version 1.13, 2005/12/30 01:02:41 |
version 1.14, 2005/12/30 19:26:06 |
|
|
#!/usr/bin/perl
|
#!/usr/bin/perl
|
# $RedRiver: update_trango.pl,v 1.12 2005/12/29 18:41:17 andrew Exp $
|
# $RedRiver: update_trango.pl,v 1.13 2005/12/30 01:02:41 andrew Exp $
|
########################################################################
|
########################################################################
|
# update_trango.pl *** Updates trango foxes with a new firmware
|
# update_trango.pl *** Updates trango foxes with a new firmware
|
#
|
#
|
|
|
$l->sp("Updating: $fox");
|
$l->sp("Updating: $fox");
|
|
|
## Connect and login.
|
## Connect and login.
|
my $t = new Net::Telnet::Trango ({
|
my $t = new Net::Telnet::Trango (
|
Host => $fox,
|
|
Timeout => 5,
|
Timeout => 5,
|
Errmode => 'return',
|
Errmode => 'return',
|
}) or die "Couldn't make new connection: $!";
|
) or die "Couldn't make new connection: $!";
|
|
|
$l->p("Connecting to $fox");
|
$l->p("Connecting to $fox");
|
unless ($t->open) {
|
unless ( $t->open($fox) ) {
|
$l->sp("Error connecting: $!");
|
$l->sp("Error connecting: $!");
|
next;
|
next;
|
}
|
}
|
|
|
|
|
$l->p("Sending commands");
|
$l->p("Sending commands");
|
## Send commands
|
## Send commands
|
print Dump $t->login_banner;
|
#print Dump $t->login_banner;
|
print Dump $t->sysinfo;
|
#print Dump $t->sysinfo;
|
print Dump $t->last_lines;
|
#print Dump $t->last_lines;
|
print Dump $t->ver();
|
#print Dump $t->ver();
|
print Dump $t->tftpd();
|
print Dump $t->tftpd();
|
print Dump $t->enable_tftpd();
|
print Dump $t->enable_tftpd();
|
print Dump [ "Exit", $t->exit ];
|
#print Dump [ "Exit", $t->exit ];
|
print Dump $t->tftpd();
|
print Dump $t->tftpd();
|
print Dump $t->disable_tftpd();
|
print Dump $t->disable_tftpd();
|
print Dump $t->tftpd();
|
print Dump $t->tftpd();
|