From eefa2922b77418da304c899e8bea3ac00a97c6d5 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Wed, 23 May 2001 22:04:06 +0000 Subject: don't error on raid devices that are marked noauto (#41913, ) --- rc.d/rc.sysinit | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/rc.d/rc.sysinit b/rc.d/rc.sysinit index f2f62d55..bcffb781 100755 --- a/rc.d/rc.sysinit +++ b/rc.d/rc.sysinit @@ -431,11 +431,19 @@ if [ -f /proc/mdstat -a -f /etc/raidtab ]; then RAIDDEV=`basename $i` RAIDSTAT=`grep "^$RAIDDEV : active" /proc/mdstat` if [ -z "$RAIDSTAT" ]; then - # Try raidstart first...if that fails then + # First scan the /etc/fstab for the "noauto"-flag + # for this device. If found, skip the initialization + # for it to avoid dropping to a shell on errors. + # If not, try raidstart...if that fails then # fall back to raidadd, raidrun. If that # also fails, then we drop to a shell RESULT=1 - if [ -x /sbin/raidstart ]; then + NOAUTO=`grep "^$i" /etc/fstab | grep -c "noauto"` + if [ $NOAUTO -gt 0 ]; then + RESULT=0 + RAIDDEV="$RAIDDEV(skipped)" + fi + if [ $RESULT -gt 0 -a -x /sbin/raidstart ]; then /sbin/raidstart $i RESULT=$? fi -- cgit