@@ -48,24 +48,28 @@ commit()
4848eval VAL=\$$i
4949eval OVAL=\$OLDVAL_${i}
5050
51- if [ "${i}" = "jname" ]; then
52- _oldjname="${OVAL}"
53- _newjname="${VAL}"
54- continue
55- fi
56-
57- if [ "${i}" = "vm_ram" ]; then
58- # In SQLite3 we store vm_ram in bytes, convert it
59- # test for human
60- if is_number ${VAL}; then
61- if conv2bytes ${VAL}; then
62- VAL="${convval}"
51+ case "${i}" in
52+ jname)
53+ _oldjname="${OVAL}"
54+ _newjname="${VAL}"
55+ continue
56+ ;;
57+ vm_ram)
58+ # In SQLite3 we store vm_ram in bytes, convert it
59+ # test for human
60+ if is_number ${VAL}; then
61+ if conv2bytes ${VAL}; then
62+ VAL="${convval}"
63+ fi
64+ else
65+ # Assume than user input in MB, so convert to bytes
66+ VAL=$(( convval * 1024 * 1024 ))
6367fi
64- else
65- # Assume than user input in MB, so convert to bytes
66- VAL=$(( convval * 1024 * 1024 ))
67- fi
68- fi
68+ ;;
69+ vm_iso_path2)
70+ [ -z "${VAL}" ] && VAL="0"
71+ ;;
72+ esac
6973
7074[ "${VAL}" = "${OVAL}" ] && continue
7175
@@ -295,7 +299,7 @@ while [ 1 ]; do
295299"COMMIT")
296300commit
297301;;
298- astart|protectedbhyve_generate_acpi |bhyve_wire_memory|bhyve_rts_keeps_utc|bhyve_force_msi_irq|bhyve_x2apic_mode|bhyve_mptable_gen|bhyve_ignore_msr_acc|xhci|tablet|fbuf|jailed|chrooted|double_acpi|virtio_rnd)
302+ astart|protected|bhyve_generate_acpi |bhyve_wire_memory|bhyve_rts_keeps_utc|bhyve_force_msi_irq|bhyve_x2apic_mode|bhyve_mptable_gen|bhyve_ignore_msr_acc|xhci|tablet|fbuf|jailed|chrooted|double_acpi|virtio_rnd)
299303invert_checkbox ${mychoice}
300304continue
301305;;