set-br-ex now idempotent
When refreshing a snap, set-br-ex could fail because the iptables rules that it sets were already setup. We now exit zero if this is true, which prevents us from breaking on upgrades. Change-Id: Ibfee98cabfa3e35bf53dbd191de2cf46f3709a51
This commit is contained in:
parent
e58aeddd67
commit
f7d2064561
@ -18,6 +18,7 @@ ovs-vsctl --retry --may-exist add-br br-ex
|
||||
ip address add $extcidr dev br-ex || :
|
||||
ip link set br-ex up || :
|
||||
|
||||
sudo iptables -w -t nat -A POSTROUTING -s $extcidr ! -d $extcidr -j MASQUERADE
|
||||
sudo iptables -w -t nat -A POSTROUTING -s $extcidr ! \
|
||||
-d $extcidr -j MASQUERADE || :
|
||||
|
||||
exit 0
|
||||
|
Loading…
Reference in New Issue
Block a user