diff options
author | Antoine Jacoutot <ajacoutot@cvs.openbsd.org> | 2015-08-03 13:18:49 +0000 |
---|---|---|
committer | Antoine Jacoutot <ajacoutot@cvs.openbsd.org> | 2015-08-03 13:18:49 +0000 |
commit | 70922e0c3fe740161f4cc04794801f3f27f227fe (patch) | |
tree | b13f71fbd7da52c45e41d82a79ab844a4faa0b41 /usr.sbin | |
parent | 25fc07d7ed6f4133eaffc5864cc7ca5cf7059a05 (diff) |
"ls" requires an argument.
issue reported by kirby@
"hurry up" deraadt@
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/rcctl/rcctl.sh | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/usr.sbin/rcctl/rcctl.sh b/usr.sbin/rcctl/rcctl.sh index db8ed582833..31368227f58 100644 --- a/usr.sbin/rcctl/rcctl.sh +++ b/usr.sbin/rcctl/rcctl.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# $OpenBSD: rcctl.sh,v 1.77 2015/08/01 11:28:14 ajacoutot Exp $ +# $OpenBSD: rcctl.sh,v 1.78 2015/08/03 13:18:48 ajacoutot Exp $ # # Copyright (c) 2014, 2015 Antoine Jacoutot <ajacoutot@openbsd.org> # Copyright (c) 2014 Ingo Schwarze <schwarze@openbsd.org> @@ -426,6 +426,7 @@ shift $((OPTIND-1)) action=$1 if [ "${action}" = "ls" ]; then lsarg=$2 + [[ ${lsarg} == @(all|faulty|off|on|started|stopped) ]] || usage elif [ "${action}" = "order" ]; then shift 1 svcs="$*" @@ -436,9 +437,6 @@ else args="$*" fi -[ -n "${lsarg}" ] && [[ ${lsarg} != @(all|faulty|off|on|started|stopped) ]] && \ - usage - if [ -n "${svc}" ]; then [[ ${action} == @(disable|enable|get|getdef|set|start|stop|restart|reload|check) ]] || \ usage |