Changeset 6103 in /cluster/svnroot


Ignore:
Timestamp:
Oct 23, 2018 12:46:54 PM (2 years ago)
Author:
skylar
Message:

improve debug logging re #1008

File:
1 edited

Legend:

Unmodified
Added
Removed
  • bccd-ng/branches/skylar/bccd-3.4.0-build_ng/src/usr/local/lib/site_perl/Bccd.pm

    r6097 r6103  
    27542754                # Only for NICs that pickup a response from a non-BCCD DHCP server
    27552755                if(!$self->parse_cmdline('standalone')) {
    2756                     $self->log_and_cont('DEBUG',$sub,"$nic has DHCP response from $self->{nic_conf}->{$nic}->{'dhcp_source'}, taking $self->{nic_conf}->{$nic}->{'ipaddr'} and setting dhcp flag");
     2756                    if($self->is_log($DEBUG)) {
     2757                        $self->log_and_cont('DEBUG',$sub,"$nic has DHCP response from $self->{nic_conf}->{$nic}->{'dhcp_source'}, taking $self->{nic_conf}->{$nic}->{'ipaddr'} and setting dhcp flag");
     2758                    }
    27572759                    $self->{nic_conf}->{$nic}->{'dhcp'} = 1;
    27582760                }
     
    27662768                    || (-e '/testmode'))
    27672769            )) {
    2768                 $self->log_and_cont('DEBUG',$sub,"$nic has DHCP response from $self->{nic_conf}->{$nic}->{'dhcp_source'}, taking $self->{nic_conf}->{$nic}->{'ipaddr'} and setting dhcp flag");
     2770                if($self->is_log($DEBUG)) {
     2771                    $self->log_and_cont('DEBUG',$sub,"$nic has DHCP response from $self->{nic_conf}->{$nic}->{'dhcp_source'}, taking $self->{nic_conf}->{$nic}->{'ipaddr'} and setting dhcp flag");
     2772                }
    27692773                $self->{nic_conf}->{$nic}->{'dhcp'} = 1;
    27702774            }
    27712775            # If no DHCP response were received...
    27722776            else {
    2773                 $self->log_and_cont('DEBUG',$sub,"$nic has no DHCP, unsetting dhcp flag");
     2777                if($self->is_log($DEBUG)) {
     2778                    $self->log_and_cont('DEBUG',$sub,"$nic has no DHCP, unsetting dhcp flag");
     2779                }
    27742780                $self->{nic_conf}->{$nic}->{'dhcp'} = 0;
    27752781                # If we have no DHCP response and no IP address, then prompt
     
    27872793                    && (!defined($self->{nic_conf}->{$nic}->{bccdnet}) || $self->{nic_conf}->{$nic}->{bccdnet} == 1)
    27882794                    && $temp == 0) {
    2789                     $self->log_and_cont('DEBUG',$sub,"Disabling $nic DHCP flag");
     2795                }
     2796                    if($self->is_log($DEBUG)) {
     2797                        $self->log_and_cont('DEBUG',$sub,"Disabling $nic DHCP flag");
     2798                    }
    27902799                    $self->{nic_conf}->{$nic}->{'dhcp'} = 0;
    2791                 }
    2792                 elsif($temp == 1) {
    2793                     $self->log_and_cont('DEBUG',$sub,"Enabling $nic DHCP flag");
    2794                     $self->{nic_conf}->{$nic}->{'dhcp'} = 1;
    27952800                }
    27962801            }
Note: See TracChangeset for help on using the changeset viewer.