openvswitch: Userspace tunneling.
[cascardo/ovs.git] / debian / openvswitch-switch.init
index 84aa450..bf84477 100755 (executable)
@@ -66,11 +66,13 @@ start () {
     fi
     set "$@" $OVS_CTL_OPTS
     "$@" || exit $?
-    [ "$2" = "start" ] && network_interfaces ifup
+    if [ "$2" = "start" ] && [ "$READ_INTERFACES" != "no" ]; then
+        network_interfaces ifup
+    fi
 }
 
 stop () {
-    network_interfaces ifdown
+    [ "$READ_INTERFACES" != "no" ] && network_interfaces ifdown
     ovs_ctl stop
 }
 
@@ -105,8 +107,8 @@ restart () {
             start restart
         fi
     else
-        stop
-        start
+        READ_INTERFACES="no" stop
+        READ_INTERFACES="no" start
     fi
 }