summaryrefslogtreecommitdiffstats
path: root/libexec/container
diff options
context:
space:
mode:
authorSakirnth Nagarasa <sakirnth@gmail.com>2021-04-27 07:55:03 +0000
committerSakirnth Nagarasa <sakirnth@gmail.com>2021-09-01 08:25:43 +0000
commit823f40a3ebf87ebd33d306ea184ee620a62004fb (patch)
tree404358f0f39922975f31f7b6a4ddfe6734e8ceaf /libexec/container
parentAdding more templates for arista eos lab. (diff)
downloadcompute-tools-823f40a3ebf87ebd33d306ea184ee620a62004fb.tar.xz
compute-tools-823f40a3ebf87ebd33d306ea184ee620a62004fb.zip
Ignore serial connection when it is not configured.
Signed-off-by: Sakirnth Nagarasa <sakirnth@gmail.com>
Diffstat (limited to 'libexec/container')
-rwxr-xr-xlibexec/container/start-qemu7
1 files 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