Move /etc/conf.d/rc to /etc/rc.conf.

Lowercase all configurable variables, non configurations remain uppercase.
Replace rc_env_bool with rc_yesno.
Split localmount info procfs (Linux) and dumpon, savecore (BSD)
This commit is contained in:
Roy Marples
2007-11-23 12:04:11 +00:00
parent f077f179ed
commit d81def80b0
64 changed files with 755 additions and 477 deletions

View File

@@ -59,18 +59,18 @@ describe() {
done
}
yesno ${RC_DEBUG} && set -x
yesno ${rc_debug} && set -x
# If we're net.eth0 or openvpn.work then load net or openvpn config
rc_c=${SVCNAME%%.*}
if [ -n "${rc_c}" -a "${rc_c}" != "${SVCNAME}" ]; then
if [ -e "/etc/conf.d/${rc_c}.${RC_SOFTLEVEL}" ]; then
. "/etc/conf.d/${rc_c}.${RC_SOFTLEVEL}"
elif [ -e "/etc/conf.d/${rc_c}" ]; then
. "/etc/conf.d/${rc_c}"
_c=${SVCNAME%%.*}
if [ -n "${_c}" -a "${_c}" != "${SVCNAME}" ]; then
if [ -e "/etc/conf.d/${_c}.${RC_SOFTLEVEL}" ]; then
. "/etc/conf.d/${_c}.${RC_SOFTLEVEL}"
elif [ -e "/etc/conf.d/${_c}" ]; then
. "/etc/conf.d/${_c}"
fi
fi
unset rc_c
unset _c
# Overlay with our specific config
if [ -e "/etc/conf.d/${SVCNAME}.${RC_SOFTLEVEL}" ]; then
@@ -83,7 +83,7 @@ fi
[ -e /etc/rc.conf ] && . /etc/rc.conf
# Apply any ulimit defined
[ -n "${RC_ULIMIT}" ] && ulimit ${RC_ULIMIT}
[ -n "${rc_ulimit:-${RC_ULIMIT}}" ] && ulimit ${rc_ulimit:-${RC_ULIMIT}}
# Load our script
. $1
@@ -128,10 +128,10 @@ fi
while [ -n "$1" ]; do
# See if we have the required function and run it
for rc_x in describe start stop ${extra_commands:-${opts}}; do
if [ "${rc_x}" = "$1" ]; then
for _cmd in describe start stop ${extra_commands:-${opts}}; do
if [ "${_cmd}" = "$1" ]; then
if type "$1" >/dev/null 2>&1; then
unset rc_x
unset _cmd
if type "$1"_pre >/dev/null 2>&1; then
"$1"_pre || exit $?
fi
@@ -142,7 +142,7 @@ while [ -n "$1" ]; do
shift
continue 2
else
if [ "${rc_x}" = "start" -o "${rc_x}" = "stop" ]; then
if [ "${_cmd}" = "start" -o "${_cmd}" = "stop" ]; then
exit 0
else
eerror "${SVCNAME}: function \`$1' defined but does not exist"