Comment 1 for bug 1331320

Revision history for this message
Hamilton Turner (hamiltont-x) wrote :

I'm not insane, but I am wrong! This is indeed caused by "set -e and ||". Specifically, the difference between how test-kickseed and initrd-kickseed call the kickseed function.

test-kickseed calls:

     RET=0
     (kickseed "$1") || RET=$?

This means that kickseed() is called as "part of any command executed in a && or || list", and therefore errexit has no effect anywhere inside of the kickseed function when it is called from test-kickseed.

This is clearly intentional, but it also caused me substantial confusion due to different behavior, so I'll put in a tiny commit that causes a big warning message to be printed when $RET != 0. Currently the exit code is just being returned to the user, and it would take a particularly savvy user to check the exit code of test-kickseed every time and interpret that a non-zero means that the install will behave differently than the test.