summaryrefslogtreecommitdiff
path: root/utilities
diff options
context:
space:
mode:
authorGurucharan Shetty <guru@ovn.org>2016-04-11 08:23:43 -0700
committerGurucharan Shetty <guru@ovn.org>2016-04-11 10:21:44 -0700
commita3176cb54cc3eada0eabe5ca0ca47f53ad029921 (patch)
tree975d2e7daaef480607962cf6c5914746c52f31b5 /utilities
parent24de3634f9dc2e1ca07ce65fcf619a197a5cb61e (diff)
downloadopenvswitch-a3176cb54cc3eada0eabe5ca0ca47f53ad029921.tar.gz
ovs-save: Handle MTU changes correctly.
The following command on ubuntu 12.04, 14.04 and CentOS 7.x returns null: expr "mtu 1500" : '.*mtu \([0-9]+\)' But the following works correctly: expr "mtu 1500" : '.*mtu \([0-9]\+\)' I am not sure about the portability implications as there seems to be very sparse documentation about this but this fixes a bug in 2 of the most popular distributions. VMware-BZ: #1638654 Signed-off-by: Gurucharan Shetty <guru@ovn.org>
Diffstat (limited to 'utilities')
-rwxr-xr-xutilities/ovs-save4
1 files changed, 2 insertions, 2 deletions
diff --git a/utilities/ovs-save b/utilities/ovs-save
index 90320b1dc..d4d3c35ab 100755
--- a/utilities/ovs-save
+++ b/utilities/ovs-save
@@ -65,7 +65,7 @@ save_interfaces () {
if expr "$state" : '.*\bdynamic\b' > /dev/null; then
linkcmd="$linkcmd dynamic"
fi
- if qlen=`expr "$state" : '.*qlen \([0-9]+\)'`; then
+ if qlen=`expr "$state" : '.*qlen \([0-9]\+\)'`; then
linkcmd="$linkcmd txqueuelen $qlen"
fi
if hwaddr=`expr "$state" : '.*link/ether \([^ ]*\)'`; then
@@ -74,7 +74,7 @@ save_interfaces () {
if brd=`expr "$state" : '.*brd \([^ ]*\)'`; then
linkcmd="$linkcmd broadcast $brd"
fi
- if mtu=`expr "$state" : '.*mtu \([0-9]+\)'`; then
+ if mtu=`expr "$state" : '.*mtu \([0-9]\+\)'`; then
linkcmd="$linkcmd mtu $mtu"
fi
if test -n "$linkcmd"; then