-.\" $OpenBSD: rcctl.8,v 1.37 2021/06/26 18:02:48 jmc Exp $
+.\" $OpenBSD: rcctl.8,v 1.38 2021/10/23 08:19:27 sthen 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: June 26 2021 $
+.Dd $Mdocdate: October 23 2021 $
.Dt RCCTL 8
.Os
.Sh NAME
.Nm rcctl
.Cm ls
.Sm off
-.Cm all | failed | on | off | started | stopped
+.Cm all | failed | on | off | rogue | started | stopped
.Sm on
.Sh DESCRIPTION
The
disabled services and daemons
.It Cm on
enabled services and daemons
+.It Cm rogue
+daemons which are disabled but currently running
.It Cm started
running daemons
.It Cm stopped
#!/bin/ksh
#
-# $OpenBSD: rcctl.sh,v 1.110 2021/02/27 09:28:04 ajacoutot Exp $
+# $OpenBSD: rcctl.sh,v 1.111 2021/10/23 08:19:27 sthen Exp $
#
# Copyright (c) 2014, 2015-2021 Antoine Jacoutot <ajacoutot@openbsd.org>
# Copyright (c) 2014 Ingo Schwarze <schwarze@openbsd.org>
"usage: rcctl get|getdef|set service | daemon [variable [arguments]]
rcctl [-df] ${_a} daemon ...
rcctl disable|enable|order [daemon ...]
- rcctl ls all|failed|off|on|started|stopped"
+ rcctl ls all|failed|off|on|rogue|started|stopped"
}
needs_root()
unset _on
done
;;
+ rogue)
+ for _svc in $(svc_ls off); do
+ ! svc_is_special ${_svc} && \
+ /etc/rc.d/${_svc} check >/dev/null && \
+ echo ${_svc} && _ret=1
+ done
+ ;;
started|stopped)
for _svc in $(ls_rcscripts); do
/etc/rc.d/${_svc} check >/dev/null && _started=1
case ${action} in
ls)
lsarg=$2
- [[ ${lsarg} == @(all|failed|off|on|started|stopped) ]] || usage
+ [[ ${lsarg} == @(all|failed|off|on|rogue|started|stopped) ]] || usage
;;
order)
shift 1