Permalink
Browse files

Imported from rancid-1.1.tar.gz.

  • Loading branch information...
1 parent 8c5c1d2 commit 82d9e178146555c8bd72b1da39eeb0cf057783df Tar Committer committed Jul 3, 1999
Showing with 479 additions and 7 deletions.
  1. +7 −7 bin/clogin
  2. +472 −0 bin/clogin.orig
View
@@ -403,7 +403,7 @@ foreach router [lrange $argv $i end] {
continue
}
if { $do_enapasswd && !$autoenable && [llength $pswd] < 2 } {
- send_user "Error - no enable password for $router in $password_file."
+ send_user "Error - no enable password for $router in $password_file.\n"
continue
}
set passwd [lindex $pswd 0]
@@ -413,10 +413,10 @@ foreach router [lrange $argv $i end] {
# Figure out username
if {[info exists username]} {
# command line username
- set user $username
+ set ruser $username
} else {
- set user [find user $router]
- if { "$user" == "" } { set user $default_user }
+ set ruser [find user $router]
+ if { "$ruser" == "" } { set ruser $default_user }
}
# Figure out username's password (if different from the vty password)
@@ -434,11 +434,11 @@ foreach router [lrange $argv $i end] {
set enauser $enausername
} else {
set enauser [find enauser $router]
- if { "$enauser" == "" } { set enauser $user }
+ if { "$enauser" == "" } { set enauser $ruser }
}
-
+
# Login to the router
- if {[login $router $user $userpswd $passwd $enapasswd $prompt]} {
+ if {[login $router $ruser $userpswd $passwd $enapasswd $prompt]} {
continue
}
if { $enable } {
Oops, something went wrong.

0 comments on commit 82d9e17

Please sign in to comment.