diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2014-06-13 17:08:18 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2014-06-13 17:08:18 -0300 |
commit | 22751e613fc2e3690b274af94a3f6c62ae39acab (patch) | |
tree | 0e7159bab15150f796368bf2dcc2ced4546325d7 | |
parent | 11179540152eb6fe5d8b09be4a00cc3a4dcd1bdc (diff) | |
download | scripts-22751e613fc2e3690b274af94a3f6c62ae39acab.tar.gz scripts-22751e613fc2e3690b274af94a3f6c62ae39acab.tar.bz2 |
Fixing vbox usage
-rwxr-xr-x | vbox | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -8,6 +8,12 @@ BASENAME="`basename $0`" COMMAND="$1" VM="$2" +# Usage +function usage { + echo "usage: $BASENAME <command> [vm]" + exit 1 +} + # Build options if [ ! -z "$VM" ]; then if [ "$COMMAND" == "up" ]; then @@ -19,13 +25,14 @@ if [ ! -z "$VM" ]; then elif [ "$COMMAND" == "halt" ]; then OPTIONS="poweroff" COMMAND="controlvm" + else + usage fi elif [ "$COMMAND" == "status" ]; then OPTIONS="runningvms" COMMAND="list" else - echo "usage: $BASENAME <command> [vm]" - exit 1 + usage fi # Dispatch |