summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDominique Martinet <asmadeus@codewreck.org>2013-07-20 18:51:29 +0200
committerDominique Martinet <asmadeus@codewreck.org>2015-07-02 18:26:37 +0200
commit18b2ca19ade523d8f81cfdfd4f9f4591d69a12df (patch)
tree55a09adf868d5da6fc9657ae71ca8514535c8a4e
parentf793fe53fe1179031a4a119ad4fca0a28283ee6b (diff)
Don't busyloop if arguments are malformed on createsource
-rwxr-xr-xkvm-wrapper.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/kvm-wrapper.sh b/kvm-wrapper.sh
index 0dcb48d..aa43aab 100755
--- a/kvm-wrapper.sh
+++ b/kvm-wrapper.sh
@@ -959,9 +959,15 @@ function kvm_build_vm ()
local DISABLE_BOOTSTRAP="yes"
shift
;;
+ *)
+ echo "Unknown argument: $1"
+ echo "Exiting"
+ print_help "create"
+ return 1
+ ;;
esac
done
- if [[ ! "$#" -eq 1 ]]; then print_help; exit 1; fi
+ if [[ ! "$#" -eq 1 ]]; then print_help "create"; exit 1; fi
VM_NAME="$1"