chore: change exit code in create_conmfig() to 1
This commit is contained in:
parent
d73d54a688
commit
b2205dfbd8
6
quickget
6
quickget
|
@ -367,7 +367,7 @@ function create_config() {
|
||||||
OS="custom"
|
OS="custom"
|
||||||
if ! mkdir "${VM_PATH}" 2>/dev/null; then
|
if ! mkdir "${VM_PATH}" 2>/dev/null; then
|
||||||
echo "ERROR! Could not create directory: ${VM_PATH}. Please verify that it does not already exist"
|
echo "ERROR! Could not create directory: ${VM_PATH}. Please verify that it does not already exist"
|
||||||
exit 21
|
exit 1
|
||||||
fi
|
fi
|
||||||
if [[ "${INPUT}" == "http://"* ]] || [[ "${INPUT}" == "https://"* ]]; then
|
if [[ "${INPUT}" == "http://"* ]] || [[ "${INPUT}" == "https://"* ]]; then
|
||||||
INPUT="$(web_redirect "${INPUT}")"
|
INPUT="$(web_redirect "${INPUT}")"
|
||||||
|
@ -376,7 +376,7 @@ function create_config() {
|
||||||
INPUT="${VM_PATH}/${INPUT##*/}"
|
INPUT="${VM_PATH}/${INPUT##*/}"
|
||||||
else
|
else
|
||||||
echo "ERROR! Only ISO,IMG and QCOW2 file types are supported for --create-config"
|
echo "ERROR! Only ISO,IMG and QCOW2 file types are supported for --create-config"
|
||||||
exit 22
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if [[ "${INPUT}" == *".iso" ]]; then
|
if [[ "${INPUT}" == *".iso" ]]; then
|
||||||
|
@ -390,7 +390,7 @@ function create_config() {
|
||||||
CUSTOM_IMAGE_TYPE="qcow2"
|
CUSTOM_IMAGE_TYPE="qcow2"
|
||||||
else
|
else
|
||||||
echo "ERROR! Only ISO,IMG and QCOW2 file types are supported for --create-config"
|
echo "ERROR! Only ISO,IMG and QCOW2 file types are supported for --create-config"
|
||||||
exit 23
|
exit 1
|
||||||
fi
|
fi
|
||||||
echo "Creating custom VM config for ${INPUT##*/}."
|
echo "Creating custom VM config for ${INPUT##*/}."
|
||||||
case "${INPUT,,}" in
|
case "${INPUT,,}" in
|
||||||
|
|
Loading…
Reference in New Issue