Changeset 2940 in /cluster/svnroot


Ignore:
Timestamp:
Jan 23, 2011 7:02:52 PM (10 years ago)
Author:
skylar
Message:

improving debugging for config_nat (#584)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • bccd-ng/branches/skylar-devel/trees/usr/local/lib/site_perl/5.10.0/Bccd.pm

    r2920 r2940  
    21672167        my($natnic,$sub);
    21682168        $sub = 'config_nat';
     2169    if($self->is_log($INFO) || $self->is_log($DEBUG)) {
     2170                $self->log_and_cont('INFO',$sub,"Gathering routing information");
     2171        }
    21692172        open(my $NETSTAT, '-|', '/bin/netstat', '-rn') or
    21702173                $self->log_and_die("ERROR",$sub,"Couldn't open up netstat for piping!");
     
    21752178                my @splitline = split(/\s+/, $line);
    21762179                if($splitline[0] eq '0.0.0.0') {
     2180                if($self->is_log($INFO) || $self->is_log($DEBUG)) {
     2181                                $self->log_and_cont('INFO',$sub,"$splitline[7] is a default router");
     2182                        }
    21772183                        $natnic = $splitline[7];
    21782184                        last NETSTAT;
     
    21822188
    21832189        if(defined($natnic)) {
     2190        if($self->is_log($INFO) || $self->is_log($DEBUG)) {
     2191                        $self->log_and_cont('INFO',$sub,"Writing out $NATSH");
     2192                }
    21842193                open(my $NAT, '>', $NATSH) or
    21852194                        $self->log_and_die("ERROR",$sub,"Couldn't open $NATSH for writing: $!");
     
    21972206
    21982207                close($NAT);
     2208        if($self->is_log($INFO) || $self->is_log($DEBUG)) {
     2209                        $self->log_and_cont('INFO',$sub,"Making $NATSH executable");
     2210                }
    21992211                chmod(S_IRWXU|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH, $NATSH) or
    22002212                        $self->log_and_die("ERROR",$sub,"Couldn't set $NATSH to be executable: $!");
Note: See TracChangeset for help on using the changeset viewer.