summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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