diff options
Diffstat (limited to 'live_zap')
-rwxr-xr-x | live_zap | 17 |
1 files changed, 16 insertions, 1 deletions
@@ -110,9 +110,11 @@ usage() { echo "Usage: equivalent of:" echo "$me install make install" echo "$me config make config" - echo "$me rsync TARGET (copies file to /tmp/live in TARGET)" echo "$me unload /etc/init.d/zaptel stop" echo "$me load /etc/init.d/zaptel start" + echo "$me reload /etc/init.d/zaptel restart" + echo "$me rsync TARGET (copies file to /tmp/live in TARGET)" + echo "$me exec COMMAND (Runs COMMAND in 'live' environment)" } case "$1" in @@ -128,6 +130,7 @@ config) rsync) if [ $# -ne 2 ]; then echo >&2 "$0: Error: rsync requires a target parameter". + exit 1 fi # copy the script itself and the installed directory to the # target host: @@ -164,6 +167,18 @@ reload) $0 unload $0 load ;; +exec) + if [ $# -lt 2 ]; then + # No command given: start a subshell in the environemnt + # of the "live" system: + echo >&2 "$0: Error: exec requires a command to run" + exit 1 + fi + + # Command given: run it: + shift + "$@" + ;; help) usage ;; |