diff options
author | Sakirnth Nagarasa <sakirnth@gmail.com> | 2021-04-27 07:55:03 +0000 |
---|---|---|
committer | Sakirnth Nagarasa <sakirnth@gmail.com> | 2021-09-01 08:25:43 +0000 |
commit | 823f40a3ebf87ebd33d306ea184ee620a62004fb (patch) | |
tree | 404358f0f39922975f31f7b6a4ddfe6734e8ceaf /libexec/container/start-qemu | |
parent | Adding more templates for arista eos lab. (diff) | |
download | compute-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/start-qemu')
-rwxr-xr-x | libexec/container/start-qemu | 7 |
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 |