From 0c632eeb19a5d67cbda5f863ec7e6f2f0bf3c86d Mon Sep 17 00:00:00 2001 From: Brielle Bruns Date: Thu, 19 Apr 2018 12:03:32 -0600 Subject: [PATCH] Fix the errors with option parsing --- virt-install-cloud.sh | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/virt-install-cloud.sh b/virt-install-cloud.sh index 63f737f..715a4f0 100755 --- a/virt-install-cloud.sh +++ b/virt-install-cloud.sh @@ -6,7 +6,7 @@ # # Originally based on: # virt-install-cloud.sh : script to start an OpenStack cloud image on kvm -# version : 1.1 +# version : 1.1.1 # # Author : Claude Durocher # License : GPLv3 @@ -37,16 +37,16 @@ usage() { echo -e "\t-o OS type and variant (default: generic:generic - also set by distro option when available)" } -while getopts "cr:s:n:d:iob:h" opt; do +while getopts "c:r:s:n:d:i:o:b:h" opt; do case $opt in - c) cpucount=("$OPTARG");; - r) ram=("$OPTARG");; - s) storage=("$OPTARG");; - n) hostname=("$OPTARG");; - d) domain=("$OPTARG");; - i) distro=("$OPTARG");; - o) ostype=("$OPTARG");; - b) bridge=("$OPTARG");; + c) cpucount=$OPTARG;; + r) ram=$OPTARG;; + s) storage=$OPTARG;; + n) hostname=$OPTARG;; + d) domain=$OPTARG;; + i) distro=$OPTARG;; + o) ostype=$OPTARG;; + b) bridge=$OPTARG;; h) help="yes";; esac done