Skip to content

Commit

Permalink
openvswitch-switch.init: Redirect error to /dev/null.
Browse files Browse the repository at this point in the history
The latest Open vSwitch kernel module from Upstream linux does not
list "version". During debian package installation, we would see
a non-harmful error in the log. This patch suppresses it.

Signed-off-by: Gurucharan Shetty <[email protected]>
Acked-by: Ben Pfaff <[email protected]>
  • Loading branch information
shettyg committed Jan 5, 2016
1 parent 0dcc739 commit 51386ba
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions debian/openvswitch-switch.init
Original file line number Diff line number Diff line change
Expand Up @@ -87,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`
Expand Down

0 comments on commit 51386ba

Please sign in to comment.