-# $OpenBSD: rc.subr,v 1.151 2021/11/15 12:56:11 ajacoutot Exp $
+# $OpenBSD: rc.subr,v 1.152 2022/02/10 16:57:33 robert Exp $
#
# Copyright (c) 2010, 2011, 2014-2021 Antoine Jacoutot <ajacoutot@openbsd.org>
# Copyright (c) 2010, 2011 Ingo Schwarze <schwarze@openbsd.org>
eval _rcuser=\${${_name}_user}
# set default values; duplicated in rcctl(8)
-getcap -f /etc/login.conf ${_name} 1>/dev/null 2>&1 && daemon_class=${_name} ||
- daemon_class=daemon
+getcap -f /etc/login.conf.d/${_name}:/etc/login.conf ${_name} 1>/dev/null 2>&1 && \
+ daemon_class=${_name} || daemon_class=daemon
[ -z "${daemon_rtable}" ] && daemon_rtable=0
[ -z "${daemon_timeout}" ] && daemon_timeout=30
[ -z "${daemon_user}" ] && daemon_user=root
#!/bin/ksh
#
-# $OpenBSD: rcctl.sh,v 1.111 2021/10/23 08:19:27 sthen Exp $
+# $OpenBSD: rcctl.sh,v 1.112 2022/02/10 16:57:33 robert Exp $
#
# Copyright (c) 2014, 2015-2021 Antoine Jacoutot <ajacoutot@openbsd.org>
# Copyright (c) 2014 Ingo Schwarze <schwarze@openbsd.org>
if ! svc_is_meta ${_svc}; then
# these are expensive, make sure they are explicitly requested
if [ -z "${_var}" -o "${_var}" = "class" ]; then
- getcap -f /etc/login.conf ${_svc} 1>/dev/null 2>&1 && \
- daemon_class=${_svc}
+ getcap -f /etc/login.conf.d/${_svc}:/etc/login.conf \
+ ${_svc} 1>/dev/null 2>&1 && daemon_class=${_svc}
[ -z "${daemon_class}" ] && \
daemon_class="$(svc_getdef ${_svc} class)"
fi