containers="$containers $md"
continue
fi
- mdadm $_offroot -S "$md" >/dev/null 2>&1 || need_shutdown
+ mdadm $_offroot -S "$md" >/dev/null 2>&1
done
for md in $containers; do
- mdadm $_offroot -S "$md" >/dev/null 2>&1 || need_shutdown
+ mdadm $_offroot -S "$md" >/dev/null 2>&1
done
unset containers udevinfo _offroot
--- /dev/null
+#!/bin/sh
+# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
+# ex: ts=8 sw=4 sts=4 et filetype=sh
+
+type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh
+
+for md in /dev/md[0-9_]*; do
+ [ -b "$md" ] || continue
+ need_shutdown
+ break
+done
inst_hook pre-udev 30 "$moddir/mdmon-pre-udev.sh"
inst_hook pre-trigger 30 "$moddir/parse-md.sh"
inst_hook pre-mount 10 "$moddir/mdraid-waitclean.sh"
+ inst_hook cleanup 99 "$moddir/mdraid-needshutdown.sh"
inst_hook shutdown 30 "$moddir/md-shutdown.sh"
inst_script "$moddir/mdraid-cleanup.sh" /sbin/mdraid-cleanup
inst_script "$moddir/mdraid_start.sh" /sbin/mdraid_start