summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authordougb <dougb@FreeBSD.org>2010-12-27 22:52:47 +0000
committerdougb <dougb@FreeBSD.org>2010-12-27 22:52:47 +0000
commiteefe5120b63eac2a6b81e4bda2de128d14099dd7 (patch)
tree29ea18cb4f29885705cb8f7da0f2de3e2fc60fb2 /etc
parentf6812a9bf2e3848d63c02126ebcf725221fc8fff (diff)
downloadFreeBSD-src-eefe5120b63eac2a6b81e4bda2de128d14099dd7.zip
FreeBSD-src-eefe5120b63eac2a6b81e4bda2de128d14099dd7.tar.gz
Add pidfile [1]
While I'm here, don't run the sysctl frob unconditionally, and s/sysctl/$SYSCTL/ PR: conf/153460 [1] Submitted by: Grigory Rechistov <ggg_mail@inbox.ru>
Diffstat (limited to 'etc')
-rwxr-xr-xetc/rc.d/devd16
1 files changed, 11 insertions, 5 deletions
diff --git a/etc/rc.d/devd b/etc/rc.d/devd
index 1674a72..a126645 100755
--- a/etc/rc.d/devd
+++ b/etc/rc.d/devd
@@ -13,11 +13,17 @@
name="devd"
rcvar=`set_rcvar`
command="/sbin/${name}"
+pidfile=/var/run/${name}.pid
+
+start_precmd=${name}_prestart
+
+devd_prestart ()
+{
+ # 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
+}
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
OpenPOWER on IntegriCloud