90mdraid: only switch mdmon to new root, if an instance is running
authorHarald Hoyer <harald@redhat.com>
Tue, 15 Sep 2009 07:27:02 +0000 (09:27 +0200)
committerHarald Hoyer <harald@redhat.com>
Tue, 15 Sep 2009 13:00:23 +0000 (15:00 +0200)
modules.d/90mdraid/mdmon-pre-pivot.sh

index b1f379f..a542313 100644 (file)
@@ -1,3 +1,5 @@
 # switch any mdmon instances to newroot
-[ -f /etc/mdadm.conf ] && /sbin/mdmon /proc/mdstat $NEWROOT
+if  pidof mdmon >/dev/null 2>&1; then
+    /sbin/mdmon /proc/mdstat $NEWROOT
+fi