[Libguestfs] [PATCH 1/2] appliance: Create tmpfiles before running udev.

Richard W.M. Jones rjones at redhat.com
Thu Nov 20 13:09:39 UTC 2014


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




More information about the Libguestfs mailing list