Go to file
Dustin e2f9cc7a3a container: Symlink /etc/{passwd,group} to /host
When `tmpl` runs `systemd-sysusers` after generating the `sysusers.d`
file for NUT, the `/etc/passwd` and `/etc/group` files on the host are
created anew and replaced, which "breaks" the bind mount.  Since new
files are put in their place, the container and the host no longer see
the same files.  We can work around this by using a symbolic link for
each file, pointing to the respective file in the `/host` directory
(which is the host's `/` directory bind mounted into the container's
namespace).  Since the symlinks follow the file by name rather than
inode, the container's view is always in sync with the host's.
2024-01-14 19:24:55 -06:00
app/nut Initial commit 2024-01-14 19:24:55 -06:00
host Initial commit 2024-01-14 19:24:55 -06:00
pkg nut: Pass explicit path to systemd-sysusers 2024-01-14 19:24:55 -06:00
templates/nut Initial commit 2024-01-14 19:24:55 -06:00
.editorconfig Initial commit 2024-01-14 19:24:55 -06:00
.gitignore Initial commit 2024-01-14 19:24:55 -06:00
Containerfile container: Symlink /etc/{passwd,group} to /host 2024-01-14 19:24:55 -06:00
config.sh Add Containerfile 2024-01-14 19:24:55 -06:00
kcl.mod Initial commit 2024-01-14 19:24:55 -06:00
kcl.mod.lock Initial commit 2024-01-14 19:24:55 -06:00
nsenter.sh Add Containerfile 2024-01-14 19:24:55 -06:00