diff options
| author | Roy Marples <roy@marples.name> | 2007-11-23 12:04:11 +0000 | 
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2007-11-23 12:04:11 +0000 | 
| commit | d81def80b00a3dbcb4f8980f4503c4d659b48a2a (patch) | |
| tree | 64a5df4281620cacbc1f03838d42e88167886fc9 /sh/runscript.sh | |
| parent | f077f179edaeb746b267421baa29ec751c38b713 (diff) | |
| download | openrc-d81def80b00a3dbcb4f8980f4503c4d659b48a2a.tar.xz | |
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)
Diffstat (limited to 'sh/runscript.sh')
| -rwxr-xr-x | sh/runscript.sh | 26 | 
1 files changed, 13 insertions, 13 deletions
| diff --git a/sh/runscript.sh b/sh/runscript.sh index 5ba1004d..78433e87 100755 --- a/sh/runscript.sh +++ b/sh/runscript.sh @@ -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" | 
