diff options
author | Antoine Jacoutot <ajacoutot@cvs.openbsd.org> | 2016-11-04 11:42:15 +0000 |
---|---|---|
committer | Antoine Jacoutot <ajacoutot@cvs.openbsd.org> | 2016-11-04 11:42:15 +0000 |
commit | 08841fc316951d424130560a36cdb0dd0979d2de (patch) | |
tree | 24a1996c811f5ee5347d4706f3ccdfc51b48e05a /usr.sbin | |
parent | efa422ba4881a252a2d031b54fc13268cecb721b (diff) |
Use 'rm -f' to remove the rollback tarball if we have an errir; it may
be because we have a read-only /var.
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/syspatch/syspatch.sh | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.sbin/syspatch/syspatch.sh b/usr.sbin/syspatch/syspatch.sh index 07555852e41..a3bb92d677a 100644 --- a/usr.sbin/syspatch/syspatch.sh +++ b/usr.sbin/syspatch/syspatch.sh @@ -1,6 +1,6 @@ #!/bin/ksh # -# $OpenBSD: syspatch.sh,v 1.34 2016/11/03 17:14:31 ajacoutot Exp $ +# $OpenBSD: syspatch.sh,v 1.35 2016/11/04 11:42:14 ajacoutot Exp $ # # Copyright (c) 2016 Antoine Jacoutot <ajacoutot@openbsd.org> # @@ -35,6 +35,7 @@ needs_root() apply_patch() { + # XXX make sure mount points are not read-only local _explodir _file _files _patch=$1 [[ -n ${_patch} ]] @@ -101,7 +102,8 @@ create_rollback() ${_rbfiles} fi ); then - rm ${_PDIR}/${_REL}/rollback-${_patch}.tgz + # `-f' in case /var is read-only + rm -f ${_PDIR}/${_REL}/rollback-${_patch}.tgz sp_err "Failed to create rollback for ${_patch}" fi } |