config_swraid: use mkconf for generation of mdadm.conf
authorMichael Prokop <mika@grml.org>
Tue, 7 Nov 2006 11:30:30 +0000 (12:30 +0100)
committerMichael Prokop <mika@grml.org>
Tue, 7 Nov 2006 11:30:30 +0000 (12:30 +0100)
autoconfig.functions
debian/changelog

index f8af3db..aa85c08 100755 (executable)
@@ -2001,6 +2001,14 @@ config_swraid(){
        eerror "mdadm not available, can not execute it." ; eend 1
     else
 
+       if ! grep -q ARRAY /etc/mdadm/mdadm.conf 2>>$DEBUG ; then
+         einfo "Creating /etc/mdadm/mdadm.conf"
+         [ -r /etc/mdadm/mdadm.conf ] && mv /etc/mdadm/mdadm.conf /etc/mdadm/mdadm.conf.old
+         /usr/share/mdadm/mkconf > /etc/mdadm/mdadm.conf ; eend $?
+       else
+         ewarn "/etc/mdadm/mdadm.conf looks like a configured mdadm setup, will not touch it." ; eend 0
+       fi
+
        einfo "Searching for software RAID arrays (disable via bootoption noraid):"
        eindent
          IFSOLD=${IFS:-}
index 90e9806..3736ff6 100644 (file)
@@ -1,3 +1,9 @@
+grml-autoconfig (0.5-22) unstable; urgency=low
+
+  * config_swraid: use mkconf for generation of mdadm.conf
+
+ -- Michael Prokop <mika@grml.org>  Tue,  7 Nov 2006 12:30:09 +0100
+
 grml-autoconfig (0.5-21) unstable; urgency=low
 
   * grml-bootsplash: replace the clear command with