diff options
author | Antoine Jacoutot <ajacoutot@cvs.openbsd.org> | 2017-03-31 16:02:32 +0000 |
---|---|---|
committer | Antoine Jacoutot <ajacoutot@cvs.openbsd.org> | 2017-03-31 16:02:32 +0000 |
commit | ae5a83f5166b1b9811b3ec6b9e4a9748c05cc752 (patch) | |
tree | 089a89b2e2fc07613aec61151d12883f522f7af8 /usr.sbin/syspatch/syspatch.sh | |
parent | 5d8976063e00b356770a5dc114931c1ab60758cf (diff) |
Be quiet in case /var/syspatch/ is empty and that there's no remote sig
file yet (i.e. when we are in release mode but not released yet).
ok deraadt@
Diffstat (limited to 'usr.sbin/syspatch/syspatch.sh')
-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 e04c0f33fc0..a7aa06f74e5 100644 --- a/usr.sbin/syspatch/syspatch.sh +++ b/usr.sbin/syspatch/syspatch.sh @@ -1,6 +1,6 @@ #!/bin/ksh # -# $OpenBSD: syspatch.sh,v 1.92 2017/02/13 14:59:09 ajacoutot Exp $ +# $OpenBSD: syspatch.sh,v 1.93 2017/03/31 16:02:31 ajacoutot Exp $ # # Copyright (c) 2016 Antoine Jacoutot <ajacoutot@openbsd.org> # @@ -182,7 +182,7 @@ ls_missing() # don't output anything on stdout to prevent corrupting the patch list unpriv -f "${_sha}.sig" ftp -MVo "${_sha}.sig" "${_MIRROR}/SHA256.sig" \ - >/dev/null + >/dev/null 2>&1 unpriv -f "${_sha}" signify -Veq -x ${_sha}.sig -m ${_sha} -p \ /etc/signify/openbsd-${_OSrev}-syspatch.pub >/dev/null @@ -231,6 +231,7 @@ sp_cleanup() # remove non matching release /var/syspatch/ content for _d in ${_PDIR}/*; do + [[ -e ${_d} ]] || continue [[ ${_d##*/} == ${_OSrev}-+([[:digit:]])_+([[:alnum:]]|_) ]] && [[ -f ${_d}/rollback.tgz ]] || rm -r ${_d} done |