diff options
author | 2016-03-26 13:59:36 +0000 | |
---|---|---|
committer | 2016-03-26 13:59:36 +0000 | |
commit | e54a2c58340da11320d3e0280bd7ac685f4724e3 (patch) | |
tree | 1365453724aa43fd0df4f739e88aeba388956246 | |
parent | Handle the rc_stop=NO => rc_restart=NO case within _rc_not_supported(). (diff) | |
download | wireguard-openbsd-e54a2c58340da11320d3e0280bd7ac685f4724e3.tar.xz wireguard-openbsd-e54a2c58340da11320d3e0280bd7ac685f4724e3.zip |
Make it possible to get usage as a non-root user.
ok robert@
-rw-r--r-- | etc/rc.d/rc.subr | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/etc/rc.d/rc.subr b/etc/rc.d/rc.subr index 3615cf8a13d..cd083d14439 100644 --- a/etc/rc.d/rc.subr +++ b/etc/rc.d/rc.subr @@ -1,6 +1,6 @@ -# $OpenBSD: rc.subr,v 1.106 2016/03/26 09:21:24 ajacoutot Exp $ +# $OpenBSD: rc.subr,v 1.107 2016/03/26 13:59:36 ajacoutot Exp $ # -# Copyright (c) 2010, 2011, 2014 Antoine Jacoutot <ajacoutot@openbsd.org> +# Copyright (c) 2010, 2011, 2014, 2015 Antoine Jacoutot <ajacoutot@openbsd.org> # Copyright (c) 2010, 2011 Ingo Schwarze <schwarze@openbsd.org> # Copyright (c) 2010, 2011, 2014 Robert Nagy <robert@openbsd.org> # @@ -169,6 +169,8 @@ rc_stop() { rc_cmd() { local _bg _n + [ -n "${1}" ] && echo "${_rc_actions}" | grep -qw -- ${1} || _rc_usage + [ "$(id -u)" -eq 0 ] || \ [ X"${rc_usercheck}" != X"NO" -a X"$1" = "Xcheck" ] || \ _rc_err "$0: need root privileges" |