r2957 - maintenance->trunk sync of changeset:2931
authorDenis Ovsienko <infrastation@yandex.ru>
Mon, 20 Jul 2009 13:51:33 +0000 (13:51 +0000)
committerDenis Ovsienko <infrastation@yandex.ru>
Mon, 20 Jul 2009 13:51:33 +0000 (13:51 +0000)
gateways/switchvlans/cisco.connector

index c2f8f6379a9782c8189b78f51738a80725460cd7..57f8bb785f6d13c1b18f367cff2a446a4c913fbc 100755 (executable)
@@ -49,9 +49,13 @@ prepare_connect_commands()
 
                        username=`echo $line | cut -s -d' ' -f5`
                        [ "$username" != "-" ] && echo $username > $CMDS1
 
                        username=`echo $line | cut -s -d' ' -f5`
                        [ "$username" != "-" ] && echo $username > $CMDS1
+                       # access password
                        echo $line | cut -s -d' ' -f6 >> $CMDS1
                        echo $line | cut -s -d' ' -f6 >> $CMDS1
-                       echo en >> $CMDS1
-                       echo $line | cut -s -d' ' -f7 >> $CMDS1
+                       enable_password=`echo $line | cut -s -d' ' -f7`
+                       [ "$enable_password" != "-" ] && {
+                               echo en >> $CMDS1
+                               echo $enable_password >> $CMDS1
+                       }
                        # same for ports
                        cat "$CMDS1" > "$CMDS2"
                        # ...and MAC addresses
                        # same for ports
                        cat "$CMDS1" > "$CMDS2"
                        # ...and MAC addresses