Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/etc Implement load_rc_config(), which takes the config name ...
details: https://anonhg.NetBSD.org/src/rev/a1c6eed5debd
branches: trunk
changeset: 486106:a1c6eed5debd
user: lukem <lukem%NetBSD.org@localhost>
date: Sat May 13 08:23:45 2000 +0000
description:
Implement load_rc_config(), which takes the config name as an argument.
Currently this just loads /etc/rc.conf, but this will make it easier
for us and users to modify the config mechanism without modifying all
of /etc/rc.d/*.
diffstat:
etc/rc.subr | 18 +++++++++++++++++-
1 files changed, 17 insertions(+), 1 deletions(-)
diffs (32 lines):
diff -r bb2f4c1de232 -r a1c6eed5debd etc/rc.subr
--- a/etc/rc.subr Sat May 13 08:07:01 2000 +0000
+++ b/etc/rc.subr Sat May 13 08:23:45 2000 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: rc.subr,v 1.18 2000/05/13 03:07:17 lukem Exp $
+# $NetBSD: rc.subr,v 1.19 2000/05/13 08:23:45 lukem Exp $
#
# Copyright (c) 1997-2000 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -447,6 +447,22 @@
}
#
+# load_rc_config
+# Source in the configuration file for a given command.
+# Currently just uses /etc/rc.conf.
+#
+load_rc_config()
+{
+ _command=$1
+ if [ -z "$_command" ]; then
+ err 3 'USAGE: load_rc_config command'
+ fi
+
+ . /etc/rc.conf
+}
+
+
+#
# rc_usage commands
# Print a usage string for $0, with `commands' being a list of
# valid commands.
Home |
Main Index |
Thread Index |
Old Index