From 406259c1331cd4ea96a6a2faf5463d898293d5ab Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Sat, 30 Nov 2002 00:40:53 +0000 Subject: Two fixes for devd: 1) Move devd to the start of the head of the boot process rather than the end. 2) Disable devctl if devd is disabled. --- etc/rc.d/devd | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/etc/rc.d/devd b/etc/rc.d/devd index 7702c77bc7926..9636eaac4cba8 100644 --- a/etc/rc.d/devd +++ b/etc/rc.d/devd @@ -4,7 +4,7 @@ # # PROVIDE: devd -# REQUIRE: devfs +# BEFORE: disks # KEYWORD: FreeBSD . /etc/rc.subr @@ -15,3 +15,8 @@ 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 -- cgit v1.3