From 9605b4b465fa9f8ce9b705a75c8c02fded6eafc6 Mon Sep 17 00:00:00 2001 From: Christian Weisgerber Date: Fri, 10 May 2019 01:29:15 +0000 Subject: tweak verbosity; ok ccardenas@ --- usr.sbin/sysupgrade/sysupgrade.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/usr.sbin/sysupgrade/sysupgrade.sh b/usr.sbin/sysupgrade/sysupgrade.sh index f4592a7dc15..b6081b0dfe8 100644 --- a/usr.sbin/sysupgrade/sysupgrade.sh +++ b/usr.sbin/sysupgrade/sysupgrade.sh @@ -1,6 +1,6 @@ #!/bin/ksh # -# $OpenBSD: sysupgrade.sh,v 1.18 2019/05/09 21:09:37 naddy Exp $ +# $OpenBSD: sysupgrade.sh,v 1.19 2019/05/10 01:29:14 naddy Exp $ # # Copyright (c) 1997-2015 Todd Miller, Theo de Raadt, Ken Westerback # Copyright (c) 2015 Robert Peichaer @@ -162,7 +162,8 @@ OLD_FILES=$(ls) OLD_FILES=$(rmel SHA256 $OLD_FILES) DL=$SETS -for f in $SETS; do +[[ -n ${OLD_FILES} ]] && echo Verifying old sets. +for f in ${OLD_FILES}; do if cksum -C SHA256 $f >/dev/null 2>&1; then DL=$(rmel $f ${DL}) OLD_FILES=$(rmel $f ${OLD_FILES}) @@ -174,8 +175,10 @@ for f in ${DL}; do unpriv -f $f ftp -Vmo ${f} ${URL}${f} done -echo Verifying sets. -[[ -n ${DL} ]] && unpriv cksum -qC SHA256 ${DL} +if [[ -n ${DL} ]]; then + echo Verifying sets. + unpriv cksum -qC SHA256 ${DL} +fi ${KEEP} && > keep -- cgit v1.2.3