diff options
author | 2014-10-10 07:27:44 +0000 | |
---|---|---|
committer | 2014-10-10 07:27:44 +0000 | |
commit | 02eaf985ac635fbe8c6de15cb375869d53dd4e3f (patch) | |
tree | 1ef64ff499f25b293044be6eeee2e88625c4a327 | |
parent | Significant unification of RAMDISK* config files, making them diffable. (diff) | |
download | wireguard-openbsd-02eaf985ac635fbe8c6de15cb375869d53dd4e3f.tar.xz wireguard-openbsd-02eaf985ac635fbe8c6de15cb375869d53dd4e3f.zip |
Allow passing flags without arguments for special variables.
initial request and patch from Patrik Lundin
simpler patch from and ok schwartze@
-rw-r--r-- | usr.sbin/rcctl/rcctl.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/rcctl/rcctl.sh b/usr.sbin/rcctl/rcctl.sh index 40284d79f01..df18c1dbaea 100644 --- a/usr.sbin/rcctl/rcctl.sh +++ b/usr.sbin/rcctl/rcctl.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# $OpenBSD: rcctl.sh,v 1.38 2014/09/01 18:01:55 ajacoutot Exp $ +# $OpenBSD: rcctl.sh,v 1.39 2014/10/10 07:27:44 ajacoutot Exp $ # # Copyright (c) 2014 Antoine Jacoutot <ajacoutot@openbsd.org> # Copyright (c) 2014 Ingo Schwarze <schwarze@openbsd.org> @@ -276,7 +276,7 @@ if [ -n "$flag" ]; then if [ "$action" != "enable" ]; then _rc_err "${0##*/}: \"flags\" can only be set with \"enable\"" fi - if svc_is_special $svc; then + if svc_is_special $svc && [ -n "$4" ]; then _rc_err "${0##*/}: \"$svc\" is a special variable, cannot set \"flags\"" fi if [ "$4" = "NO" ]; then |