On Tuesday 22 March 2016 19:05:21 Richard W.M. Jones wrote: > --- > 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
Considering commit bb5d30ab2af5720775c63179afdec3ad9efd510d, these checks (excluding the guestfs_channel one) could be moved ever earlier than there, what do you think? I'd say between the mount of the filesystems and the static nodes setup. -- Pino Toscano
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Libguestfs mailing list [email protected] https://www.redhat.com/mailman/listinfo/libguestfs
