(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
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`