[why] check $kernel includes "riscv64" to set qemu command, this logic is suitable in check_option_value(), not in set_qemu, so move order.
test: /srv/result/host-info/2021-01-13/vm-2p8g/debian-sid-x86_64/z9.351229 /srv/result/host-info/2021-01-13/vm-2p8g/debian-sid-riscv64/z9.351202 /srv/result/host-info/2021-01-13/vm-2p8g/debian-sid-aarch64/z9.351187
Signed-off-by: Liu Yinsi liuyinsi@163.com --- providers/qemu/kvm.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/providers/qemu/kvm.sh b/providers/qemu/kvm.sh index 8979da6..51357a6 100755 --- a/providers/qemu/kvm.sh +++ b/providers/qemu/kvm.sh @@ -57,6 +57,9 @@ check_option_value() exit } + # debian has both qemu-system-x86_64 and qemu-system-riscv64 command + [[ $kernel =~ 'riscv64' ]] && qemu=qemu-system-riscv64 + [ -n "$initrds" ] || exit }
@@ -104,9 +107,6 @@ set_qemu() do command -v "$qemu" > /dev/null && break done - - # debian has both qemu-system-x86_64 and qemu-system-riscv64 command - [[ $kernel =~ 'riscv64' ]] && qemu=qemu-system-riscv64 }
print_message() @@ -195,9 +195,9 @@ check_logfile write_logfile
parse_ipxe_script -check_option_value
set_options +check_option_value
print_message