tag 525655 confirmed pending thanks also sprach Cristian Ionescu-Idbohrn <cristian.ionescu-idbo...@axis.com> [2009.04.26.1329 +0200]: > Got warnings like this: > > W: mdadm: You appear to be missing /dev/md1 from /etc/mdadm/mdadm.conf > W: mdadm: If this is required to boot you must add this line: > W: mdadm: ARRAY /dev/md1 level=raid1 num-devices=2 > UUID=e28345e7:cf40379b:3407723407727f:ebf0f0b0 > > on all md-devices except the md0 boot device, but there doesn't seem > to be anything wrong with my /etc/mdadm/mdadm.conf, AFAICS. I believe > i found a few bugs in /usr/share/initramfs-tools/hooks/mdadm. See > attached patch (mdadm-hook.1.patch). > > Hunk 4 corrects the real bug.
Thanks, fixed. More comments inline with the hunks: > --- /usr/share/initramfs-tools/hooks/mdadm 2009-04-25 19:57:49.000000000 > +0200 > +++ mdadm.1 2009-04-26 12:56:39.000000000 +0200 > @@ -24,7 +24,7 @@ > { > case "${1:-}" in > [Yy]es|[Yy]|1|[Tt]rue|[Tt]) return 0;; > - *) return 1; > + *) return 1;; > esac > } > Good spot! Fixed. > @@ -179,7 +179,7 @@ > exit 0 > else > # obtain dev:level pairs from config file, honouring multiline entries > - devpairs="$( > + devpairs=$( > while read line; do > case "$line" in > (ARRAY*) :;; > @@ -207,7 +207,7 @@ > echo -n "$($MDADM --detail $dev | sed -rne 's,[[:space:]]+Raid Level > : ,,p')" > fi > echo -n ' ' > - done < $DESTMDADMCONF)" || exit $? > + done < $DESTMDADMCONF) || exit $? > fi Not a bug. Inside $(), I can use "" without quoting them again. That's one of the great things about $() over ``. > --- mdadm.1 2009-04-26 12:56:39.000000000 +0200 > +++ mdadm.2 2009-04-26 12:54:29.000000000 +0200 > @@ -6,14 +6,14 @@ > # > set -eu > > -PREREQ="" > +PREREQ= > I don't see the real difference. > -case ${1:-} in > +case "${1:-}" in Okay, done > write() > { > - local PREFIX; PREFIX=$1; shift > + local PREFIX=$1; shift > echo "${PREFIX}: mdadm: $@" >&2 > } I saw that policy now allows this, but then again, there's not really any benefit, so I'll leave it for now. > @@ -218,7 +218,7 @@ > if [ "$INITRDSTART" != none ] && [ -n "$devpairs" ]; then > echo "MD_DEVPAIRS='${devpairs% }'" >> $DESTCONFIG > > - devs=''; levels='' > + devs=; levels= See above; no difference that I can make out. > @@ -295,7 +295,7 @@ > fi > > # only output this on Debian systems > -[ -s /etc/default/mdadm ] && \ > +[ -s /etc/default/mdadm ] && > info 'use `dpkg-reconfigure --priority=low mdadm` to change this.' I don't need the backslash, but it's not wrong either. Thus I am leaving it. Thanks for your feedback. New version pending. -- .''`. martin f. krafft <madd...@d.o> Related projects: : :' : proud Debian developer http://debiansystem.info `. `'` http://people.debian.org/~madduck http://vcs-pkg.org `- Debian - when you have better things to do than fixing systems "writing a book is like washing an elephant: there no good place to begin or end, and it's hard to keep track of what you've already covered." -- anonymous
digital_signature_gpg.asc
Description: Digital signature (see http://martin-krafft.net/gpg/)