diff options
author | Cristian Gafton <gafton@redhat.com> | 1999-02-13 23:23:44 +0000 |
---|---|---|
committer | Cristian Gafton <gafton@redhat.com> | 1999-02-13 23:23:44 +0000 |
commit | 1c0967c9cd6948f410c14a691d28e2dd5d0ffdf0 (patch) | |
tree | 8bd38d9aa5a05717d30eaea924cc0b8469b68963 | |
parent | c3e310951a711de4fdb82650148e8e13b3d0f17a (diff) | |
download | initscripts-1c0967c9cd6948f410c14a691d28e2dd5d0ffdf0.tar initscripts-1c0967c9cd6948f410c14a691d28e2dd5d0ffdf0.tar.gz initscripts-1c0967c9cd6948f410c14a691d28e2dd5d0ffdf0.tar.bz2 initscripts-1c0967c9cd6948f410c14a691d28e2dd5d0ffdf0.tar.xz initscripts-1c0967c9cd6948f410c14a691d28e2dd5d0ffdf0.zip |
Attempt a fix for the raid stop code
-rwxr-xr-x | rc.d/init.d/halt | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/rc.d/init.d/halt b/rc.d/init.d/halt index 198767c0..02621122 100755 --- a/rc.d/init.d/halt +++ b/rc.d/init.d/halt @@ -58,7 +58,17 @@ mount -n -o remount,ro / # turn off raid if [ -x /sbin/raidstop -a -f /etc/raidtab ]; then - runcmd "Turning off RAID" /sbin/raidstop -a + # 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=$(grep ^md /proc/mdstat | awk '{ print $1 }') + for mddev in $mddevs ; do + runcmd "Turning off RAID for $mddev" raidstop /dev/$mddev + done + unset mddev mddevs + fi + #runcmd "Turning off RAID" /sbin/raidstop -a fi # Remount read only anything that's left mounted. |