From f51554d23b4d4750d5d711da2ab85c7e52b4cc65 Mon Sep 17 00:00:00 2001 From: ajacoutot Date: Tue, 4 Apr 2017 21:20:22 +0000 Subject: [PATCH] Also remove non syspatch hidden files/dirs. --- 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 a7aa06f74e5..42059499cc8 100644 --- a/usr.sbin/syspatch/syspatch.sh +++ b/usr.sbin/syspatch/syspatch.sh @@ -1,6 +1,6 @@ #!/bin/ksh # -# $OpenBSD: syspatch.sh,v 1.93 2017/03/31 16:02:31 ajacoutot Exp $ +# $OpenBSD: syspatch.sh,v 1.94 2017/04/04 21:20:22 ajacoutot Exp $ # # Copyright (c) 2016 Antoine Jacoutot # @@ -230,7 +230,7 @@ sp_cleanup() local _d _k _m # remove non matching release /var/syspatch/ content - for _d in ${_PDIR}/*; do + for _d in ${_PDIR}/{.[!.],}*; do [[ -e ${_d} ]] || continue [[ ${_d##*/} == ${_OSrev}-+([[:digit:]])_+([[:alnum:]]|_) ]] && [[ -f ${_d}/rollback.tgz ]] || rm -r ${_d} -- 2.20.1