diff -u Downloads/init.d/mdadm /etc/init.d/mdadm --- Downloads/init.d/mdadm 2014-11-29 10:14:32.234168917 -0700 +++ /etc/init.d/mdadm 2014-11-28 23:48:13.288275633 -0700 @@ -62,6 +62,10 @@ log_end_msg $? set -e fi + for file in $RUNDIR/md[0-9]*.pid ; do + [ ! -f "$file" ] && continue + ln -sf $file /run/sendsigs.omit.d/mdmon-${file##*/} + done ;; stop) if [ -f $PIDFILE ] ; then diff -u Downloads/init.d/umountroot /etc/init.d/umountroot --- Downloads/init.d/umountroot 2014-03-12 19:33:14.000000000 -0600 +++ /etc/init.d/umountroot 2014-11-29 00:01:01.917073708 -0700 @@ -14,6 +14,17 @@ . /lib/lsb/init-functions +##added to prevent resync of raid on clean reboot +check_raid() { + log_action_begin_msg “Checking RAIDs ” + if mdadm --wait-clean --scan ; then + log_action_end_msg 0 + else + log_action_end_msg 1 + fi +} + + do_stop () { [ "$VERBOSE" = no ] || log_action_begin_msg "Mounting root filesystem read-only" # Ask init to re-exec itself before we go down if it has been @@ -66,7 +77,9 @@ exit 3 ;; stop) + check_raid do_stop + check_raid ;; *) echo "Usage: $0 start|stop" >&2