defaults/initrd.scripts contains the following test on line 879: if [ $(echo ${LUKS_KEY} | grep -o '.gpg$') = ".gpg" ] However, if ${LUKS_KEY} does not end with the string ".gpg" then the LHS of this comparison evaluates to NULL, i.e [ if = ".gpg" ], which produces the ash interpreter error: ".gpg: unknown operand" on the console during the boot sequence. This is non-fatal, but annoying, and may cause unnecessary concern to those who don't know why this error occurred. It also causes a momentary interruption to the bootsplash. A better test would be: if [ ! -z $(echo ${LUKS_KEY} | grep -o '.gpg$') ] Which tests if the comparison between ${LUKS_KEY} and '.gpg$' is NOT null. If true, then ${LUKS_KEY} = '.gpg$', if false then it isn't equal. This produces the same result as the original test, but without an error. Patch included. Reproducible: Always Steps to Reproduce: 1. Boot Gentoo from on a filesystem encrypted with a LUKS keyfile that isn't GPG signed. Actual Results: Observe ".gpg: unknown operand" error on the initial console. Expected Results: No error should occur.
Created attachment 299177 [details, diff] Resolve ".gpg: unknown operand" error +1 submit for testing
Hello Homer, this bug should be fixed since genkernel 3.4.19. # git blame defaults/initrd.scripts | fgrep .gpg 3453a062 defaults/initrd.scripts [..] http://git.overlays.gentoo.org/gitweb/?p=proj/genkernel.git;a=commitdiff;h=3453a0621c20576f9b3249215187f34ed55014f0;hp=fe5f95c9315c23429cac9807671e13da34f57414 Please re-open if necessary.