From 5b8623bec67db7e412dfbe5dd0ec0e28391a4b5a Mon Sep 17 00:00:00 2001 From: fvdl Date: Fri, 9 Jun 2000 14:27:57 +0000 Subject: [PATCH] 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 --- etc/mtree/NetBSD.dist | 7 ++++++- etc/rc.subr | 6 ++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/etc/mtree/NetBSD.dist b/etc/mtree/NetBSD.dist index f50fa1260d2f..68085438da4c 100644 --- a/etc/mtree/NetBSD.dist +++ b/etc/mtree/NetBSD.dist @@ -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 @@ rc.d # ./etc/rc.d .. +# ./etc/rc.conf.d +rc.conf.d +# ./etc/rc.conf.d +.. + # ./etc/sliphome sliphome # ./etc/sliphome diff --git a/etc/rc.subr b/etc/rc.subr index c22866985e96..3b7a9f3e903d 100644 --- a/etc/rc.subr +++ b/etc/rc.subr @@ -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 @@ run_rc_script() # # 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 @@ load_rc_config() fi . /etc/rc.conf + if [ -f /etc/rc.conf.d/"$_command" ]; then + . /etc/rc.conf.d/"$_command" + fi }