r2203 - quick hack for 4948 MAC address table fetcher
authorDenis Ovsienko <infrastation@yandex.ru>
Wed, 10 Sep 2008 14:25:14 +0000 (14:25 +0000)
committerDenis Ovsienko <infrastation@yandex.ru>
Wed, 10 Sep 2008 14:25:14 +0000 (14:25 +0000)
gateways/switchvlans/cisco.connector

index 50d6ec6..fd9b074 100755 (executable)
@@ -131,10 +131,14 @@ do_fetch()
                cat "$OUT3" | tr -d '\r' | fgrep Dynamic | sed $SEDFLAG 's/ +Dynamic +([0-9]+) +(.+)/=\1@\2/;s/FastEthernet/Fa/;s/GigabitEthernet/Gi/' > "$FILE3"
        elif [ "$SW" = "Cisco+IOS+12.2" -o "$SW" = "Cisco+IOS+12.1" ]; then
                case "$HW" in
-                       Cisco+Catalyst+35*|Cisco+Catalyst+37*|Cisco+Catalyst+29*|Cisco+Catalyst+49*)
+                       Cisco+Catalyst+35*|Cisco+Catalyst+37*|Cisco+Catalyst+29*)
                                cat "$OUT3" | tr -d '\r' | fgrep DYNAMIC | \
                                sed $SEDFLAG 's/ +([0-9]+) +(.+)    DYNAMIC +(.+)/\2=\1@\3/;s/FastEthernet/Fa/;s/GigabitEthernet/Gi/' > "$FILE3"
                        ;;
+                       Cisco+Catalyst+49*)
+                               cat "$OUT3" | tr -d '\r' | fgrep dynamic | \
+                               sed $SEDFLAG 's/ +([0-9]+) +([0-9a-f\.]+)   dynamic ip +([a-zA-Z/0-9]+) */\2=\1@\3/;s/FastEthernet/Fa/;s/GigabitEthernet/Gi/;s/TenGi/Te/' > "$FILE3"
+                       ;;
                esac
        fi
 }