r2377 - toss things around to let more config lines be generated by decoder script
authorDenis Ovsienko <infrastation@yandex.ru>
Fri, 30 Jan 2009 18:38:20 +0000 (18:38 +0000)
committerDenis Ovsienko <infrastation@yandex.ru>
Fri, 30 Jan 2009 18:38:20 +0000 (18:38 +0000)
gateways/switchvlans/cisco.connector
gateways/switchvlans/vlandecoder-sample [moved from gateways/switchvlans/trunkdecoder-sample with 100% similarity]
gateways/switchvlans/vlantable-sample [moved from gateways/switchvlans/trunktable-sample with 100% similarity]

index c1bb0d2b73758dc81ca3bd141a482a8d7075e794..d6198d86057762458a256603f9a337de8f738c87 100755 (executable)
@@ -85,13 +85,11 @@ prepare_push_commands()
                fi
                printf "int $portname\n" >> $CMDS1
                if [ $vlanid -lt 4096 ]; then
-                       printf "swi access vlan $vlanid\nswi mode access\n" >> $CMDS1
                        printf "no description\n" >> $CMDS1
                else
                        printf "descr VLAN$vlanid\n" >> $CMDS1
-                       printf "swi trunk encap dot1q\nswi mode trunk\n" >> $CMDS1
-                       "$MYDIR/trunkdecoder" $vlanid >> $CMDS1
                fi
+               "$MYDIR/vlandecoder" $vlanid >> $CMDS1
                printf "exit\n" >> $CMDS1
                echo "C!64!$portname!$ENDPOINT!$vlanid" >> "$FILE2"
        done < "$FILE1"
@@ -110,7 +108,7 @@ do_fetch()
        nc $ENDPOINT 23 < $CMDS3 > "$OUT3"
        cat "$OUT1" | fgrep ' active    ' | sed $SEDFLAG 's/^([[:digit:]]+)[[:space:]]+(.+)[[:space:]]+active    (.*)/\1=\2/;s/[[:space:]]+$//' > $FILE1
        # Add trunk data, if appropriate.
-       [ -s "$MYDIR/trunktable" ] && cat "$MYDIR/trunktable" >> $FILE1
+       [ -s "$MYDIR/vlantable" ] && cat "$MYDIR/vlantable" >> $FILE1
 
        # First extract structured info about VLAN membership, then map
        # special descriptions into VLAN IDs.