ovs-save: Fix address label processing.
authorAlexey I. Froloff <raorn@altlinux.org>
Tue, 7 Jun 2011 13:33:10 +0000 (17:33 +0400)
committerBen Pfaff <blp@nicira.com>
Tue, 7 Jun 2011 16:32:54 +0000 (09:32 -0700)
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>
utilities/ovs-save

index b2c726eb40c854831ff21126b9b81fd0bdce2e31..323d1845f43ac89f7af1ea0cba89ca706281ecfb 100755 (executable)
@@ -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
                     ;;