summaryrefslogtreecommitdiffstats
path: root/perl-install/network
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/network')
-rw-r--r--perl-install/network/isdn.pm2
-rw-r--r--perl-install/network/netconnect.pm8
-rw-r--r--perl-install/network/network.pm4
3 files changed, 7 insertions, 7 deletions
diff --git a/perl-install/network/isdn.pm b/perl-install/network/isdn.pm
index cd084bb2a..029f75bcf 100644
--- a/perl-install/network/isdn.pm
+++ b/perl-install/network/isdn.pm
@@ -277,7 +277,7 @@ sub isdn_get_list {
sub isdn_get_info {
my ($desc) = @_;
foreach (@isdndata) {
- return $_ if ($_->{description} eq $desc);
+ return $_ if $_->{description} eq $desc;
}
}
diff --git a/perl-install/network/netconnect.pm b/perl-install/network/netconnect.pm
index f515d85ef..592092a06 100644
--- a/perl-install/network/netconnect.pm
+++ b/perl-install/network/netconnect.pm
@@ -46,10 +46,10 @@ sub intro {
translate($text),
sub { $_[0]{description} },
\@l);
- run_program::rooted($prefix, $connect_prog) if ($e->{c}==1);
- run_program::rooted($prefix, $disconnect_file) if ($e->{c}==2);
- main($prefix, $netcnx, $netc, $mouse, $in, $intf, 0, 0) if ($e->{c}==3);
- $in->exit(0) if ($e->{c}==4);
+ run_program::rooted($prefix, $connect_prog) if $e->{c}==1;
+ run_program::rooted($prefix, $disconnect_file) if $e->{c}==2;
+ main($prefix, $netcnx, $netc, $mouse, $in, $intf, 0, 0) if $e->{c}==3;
+ $in->exit(0) if $e->{c}==4;
} else {
main($prefix, $netcnx, $netc, $mouse, $in, $intf, 0, 0);
}
diff --git a/perl-install/network/network.pm b/perl-install/network/network.pm
index 4c92ead01..ed5c7f0f5 100644
--- a/perl-install/network/network.pm
+++ b/perl-install/network/network.pm
@@ -84,7 +84,7 @@ sub write_resolv_conf {
#- get the list of used dns.
my %used_dns; @used_dns{$netc->{dnsServer}, $netc->{dnsServer2}, $netc->{dnsServer3}} = (1, 2, 3);
- unless ($netc->{DOMAINNAME} || $netc->{DOMAINNAME2} || keys %used_dns > 0) {
+ if (!$netc->{DOMAINNAME} && !$netc->{DOMAINNAME2} && !%used_dns) {
unlink($file);
log::l("neither domain name nor dns server are configured");
return 0;
@@ -107,7 +107,7 @@ sub write_resolv_conf {
unlink $file; #- workaround situation when /etc/resolv.conf is an absolute link to /etc/ppp/resolv.conf or whatever
open F, ">$file" or die "cannot write $file: $!";
print F "# search $_\n" foreach grep { $_ ne "$netc->{DOMAINNAME} $netc->{DOMAINNAME2}" } sort { $search{$a} <=> $search{$b} } keys %search;
- print F "search $netc->{DOMAINNAME} $netc->{DOMAINNAME2}\n" if ($netc->{DOMAINNAME} || $netc->{DOMAINNAME2});
+ print F "search $netc->{DOMAINNAME} $netc->{DOMAINNAME2}\n" if $netc->{DOMAINNAME} || $netc->{DOMAINNAME2};
#- print F "$options\n\n";
print F "# nameserver $_\n" foreach grep { ! exists $used_dns{$_} } sort { $dns{$a} <=> $dns{$b} } keys %dns;
print F "nameserver $_\n" foreach sort { $used_dns{$a} <=> $used_dns{$b} } grep { $_ } keys %used_dns;