]> git.pld-linux.org Git - projects/rc-scripts.git/blobdiff - rc.d/rc.shutdown
Uh, for readability sake leave else and drop exit.
[projects/rc-scripts.git] / rc.d / rc.shutdown
index 31baf75d8f24cec2fb85f0819f095c241b50fdca..b374bc92164b335ee9eedf6fc27dd888291c3854 100755 (executable)
@@ -4,7 +4,6 @@
 #
 # Author:      Miquel van Smoorenburg, <miquels@drinkel.nl.mugnet.org>
 #
-# $Id$
 
 # Set the path.
 PATH=/sbin:/bin:/usr/bin:/usr/sbin
@@ -129,31 +128,13 @@ if ! is_yes "$VSERVER"; then
                /sbin/vgchange -a n $lvmsysinit > /dev/null 2>&1
        fi
 
-       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
                        /sbin/mdadm --stop --scan > /dev/null 2>&1
                        rc=$?
-                       [ "$rc" -eq 0 ] && goraidtab=0
                fi
        fi
 
-       # turn off raid
-       if [ -x /sbin/raidstop -a -f /etc/raidtab -a "$goraidtab" -eq 1 ]; then
-               # we can not use raidstop -a here because this will only stop
-               # devices listed in the default config file which is not always
-               # the case. So we look only for the active raid devices
-               if [ -f /proc/mdstat ] ; then
-                       mddevs=$(awk '/^md.* active/ {print $1}' /proc/mdstat)
-                       for mddev in $mddevs ; do
-                               show "Turning off RAID for %s" "$mddev"
-                               daemon /sbin/raidstop /dev/$mddev
-                       done
-                       unset mddev mddevs
-               fi
-               # runcmd "Turning off RAID" /sbin/raidstop -a
-       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
                ok
@@ -190,7 +171,7 @@ if [ "$runlevel" = "0" ] ; then
                       [ -x /sbin/poweroff-ups ] && /sbin/poweroff-ups
               fi
        fi
-       [ "$previous" != "unknown" ] && eval halt -d -p -f
+       [ "$previous" != "unknown" ] && halt -d -p -f
 else
        show "Please stand by while rebooting the $_rebootwhat"; ok
        if [ -f /fastboot ]; then
@@ -207,5 +188,5 @@ else
                fail
        fi
 
-       [ "$previous" != "unknown" ] && eval reboot -d -f
+       [ "$previous" != "unknown" ] && reboot -d -f
 fi
This page took 0.045954 seconds and 4 git commands to generate.