ofp: Add support for bundles extension in OpenFlow 1.3.
[cascardo/ovs.git] / debian / openvswitch-switch.init
index 8e156da..a045f3b 100755 (executable)
@@ -27,6 +27,8 @@
 
 (test -x /usr/sbin/ovs-vswitchd && test -x /usr/sbin/ovsdb-server) || exit 0
 
+_SYSTEMCTL_SKIP_REDIRECT=yes
+
 . /usr/share/openvswitch/scripts/ovs-lib
 test -e /etc/default/openvswitch-switch && . /etc/default/openvswitch-switch
 
@@ -85,11 +87,15 @@ restart () {
         depmod -a
 
         if [ -e /sys/module/openvswitch ]; then
-            LOADED_SRCVERSION=`cat /sys/module/openvswitch/srcversion`
-            LOADED_VERSION=`cat /sys/module/openvswitch/version`
+            LOADED_SRCVERSION=`cat /sys/module/openvswitch/srcversion \
+                               2>/dev/null`
+            LOADED_VERSION=`cat /sys/module/openvswitch/version \
+                            2>/dev/null`
         elif [ -e /sys/module/openvswitch_mod ]; then
-            LOADED_SRCVERSION=`cat /sys/module/openvswitch_mod/srcversion`
-            LOADED_VERSION=`cat /sys/module/openvswitch_mod/version`
+            LOADED_SRCVERSION=`cat /sys/module/openvswitch_mod/srcversion \
+                               2>/dev/null`
+            LOADED_VERSION=`cat /sys/module/openvswitch_mod/version \
+                            2>/dev/null`
         fi
         SRCVERSION=`modinfo -F srcversion openvswitch 2>/dev/null`
         VERSION=`modinfo -F version openvswitch 2>/dev/null`