HEX
Server: Apache/2.4.41 (FreeBSD) OpenSSL/1.0.2s mod_fcgid/2.3.9
System: FreeBSD salazo 12.0-RELEASE-p1303-ZFS hostBSD 12.0-RELEASE-p1303-ZFS DMR amd64
User: admin (1000)
PHP: 7.4.3
Disabled: NONE
Upload Files
File: //etc/rc.d/devd
#!/bin/sh
#
# $FreeBSD: releng/10.3/etc/rc.d/devd 263963 2014-03-31 02:53:15Z mjg $
#

# PROVIDE: devd
# REQUIRE: netif
# BEFORE: NETWORKING mountcritremote
# KEYWORD: nojail shutdown

. /etc/rc.subr

name="devd"
rcvar="devd_enable"
command="/sbin/${name}"

start_precmd=${name}_prestart
stop_precmd=find_pidfile

find_pidfile()
{
	if get_pidfile_from_conf pid-file /etc/devd.conf; then
		pidfile="$_pidfile_from_conf"
	else
		pidfile="/var/run/${name}.pid"
	fi
}

devd_prestart()
{
	find_pidfile

	# If devd is disabled, turn it off in the kernel to avoid unnecessary
	# memory usage.
	if ! checkyesno ${rcvar}; then
	    $SYSCTL hw.bus.devctl_queue=0
	fi
}

load_rc_config $name
run_rc_command "$1"