aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2001-05-23 22:04:06 +0000
committerBill Nottingham <notting@redhat.com>2001-05-23 22:04:06 +0000
commiteefa2922b77418da304c899e8bea3ac00a97c6d5 (patch)
tree152c5229bf7480a582b0feaf5da96f263f2db56e
parentf705e15cac841cfbcd98d372aefca7950c19fb6b (diff)
downloadinitscripts-eefa2922b77418da304c899e8bea3ac00a97c6d5.tar
initscripts-eefa2922b77418da304c899e8bea3ac00a97c6d5.tar.gz
initscripts-eefa2922b77418da304c899e8bea3ac00a97c6d5.tar.bz2
initscripts-eefa2922b77418da304c899e8bea3ac00a97c6d5.tar.xz
initscripts-eefa2922b77418da304c899e8bea3ac00a97c6d5.zip
don't error on raid devices that are marked noauto (#41913, <hdeller@redhat.com>)
-rwxr-xr-xrc.d/rc.sysinit12
1 files 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