Fix the errors with option parsing

master
Brie Bruns 5 years ago
parent 673fa71904
commit 0c632eeb19
  1. 20
      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

Loading…
Cancel
Save