diff --git a/quickemu b/quickemu index a4b03a0..0e644e6 100755 --- a/quickemu +++ b/quickemu @@ -1442,6 +1442,18 @@ function display_param_check() { fi } +function ports_param_check() { + if [ -n "${ssh_port}" ] && ! is_numeric "${ssh_port}"; then + echo "ERROR: ssh_port must be a number!" + exit 1 + fi + + if [ -n "${spice_port}" ] && ! is_numeric "${spice_port}"; then + echo "ERROR: spice_port must be a number!" + exit 1 + fi +} + function sound_card_param_check() { if [ "${sound_card}" != "ac97" ] && [ "${sound_card}" != "es1370" ] && [ "${sound_card}" != "ich9-intel-hda" ] && [ "${sound_card}" != "intel-hda" ] && [ "${sound_card}" != "sb16" ] && [ "${sound_card}" != "usb-audio" ] && [ "${sound_card}" != "none" ]; then echo "ERROR! Requested sound card '${sound_card}' is not recognised."