Bug#384222: mdadm: Fails to parse mdadm.conf on upgrade

martin f krafft madduck at debian.org
Tue Aug 22 20:13:32 UTC 2006


also sprach Gabor Gombas <gombasg at sztaki.hu> [2006.08.22.1952 +0100]:
> But md0 _is_ listed in mdadm.conf.  Maybe the postinst script is
> confused by the multi-line syntax?

Good spot. Could you please apply the following patch and run
dpkg-reconfigure to verify it now works (just copy-paste into
a root-shell should work):

patch /var/lib/dpkg/info/mdadm.config <<_eof
Index: mdadm.config
===================================================================
--- mdadm.config  (revision 127)
+++ mdadm.config  (working copy)
@@ -111,10 +111,10 @@
         fi
         
         if [ -f $CONFIG ]; then
-          if ! egrep -q "^ARRAY[[:space:]]+$i[[:space:]]+" $CONFIG; then
+          if ! egrep -q "^ARRAY[[:space:]]+$i([[:space:]]+|$)" $CONFIG; then
             t="$(readlink -nf "$i")"
             if [ -L "$i" ] \
-                && egrep -q "^ARRAY[[:space:]]+$t[[:space:]]+" $CONFIG; then
+                && egrep -q "^ARRAY[[:space:]]+$t([[:space:]]|$)+" $CONFIG; then
               i="$t"
             else
               db_subst mdadm/initrdstart_notinconf array "$i"
_eof
dpkg-reconfigure mdadm


Thanks,

-- 
 .''`.     martin f. krafft <madduck at debian.org>
: :'  :    proud Debian developer, author, administrator, and user
`. `'`     http://people.debian.org/~madduck http://debiansystem.info
  `-  Debian - when you have better things to do than fixing systems
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature (GPG/PGP)
Url : http://lists.alioth.debian.org/pipermail/pkg-mdadm-devel/attachments/20060822/4866c1d0/attachment.pgp


More information about the pkg-mdadm-devel mailing list