1 diff -ur rc-scripts-0.4.12.orig/rc.d/rc.sysinit rc-scripts-0.4.12/rc.d/rc.sysinit
2 --- rc-scripts-0.4.12.orig/rc.d/rc.sysinit 2014-06-19 20:04:44.000000000 +0000
3 +++ rc-scripts-0.4.12/rc.d/rc.sysinit 2014-07-25 16:08:09.735000000 +0000
6 # mdadm - manage MD devices aka Linux Software RAID
8 - if [ ! -x /sbin/mdadm -o ! -f /etc/mdadm.conf ]; then
9 + if [ ! -x /sbin/mdadm ]; then
14 - local rc=0 golvm=0 have_md=0
15 if [ ! -f /proc/mdstat ]; then
19 - # assume we have md if at least one ARRAY line is present
20 - if grep -qE "^([[:blank:]]|)ARRAY[[:blank:]]" /etc/mdadm.conf; then
22 + if ! grep -q -E "^md.*active" /proc/mdstat; then
23 + run_cmd "Starting up RAID devices" /sbin/mdadm --assemble --scan
25 - # configured to do auto scanning
26 - if [ $have_md = 0 ] && grep -qE "^([[:blank:]]|)DEVICE[[:blank:]]partitions" /etc/mdadm.conf; then
31 - if [ $have_md = 0 ]; then
35 - show "Starting up RAID devices"; busy
36 - /sbin/mdadm --assemble --scan --auto=yes
38 - if [ "$rc" -eq 0 -o "$rc" -eq 2 ]; then
39 - # rc is used later too, so set sane value
47 - # A non-zero return means there were problems
48 - if [ $rc -gt 0 ]; then
49 - [ -e /proc/splash ] && echo "verbose" > /proc/splash
50 - show "Starting up RAID devices"; fail
52 - PS1="$(nls '(RAID Repair)# ')"; export PS1
53 - repair_shell "$(nls '*** An error occurred during the RAID startup.')"
56 - # LVM on RAID (keep in sync with LVM init)
57 - if [ "$golvm" -eq "1" ]; then
58 - if [ -x /sbin/vgscan -a -x /sbin/vgchange ]; then
59 - run_cmd "Scanning for LVM volume groups (on RAID)" /sbin/vgscan $lvmignorelocking
60 - run_cmd "Activating LVM volume groups (on RAID)" /sbin/vgchange -a y $lvmsysinit
61 - [ "$lvmversion" = "2" ] && /sbin/vgmknodes
64 - show "Starting up RAID devices"; ok
74 + if ! is_no "$MDADM"; then
78 if ! is_no "$LVM2"; then
82 [ $delay_cryptsetup = 0 ] && ok || fail
85 - if ! is_no "$MDADM"; then
91 if [ -z "$fastboot" ] && [ -z "$nofsck" ]; then