From 26c430615c692fa98260a3b116750fdc3471ce49 Mon Sep 17 00:00:00 2001 From: Gurucharan Shetty Date: Tue, 5 Jan 2016 10:13:39 -0800 Subject: [PATCH] openvswitch-switch.init: Redirect error to /dev/null. 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 Acked-by: Ben Pfaff --- debian/openvswitch-switch.init | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/debian/openvswitch-switch.init b/debian/openvswitch-switch.init index aece7802c..a045f3b73 100755 --- a/debian/openvswitch-switch.init +++ b/debian/openvswitch-switch.init @@ -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` -- 2.20.1