diff options
author | 2018-05-09 10:22:06 +0000 | |
---|---|---|
committer | 2018-05-09 10:22:06 +0000 | |
commit | a532db0534a03cc2383eb982eac1216cf593dadc (patch) | |
tree | f594db85074041b81071b338354ce0bfddfa1f67 /usr.sbin/syspatch | |
parent | Mark `f_ops' as immutable. (diff) | |
download | wireguard-openbsd-a532db0534a03cc2383eb982eac1216cf593dadc.tar.xz wireguard-openbsd-a532db0534a03cc2383eb982eac1216cf593dadc.zip |
Remove empty syspatch dir if we fail to extract.
Diffstat (limited to 'usr.sbin/syspatch')
-rw-r--r-- | usr.sbin/syspatch/syspatch.sh | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/syspatch/syspatch.sh b/usr.sbin/syspatch/syspatch.sh index c06a3536eb1..91c1ee39e04 100644 --- a/usr.sbin/syspatch/syspatch.sh +++ b/usr.sbin/syspatch/syspatch.sh @@ -1,6 +1,6 @@ #!/bin/ksh # -# $OpenBSD: syspatch.sh,v 1.136 2018/04/26 12:50:41 ajacoutot Exp $ +# $OpenBSD: syspatch.sh,v 1.137 2018/05/09 10:22:06 ajacoutot Exp $ # # Copyright (c) 2016, 2017 Antoine Jacoutot <ajacoutot@openbsd.org> # @@ -44,7 +44,8 @@ apply_patch() ${_BSDMP} && _s="-s @usr/share/relink/kernel/GENERIC/.*@@g" || _s="-s @usr/share/relink/kernel/GENERIC.MP/.*@@g" - _files="$(tar -xvzphf ${_TMP}/syspatch${_patch}.tgz -C ${_edir} ${_s})" + _files="$(tar -xvzphf ${_TMP}/syspatch${_patch}.tgz -C ${_edir} \ + ${_s})" || { rm -r ${_PDIR}/${_patch}; return 1; } checkfs ${_files} create_rollback ${_patch} "${_files}" |