summaryrefslogtreecommitdiff
path: root/usr.sbin/syspatch/syspatch.sh
diff options
context:
space:
mode:
authorAlexander Hall <halex@cvs.openbsd.org>2016-11-12 22:22:26 +0000
committerAlexander Hall <halex@cvs.openbsd.org>2016-11-12 22:22:26 +0000
commit26e6ef7a8e4cdc9522c35ee99dab7bc526f6a624 (patch)
treef17235d590e92e7edaaee803c22bd35a2e4e1504 /usr.sbin/syspatch/syspatch.sh
parent95cbfe0806c75f83c2dd8d814eb30acf458a42f5 (diff)
Improve the cleanup error handling to make sure the exit code is
really preserved. Noticed by, discussed with, and fix approved tb@
Diffstat (limited to 'usr.sbin/syspatch/syspatch.sh')
-rw-r--r--usr.sbin/syspatch/syspatch.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/syspatch/syspatch.sh b/usr.sbin/syspatch/syspatch.sh
index ebe4a106e94..fd1e888329a 100644
--- a/usr.sbin/syspatch/syspatch.sh
+++ b/usr.sbin/syspatch/syspatch.sh
@@ -1,6 +1,6 @@
#!/bin/ksh
#
-# $OpenBSD: syspatch.sh,v 1.46 2016/11/10 13:56:57 ajacoutot Exp $
+# $OpenBSD: syspatch.sh,v 1.47 2016/11/12 22:22:25 halex Exp $
#
# Copyright (c) 2016 Antoine Jacoutot <ajacoutot@openbsd.org>
#
@@ -281,8 +281,8 @@ _RELINT=${_REL%\.*}${_REL#*\.}
_TMP=$(mktemp -d -p /tmp syspatch.XXXXXXXXXX)
readonly _BSDMP _FETCH _PDIR _REL _RELINT _TMP
-trap 'rm -rf "${_TMP}"' EXIT
-trap exit HUP INT TERM ERR
+trap 'set +e; rm -rf "${_TMP}"' EXIT
+trap exit HUP INT TERM
[[ -n ${_REL} && -n ${_RELINT} ]]