On Fri, Jan 15, 2021 at 05:59:18PM +0800, Yu Chuan wrote:
Signed-off-by: Yu Chuan 13186087857@163.com
providers/qemu/kvm.sh | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/providers/qemu/kvm.sh b/providers/qemu/kvm.sh index 35678fbd44ef..f1d65272dbf9 100755 --- a/providers/qemu/kvm.sh +++ b/providers/qemu/kvm.sh @@ -52,15 +52,23 @@ parse_ipxe_script()
check_option_value() {
- [ -n "$kernel" ] || {
echo "[ERROR] Can not find job for current hostname: $hostname."
exit 1
- }
- [ -s "$kernel" ] || {
echo "The kernel does not exist: $kernel"
exit
echo "[ERROR] Can not find kernel file or kernel file is empty: $kernel."
no job is normal, why define it error?
if we do this, when i read this message, i feel an error occurred in the program
Thanks, Shenwei
exit 1
}
# debian has both qemu-system-x86_64 and qemu-system-riscv64 command [[ $kernel =~ 'riscv64' ]] && qemu=qemu-system-riscv64
- [ -n "$initrds" ] || exit
- [ -n "$initrds" ] || {
echo "[ERROR] Can not find any initrd for current vm."
exit 1
- }
}
set_initrd()
2.23.0