Create subvolumes in init-storage
It turns out that we cannot use `systemd-tmpfiles` to create our Btrfs subvolumes. Since the directories we are interested in, specifically `/var/log` and `/var/tmp` already exist in the rootfs image and are therefore copied into the mutable filesystem, `systemd-tmpfiles` ignores them. To avoid having to explicitly specify the SELinux context for each subvolume created on the persistent filesystem, `init-storage` now executes `setfiles` to set the appropriate labels.
This commit is contained in:
@@ -68,7 +68,6 @@ if [ -f /mnt/gentoo/etc/udev/hwdb.bin ]; then
|
||||
fi
|
||||
|
||||
rm -f /mnt/gentoo/lib/tmpfiles.d/provision.conf
|
||||
sed -i 's:d /var/log :v /var/log :' /mnt/gentoo/lib/tmpfiles.d/var.conf
|
||||
systemd-tmpfiles --root=/mnt/gentoo -E --exclude-prefix=/var --create
|
||||
|
||||
systemctl preset-all --root=/mnt/gentoo
|
||||
|
||||
Reference in New Issue
Block a user