sys: only run mdadm if RAID devices actually exist (Closes: #572450)
authorintrigeri <intrigeri@boum.org>
Sat, 6 Mar 2010 14:27:34 +0000 (15:27 +0100)
committerintrigeri <intrigeri@boum.org>
Sat, 6 Mar 2010 14:27:34 +0000 (15:27 +0100)
ChangeLog
handlers/sys.in

index 4be58baa181002eead2ba042b7c1432678706a5e..2fbe7ed54a944e1b0e68c1204fce30e5d7428cb2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+version 0.9.8 -- UNRELEASED
+    handler changes
+       sys:
+        . Only run mdadm if RAID devices actually exist (Closes: #572450)
+
 version 0.9.7 -- January 27, 2010
     backupninja changes
         . fix bug in reportspace, thanks Dan Garthwaite
index 69751ed125978d7c2df25ea4ee0e14634252a301..a92663e23766b43c9ed26ecb4e62d21d46effc70 100755 (executable)
@@ -462,7 +462,9 @@ STATUS="Collecting Software RAID information (/etc/mdadm.conf)"
 catiffile "/etc/mdadm.conf"
 
 STATUS="Collecting Software RAID information (/sbin/mdadm -Q)"
-catifexec "/sbin/mdadm" "-Q" "--detail" '/dev/md?*'
+if ls /dev/md?* >/dev/null 2>&1; then
+   catifexec "/sbin/mdadm" "-Q" "--detail" '/dev/md?*'
+fi
 
 STATUS="Collecting Automount information (auto.master)"
 catiffile "/etc/auto.master"