From 563103decdca7c06850ca0909e5c8f8b4b0c0fe5 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 24 Jan 2013 13:49:17 -0800 Subject: [PATCH] Fix test script error codes The 'exit $?' command in the INT TERM EXIT trap was overwritting the expected error code with the error code from mv. Fix the issue by removing the 'exit $?'. It's important the we preserve the original error code so failures are easily noticed. Signed-off-by: Brian Behlendorf --- scripts/common.sh.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/common.sh.in b/scripts/common.sh.in index 3c118201..f087f443 100644 --- a/scripts/common.sh.in +++ b/scripts/common.sh.in @@ -124,7 +124,7 @@ init() { # set to ensure the udev rule is correctly replaced on exit. local RULE=${udevruledir}/90-zfs.rules if test -e ${RULE}; then - trap "mv ${RULE}.disabled ${RULE}; exit $?" INT TERM EXIT + trap "mv ${RULE}.disabled ${RULE}" INT TERM EXIT mv ${RULE} ${RULE}.disabled fi } -- 2.39.5