summaryrefslogtreecommitdiff
path: root/sh
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2007-11-20 18:19:48 +0000
committerRoy Marples <roy@marples.name>2007-11-20 18:19:48 +0000
commita76f2c20e410a1414b0922b22b00d1bc7c6cc35d (patch)
treee4615e9c105b02b110f295e0a95186e55967e43c /sh
parent6a6ef66d15f37b771924b4c3504f173cb9dbc3f0 (diff)
downloadopenrc-a76f2c20e410a1414b0922b22b00d1bc7c6cc35d.tar.gz
openrc-a76f2c20e410a1414b0922b22b00d1bc7c6cc35d.tar.bz2
openrc-a76f2c20e410a1414b0922b22b00d1bc7c6cc35d.tar.xz
opts -> extra_commands. This is much more descriptive.
Diffstat (limited to 'sh')
-rwxr-xr-xsh/rc-help.sh12
-rwxr-xr-xsh/runscript.sh4
2 files changed, 8 insertions, 8 deletions
diff --git a/sh/rc-help.sh b/sh/rc-help.sh
index 69a8797..d4995df 100755
--- a/sh/rc-help.sh
+++ b/sh/rc-help.sh
@@ -54,12 +54,12 @@ else
NL=
fi
-default_opts="describe help start status stop restart zap"
-extra_opts="$(. "${myscript}" 2>/dev/null ; echo "${opts}")"
+default_commands="describe help start status stop restart zap"
+extra_commands="$(. "${myscript}" 2>/dev/null ; echo "${extra_commands:-${opts}}")"
printf "Usage: ${CYAN}${SERVICE}${OFF} [ ${GREEN}flags${OFF} ] < ${GREEN}options${OFF} >
-${CYAN}Normal Options:${OFF}"
+${CYAN}Normal Commands:${OFF}"
if [ "${BE_VERBOSE}" = "yes" ] ; then
printf "
@@ -115,16 +115,16 @@ printf "
else
-printf " ${GREEN}${default_opts}${OFF}
+printf " ${GREEN}${default_commands}${OFF}
Default init.d options.
"
fi
-if [ -n "${extra_opts}" ] ; then
+if [ -n "${extra_commands}" ] ; then
printf "
${CYAN}Additional Options:${OFF}${NL}
- ${GREEN}${extra_opts}${OFF}
+ ${GREEN}${extra_commands}${OFF}
Extra options supported by this init.d script.
"
fi
diff --git a/sh/runscript.sh b/sh/runscript.sh
index e5eb5c2..8aab605 100755
--- a/sh/runscript.sh
+++ b/sh/runscript.sh
@@ -49,7 +49,7 @@ describe() {
fi
local svc= desc=
- for svc in ${opts}; do
+ for svc in ${extra_commands:-${opts}}; do
eval desc=\$description_${svc}
if [ -n "${desc}" ]; then
einfo "${HILITE}${svc}${NORMAL}: ${desc}"
@@ -128,7 +128,7 @@ fi
while [ -n "$1" ]; do
# See if we have the required function and run it
- for rc_x in describe start stop ${opts}; do
+ for rc_x in describe start stop ${extra_commands:-${opts}}; do
if [ "${rc_x}" = "$1" ]; then
if type "$1" >/dev/null 2>&1; then
unset rc_x