-# $OpenBSD: rc.subr,v 1.162 2024/01/17 08:26:06 ajacoutot Exp $
+# $OpenBSD: rc.subr,v 1.163 2024/09/29 14:36:13 kn Exp $
#
# Copyright (c) 2010, 2011, 2014-2022 Antoine Jacoutot <ajacoutot@openbsd.org>
# Copyright (c) 2010, 2011 Ingo Schwarze <schwarze@openbsd.org>
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-_rc_actions="start stop restart reload check configtest"
+_rc_actions="check configtest reload restart start stop"
readonly _rc_actions
_rc_check_name() {
-.\" $OpenBSD: rcctl.8,v 1.45 2024/05/05 08:16:45 ajacoutot Exp $
+.\" $OpenBSD: rcctl.8,v 1.46 2024/09/29 14:36:13 kn 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: May 5 2024 $
+.Dd $Mdocdate: September 29 2024 $
.Dt RCCTL 8
.Os
.Sh NAME
.Sh SYNOPSIS
.Nm rcctl
.Cm get Ns | Ns Cm getdef Ns | Ns Cm set
-.Ar service | daemon Op Ar variable Op Ar argument ...
+.Ar daemon Ns | Ns Ar service Op Ar variable Op Ar argument ...
.Nm rcctl
.Op Fl df
.Sm off
#!/bin/ksh
#
-# $OpenBSD: rcctl.sh,v 1.119 2024/07/08 14:47:42 ajacoutot Exp $
+# $OpenBSD: rcctl.sh,v 1.120 2024/09/29 14:36:13 kn Exp $
#
# Copyright (c) 2014, 2015-2022 Antoine Jacoutot <ajacoutot@openbsd.org>
# Copyright (c) 2014 Ingo Schwarze <schwarze@openbsd.org>
usage()
{
local _a _i
- for _i in ${_rc_actions}; do _a="$(echo -n ${_i}${_a:+|${_a}})"; done
+ for _i in ${_rc_actions}; do _a=${_a:+${_a}|}$_i; done
_rc_err \
- "usage: rcctl get|getdef|set service | daemon [variable [argument ...]]
+ "usage: rcctl get|getdef|set daemon|service [variable [argument ...]]
rcctl [-df] ${_a} daemon ...
rcctl disable|enable|order [daemon ...]
rcctl ls all|failed|off|on|rogue|started|stopped"