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/*.
This commit is contained in:
lukem 2000-05-13 08:23:45 +00:00
parent 78abee064b
commit 2c25ae21eb
1 changed files with 17 additions and 1 deletions

View File

@ -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.
@ -446,6 +446,22 @@ run_rc_script()
esac
}
#
# 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