Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/etc Add and rc.conf.d directory. If a config file for comman...



details:   https://anonhg.NetBSD.org/src/rev/1ff0918740ad
branches:  trunk
changeset: 487585:1ff0918740ad
user:      fvdl <fvdl%NetBSD.org@localhost>
date:      Fri Jun 09 14:27:57 2000 +0000

description:
Add and rc.conf.d directory. If a config file for command X exists
(/etc/rc.conf.d/X), then it is sourced in addition of /etc/rc.conf

This means that the base system will still use rc.conf, but that
3rd party scripts can use rc.conf.d

diffstat:

 etc/mtree/NetBSD.dist |  7 ++++++-
 etc/rc.subr           |  6 ++++--
 2 files changed, 10 insertions(+), 3 deletions(-)

diffs (48 lines):

diff -r 86cceff93a80 -r 1ff0918740ad etc/mtree/NetBSD.dist
--- a/etc/mtree/NetBSD.dist     Fri Jun 09 14:14:44 2000 +0000
+++ b/etc/mtree/NetBSD.dist     Fri Jun 09 14:27:57 2000 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: NetBSD.dist,v 1.108 2000/05/12 18:12:55 thorpej Exp $
+#      $NetBSD: NetBSD.dist,v 1.109 2000/06/09 14:28:00 fvdl Exp $
 #      @(#)4.4BSD.dist 8.1 (Berkeley) 6/13/93
 
 /set type=dir uname=root gname=wheel mode=0755
@@ -95,6 +95,11 @@
 # ./etc/rc.d
 ..
 
+# ./etc/rc.conf.d
+rc.conf.d
+# ./etc/rc.conf.d
+..
+
 # ./etc/sliphome
 sliphome
 # ./etc/sliphome
diff -r 86cceff93a80 -r 1ff0918740ad etc/rc.subr
--- a/etc/rc.subr       Fri Jun 09 14:14:44 2000 +0000
+++ b/etc/rc.subr       Fri Jun 09 14:27:57 2000 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: rc.subr,v 1.19 2000/05/13 08:23:45 lukem Exp $
+# $NetBSD: rc.subr,v 1.20 2000/06/09 14:27:57 fvdl Exp $
 #
 # Copyright (c) 1997-2000 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -449,7 +449,6 @@
 #
 # load_rc_config
 #      Source in the configuration file for a given command.
-#      Currently just uses /etc/rc.conf.
 #
 load_rc_config()
 {
@@ -459,6 +458,9 @@
        fi
 
        . /etc/rc.conf
+       if [ -f /etc/rc.conf.d/"$_command" ]; then
+               . /etc/rc.conf.d/"$_command"
+       fi
 }
 
 



Home | Main Index | Thread Index | Old Index