before: -initrd $initrd after: -initrd initrd
[why] initrd is a file, no path involved, can use directly, so remove $initrd, set_initrd() also unnecessary if directly use initrd.
Signed-off-by: Liu Yinsi liuyinsi@163.com --- providers/qemu/kvm.sh | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/providers/qemu/kvm.sh b/providers/qemu/kvm.sh index 0c58d94..1e3f397 100755 --- a/providers/qemu/kvm.sh +++ b/providers/qemu/kvm.sh @@ -69,18 +69,13 @@ check_option_value() [[ $kernel =~ 'riscv64' ]] && qemu=qemu-system-riscv64
if [ -n "$initrds" ]; then - cat $initrds > $initrd + cat $initrds > initrd else log_error "The current initrds is null." exit 1 fi }
-set_initrd() -{ - initrd=initrd -} - set_bios() { bios=/usr/share/qemu-efi-aarch64/QEMU_EFI.fd @@ -137,7 +132,7 @@ public_option() kvm=( $qemu -kernel $kernel - -initrd $initrd + -initrd initrd -smp $nr_cpu -m $memory -rtc base=localtime @@ -196,7 +191,6 @@ run_qemu()
set_options() { - set_initrd set_bios set_helper set_nic