r1319 + VLAN gateway was confused by monitoring ports. Fixed.
authorDenis Ovsienko <infrastation@yandex.ru>
Wed, 28 Nov 2007 07:18:51 +0000 (07:18 +0000)
committerDenis Ovsienko <infrastation@yandex.ru>
Wed, 28 Nov 2007 07:18:51 +0000 (07:18 +0000)
gateways/switchvlans/cisco.connector

index 01e35df6630bf05074684192f0612b74dc586ec5..335fd51b85cb646f2d11ac721581a7dfe90a58f0 100755 (executable)
@@ -84,7 +84,7 @@ do_fetch()
        nc $ENDPOINT 23 < $CMDS2 > "$OUT2"
        nc $ENDPOINT 23 < $CMDS3 > "$OUT3"
        cat "$OUT1" | fgrep ' active    ' | sed -E 's/^([[:digit:]]+)[[:space:]]+(.+)[[:space:]]+active    (.*)/\1=\2/;s/[[:space:]]+$//' > $FILE1
-       cat "$OUT2" | egrep '^(Et|Fa|Gi|Te)' | sed -E 's/^([A-Za-z/0-9]+).+(connected|notconnect|disabled) +/\1=\2,/;s/,(trunk|([0-9]+)) .*$/,\1/' > $FILE2
+       cat "$OUT2" | egrep '^(Et|Fa|Gi|Te)' | sed -E 's/^([A-Za-z/0-9]+).+(connected|notconnect|disabled|monitoring) +/\1=\2,/;s/,(trunk|([0-9]+)) .*$/,\1/;s/=monitoring,/=connected,/' > $FILE2
        # FIXME
        # Here we need to distinguish between different platforms and IOS version,
        # cause they produce output in different formats.