[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.33 and 1.34

version 1.33, 2007/02/07 22:07:35 version 1.34, 2007/02/07 23:24:39
Line 1 
Line 1 
 #!/usr/bin/perl  #!/usr/bin/perl
 # $RedRiver: update_trango.pl,v 1.32 2007/02/07 19:25:05 andrew Exp $  # $RedRiver: update_trango.pl,v 1.33 2007/02/07 22:07:35 andrew Exp $
 ########################################################################  ########################################################################
 # update_trango.pl *** Updates trango hosts with a new firmware  # update_trango.pl *** Updates trango hosts with a new firmware
 #  #
Line 164 
Line 164 
                 $host->{retry}--;                  $host->{retry}--;
             }              }
             else {              else {
                 $l->sp("Failed");                  $l->sp("Failed! - Bye $host->{name}");
                   $l->e("Error updating $firmware_type on $host->{name}" .
                       "(try $host->{tries})");
                 $t->bye;                  $t->bye;
                 next;                  # don't try any other firmware, don't want to reboot
                   last;
             }              }
   
         }          }
Line 362 
Line 365 
 #use YAML;  #use YAML;
 use constant LOG_PRINT => 128;  use constant LOG_PRINT => 128;
 use constant LOG_SAVE  => 64;  use constant LOG_SAVE  => 64;
   use constant LOG_ERR   => 1;
   
 DESTROY {  DESTROY {
     my $self = shift;      my $self = shift;
Line 401 
Line 405 
     return $self->mylog( $m, LOG_SAVE | LOG_PRINT );      return $self->mylog( $m, LOG_SAVE | LOG_PRINT );
 }  }
   
   sub e {
       my $self = shift;
       my $m    = shift;
       return $self->mylog( $m, LOG_ERR );
   }
   
 sub mylog {  sub mylog {
     my $self = shift;      my $self = shift;
   
Line 436 
Line 446 
         print $MYLOG ( scalar gmtime ), "\t", $thing, "\n"          print $MYLOG ( scalar gmtime ), "\t", $thing, "\n"
           or die "Couldn't print to MYLOG: $!";            or die "Couldn't print to MYLOG: $!";
         flock( $MYLOG, LOCK_UN );          flock( $MYLOG, LOCK_UN );
       }
   
       if ( $which & LOG_ERR ) {
           # XXX Could tie in here to handle some sort of notifications.
           print STDERR $thing, "\n";
     }      }
 }  }
   

Legend:
Removed from v.1.33  
changed lines
  Added in v.1.34

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