summaryrefslogtreecommitdiffstats
path: root/usr.sbin/syspatch
diff options
context:
space:
mode:
authorajacoutot <ajacoutot@openbsd.org>2019-01-21 23:50:36 +0000
committerajacoutot <ajacoutot@openbsd.org>2019-01-21 23:50:36 +0000
commit15b295ccc09753b6a7c17d113007331c7524ecbc (patch)
tree385bbd4ece707f3f87c6bc9c72f79d66908ad41f /usr.sbin/syspatch
parentthis driver does actually work (diff)
downloadwireguard-openbsd-15b295ccc09753b6a7c17d113007331c7524ecbc.tar.xz
wireguard-openbsd-15b295ccc09753b6a7c17d113007331c7524ecbc.zip
Don't return 1 if we rollback and there's no installed patches.
Diffstat (limited to 'usr.sbin/syspatch')
-rw-r--r--usr.sbin/syspatch/syspatch.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/syspatch/syspatch.sh b/usr.sbin/syspatch/syspatch.sh
index cd7c1ec7e6f..8f57d690753 100644
--- a/usr.sbin/syspatch/syspatch.sh
+++ b/usr.sbin/syspatch/syspatch.sh
@@ -1,6 +1,6 @@
#!/bin/ksh
#
-# $OpenBSD: syspatch.sh,v 1.141 2019/01/21 23:44:26 ajacoutot Exp $
+# $OpenBSD: syspatch.sh,v 1.142 2019/01/21 23:50:36 ajacoutot Exp $
#
# Copyright (c) 2016, 2017 Antoine Jacoutot <ajacoutot@openbsd.org>
#
@@ -187,7 +187,7 @@ rollback_patch()
local _edir _file _files _patch _ret=0
_patch="$(ls_installed | tail -1)"
- [[ -n ${_patch} ]]
+ [[ -n ${_patch} ]] || return 0 # nothing to rollback
_edir=${_TMP}/${_patch}-rollback
_patch=${_OSrev}-${_patch}