From 9d4f318e410c615a28a05aba1b2a4d7c2a920aa0 Mon Sep 17 00:00:00 2001 From: Antoine Jacoutot Date: Wed, 7 Dec 2016 15:36:51 +0000 Subject: Cleanup syspatch directories that do not contain a tarball; it means it was not applied properly. --- usr.sbin/syspatch/syspatch.sh | 4 ++-- 1 file 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 # @@ -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 -- cgit v1.2.3