Fix the errors with option parsing

master
Brie Bruns 2018-04-19 12:03:32 -06:00
parent 673fa71904
commit 0c632eeb19
1 changed files with 10 additions and 10 deletions

View File

@ -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