]> git.pld-linux.org Git - projects/rc-scripts.git/commitdiff
drop raidutils (raidstart, /etc/raidtab) support. our geninitrd doesn't support it...
authorElan Ruusamäe <glen@pld-linux.org>
Thu, 30 May 2013 20:44:04 +0000 (20:44 +0000)
committerElan Ruusamäe <glen@pld-linux.org>
Thu, 30 May 2013 20:44:04 +0000 (20:44 +0000)
svn-id: @12679

rc.d/rc.shutdown
rc.d/rc.sysinit

index 31baf75d8f24cec2fb85f0819f095c241b50fdca..e1c4045f9ce18d7d5bc0ed7bd999da036c2c31c9 100755 (executable)
@@ -129,31 +129,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
index b503846a4f754a215907035d623fe6fae7b9a0c7..e06b3e5de5d44b6867e5cdd6fb4d6f3d9bd5eccb 100755 (executable)
@@ -713,10 +713,9 @@ if ! is_yes "$VSERVER"; then
        fi
 
        # Add raid devices
-       if [ -x /sbin/mdadm -a -f /etc/mdadm.conf ] || [ -f /etc/raidtab ]; then
+       if [ -x /sbin/mdadm -a -f /etc/mdadm.conf ]; then
                modprobe -s md
                if [ -f /proc/mdstat ]; then
-                       goraidtab=1
                        golvm=0
                        rc=0
                        if [ -x /sbin/mdadm -a -f /etc/mdadm.conf ]; then
@@ -728,7 +727,6 @@ if ! is_yes "$VSERVER"; then
                                                # rc is used later, too so set sane value
                                                rc=0
                                                deltext; ok
-                                               goraidtab=0
                                                golvm=1
                                        else
                                                deltext; fail
@@ -737,43 +735,6 @@ if ! is_yes "$VSERVER"; then
                                fi
                        fi
 
-                       if [ -f /etc/raidtab -a "$goraidtab" -eq 1 ]; then
-                               for i in $(awk '!/^#/ && /raiddev/{print $2}' /etc/raidtab 2>/dev/null); do
-                                       golvm=1
-                                       RAIDDEV=$(basename $i)
-                                       RAIDSTAT=$(grep "^$RAIDDEV : active" /proc/mdstat 2>/dev/null)
-                                       show "Starting up RAID device %s" $RAIDDEV
-                                       busy
-                                       if [ -z "$RAIDSTAT" ]; then
-                                               # Try raidstart first...if that fails then
-                                               # fall back to raid0run and if that fails too
-                                               # fall back to raidadd, raidrun.
-                                               RESULT=1
-                                               if [ -x /sbin/raidstart ]; then
-                                                       /sbin/raidstart $i
-                                                       RESULT=$?
-                                               fi
-                                               if [ $RESULT -gt 0 -a -x /sbin/raid0run ]; then
-                                                       /sbin/raid0run $i
-                                                       RESULT=$?
-                                               fi
-                                               if [ $RESULT -gt 0 -a -x /sbin/raidadd -a -x /sbin/raidrun ]; then
-                                                       /sbin/raidadd $i
-                                                       /sbin/raidrun $i
-                                                       RESULT=$?
-                                               fi
-                                               if [ $RESULT -gt 0 ]; then
-                                                       rc=1
-                                                       fail
-                                               else
-                                                       ok
-                                               fi
-                                       else
-                                               ok
-                                       fi
-                               done
-                       fi
-
                        # A non-zero return means there were problems
                        if [ $rc -gt 0 ]; then
                                [ -e /proc/splash ] && echo "verbose" > /proc/splash
This page took 0.257046 seconds and 4 git commands to generate.