drop the '0' default in config_get_bool
[openwrt.git] / package / base-files / files / etc / rc.common
index 4ffc798..99e2a5d 100755 (executable)
@@ -67,24 +67,26 @@ EOF
 }
 
 initscript="$1"
-action="$2"
+[ "$#" -ge 1 ] && shift
+action="$1"
+[ "$#" -ge 1 ] && shift
 
 . "$initscript"
 
 cmds=
 for cmd in $EXTRA_COMMANDS; do
-       cmds="${cmds:+$cmds$N}$cmd) $cmd;;"
+       cmds="${cmds:+$cmds$N}$cmd) $cmd \"\$@\";;"
 done
 eval "case \"\$action\" in
-       start) start;;
-       stop) stop;;
-       reload) reload || restart;;
-       restart) restart;;
-       boot) boot;;
-       shutdown) shutdown;;
-       enable) enable;;
-       enabled) enabled;;
-       disable) disable;;
+       start) start \"\$@\";;
+       stop) stop \"\$@\";;
+       reload) reload \"\$@\" || restart \"\$@\";;
+       restart) restart \"\$@\";;
+       boot) boot \"\$@\";;
+       shutdown) shutdown \"\$@\";;
+       enable) enable \"\$@\";;
+       enabled) enabled \"\$@\";;
+       disable) disable \"\$@\";;
        $cmds
        *) help;;
 esac"
This page took 0.021923 seconds and 4 git commands to generate.