From 823f40a3ebf87ebd33d306ea184ee620a62004fb Mon Sep 17 00:00:00 2001 From: Sakirnth Nagarasa Date: Tue, 27 Apr 2021 09:55:03 +0200 Subject: Ignore serial connection when it is not configured. Signed-off-by: Sakirnth Nagarasa --- libexec/container/start-qemu | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libexec/container/start-qemu b/libexec/container/start-qemu index 3f05c8c..c81e6f5 100755 --- a/libexec/container/start-qemu +++ b/libexec/container/start-qemu @@ -253,8 +253,11 @@ then MEMORY="-m $(awk -Fmemory= '/^memory=/ { print $2 }' ${CONFIG}/${NAME}.conf)" - SERIAL="-serial $(awk -Fserial= '/^serial=/ { print $2 }' ${CONFIG}/${NAME}.conf)" - # FIXME empty + if [ -z "$(awk -Fserial= '/^serial=/ { print $2 }' ${CONFIG}/${NAME}.conf)" ] + SERIAL="" + else if + SERIAL="-serial $(awk -Fserial= '/^serial=/ { print $2 }' ${CONFIG}/${NAME}.conf)" + fi RAW_OPTIONS="$(awk -Fraw-options= '/^raw-options=/ { print $2 }' ${CONFIG}/${NAME}.conf)" # FIXME empty -- cgit v1.2.3