summaryrefslogtreecommitdiffstats
path: root/usr.sbin/syspatch/syspatch.sh
diff options
context:
space:
mode:
authorajacoutot <ajacoutot@openbsd.org>2020-12-07 21:19:28 +0000
committerajacoutot <ajacoutot@openbsd.org>2020-12-07 21:19:28 +0000
commit91cb7cd0534179111e18f0ec92f74506fd62dcd5 (patch)
treeecb204a841b47054635289834e75e224c724cbd2 /usr.sbin/syspatch/syspatch.sh
parentIn revision 1.18 of bt_parse.y, I missed the fact that the print() (diff)
downloadwireguard-openbsd-91cb7cd0534179111e18f0ec92f74506fd62dcd5.tar.xz
wireguard-openbsd-91cb7cd0534179111e18f0ec92f74506fd62dcd5.zip
When asking to install patches and none are available, return 2.
man page and inputs from schwarze@ ok sthen@
Diffstat (limited to 'usr.sbin/syspatch/syspatch.sh')
-rw-r--r--usr.sbin/syspatch/syspatch.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/syspatch/syspatch.sh b/usr.sbin/syspatch/syspatch.sh
index 57247f40969..4eacb6205e0 100644
--- a/usr.sbin/syspatch/syspatch.sh
+++ b/usr.sbin/syspatch/syspatch.sh
@@ -1,6 +1,6 @@
#!/bin/ksh
#
-# $OpenBSD: syspatch.sh,v 1.166 2020/10/27 17:42:05 tb Exp $
+# $OpenBSD: syspatch.sh,v 1.167 2020/12/07 21:19:28 ajacoutot Exp $
#
# Copyright (c) 2016, 2017 Antoine Jacoutot <ajacoutot@openbsd.org>
#
@@ -320,6 +320,7 @@ if ((OPTIND == 1)); then
[[ -f ${_D}/rollback.tgz ]] || rm -r ${_D}
done
_PATCHES=$(ls_missing) # can't use errexit in a for loop
+ [[ -n ${_PATCHES} ]] || exit 2
for _PATCH in ${_PATCHES}; do
apply_patch ${_OSrev}-${_PATCH}
_PATCH_APPLIED=true