Author: glen
Date: Mon Mar 16 12:27:42 2009
New Revision: 10213

Modified:
   rc-scripts/trunk/rc.d/rc.shutdown
Log:
- remove unneeded subshells

Modified: rc-scripts/trunk/rc.d/rc.shutdown
==============================================================================
--- rc-scripts/trunk/rc.d/rc.shutdown   (original)
+++ rc-scripts/trunk/rc.d/rc.shutdown   Mon Mar 16 12:27:42 2009
@@ -119,7 +119,7 @@
 
        goraidtab=1
        if [ -x /sbin/mdadm -a -f /etc/mdadm.conf ]; then
-               if (grep -qE "^([[:blank:]]|)ARRAY[[:blank:]]" /etc/mdadm.conf 
2>/dev/null); then
+               if grep -qE "^([[:blank:]]|)ARRAY[[:blank:]]" /etc/mdadm.conf 
2>/dev/null; then
                        /sbin/mdadm --stop --scan > /dev/null 2>&1
                        rc=$?
                        [ "$rc" -eq 0 ] && goraidtab=0
@@ -143,9 +143,7 @@
        fi
 
        show "Remounting remaining filesystems ro mode"; busy
-       if ( mount | awk '/ext2|ext3|reiserfs|xfs|jfs/ { print $3 }' | \
-               while read line; do
-               mount -n -o ro,remount $line; done ); then
+       if mount | awk '/ext2|ext3|reiserfs|xfs|jfs/ { print $3 }' | while read 
line; do mount -n -o ro,remount $line; done; then
                ok
        else
                fail
@@ -164,7 +162,9 @@
 
 if [ "$runlevel" = "0" ] ; then
        show "The $_rebootwhat is halted"; ok
-       [ -f /fastboot ] && (show "On the next boot fsck will be skipped."; ok)
+       if [ -f /fastboot ]; then
+               show "On the next boot fsck will be skipped."; ok
+       fi
 
        if [ -f /etc/killpower -a -f /etc/sysconfig/ups ] ; then
                . /etc/sysconfig/ups
@@ -181,7 +181,9 @@
        [ "$previous" != "unknown" ] && eval halt -d -p -f
 else
        show "Please stand by while rebooting the $_rebootwhat"; ok
-       [ -f /fastboot ] && (show "On the next boot fsck will be skipped."; ok)
+       if [ -f /fastboot ]; then
+               show "On the next boot fsck will be skipped."; ok
+       fi
        [ -x /sbin/kexec ] && /sbin/kexec -e
        [ "$previous" != "unknown" ] && eval reboot -d -f
 fi
_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to