diff --git a/misc/config_tools/launch_config/launch_script_template.sh b/misc/config_tools/launch_config/launch_script_template.sh index 4c333af81..b0adb2be8 100644 --- a/misc/config_tools/launch_config/launch_script_template.sh +++ b/misc/config_tools/launch_config/launch_script_template.sh @@ -127,8 +127,10 @@ function add_virtual_device() { if [ "${kind}" = "virtio-net" ]; then # Create the tap device - tap_conf=${options%,*} - create_tap "${tap_conf#tap=}" >> /dev/stderr + if [[ ${options} =~ tap=([^,]+) ]]; then + tap_conf="${BASH_REMATCH[1]}" + create_tap "${tap_conf}" >> /dev/stderr + fi fi echo -n "-s ${slot},${kind}"