refactor: move all port checks to ports_param_check()
This commit is contained in:
parent
124202511a
commit
cbc3c20104
20
quickemu
20
quickemu
|
@ -1242,11 +1242,6 @@ function vm_boot() {
|
||||||
-device tpm-tis,tpmdev=tpm0)
|
-device tpm-tis,tpmdev=tpm0)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "${monitor_telnet_port}" ] && ! is_numeric "${monitor_telnet_port}"; then
|
|
||||||
echo "ERROR: telnet port must be a number!"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "${monitor}" == "none" ]; then
|
if [ "${monitor}" == "none" ]; then
|
||||||
args+=(-monitor none)
|
args+=(-monitor none)
|
||||||
echo " - Monitor: (off)"
|
echo " - Monitor: (off)"
|
||||||
|
@ -1272,11 +1267,6 @@ function vm_boot() {
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "${serial_telnet_port}" ] && ! is_numeric "${serial_telnet_port}"; then
|
|
||||||
echo "ERROR: serial port must be a number!"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "${serial}" == "none" ]; then
|
if [ "${serial}" == "none" ]; then
|
||||||
args+=(-serial none)
|
args+=(-serial none)
|
||||||
echo " - Serial: (off)"
|
echo " - Serial: (off)"
|
||||||
|
@ -1485,6 +1475,16 @@ function ports_param_check() {
|
||||||
echo "ERROR: spice_port must be a number!"
|
echo "ERROR: spice_port must be a number!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -n "${monitor_telnet_port}" ] && ! is_numeric "${monitor_telnet_port}"; then
|
||||||
|
echo "ERROR: telnet port must be a number!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "${serial_telnet_port}" ] && ! is_numeric "${serial_telnet_port}"; then
|
||||||
|
echo "ERROR: serial port must be a number!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function sound_card_param_check() {
|
function sound_card_param_check() {
|
||||||
|
|
Loading…
Reference in New Issue