aboutsummaryrefslogtreecommitdiffstats
path: root/rc.d/rc.sysinit
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2004-11-02 05:28:12 +0000
committerBill Nottingham <notting@redhat.com>2004-11-02 05:28:12 +0000
commit78c7f43364fe97c3610d5f52c8d09bdf368723c6 (patch)
treed9fa48747650cfddc5df36413801788bee3983e6 /rc.d/rc.sysinit
parent6762cc57890a685411a2cd9049dfd886384ab7d8 (diff)
downloadinitscripts-78c7f43364fe97c3610d5f52c8d09bdf368723c6.tar
initscripts-78c7f43364fe97c3610d5f52c8d09bdf368723c6.tar.gz
initscripts-78c7f43364fe97c3610d5f52c8d09bdf368723c6.tar.bz2
initscripts-78c7f43364fe97c3610d5f52c8d09bdf368723c6.tar.xz
initscripts-78c7f43364fe97c3610d5f52c8d09bdf368723c6.zip
set up raid & LVM before first fsck
Diffstat (limited to 'rc.d/rc.sysinit')
-rwxr-xr-xrc.d/rc.sysinit41
1 files changed, 21 insertions, 20 deletions
diff --git a/rc.d/rc.sysinit b/rc.d/rc.sysinit
index b74c5298..426563fb 100755
--- a/rc.d/rc.sysinit
+++ b/rc.d/rc.sysinit
@@ -216,8 +216,6 @@ echo -n $" done"
success
echo
-echo "raidautorun /dev/md0" | nash --quiet
-
# Start the graphical boot, if necessary; /usr may not be mounted yet, so we
# may have to do this again after mounting
RHGB_STARTED=0
@@ -308,6 +306,27 @@ if [ -d /proc/acpi ]; then
done
fi
+# RAID setup
+update_boot_stage RCraid
+echo "raidautorun /dev/md0" | nash --quiet
+if [ -f /etc/mdadm.conf ]; then
+ /sbin/mdadm -A -s
+fi
+
+# LVM2 initialization
+if [ -x /sbin/lvm.static ]; then
+ if ! LC_ALL=C fgrep -q "device-mapper" /proc/devices 2>/dev/null ; then
+ modprobe dm-mod >/dev/null 2>&1
+ fi
+ echo "mkdmnod" | /sbin/nash --quiet >/dev/null 2>&1
+ [ -n "$SELINUX" ] && restorecon /dev/mapper/control >/dev/null 2>&1
+ if [ -c /dev/mapper/control -a -x /sbin/lvm.static ]; then
+ if /sbin/lvm.static vgscan --mknodes --ignorelockingfailure > /dev/null 2>&1 ; then
+ action $"Setting up Logical Volume Management:" /sbin/lvm.static vgchange -a y --ignorelockingfailure
+ fi
+ fi
+fi
+
if [ -f /fastboot ] || strstr "$cmdline" fastboot ; then
fastboot=yes
fi
@@ -452,20 +471,6 @@ state=`awk '/ \/ / && ($3 !~ /rootfs/) { print $4 }' /proc/mounts`
[ "$state" != "rw" -a "$READONLY" != "yes" ] && \
action $"Remounting root filesystem in read-write mode: " mount -n -o remount,rw /
-# LVM2 initialization
-if [ -x /sbin/lvm.static ]; then
- if ! LC_ALL=C fgrep -q "device-mapper" /proc/devices 2>/dev/null ; then
- modprobe dm-mod >/dev/null 2>&1
- fi
- echo "mkdmnod" | /sbin/nash --quiet >/dev/null 2>&1
- [ -n "$SELINUX" ] && restorecon /dev/mapper/control >/dev/null 2>&1
- if [ -c /dev/mapper/control -a -x /sbin/lvm.static ]; then
- if /sbin/lvm.static vgscan --mknodes --ignorelockingfailure > /dev/null 2>&1 ; then
- action $"Setting up Logical Volume Management:" /sbin/lvm.static vgchange -a y --ignorelockingfailure
- fi
- fi
-fi
-
# Clean up SELinux labels
if [ -n "$SELINUX" ]; then
for file in /etc/mtab /etc/ld.so.cache ; do
@@ -506,10 +511,6 @@ if [ -f /etc/rc.modules ]; then
/etc/rc.modules
fi
-update_boot_stage RCraid
-if [ -f /etc/mdadm.conf ]; then
- /sbin/mdadm -A -s
-fi
_RUN_QUOTACHECK=0
# Check filesystems