From 6fc3b870af235dc03394955f0b077f260651e177 Mon Sep 17 00:00:00 2001 From: riz Date: Tue, 6 Sep 2011 21:32:29 +0000 Subject: [PATCH] Create and install an rc.d file for devpubd - a daemon to listen on drvctl and autocreate device nodes in /dev for those which don't have any. Set the default to "NO" for now. --- distrib/sets/lists/etc/mi | 3 ++- etc/defaults/rc.conf | 3 ++- etc/rc.d/Makefile | 4 ++-- etc/rc.d/devpubd | 17 +++++++++++++++++ 4 files changed, 23 insertions(+), 4 deletions(-) create mode 100755 etc/rc.d/devpubd diff --git a/distrib/sets/lists/etc/mi b/distrib/sets/lists/etc/mi index 3919b7691c46..00b63f71cebc 100644 --- a/distrib/sets/lists/etc/mi +++ b/distrib/sets/lists/etc/mi @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.224 2011/05/27 09:28:41 plunky Exp $ +# $NetBSD: mi,v 1.225 2011/09/06 21:32:30 riz Exp $ # # Note: end-user configuration files that are moved to another location # should not be marked "obsolete"; they should just be removed from @@ -183,6 +183,7 @@ ./etc/rc.d/cgd etc-sys-rc ./etc/rc.d/cleartmp etc-sys-rc ./etc/rc.d/cron etc-cron-rc +./etc/rc.d/devpubd etc-sys-rc ./etc/rc.d/dhclient etc-dhclient-rc ./etc/rc.d/dhcpcd etc-dhcpcd-rc ./etc/rc.d/dhcpd etc-dhcpd-rc diff --git a/etc/defaults/rc.conf b/etc/defaults/rc.conf index 83fc022b331b..0fdce82d6c75 100644 --- a/etc/defaults/rc.conf +++ b/etc/defaults/rc.conf @@ -1,4 +1,4 @@ -# $NetBSD: rc.conf,v 1.114 2011/08/22 18:54:06 jym Exp $ +# $NetBSD: rc.conf,v 1.115 2011/09/06 21:32:29 riz Exp $ # # /etc/defaults/rc.conf -- # default configuration of /etc/rc.conf @@ -316,6 +316,7 @@ sdpd=YES sdpd_flags="" # Other daemons. # rwhod=NO rwhod_flags="-u _rwhod" +devpubd=NO devpubd_flags="" # autocreate nodes for new devs envsys=NO # Set /etc/envsys.conf preferences # Hardware daemons. diff --git a/etc/rc.d/Makefile b/etc/rc.d/Makefile index edcea18de485..198fcba139c2 100755 --- a/etc/rc.d/Makefile +++ b/etc/rc.d/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.84 2011/05/27 09:28:42 plunky Exp $ +# $NetBSD: Makefile,v 1.85 2011/09/06 21:32:29 riz Exp $ .include @@ -17,7 +17,7 @@ CONFIGFILES=\ DAEMON DISKS LOGIN NETWORKING SERVERS \ accounting altqd amd apmd \ bluetooth bootconf.sh bootparams \ - ccd cgd cleartmp cron \ + ccd cgd cleartmp cron devpubd \ dhclient dhcpcd dhcpd dhcrelay dmesg downinterfaces envsys \ fsck fsck_root ftp_proxy ftpd \ gpio \ diff --git a/etc/rc.d/devpubd b/etc/rc.d/devpubd new file mode 100755 index 000000000000..63c22e472ee8 --- /dev/null +++ b/etc/rc.d/devpubd @@ -0,0 +1,17 @@ +#!/bin/sh +# +# $NetBSD: devpubd,v 1.1 2011/09/06 21:32:29 riz Exp $ +# + +# PROVIDE: devpubd +# REQUIRE: DAEMON +# BEFORE: LOGIN + +$_rc_subr_loaded . /etc/rc.subr + +name="devpubd" +rcvar=$name +command="/sbin/${name}" + +load_rc_config $name +run_rc_command "$1"