aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorStijn Tintel <stijn@linux-ipv6.be>2021-07-20 20:22:49 +0300
committerStijn Tintel <stijn@linux-ipv6.be>2021-07-23 12:16:29 +0300
commita5648280b3377d6779c281c4af8352dc42f9ac58 (patch)
treef80ec46f2752d66ab118e8a703c2fab7157ef15b /net
parent261961a33cc0c36d318d0b38a86a57a655aea1ca (diff)
openvswitch: only init bridges when (re)starting
Calling the ovs_bridge_init function when stopping the service will result in ovs-vsctl being called after ovsdb-server has been shut down. This causes the following error: ovs-vsctl: unix:/var/run/openvswitch/db.sock: database connection failed (No such file or directory) Calling the ovs_bridge_init function when requesting the service status has no added value. Only call ovs_bridge_init during start or restart to fix this. Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
Diffstat (limited to 'net')
-rwxr-xr-xnet/openvswitch/files/openvswitch.init7
1 files changed, 6 insertions, 1 deletions
diff --git a/net/openvswitch/files/openvswitch.init b/net/openvswitch/files/openvswitch.init
index 23b75c38f..9958f9892 100755
--- a/net/openvswitch/files/openvswitch.init
+++ b/net/openvswitch/files/openvswitch.init
@@ -59,7 +59,12 @@ ovs_action() {
config_foreach "ovs_xx" "$cfgtype" "$action" "$cfgtype"
done
- config_foreach ovs_bridge_init "ovs_bridge"
+ case "$action" in
+ restart|start)
+ config_foreach ovs_bridge_init "ovs_bridge"
+ ;;
+ esac
+
}
ovs_xx() {