Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Dec 2010 22:52:48 +0000 (UTC)
From:      Doug Barton <dougb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r216744 - head/etc/rc.d
Message-ID:  <201012272252.oBRMqmaw038842@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dougb
Date: Mon Dec 27 22:52:47 2010
New Revision: 216744
URL: http://svn.freebsd.org/changeset/base/216744

Log:
  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>

Modified:
  head/etc/rc.d/devd

Modified: head/etc/rc.d/devd
==============================================================================
--- head/etc/rc.d/devd	Mon Dec 27 22:18:27 2010	(r216743)
+++ head/etc/rc.d/devd	Mon Dec 27 22:52:47 2010	(r216744)
@@ -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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201012272252.oBRMqmaw038842>