From: Alexey I. Froloff <raorn@altlinux.org>
Date: Tue, 7 Jun 2011 13:33:10 +0000 (+0400)
Subject: ovs-save: Fix address label processing.
X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d3db2ef1f501cdbbf136de35e77a72e9b4970ece;p=openvswitch

ovs-save: Fix address label processing.

If there is a string in ip addr show output, that "coincide with the
name of the device or ... prefixed with the device name followed by
colon", consider this is an address label string.

Signed-off-by: Alexey I. Froloff <raorn@altlinux.org>
Signed-off-by: Ben Pfaff <blp@nicira.com>
---

diff --git a/utilities/ovs-save b/utilities/ovs-save
index b2c726eb..323d1845 100755
--- a/utilities/ovs-save
+++ b/utilities/ovs-save
@@ -115,8 +115,9 @@ for dev in $devs; do
                         continue 2
                     fi
                     ;;
-                "$dev")
-                    # Omit because "ip" wants "dev" keyword in front.
+                "$dev"|"$dev:"*)
+                    # Address label string
+                    addrcmd="$addrcmd label $1"
                     shift
                     continue
                     ;;