r1768 + fix ticket:152 by introducing a workaround (the regexp is still sensitive...
authorDenis Ovsienko <infrastation@yandex.ru>
Tue, 11 Mar 2008 11:16:26 +0000 (11:16 +0000)
committerDenis Ovsienko <infrastation@yandex.ru>
Tue, 11 Mar 2008 11:16:26 +0000 (11:16 +0000)
gateways/switchvlans/cisco.connector

index c0b03f8..5f9e0d6 100755 (executable)
@@ -99,7 +99,7 @@ do_fetch()
 
        # First extract structured info about VLAN membership, then map
        # special descriptions into VLAN IDs.
-       cat "$OUT2a" | egrep '^(Et|Fa|Gi|Te)' | sed -E 's/^([A-Za-z/0-9]+) +(.*) +(connected|notconnect|disabled|monitoring|suspended) +/\1%\2%\3%/;s/%(trunk|([0-9]+)) .*$/%\1/;s/=(monitoring|suspended)%/=connected%/;s/ +%/%/' > $OUT2b
+       cat "$OUT2a" | egrep '^(Et|Fa|Gi|Te)' | sed -E 's/^([A-Za-z/0-9]+) +(.*) +(connected|notconnect|disabled|monitoring|suspended) +/\1~\2%\3%/;s/%(trunk|([0-9]+)) .*$/%\1/;s/=(monitoring|suspended)%/=connected%/;s/ +%/%/;s/~/%/' > $OUT2b
        while read line; do
                tmp_ifname=`echo $line | cut -d% -f1`
                tmp_ifdescr=`echo $line | cut -d% -f2`