[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.20 and 1.21

version 1.20, 2007/01/31 22:19:07 version 1.21, 2007/02/01 17:08:44
Line 1 
Line 1 
 #!/usr/bin/perl  #!/usr/bin/perl
 # $RedRiver: update_trango.pl,v 1.19 2007/01/31 22:14:26 andrew Exp $  # $RedRiver: update_trango.pl,v 1.20 2007/01/31 22:19:07 mike Exp $
 ########################################################################  ########################################################################
 # update_trango.pl *** Updates trango foxes with a new firmware  # update_trango.pl *** Updates trango foxes with a new firmware
 #  #
Line 50 
Line 50 
     next;      next;
   }    }
   
   if ($t->host_type ne $conf->{'type'}) {    my $host_type = $t->host_type;
   
     if (lc($conf->{'firmware_type'}) eq 'fpga') {
       $host_type =~ s/\s.*$//;
     }
   
     if ($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 96 
Line 102 
     $ver->{$fw_type . ' Checksum'} eq $conf->{'cksum'}      $ver->{$fw_type . ' Checksum'} eq $conf->{'cksum'}
   ) {    ) {
     $l->sp("Already updated!");      $l->sp("Already updated!");
     return 1;      return 0;
   }    }
   
   my $try = 0;    my $try = 0;
Line 116 
Line 122 
     # use tftp to push the file up      # use tftp to push the file up
     my $tftp = Net::TFTP->new($t->Host, Mode => 'octet');      my $tftp = Net::TFTP->new($t->Host, Mode => 'octet');
   
     $tftp->put($file, $file)      unless ($tftp->put($file, $file)) {
       or die "Error uploading: " . $tftp->error;        print "Error uploading: " . $tftp->error;
         next;
       }
   
     # waitfor some sort of output      # waitfor some sort of output
     # make sure it says 'Success.' otherwise error      # make sure it says 'Success.' otherwise error

Legend:
Removed from v.1.20  
changed lines
  Added in v.1.21

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