kernel - Make certain sysctl's unlocked
[dragonfly.git] / etc / rc.d / devd
blob7e76c0bece9090405e32a05580359e52e08f889e
1 #!/bin/sh
3 # $FreeBSD: head/etc/rc.d/devd 238416 2012-07-13 06:46:09Z kevlo $
6 # PROVIDE: devd
7 # REQUIRE: netif network_ipv6
8 # BEFORE: NETWORKING mountcritremote
9 # KEYWORD: nojail shutdown
11 . /etc/rc.subr
13 name="devd"
14 rcvar="devd_enable"
15 command="/sbin/${name}"
17 start_precmd=${name}_prestart
18 stop_precmd=find_pidfile
20 find_pidfile()
22 if get_pidfile_from_conf pid-file /etc/devd.conf; then
23 pidfile="$_pidfile_from_conf"
24 else
25 pidfile="/var/run/${name}.pid"
29 devd_prestart()
31 find_pidfile
33 # If devd is disabled, turn it off in the kernel to avoid memory leaks.
34 if ! checkyesno ${rcvar}; then
35 $SYSCTL hw.bus.devctl_disable=1
39 load_rc_config $name
40 run_rc_command "$1"