diff options
author | Ville Skyttä <ville.skytta@iki.fi> | 2011-02-03 20:45:43 +0200 |
---|---|---|
committer | Bill Nottingham <notting@redhat.com> | 2011-03-01 14:13:23 -0500 |
commit | 8aba31240078aa1b4a7621715615743a73c9881f (patch) | |
tree | 3d5ebb8e48e7a167ba66ae4c8ce496aaad80d256 | |
parent | 3f296db591da779000a301b2b29560ee6df413f3 (diff) | |
download | initscripts-8aba31240078aa1b4a7621715615743a73c9881f.tar initscripts-8aba31240078aa1b4a7621715615743a73c9881f.tar.gz initscripts-8aba31240078aa1b4a7621715615743a73c9881f.tar.bz2 initscripts-8aba31240078aa1b4a7621715615743a73c9881f.tar.xz initscripts-8aba31240078aa1b4a7621715615743a73c9881f.zip |
Avoid some unnecessary stat calls.
-rwxr-xr-x | rc.d/rc.sysinit | 10 | ||||
-rwxr-xr-x | systemd/fedora-storage-init | 2 |
2 files changed, 5 insertions, 7 deletions
diff --git a/rc.d/rc.sysinit b/rc.d/rc.sysinit index 3973c444..ad2c83e5 100755 --- a/rc.d/rc.sysinit +++ b/rc.d/rc.sysinit @@ -194,7 +194,7 @@ if ! strstr "$cmdline" nodmraid && [ -x /sbin/dmraid ]; then fi # Start any MD RAID arrays that haven't been started yet -[ -r /proc/mdstat -a -r /dev/md/md-device-map ] && /sbin/mdadm -IRs +[ -r /proc/mdstat ] && [ -r /dev/md/md-device-map ] && /sbin/mdadm -IRs if [ -x /sbin/lvm ]; then action $"Setting up Logical Volume Management:" /sbin/lvm vgchange -a y --sysinit @@ -204,7 +204,7 @@ if [ -f /etc/crypttab ]; then init_crypto 0 fi -if [ -f /fastboot ] || strstr "$cmdline" fastboot ; then +if strstr "$cmdline" fastboot || [ -f /fastboot ]; then fastboot=yes fi @@ -212,7 +212,7 @@ if [ -f /fsckoptions ]; then fsckoptions=$(cat /fsckoptions) fi -if [ -f /forcefsck ] || strstr "$cmdline" forcefsck ; then +if strstr "$cmdline" forcefsck || [ -f /forcefsck ]; then fsckoptions="-f $fsckoptions" elif [ -f /.autofsck ]; then [ -f /etc/sysconfig/autofsck ] && . /etc/sysconfig/autofsck @@ -632,14 +632,12 @@ fi /bin/mount -t binfmt_misc none /proc/sys/fs/binfmt_misc > /dev/null 2>&1 # Boot time profiles. Yes, this should be somewhere else. -if [ -x /usr/sbin/system-config-network-cmd ]; then - if strstr "$cmdline" netprofile= ; then +if strstr "$cmdline" netprofile= && [ -x /usr/sbin/system-config-network-cmd ]; then for arg in $cmdline ; do if [ "${arg##netprofile=}" != "${arg}" ]; then /usr/sbin/system-config-network-cmd --profile ${arg##netprofile=} fi done - fi fi # Now that we have all of our basic modules loaded and the kernel going, diff --git a/systemd/fedora-storage-init b/systemd/fedora-storage-init index b01a4657..7f439bd9 100755 --- a/systemd/fedora-storage-init +++ b/systemd/fedora-storage-init @@ -31,7 +31,7 @@ if ! strstr "$cmdline" nodmraid && [ -x /sbin/dmraid ]; then fi # Start any MD RAID arrays that haven't been started yet -[ -r /proc/mdstat -a -r /dev/md/md-device-map ] && /sbin/mdadm -IRs +[ -r /proc/mdstat ] && [ -r /dev/md/md-device-map ] && /sbin/mdadm -IRs if [ -x /sbin/lvm ]; then action $"Setting up Logical Volume Management:" /sbin/lvm vgchange -a y --sysinit |