> Package: aoetools
> Version: 30-3
> Severity: wishlist
> Tags: patch
> 
> The attached patches allows init script to assemble RAID arrays
> from AOE components.

        Thanks very much for your patch, Gabor.  I had to change it a little 
because it
has a couple of bugs:

> --- aoetools.dist-orig        2009-09-06 01:08:23.000000000 +0200
> +++ aoetools  2010-12-08 10:15:05.149207916 +0100
> [...]
> 
> +    if [ -n "$RAID_ARRAYS" ]
> +    then
> +     echo "Assembling RAID arrays..."
> +     for md in "$RAID_ARRAYS"
> 

        If you use a quoted string, then you won't see the spaces in it.  So 
something like

RAID_ARRAYS="md0 md1"

would be rendered as

/sbin/mdadm --assemble md0 md1 --scan

        I guess that you didn't catch this bug because you only used one RAID 
unit and
not multiple ones.

> @@ -151,6 +168,15 @@
>          done
>      fi
>  
> +    if [ -x /sbin/mdadm -a -n "$RAID_ARRAYS" ]
> +    then
> +     echo "Stopping RAID arrays..."
> +     for md in "$RAID_ARRAYS"

        Same here.  The -n check is fine, but the for will need an unquoted 
string to
allow multi-word expansion.

        I'm preparing a new release 36-1 with this patch.  Thanks a lot for your
contribution, and sorry for the radio silence all this time.  You rock!


                Ender.

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to