r158 - mdadm/trunk/debian/initramfs

madduck at users.alioth.debian.org madduck at users.alioth.debian.org
Mon Sep 11 16:33:50 UTC 2006


Author: madduck
Date: 2006-09-11 16:33:50 +0000 (Mon, 11 Sep 2006)
New Revision: 158

Modified:
   mdadm/trunk/debian/initramfs/hook
Log:
handle situation when mdadm.conf does not specify the level

Modified: mdadm/trunk/debian/initramfs/hook
===================================================================
--- mdadm/trunk/debian/initramfs/hook	2006-09-08 08:34:09 UTC (rev 157)
+++ mdadm/trunk/debian/initramfs/hook	2006-09-11 16:33:50 UTC (rev 158)
@@ -149,7 +149,14 @@
           (*) :;;
         esac
       done
-      [ -n "${dev:-}" ] && echo -n "${dev}:${level} "
+      [ -n "${dev:-}" ] || continue
+      echo -n "${dev}:"
+      if [ -n "${level:-}" ]; then
+        echo -n "$level"
+      else
+        echo -n "$($MDADM --detail $dev | sed -rne 's,[[:space:]]+Raid Level : ,,p')"
+      fi
+      echo -n ' '
     done < $DESTMDADMCONF)"
 fi
 




More information about the pkg-mdadm-commits mailing list