eb7bf00306
Instead, load them as part of the rc.d system. This allows us to prioritize the initidiskless script so it runs before the configuration files are loaded and allows us to get rid of the exit 2 hack in /etc/rc. The exit 2 never worked anyway since it did not unset the prior configuration, causing the diskless code to not operate properly. Do a major cleanup and revamping of the diskless code for RCNG. This will be backported to the non-RCNG scripts as well as -stable. With suggestions from: Mike Makonnen <mtm@identd.net> MFC after: 7 days
24 lines
348 B
Bash
24 lines
348 B
Bash
#!/bin/sh
|
|
#
|
|
# $FreeBSD$
|
|
#
|
|
|
|
# REQUIRE: rcconf
|
|
# PROVIDE: devd
|
|
# BEFORE: disks
|
|
# KEYWORD: FreeBSD
|
|
|
|
. /etc/rc.subr
|
|
|
|
name="devd"
|
|
rcvar=`set_rcvar`
|
|
command="/sbin/devd"
|
|
|
|
load_rc_config $name
|
|
run_rc_command "$1"
|
|
|
|
# If devd is disabled, turn it off in the kernel to avoid memory leaks.
|
|
if ! checkyesno ${rcvar}; then
|
|
sysctl hw.bus.devctl_disable=1
|
|
fi
|