[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#816406: mdadm mkconf doesn't parse mdadm.conf correctly(whitespace)



Hi Adam,

> /usr/share/mdadm/mkconf attempts to read DEVICE out of
> /etc/mdadm/mdadm.conf, using sed.  It does this, with a simple regex,
> "s/^DEVICE //p". This is not valid.

Doesn't mkconf merely transfer the value? I think the code works as
expected. It may not work for other whitespace, as you point out. For
multiple spaces, the field value is also not trimmed, but mkconf does
not run repeatedly. Either way, I do not think there is a need for
mkconf to parse the value the way you describe.

Do you have a problem as a result of the code, or are you making an
academic point? Thanks for helping to make mdadm better for everyone!

Kind regards
Felix Lechner


Reply to: