-.\" $OpenBSD: rcctl.8,v 1.24 2015/10/06 18:46:05 schwarze Exp $
+.\" $OpenBSD: rcctl.8,v 1.25 2015/10/24 13:57:24 ajacoutot Exp $
.\"
.\" Copyright (c) 2014 Antoine Jacoutot <ajacoutot@openbsd.org>
.\"
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.Dd $Mdocdate: October 6 2015 $
+.Dd $Mdocdate: October 24 2015 $
.Dt RCCTL 8
.Os
.Sh NAME
.Op Fl df
.Ar action daemon ...
.Nm rcctl
-.Cm order
+.Cm disable|enable|order
.Op Ar daemon ...
.Nm rcctl
.Cm ls
scripts with the
.Ar action
argument, passing through the specified options, if any.
+.It Cm disable Ar service ... | daemon ...
+Alias for
+.Dq Cm set Ar service | daemon Cm status off .
+.It Cm enable Ar service ... | daemon ...
+Alias for
+.Dq Cm set Ar service | daemon Cm status on .
.It Cm get Ar service | daemon Op Ar variable
Display the value of
.Ar service
#!/bin/sh
#
-# $OpenBSD: rcctl.sh,v 1.82 2015/10/06 18:46:05 schwarze Exp $
+# $OpenBSD: rcctl.sh,v 1.83 2015/10/24 13:57:24 ajacoutot Exp $
#
# Copyright (c) 2014, 2015 Antoine Jacoutot <ajacoutot@openbsd.org>
# Copyright (c) 2014 Ingo Schwarze <schwarze@openbsd.org>
_rc_err \
"usage: rcctl get|getdef|set service | daemon [variable [arguments]]
rcctl [-df] action daemon ...
- rcctl order [daemon ...]
+ rcctl disable|enable|order [daemon ...]
rcctl ls lsarg"
}
order)
shift 1
svcs="$*"
+ for svc in ${svcs}; do
+ svc_is_avail ${svc} || \
+ rcctl_err "service ${svc} does not exist" 2
+ done
;;
- # enable|disable: undocumented, deprecated
disable|enable|start|stop|restart|reload|check)
shift 1
svcs="$*"
esac
case ${action} in
- disable) # undocumented, deprecated
+ disable)
needs_root ${action}
for svc in ${svcs}; do
svc_set ${svc} status off || ret=$?;
done
exit ${ret}
;;
- enable) # undocumented, deprecated
+ enable)
needs_root ${action}
for svc in ${svcs}; do
svc_set ${svc} status on || ret=$?;