aboutsummaryrefslogtreecommitdiffstats
path: root/rc.d/rc.sysinit
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2003-01-14 04:01:59 +0000
committerBill Nottingham <notting@redhat.com>2003-01-14 04:01:59 +0000
commit543fcf9777958e648acf0cd25027523fc3bcd974 (patch)
tree74e0c27ef226e96f0b5f58742d1d0b897679eb90 /rc.d/rc.sysinit
parent48a8e2b917a881923c732a13cb2fd9ff14931d3e (diff)
downloadinitscripts-543fcf9777958e648acf0cd25027523fc3bcd974.tar
initscripts-543fcf9777958e648acf0cd25027523fc3bcd974.tar.gz
initscripts-543fcf9777958e648acf0cd25027523fc3bcd974.tar.bz2
initscripts-543fcf9777958e648acf0cd25027523fc3bcd974.tar.xz
initscripts-543fcf9777958e648acf0cd25027523fc3bcd974.zip
fix raidtab parsing, don't worry about not-in-fstab RAID devices
(#71087, #78467, <aja@mit.edu>)
Diffstat (limited to 'rc.d/rc.sysinit')
-rwxr-xr-xrc.d/rc.sysinit7
1 files changed, 6 insertions, 1 deletions
diff --git a/rc.d/rc.sysinit b/rc.d/rc.sysinit
index c6ef5d90..31c867a6 100755
--- a/rc.d/rc.sysinit
+++ b/rc.d/rc.sysinit
@@ -420,7 +420,7 @@ if [ -f /etc/raidtab -a -f /proc/mdstat ]; then
rc=0
- for i in `grep "^[^*]*raiddev" /etc/raidtab | awk '{print $2}'`
+ for i in `awk '{if ($1=="raiddev") print $2}' /etc/raidtab`
do
RAIDDEV=`basename $i`
RAIDSTAT=`grep "^$RAIDDEV : active" /proc/mdstat`
@@ -432,6 +432,11 @@ if [ -f /etc/raidtab -a -f /proc/mdstat ]; then
# fall back to raidadd, raidrun. If that
# also fails, then we drop to a shell
RESULT=1
+ INFSTAB=`LC_ALL=C grep -c "^$i" /etc/fstab`
+ if [ $INFSTAB -eq 0 ] ; then
+ RESULT=0
+ RAIDDEV="$RAIDDEV(skipped)"
+ fi
NOAUTO=`grep "^$i" /etc/fstab | grep -c "noauto"`
if [ $NOAUTO -gt 0 ]; then
RESULT=0