Start to fix script errors
parent
e4f0b8f844
commit
87e76c75a3
|
@ -40,10 +40,10 @@ usage() {
|
||||||
while getopts "hcr:s:n:d:iob" opt; do
|
while getopts "hcr:s:n:d:iob" opt; do
|
||||||
case $opt in
|
case $opt in
|
||||||
c) cpucount=("$OPTARG");;
|
c) cpucount=("$OPTARG");;
|
||||||
r) ram=("$OPTARG");;
|
r) ram=("$OPTARG");;
|
||||||
s) storage=("$OPTARG");;
|
s) storage=("$OPTARG");;
|
||||||
n) hostname=("$OPTARG");;
|
n) hostname=("$OPTARG");;
|
||||||
d) domain=("$OPTARG");;
|
d) domain=("$OPTARG");;
|
||||||
i) distro=("$OPTARG");;
|
i) distro=("$OPTARG");;
|
||||||
o) ostype=("$OPTARG");;
|
o) ostype=("$OPTARG");;
|
||||||
b) bridge=("$OPTARG");;
|
b) bridge=("$OPTARG");;
|
||||||
|
@ -52,7 +52,7 @@ while getopts "hcr:s:n:d:iob" opt; do
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
||||||
if [[ -z $ram || -z $storage || -z $hostname || -z $domain || -z $bridge || $help = "yes" ]]; then
|
if [[ -z $ram || -z $storage || -z $hostname || -z $domain || -z $bridge || $help == "yes" ]]; then
|
||||||
echo "Error: Incorrect command usage, must provide all * flags."
|
echo "Error: Incorrect command usage, must provide all * flags."
|
||||||
usage
|
usage
|
||||||
exit 1
|
exit 1
|
||||||
|
|
Loading…
Reference in New Issue