[ovs-dev] [PATCH] openvswitch-switch.init: Redirect error to /dev/null.
Gurucharan Shetty
guru at ovn.org
Tue Jan 5 18:18:41 UTC 2016
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 <guru at ovn.org>
---
debian/openvswitch-switch.init | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/debian/openvswitch-switch.init b/debian/openvswitch-switch.init
index aece780..ddf2192 100755
--- a/debian/openvswitch-switch.init
+++ b/debian/openvswitch-switch.init
@@ -1,3 +1,4 @@
+w
#! /bin/sh
#
# Copyright (C) 2011, 2012 Nicira, Inc.
@@ -87,11 +88,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`
--
1.7.9.5
More information about the dev
mailing list