
when no job, the $kernel not exists and will exit, no judge initrd
如果kernel为空就代表一定没有job吗? Thanks, Yinsi
Thanks, Shenwei
Signed-off-by: Liu Yinsi <liuyinsi@163.com> --- providers/qemu/kvm.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/providers/qemu/kvm.sh b/providers/qemu/kvm.sh index 4d05964..0c58d94 100755 --- a/providers/qemu/kvm.sh +++ b/providers/qemu/kvm.sh @@ -68,16 +68,17 @@ check_option_value() # debian has both qemu-system-x86_64 and qemu-system-riscv64 command [[ $kernel =~ 'riscv64' ]] && qemu=qemu-system-riscv64
- [ -n "$initrds" ] || { + if [ -n "$initrds" ]; then + cat $initrds > $initrd + else log_error "The current initrds is null." exit 1 - } + fi }
set_initrd() { initrd=initrd - cat $initrds > $initrd }
set_bios() -- 2.23.0