tools/hotplug/Linux: don't needlessly use non-standard features in vif-bridge
PATCH 1/1 tools/hotplug/Linux: don't needlessly use non-standard features in vif-bridge
We're not after any "fall-through" behavior here. Replace the constructs with ones understood by all conforming shells, including older bash (problem observed with 3.1.51(1)).
tools/hotplug/Linux/vif-bridge +2 -6
@@ -77,16 +77,12 @@ then fi case "$command" in - add) - ;& - online) + add|online) setup_virtual_bridge_port "$dev" set_mtu "$bridge" "$dev" "$type_if" add_to_bridge "$bridge" "$dev" ;; - remove) - ;& - offline) + remove|offline) remove_from_bridge "$bridge" "$dev" ;; esac
Quoted 7 lines
-----Original Message-----
From: Jan Beulich <[email protected]>
Sent: 01 September 2020 11:11
To: [email protected]
Cc: Ian Jackson <[email protected]>; Wei Liu <[email protected]>; Paul Durrant <[email protected]>
Subject: [PATCH]tools/hotplug/Linux: don't needlessly use non-standard features in vif-bridge
Quoted 7 lines
We're not after any "fall-through" behavior here. Replace the constructs with ones understood by all conforming shells, including older bash (problem observed with 3.1.51(1)).
Fixes b51715f02bf9 ("tools/hotplug/Linux: remove code duplication in vif-bridge")Signed-off-by Jan Beulich <[email protected]>
If using fall-through is indeed a problem then vif-route will need a similar modification I think.
Paul
Quoted 21 lines
tools/hotplug/Linux/vif-bridge +2
-6@@ -77,16 +77,12 @@ then fi case "$command" in - add) - ;& - online) + add|online) setup_virtual_bridge_port "$dev" set_mtu "$bridge" "$dev" "$type_if" add_to_bridge "$bridge" "$dev" ;; - remove) - ;& - offline) + remove|offline) remove_from_bridge "$bridge" "$dev" ;; esac
Quoted 11 lines · Paul Durrant
Quoted 11 lines
-----Original Message-----
From: Jan Beulich <[email protected]>
Sent: 01 September 2020 11:11
To: [email protected]
Cc: Ian Jackson <[email protected]>; Wei Liu <[email protected]>; Paul Durrant <[email protected]>
Subject: [PATCH]tools/hotplug/Linux: don't needlessly use non-standard features in vif-bridgeWe're not after any "fall-through" behavior here. Replace the constructs with ones understood by all conforming shells, including older bash (problem observed with 3.1.51(1)).
Quoted 5 lines
Quoted 3 lines
Fixes b51715f02bf9 ("tools/hotplug/Linux: remove code duplication in vif-bridge")Signed-off-by Jan Beulich <[email protected]>If using fall-through is indeed a problem then vif-route will need a similar modification I think.
Oh, indeed. I had meant to check before sending, but then forgot.
Jan