Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
FS#3505 - initscripts quirk
Attached to Project:
Arch Linux
Opened by Viktor Peters (Mythoz) - Saturday, 19 November 2005, 10:22 GMT
Last edited by Tobias Powalowski (tpowa) - Saturday, 19 November 2005, 16:07 GMT
Opened by Viktor Peters (Mythoz) - Saturday, 19 November 2005, 10:22 GMT
Last edited by Tobias Powalowski (tpowa) - Saturday, 19 November 2005, 16:07 GMT
|
DetailsA short while ago support for RAID arrays was added to rc.sysinit:
if [ -f /etc/mdadm.conf -a "`grep ^ARRAY /etc/mdadm.conf 2>/dev/null`" ]; then [...] fi But the first test is completely pointless since the shell test AND ("[ ... -a ... ]") is not an conditional AND like in C/C++. The grep is excuted anyway regardless of the result of the first test. The redirection of all messages to /dev/null is an ugly way to hide this missbehaviour. A simple correction is: if [ -f /etc/mdadm.conf ] && grep -q ^ARRAY /etc/mdadm.conf; then [...] fi Or if performance does not matter: if grep -q -s ^ARRAY /etc/mdadm.conf; then [...] fi |
This task depends upon
rc.sysinit is not something that needs to be aerodynamic or O(1). It's bash.