martin f. krafft: Fix mdadm.conf check for know arrays

Martin F. Krafft madduck at alioth.debian.org
Wed Apr 29 09:13:23 UTC 2009


Module: mdadm
Branch: build
Commit: b9ef26c1cee6d2836f7bad1c39c1bef9517ae4ba
URL:    http://git.debian.org/?p=pkg-mdadm/mdadm.git;a=commit;h=b9ef26c1cee6d2836f7bad1c39c1bef9517ae4ba

Author: martin f. krafft <madduck at debian.org>
Date:   Sun Apr 26 16:11:03 2009 +0200

Fix mdadm.conf check for know arrays

Fix the check whether mdadm.conf defines all devices known to the system: we
were checking against $devs earlier, which is only those devices required to
boot; $devpairs has them all.

Thanks Cristian Ionescu-Idbohrn.

Debian bug: 525655

Signed-off-by: martin f. krafft <madduck at debian.org>

---

 debian/changelog      |    7 +++++++
 debian/initramfs/hook |    8 ++++----
 2 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index de0fd65..4f7d715 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+mdadm (2.6.9-2) unstable; urgency=low
+
+  * Fix the check of whether mdadm.conf defines all devices known to the
+    system; thanks Cristian Ionescu-Idbohrn (closes: #525655).
+
+ -- martin f. krafft <madduck at debian.org>  Sun, 26 Apr 2009 16:08:28 +0200
+
 mdadm (2.6.9-1) unstable; urgency=low
 
   * New upstream release.
diff --git a/debian/initramfs/hook b/debian/initramfs/hook
index 93ca081..a24c480 100644
--- a/debian/initramfs/hook
+++ b/debian/initramfs/hook
@@ -24,7 +24,7 @@ is_true()
 {
   case "${1:-}" in
     [Yy]es|[Yy]|1|[Tt]rue|[Tt]) return 0;;
-    *) return 1;
+    *) return 1;;
   esac
 }
 
@@ -234,9 +234,9 @@ if [ "$INITRDSTART" != none ] && [ -n "$devpairs" ]; then
   # see if /etc/mdadm/mdadm.conf looks like it's missing devices
   if [ -x $MDADM ]; then
     $MDADM --detail --scan | while read array device rubbish; do
-      if ! echo $devs | grep -qw $device; then
-        warn "You appear to be missing $device from /etc/mdadm/mdadm.conf"
-        warn "If this is required to boot you must add this line:"
+      if ! echo $devpairs | grep -qw $device; then
+        warn "You appear to be missing $device from /etc/mdadm/mdadm.conf !"
+        warn "If this array is required to boot, you must add the following line:"
         rubbish=`echo $rubbish | sed 's/metadata=[^ ]* //'`
         warn "$array $device $rubbish"
       fi




More information about the pkg-mdadm-commits mailing list