Richard W.M. Jones
2014-Nov-20 13:09 UTC
[Libguestfs] [PATCH 0/2] appliance: When running systemd-tmpfiles, pass --boot
https://bugzilla.redhat.com/show_bug.cgi?id=1165785 Since the --boot option is relatively new (added 2013-12), I suspect this will break older versions of systemd. However it should be fine for all currently supported versions of Fedora. Rich.
Richard W.M. Jones
2014-Nov-20 13:09 UTC
[Libguestfs] [PATCH 1/2] appliance: Create tmpfiles before running udev.
This is the same order as systemd would run them. --- appliance/init | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/appliance/init b/appliance/init index 3d704ba..7a16d7d 100755 --- a/appliance/init +++ b/appliance/init @@ -41,6 +41,15 @@ ln -s ../run/lock /var/lock # devtmpfs is required since udev 176 mount -t devtmpfs /dev /dev +# Static nodes must happen before udev is started. + +# Set up kmod static-nodes (RHBZ#1011907). +mkdir -p /run/tmpfiles.d +kmod static-nodes --format=tmpfiles --output=/run/tmpfiles.d/kmod.conf + +# Set up tmpfiles (must run after kmod.conf is created above). +systemd-tmpfiles --prefix=/dev --create + # Find udevd and run it directly. for f in /sbin/udevd /lib/udev/udevd \ /lib/systemd/systemd-udevd /usr/lib/systemd/systemd-udevd \ @@ -59,13 +68,6 @@ if grep -sq selinux=1 /proc/cmdline; then mount -t selinuxfs none /sys/fs/selinux fi -# Set up kmod static-nodes (RHBZ#1011907). -mkdir -p /run/tmpfiles.d -kmod static-nodes --format=tmpfiles --output=/run/tmpfiles.d/kmod.conf - -# Set up tmpfiles (must run after kmod.conf is created above). -systemd-tmpfiles --prefix=/dev --create - # Disk optimizations. # Increase the SCSI timeout so we can read remote images. for f in /sys/block/sd*/device/timeout; do echo 300 > $f; done -- 2.1.0
Richard W.M. Jones
2014-Nov-20 13:09 UTC
[Libguestfs] [PATCH 2/2] appliance: When running systemd-tmpfiles, pass --boot option (RHBZ#1165785).
This causes all tmpfiles to be created. --- appliance/init | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appliance/init b/appliance/init index 7a16d7d..f4656fb 100755 --- a/appliance/init +++ b/appliance/init @@ -48,7 +48,7 @@ mkdir -p /run/tmpfiles.d kmod static-nodes --format=tmpfiles --output=/run/tmpfiles.d/kmod.conf # Set up tmpfiles (must run after kmod.conf is created above). -systemd-tmpfiles --prefix=/dev --create +systemd-tmpfiles --prefix=/dev --create --boot # Find udevd and run it directly. for f in /sbin/udevd /lib/udev/udevd \ -- 2.1.0
Reasonably Related Threads
- [PATCH] appliance: run systemd-tmpfiles also for /var/run
- [PATCH v2 0/4] Improve LVM handling in the appliance
- [PATCH 5/5] appliance: run systemd-tmpfiles also for /run
- [PATCH 4/4] appliance: run systemd-tmpfiles also for /run
- [PATCH 0/5] Improve LVM handling in the appliance