[Libguestfs] [PATCH v3 02/11] appliance: Move /proc/cmdline checks earlier.

Richard W.M. Jones rjones at redhat.com
Tue Mar 22 19:05:21 UTC 2016


---
 appliance/init | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/appliance/init b/appliance/init
index f4f6333..5d43c71 100755
--- a/appliance/init
+++ b/appliance/init
@@ -75,21 +75,6 @@ $UDEVD --daemon #--debug
 udevadm trigger
 udevadm settle --timeout=600
 
-if grep -sq selinux=1 /proc/cmdline; then
-  mount -t selinuxfs none /sys/fs/selinux
-fi
-
-# Disk optimizations.
-# Increase the SCSI timeout so we can read remote images.
-shopt -s nullglob
-for f in /sys/block/sd*/device/timeout; do echo 300 > $f; done
-# https://access.redhat.com/site/solutions/5427
-for f in /sys/block/{h,s,ub,v}d*/queue/scheduler; do echo noop > $f; done
-shopt -u nullglob
-
-# Update the system clock.
-hwclock -u -s
-
 # Parse the kernel command line.
 if grep -sq guestfs_verbose=1 /proc/cmdline; then
     guestfs_verbose=1
@@ -106,6 +91,21 @@ if grep -sq guestfs_noreboot=1 /proc/cmdline; then
 fi
 eval `grep -Eo 'guestfs_channel=[^[:space:]]+' /proc/cmdline`
 
+if grep -sq selinux=1 /proc/cmdline; then
+  mount -t selinuxfs none /sys/fs/selinux
+fi
+
+# Disk optimizations.
+# Increase the SCSI timeout so we can read remote images.
+shopt -s nullglob
+for f in /sys/block/sd*/device/timeout; do echo 300 > $f; done
+# https://access.redhat.com/site/solutions/5427
+for f in /sys/block/{h,s,ub,v}d*/queue/scheduler; do echo noop > $f; done
+shopt -u nullglob
+
+# Update the system clock.
+hwclock -u -s
+
 # Set up the network.
 ip addr add 127.0.0.1/8 brd + dev lo scope host
 ip link set dev lo up
-- 
2.7.4




More information about the Libguestfs mailing list