summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src.etc/rc.common7
1 files changed, 6 insertions, 1 deletions
diff --git a/src.etc/rc.common b/src.etc/rc.common
index c6ccf85..8bd589c 100644
--- a/src.etc/rc.common
+++ b/src.etc/rc.common
@@ -19,7 +19,7 @@ STOP=''
main()
{
- local action="${2}"
+ local action=
local es=
SCRIPT="${1}"
@@ -31,6 +31,11 @@ main()
ALL_CMDS="${ALL_CMDS} enable disable "
fi
+ if [ ${#} -ne 2 ]; then
+ usage
+ return 1
+ fi
+ action="${2:-<unknown>}"
if [ "x${ALL_CMDS#* ${action} }" != "x${ALL_CMDS}" ]; then
if [ "x${action}" = 'xstart' ] && [ -e /etc/rc.policy ]; then
[ "x$(cat /etc/rc.policy)" = 'disabled' ] && return 0