From: ajacoutot Date: Sun, 30 Apr 2017 13:41:10 +0000 (+0000) Subject: Tweak error message when running on an unsupported release. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=a2aa8c1657687fc8361f4b570934bf68fc43eb25;p=openbsd Tweak error message when running on an unsupported release. --- diff --git a/usr.sbin/syspatch/syspatch.sh b/usr.sbin/syspatch/syspatch.sh index 42059499cc8..1cd3f2ca8b3 100644 --- a/usr.sbin/syspatch/syspatch.sh +++ b/usr.sbin/syspatch/syspatch.sh @@ -1,6 +1,6 @@ #!/bin/ksh # -# $OpenBSD: syspatch.sh,v 1.94 2017/04/04 21:20:22 ajacoutot Exp $ +# $OpenBSD: syspatch.sh,v 1.95 2017/04/30 13:41:10 ajacoutot Exp $ # # Copyright (c) 2016 Antoine Jacoutot # @@ -269,7 +269,7 @@ unpriv() # only run on release (not -current nor -stable) set -A _KERNV -- $(sysctl -n kern.version | sed 's/^OpenBSD \([0-9]\.[0-9]\)\([^ ]*\).*/\1 \2/;q') -((${#_KERNV[*]} > 1)) && sp_err "Unsupported release ${_KERNV[*]}" +((${#_KERNV[*]} > 1)) && sp_err "Unsupported release: ${_KERNV[0]}${_KERNV[1]}" _OSrev=${_KERNV[0]%.*}${_KERNV[0]#*.} [[ -n ${_OSrev} ]]