refactor: if disk_img is not configured, automatically configure it
This commit is contained in:
parent
622f6046c7
commit
b3a1300144
6
quickemu
6
quickemu
|
@ -1513,8 +1513,8 @@ function monitor_send_cmd {
|
||||||
# Lowercase variables are used in the VM config file only
|
# Lowercase variables are used in the VM config file only
|
||||||
boot="efi"
|
boot="efi"
|
||||||
cpu_cores=""
|
cpu_cores=""
|
||||||
disk_img=""
|
|
||||||
disk_format="${disk_format:-qcow2}"
|
disk_format="${disk_format:-qcow2}"
|
||||||
|
disk_img="${disk_img:-}"
|
||||||
disk_size=""
|
disk_size=""
|
||||||
display="${display:-sdl}"
|
display="${display:-sdl}"
|
||||||
extra_args="${extra_args:-}"
|
extra_args="${extra_args:-}"
|
||||||
|
@ -1728,9 +1728,9 @@ if [ -n "${VM}" ] && [ -e "${VM}" ]; then
|
||||||
SOCKET_MONITOR="${VMDIR}/${VMNAME}-monitor.socket"
|
SOCKET_MONITOR="${VMDIR}/${VMNAME}-monitor.socket"
|
||||||
SOCKET_SERIAL="${VMDIR}/${VMNAME}-serial.socket"
|
SOCKET_SERIAL="${VMDIR}/${VMNAME}-serial.socket"
|
||||||
|
|
||||||
|
# if not disk_img is configured, do the right thing.
|
||||||
if [ -z "${disk_img}" ]; then
|
if [ -z "${disk_img}" ]; then
|
||||||
echo "ERROR! No disk_img defined."
|
disk_img="${VMDIR}/disk.${disk_format}"
|
||||||
exit 1
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Iterate over any actions and exit.
|
# Iterate over any actions and exit.
|
||||||
|
|
Loading…
Reference in New Issue