[BACK]Return to update_trango.pl CVS log [TXT][DIR] Up to [local] / trango / Net-Telnet-Trango / scripts

Diff for /trango/Net-Telnet-Trango/scripts/update_trango.pl between version 1.16 and 1.17

version 1.16, 2007/01/08 16:49:44 version 1.17, 2007/01/31 18:44:27
Line 1 
Line 1 
 #!/usr/bin/perl  #!/usr/bin/perl
 # $RedRiver: update_trango.pl,v 1.15 2005/12/30 20:26:41 andrew Exp $  # $RedRiver: update_trango.pl,v 1.16 2007/01/08 16:49:44 mike Exp $
 ########################################################################  ########################################################################
 # update_trango.pl *** Updates trango foxes with a new firmware  # update_trango.pl *** Updates trango foxes with a new firmware
 #  #
Line 9 
Line 9 
 use warnings;  use warnings;
   
 use Net::TFTP;  use Net::TFTP;
 use YAML;  
 use lib '.';  use lib '.';
 use Net::Telnet::Trango;  use Net::Telnet::Trango;
   
Line 45 
Line 44 
     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($fox) ) {    unless ( $t->open($fox) ) {
     $l->sp("Error connecting: $!");      $l->sp("Error connecting: $!");
Line 53 
Line 51 
   }    }
   
   if ($t->host_type ne $conf->{'type'}) {    if ($t->host_type ne $conf->{'type'}) {
     $l->sp("Wrong type of unit ('$t->host_type' should be '$conf->{'type'}')");      $l->sp("Wrong type of unit ('" . $t->host_type . "' should be '$conf->{'type'}')");
     $t->close;      $t->close;
     next;      next;
   }    }
Line 69 
Line 67 
   
   $l->p("Sending commands");    $l->p("Sending commands");
   ## Send commands    ## Send commands
   #print Dump $t->login_banner;    if ( upload($t, $conf->{'file_name'}) ) {
   #print Dump $t->sysinfo;       $l->p("Rebooting");
   #print Dump $t->last_lines;      $t->reboot;
   #print Dump $t->ver();    } else {
   #print Dump $t->tftpd();  
   #print Dump $t->enable_tftpd();  
   #print Dump [ "Exit", $t->exit ];  
   #print Dump $t->tftpd();  
   #print Dump $t->disable_tftpd();  
   #print Dump $t->tftpd();  
   print Dump $t->sulog(args => 5);  
   #if ( upload($t, $conf->{'file_name'}) ) {  
   #   $l->p("Rebooting");  
   #  $t->reboot;  
   #} else {  
     $l->p("Exiting");      $l->p("Exiting");
     $t->exit;      $t->exit;
   #}    }
   
   $l->sp("");    $l->sp("");
 }  }
Line 177 
Line 164 
       defined $results->{'Checksum'} &&        defined $results->{'Checksum'} &&
       $results->{'Checksum'} eq $conf->{'cksum'}        $results->{'Checksum'} eq $conf->{'cksum'}
     ) {      ) {
       $l->sp("Saved checksum does not match config file!");        $l->sp("Saved checksum " . $results->{'Checksum'} . " does not match config file " .  $conf->{'cksum'} . "!");
       next;        next;
     }      }
     $l->p("Uploaded checksum ($results->{'Checksum'}) " .      $l->p("Uploaded checksum ($results->{'Checksum'}) " .

Legend:
Removed from v.1.16  
changed lines
  Added in v.1.17

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>