Calling dracut to generate an initramfs produces the following log message before the regular output: /usr/bin/dracut: line 557: [: ==: unary operator expected As far as I can tell the cause of the error message didn't have any influence on the created images for me. Reproducible: Always Steps to Reproduce: 1. emerge sys-kernel/dracut 2. Call dracut to generate an initramfs, e.g. # /usr/bin/dracut "" 3.13.4-gentoo Actual Results: # /usr/bin/dracut "" 3.13.4-gentoo /usr/bin/dracut: line 557: [: ==: unary operator expected Executing: /usr/bin/dracut 3.13.4-gentoo Could not find program "dhclient" required by network. Could not find program "dhclient" required by network. *** Including module: bash *** *** Including module: caps *** *** Including module: i18n *** *** Including module: btrfs *** *** Including module: kernel-modules *** *** Including module: resume *** *** Including module: rootfs-block *** *** Including module: terminfo *** *** Including module: udev-rules *** Skipping udev rule: 91-permissions.rules Skipping udev rule: 80-drivers-modprobe.rules *** Including module: usrmount *** *** Including module: base *** *** Including module: fs-lib *** *** Including module: shutdown *** *** Including modules done *** *** Installing kernel module dependencies and firmware *** *** Installing kernel module dependencies and firmware done *** *** Resolving executable dependencies *** *** Resolving executable dependencies done*** *** Pre-linking files *** *** Pre-linking files done *** *** Stripping files *** *** Stripping files done *** *** Store current command line parameters *** *** Creating image file *** *** Creating image file done *** Expected Results: No error messages about syntax. # emerge -pvq sys-kernel/dracut [ebuild R ] sys-kernel/dracut-036-r1 USE="-debug (-selinux) -systemd"
It is parsing commandline arguments at that point, and someone forgot the quotes. This patch fixes it: --- dracut.orig 2014-02-22 11:50:21.885420684 +0100 +++ /usr/bin/dracut 2014-02-22 11:50:37.548960604 +0100 @@ -554,7 +554,7 @@ # the old fashioned way while (($# > 0)); do - if [ ${1%%=*} == "++include" ]; then + if [ "${1%%=*}" == "++include" ]; then push include_src "$2" push include_target "$3" PARMS_TO_STORE+=" --include '$2' '$3'"
Yes, this was already mentioned in another bug https://bugs.gentoo.org/show_bug.cgi?id=501694#c1
Thanks! +*dracut-036-r2 (23 Feb 2014) + + 23 Feb 2014; Amadeusz Żołnowski <aidecoe@gentoo.org> +dracut-036-r2.ebuild, + +files/036-0007-Added-missing-quotes.patch: + Fixed bug #502064 and bug #501566. + + Commit on behalf of Alexander Tsoy <alexander@tsoy.me>. +
I'm sorry to reopen, but although the patch file exists now, it isn't in the patch list of dracut-036-r2.ebuild.
(In reply to Erich Seifert from comment #4) > I'm sorry to reopen, but although the patch file exists now, it isn't in the > patch list of dracut-036-r2.ebuild. I am sorry for my mistake. Thanks! :-) +*dracut-036-r3 (24 Feb 2014) + + 24 Feb 2014; Amadeusz Żołnowski <aidecoe@gentoo.org> +dracut-036-r3.ebuild: + Added missing patch entry to the list. +