A New Hope. Limiting ourselves to POSIX shell is what made mkstandalone very messy. Bash knows EXIT trap, which always happens. Signed-off-by: Radim Krčmář <rkrcmar@xxxxxxxxxx> --- scripts/mkstandalone.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/mkstandalone.sh b/scripts/mkstandalone.sh index a187adc856b7..9ab4b1920e50 100755 --- a/scripts/mkstandalone.sh +++ b/scripts/mkstandalone.sh @@ -66,7 +66,7 @@ function mkstandalone() exec {tmpfd}<&1 exec > $standalone - echo "#!/bin/sh" + echo "#!/bin/bash" cat config.mak | grep '^ARCH=' @@ -89,7 +89,7 @@ echo "skip $testname (test kernel not present)" 1>&2 exit 1 EOF else - echo "trap 'rm -f \$cleanup; exit 1' HUP INT TERM" + echo "trap 'rm -f \$cleanup' EXIT" temp_file bin "$kernel" @@ -122,7 +122,6 @@ if [ \$ret -le 1 ]; then else echo FAIL $testname 1>&2 fi -rm -f \$bin exit 0 EOF fi -- 2.7.0 -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html