aboutsummaryrefslogtreecommitdiff
path: root/nsdbimport
diff options
context:
space:
mode:
Diffstat (limited to 'nsdbimport')
-rwxr-xr-xnsdbimport/nsdbimport16
1 files changed, 8 insertions, 8 deletions
diff --git a/nsdbimport/nsdbimport b/nsdbimport/nsdbimport
index 8b8fcca..49b1c11 100755
--- a/nsdbimport/nsdbimport
+++ b/nsdbimport/nsdbimport
@@ -64,7 +64,7 @@ sub abend {
}
END {
- if ($record_count and ($verbose or $?)) {
+ if ($record_count && ($verbose || $?)) {
print "$progname: $record_count records processed successfully\n";
}
}
@@ -146,7 +146,7 @@ sub istrue {
sub parse_named_conf {
my %zone;
abend(EX_OSFILE, "$bind_config doesn't exist or is unreadable")
- unless -f $bind_config and -r $bind_config;
+ unless -f $bind_config && -r $bind_config;
open(my $fd, '-|',
"cfpeek --parser=bind $bind_config")
or die "can't run cfpeek: $!";
@@ -160,7 +160,7 @@ sub parse_named_conf {
close $fd;
my %files;
while (my ($name, $ref) = each %zone) {
- if ($ref->{type} eq 'master' and defined($ref->{file})) {
+ if ($ref->{type} eq 'master' && defined($ref->{file})) {
debug(1, "register zone $name, file $ref->{file}");
$files{$ref->{file}} = $name;
}
@@ -197,10 +197,10 @@ sub replvar {
}
if ($val ne '') {
- if ($val eq '@' and defined($opt->{'@'})) {
+ if ($val eq '@' && defined($opt->{'@'})) {
$val = $opt->{'@'} || $rec->{origin};
$val .= '.' unless $val =~ /\.$/;
- } elsif (defined($opt->{'.'}) and $val !~ /\.$/) {
+ } elsif (defined($opt->{'.'}) && $val !~ /\.$/) {
$val .= '.' . ($opt->{'.'} || $rec->{origin});
$val .= '.' unless $val =~ /\.$/;
}
@@ -360,7 +360,7 @@ sub import_record {
my $rec = shift;
my $kw = lc($rec->{rr}).'-query';
- if (defined($rrfun{$rec->{rr}}) and defined($config{$kw})) {
+ if (defined($rrfun{$rec->{rr}}) && defined($config{$kw})) {
&{$rrfun{$rec->{rr}}}($rec, $config{$kw});
} else {
insert_rr($rec, $config{$kw});
@@ -371,7 +371,7 @@ sub zimport {
my ($file, $origin) = @_;
$file = "$bind_directory/$file"
- if $file !~ m#^/# and defined($bind_directory);
+ if $file !~ m#^/# && defined($bind_directory);
debug(1, "processing file $file, origin $origin");
open(my $fd, "<", $file)
or abend(EX_NOINPUT, "can't open input file $file: $!");
@@ -491,7 +491,7 @@ $arg .= ":;mysql_read_default_file=$config{'db-default-file'}"
if defined $config{'db-default-file'};
if (!$arg
- or (!defined($config{user}) and !defined($config{'db-default-file'}))) {
+ || (!defined($config{user}) && !defined($config{'db-default-file'}))) {
my $my_cnf = "$ENV{HOME}/.my.cnf";
if (-r $my_cnf) {
debug(1, "using mysql option file $my_cnf");

Return to:

Send suggestions and report system problems to the System administrator.