From b72700feab56a063c100ae8a38e8cb0818d99bdc Mon Sep 17 00:00:00 2001 From: redxef Date: Tue, 18 Jan 2022 11:51:45 +0100 Subject: [PATCH] Always reverse network changes if qemu crashes. --- start | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/start b/start index 96c6612..a581834 100755 --- a/start +++ b/start @@ -122,6 +122,8 @@ read -ra base_arguments -d '' < "$o_base_path" || true read -ra default_arguments -d '' < "$o_default_path" || true read -ra hardware_arguments -d '' < "$o_hardware_path" || true read -ra specific_arguments -d '' < "$o_specific_path" || true + +# append or true to reverse network changes $DEBUG $SUDO nice --adjustment=-20 taskset --cpu-list '2-5,8-11' \ qemu-system-x86_64 \ -name "$VMNAME,process=VMNAME" \ @@ -130,7 +132,7 @@ $DEBUG $SUDO nice --adjustment=-20 taskset --cpu-list '2-5,8-11' \ "${base_arguments[@]}" \ "${default_arguments[@]}" \ "${hardware_arguments[@]}" \ - "${specific_arguments[@]}" + "${specific_arguments[@]}" || true NET_CONF_FILE="$NET_CONF_FILE" $DEBUG $SUDO --preserve-env=NET_CONF_FILE \ ./net delete