summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Weisgerber <naddy@cvs.openbsd.org>2019-05-10 01:29:15 +0000
committerChristian Weisgerber <naddy@cvs.openbsd.org>2019-05-10 01:29:15 +0000
commit9605b4b465fa9f8ce9b705a75c8c02fded6eafc6 (patch)
treeb3d05522a3830bf56f8cea17b461481bd6abd143
parentbdfc5c1b8da0b4db15c8f68930b41e0bf1eea633 (diff)
tweak verbosity; ok ccardenas@
-rw-r--r--usr.sbin/sysupgrade/sysupgrade.sh11
1 files 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 <rpe@openbsd.org>
@@ -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