summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntoine Jacoutot <ajacoutot@cvs.openbsd.org>2016-12-07 15:36:51 +0000
committerAntoine Jacoutot <ajacoutot@cvs.openbsd.org>2016-12-07 15:36:51 +0000
commit9d4f318e410c615a28a05aba1b2a4d7c2a920aa0 (patch)
tree31a612182e7b16b8c70b77471ab6026b1a490406
parenta08ae6f1ece71b6c85d2b6c321e9d17d575a179f (diff)
Cleanup syspatch directories that do not contain a tarball; it means it
was not applied properly.
-rw-r--r--usr.sbin/syspatch/syspatch.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/syspatch/syspatch.sh b/usr.sbin/syspatch/syspatch.sh
index 3206d82cd83..557890cb1f9 100644
--- a/usr.sbin/syspatch/syspatch.sh
+++ b/usr.sbin/syspatch/syspatch.sh
@@ -1,6 +1,6 @@
#!/bin/ksh
#
-# $OpenBSD: syspatch.sh,v 1.76 2016/12/06 16:16:12 ajacoutot Exp $
+# $OpenBSD: syspatch.sh,v 1.77 2016/12/07 15:36:50 ajacoutot Exp $
#
# Copyright (c) 2016 Antoine Jacoutot <ajacoutot@openbsd.org>
#
@@ -231,7 +231,7 @@ sp_cleanup()
# remove non matching release /var/syspatch/ content
for _d in ${_PDIR}/*; do
[[ ${_d##*/} == ${_OSrev}-+([[:digit:]])_+([[:alnum:]]|_) ]] &&
- [[ -d ${_d} ]] || rm -r ${_d}
+ [[ -f ${_d}/rollback.tgz ]] || rm -r ${_d}
done
# remove non matching release backup kernel