mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-23 11:18:54 +00:00
361fffd228
devd.conf execution of third-party software, that needs libraries from /usr/local. Since devd is launched before ldconfig script, if the hardware that has associated software is attached on boot, then execution would fail. Differential Revision: https://reviews.freebsd.org/D2332 Reviewed by: imp
42 lines
650 B
Bash
Executable File
42 lines
650 B
Bash
Executable File
#!/bin/sh
|
|
#
|
|
# $FreeBSD$
|
|
#
|
|
|
|
# PROVIDE: devd
|
|
# REQUIRE: netif ldconfig
|
|
# 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"
|