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#22821 - [mkinitcpio] skips "encrypt" hook if "plymouth-encrypt" specified in arguments
Attached to Project:
Arch Linux
Opened by Sergey Zolotorev (serzh-z) - Tuesday, 08 February 2011, 20:50 GMT
Last edited by Thomas Bächler (brain0) - Sunday, 27 March 2011, 11:03 GMT
Opened by Sergey Zolotorev (serzh-z) - Tuesday, 08 February 2011, 20:50 GMT
Last edited by Thomas Bächler (brain0) - Sunday, 27 March 2011, 11:03 GMT
|
DetailsDescription:
It seems there is an invalid grep call in mkinitcpio. So mkinitcpio skips extra hooks if dash appears in hook name specified in argument list as part of "-S" option. For example: "encrypt" hook will be skipped also if you specified "-S plymouth-encrypt" or "base" hook will be skipped if you specified "-S bug-base". Additional info: mkinitcpio-0.6.8-1 Steps to reproduce: 1. Run mkinitcpio with "-S hook_name_with_dash": mkinitcpio -S bug-base => Parsing of "base" hook will be skipped |
This task depends upon
Closed by Thomas Bächler (brain0)
Sunday, 27 March 2011, 11:03 GMT
Reason for closing: Fixed
Additional comments about closing: Fixed in git for the next release.
Sunday, 27 March 2011, 11:03 GMT
Reason for closing: Fixed
Additional comments about closing: Fixed in git for the next release.
for hook in ${HOOKS}; do
hook=$(echo ${hook} | sed 's/-/_/')
echo "${SKIPHOOKS}" | sed 's/-/_/' | grep -qw ${hook} && continue
...
So '-w' will not split words by '-' anymore.
If it is not possible to use dashes in hook names then, I believe, mkinitcpio must stop building initramfs image with some WARNING message. Because user can get broken image (without cryptsetup capabilites) and will need some LiveCD to load system and fix initramfs image. There is an example: I have such case today... but reviewing mkinitcpio build output before rebooting saved me.
$ echo hook-foo,hook-bar | grep -qw -- bar ; echo $?
0
$ echo hook-foo,hook-bar | sed 's/-/_/g' | grep -w -- bar ; echo $?
1