diff options
Diffstat (limited to 'perl-install/network')
-rw-r--r-- | perl-install/network/drakfirewall.pm | 6 | ||||
-rw-r--r-- | perl-install/network/ethernet.pm | 2 | ||||
-rw-r--r-- | perl-install/network/isdn.pm | 8 | ||||
-rw-r--r-- | perl-install/network/modem.pm | 12 | ||||
-rw-r--r-- | perl-install/network/netconnect.pm | 12 | ||||
-rw-r--r-- | perl-install/network/network.pm | 30 |
6 files changed, 35 insertions, 35 deletions
diff --git a/perl-install/network/drakfirewall.pm b/perl-install/network/drakfirewall.pm index 8d6e7005a..152007105 100644 --- a/perl-install/network/drakfirewall.pm +++ b/perl-install/network/drakfirewall.pm @@ -119,13 +119,13 @@ sub set_ports { } sub get_conf { - my ($in, $disabled, $ports) = @_; + my ($in, $disabled, $o_ports) = @_; my $possible_servers = default_from_pkgs($in); $_->{hide} = 0 foreach @$possible_servers; - if ($ports) { - $disabled, from_ports($ports); + if ($o_ports) { + $disabled, from_ports($o_ports); } elsif (my $shorewall = network::shorewall::read()) { $shorewall->{disabled}, from_ports(\$shorewall->{ports}); } else { diff --git a/perl-install/network/ethernet.pm b/perl-install/network/ethernet.pm index b74f90fc8..f2b849144 100644 --- a/perl-install/network/ethernet.pm +++ b/perl-install/network/ethernet.pm @@ -192,7 +192,7 @@ want to use the default host name."), if_($::expert, { label => N("Host name"), val => \$netc->{HOSTNAME} }), ], complete => sub { - if ($netc->{ZEROCONF_HOSTNAME} and $netc->{ZEROCONF_HOSTNAME} =~ /\./) { + if ($netc->{ZEROCONF_HOSTNAME} && $netc->{ZEROCONF_HOSTNAME} =~ /\./) { $in->ask_warn('', N("Zeroconf host name must not contain a .")); return 1; } diff --git a/perl-install/network/isdn.pm b/perl-install/network/isdn.pm index 147fb0970..8834d7ba6 100644 --- a/perl-install/network/isdn.pm +++ b/perl-install/network/isdn.pm @@ -15,7 +15,7 @@ use MDK::Common::File; @EXPORT = qw(isdn_write_config isdn_write_config_backend get_info_providers_backend isdn_ask_info isdn_ask_protocol isdn_ask isdn_detect isdn_detect_backend isdn_get_list isdn_get_info); sub configure { - my ($netcnx, $netc, $isdn) = @_; + my ($netcnx, $netc, $_isdn) = @_; isdn_step_1: defined $netc->{autodetect}{isdn}{id} and goto intern_pci; # $::isInstall and $in->set_help('configureNetworkISDN'); @@ -72,8 +72,8 @@ sub isdn_write_config { } sub isdn_write_config_backend { - my ($isdn, $netc, $netcnx) = @_; - defined $netcnx and $netc->{isdntype} = $netcnx->{type}; + my ($isdn, $netc, $o_netcnx) = @_; + defined $o_netcnx and $netc->{isdntype} = $o_netcnx->{type}; if ($isdn->{is_light}) { modules::mergein_conf("$prefix/etc/modules.conf"); if ($isdn->{id}) { @@ -214,7 +214,7 @@ sub get_info_providers_backend { chop; my ($name_, $phone, $real, $dns1, $dns2) = split '=>'; if ($name eq $name_) { - @{$isdn}{qw(user_name phone_out DOMAINNAME2 dnsServer3 dnsServer2)} = + @$isdn{qw(user_name phone_out DOMAINNAME2 dnsServer3 dnsServer2)} = ((split(/\|/, $name_))[2], $phone, $real, $dns1, $dns2); } } diff --git a/perl-install/network/modem.pm b/perl-install/network/modem.pm index 82461dea9..318635441 100644 --- a/perl-install/network/modem.pm +++ b/perl-install/network/modem.pm @@ -22,7 +22,7 @@ sub configure { /^DNS=(.*)$/ and ($modem->{dns1}, $modem->{dns2}) = split(',', $1); } foreach (cat_("/etc/sysconfig/network-scripts/chat-ppp0")) { - /.*ATDT(\d*).*/ and $modem->{phone} = $1; + /.*ATDT(\d*)/ and $modem->{phone} = $1; } foreach (cat_("/etc/sysconfig/network-scripts/ifcfg-ppp0")) { /NAME=(['"]?)(.*)\1/ and $modem->{login} = $2; @@ -215,15 +215,15 @@ END } sub ppp_choose { - my ($in, $netc, $modem, $mouse) = @_; - $mouse ||= {}; + my ($in, $netc, $modem, $o_mouse) = @_; + $o_mouse ||= {}; - $mouse->{device} ||= readlink "$::prefix/dev/mouse"; + $o_mouse->{device} ||= readlink "$::prefix/dev/mouse"; $modem->{device} ||= $in->ask_from_listf_raw({ messsages => N("Please choose which serial port your modem is connected to."), interactive_help_id => 'selectSerialPort', }, \&mouse::serial_port2text, - [ grep { $_ ne $mouse->{device} } (if_(-e '/dev/modem', '/dev/modem'), mouse::serial_ports()) ]) || return; + [ grep { $_ ne $o_mouse->{device} } (if_(-e '/dev/modem', '/dev/modem'), mouse::serial_ports()) ]) || return; my @cnx_list; my $secret = network::tools::read_secret_backend(); @@ -250,7 +250,7 @@ sub ppp_choose { #- TODO: add choice between hcf/hsf/lt ? sub winmodemConfigure { my ($in, $netcnx, $mouse, $netc, $intf) = @_; - my %relocations = ( ltmodem => $in->do_pkgs->check_kernel_module_packages('ltmodem') ); + my %relocations = (ltmodem => $in->do_pkgs->check_kernel_module_packages('ltmodem')); my $type; foreach (keys %{$netc->{autodetect}{winmodem}}) { diff --git a/perl-install/network/netconnect.pm b/perl-install/network/netconnect.pm index 993af1ca4..8ef994583 100644 --- a/perl-install/network/netconnect.pm +++ b/perl-install/network/netconnect.pm @@ -99,7 +99,7 @@ sub pre_func { $::Wizard_splash = 0; } else { #- for i18n : %s is the type of connection of the list: (modem, isdn, adsl, cable, local network); - $in->ask_okcancel(N("Network Configuration Wizard"), N("\n\n\nWe are now going to configure the %s connection.\n\n\nPress OK to continue.", translate($_[0])), 1); + $in->ask_okcancel(N("Network Configuration Wizard"), N("\n\n\nWe are now going to configure the %s connection.\n\n\nPress OK to continue.", translate($text)), 1); } undef $::Wizard_no_previous; } @@ -127,10 +127,10 @@ sub main { my $direct_net_install; if ($first_time && $::isInstall && ($in->{method} eq "ftp" || $in->{method} eq "http" || $in->{method} eq "nfs")) { - (!($::expert || $noauto) or $in->ask_okcancel(N("Network Configuration"), - N("Because you are doing a network installation, your network is already configured. + !$::expert && !$noauto || $in->ask_okcancel(N("Network Configuration"), + N("Because you are doing a network installation, your network is already configured. Click on Ok to keep your configuration, or cancel to reconfigure your Internet & Network connection. -"), 1)) and do { +"), 1) and do { $netcnx->{type} = 'lan'; output_with_perm("$prefix$connect_file", 0755, qq( @@ -233,8 +233,8 @@ If you don't want to use the auto detection, deselect the checkbox. network::configureNetwork2($in, $prefix, $netc, $intf); my $network_configured = 1; - eval { if ($netconnect::need_restart_network && $::isStandalone and (!$::expert or $in->ask_yesorno(N("Network configuration"), - N("The network needs to be restarted. Do you want to restart it ?"), 1))) { + eval { if ($netconnect::need_restart_network && $::isStandalone && (!$::expert || $in->ask_yesorno(N("Network configuration"), + N("The network needs to be restarted. Do you want to restart it ?"), 1))) { if (!run_program::rooted($prefix, "/etc/rc.d/init.d/network restart")) { $success = 0; $in->ask_okcancel(N("Network Configuration"), diff --git a/perl-install/network/network.pm b/perl-install/network/network.pm index b5708fe53..df209fb35 100644 --- a/perl-install/network/network.pm +++ b/perl-install/network/network.pm @@ -55,13 +55,13 @@ sub read_interface_conf { sub read_dhcpd_conf { my ($file) = @_; $file ||= "$::prefix/etc/dhcpd.conf"; - { option_routers => [ cat_($file) =~ /^\s*option routers\s+(\S+)\;/mg ], - subnet_mask => [ if_(cat_($file) =~ /^\s*option subnet-mask\s+(.*)\;/mg, split(' ', $1)) ], - domain_name => [ if_(cat_($file) =~ /^\s*option domain-name\s+\"(.*)\"\;/mg, split(' ', $1)) ], - domain_name_servers => [ if_(cat_($file) =~ /^\s*option domain-name-servers\s+(.*)\;/m, split(' ', $1)) ], - dynamic_bootp => [ if_(cat_($file) =~ /^\s*range dynamic-bootp\s+\S+\.(\d+)\s+\S+\.(\d+)\s*\;/m, split(' ', $1)) ], - default_lease_time => [ if_(cat_($file) =~ /^\s*default-lease-time\s+(.*)\;/m, split(' ', $1)) ], - max_lease_time => [ if_(cat_($file) =~ /^\s*max-lease-time\s+(.*)\;/m, split(' ', $1)) ] }; + { option_routers => [ cat_($file) =~ /^\s*option routers\s+(\S+);/mg ], + subnet_mask => [ if_(cat_($file) =~ /^\s*option subnet-mask\s+(.*);/mg, split(' ', $1)) ], + domain_name => [ if_(cat_($file) =~ /^\s*option domain-name\s+\"(.*)\";/mg, split(' ', $1)) ], + domain_name_servers => [ if_(cat_($file) =~ /^\s*option domain-name-servers\s+(.*);/m, split(' ', $1)) ], + dynamic_bootp => [ if_(cat_($file) =~ /^\s*range dynamic-bootp\s+\S+\.(\d+)\s+\S+\.(\d+)\s*;/m, split(' ', $1)) ], + default_lease_time => [ if_(cat_($file) =~ /^\s*default-lease-time\s+(.*);/m, split(' ', $1)) ], + max_lease_time => [ if_(cat_($file) =~ /^\s*max-lease-time\s+(.*);/m, split(' ', $1)) ] }; } sub read_tmdns_conf { @@ -153,7 +153,7 @@ sub write_resolv_conf { } sub write_interface_conf { - my ($file, $intf, $netc, $prefix) = @_; + my ($file, $intf, $_netc, $prefix) = @_; if ($intf->{HWADDR} && -e "$prefix/sbin/ip") { $intf->{HWADDR} = undef; @@ -375,11 +375,11 @@ notation (for example, 1.2.3.4)."); return 0 if !$intf->{WIRELESS_FREQ}; if ($intf->{WIRELESS_FREQ} !~ /[0-9.]*[kGM]/) { - $in->ask_warn('', N("Freq should have the suffix k, M or G (for example, \"2.46G\" for 2.46 GHz frequency), or add enough \'0\' (zeroes).")); + $in->ask_warn('', N("Freq should have the suffix k, M or G (for example, \"2.46G\" for 2.46 GHz frequency), or add enough '0' (zeroes).")); return (1,6); } if ($intf->{WIRELESS_RATE} !~ /[0-9.]*[kGM]/) { - $in->ask_warn('', N("Rate should have the suffix k, M or G (for example, \"11M\" for 11M), or add enough \'0\' (zeroes).")); + $in->ask_warn('', N("Rate should have the suffix k, M or G (for example, \"11M\" for 11M), or add enough '0' (zeroes).")); return (1,8); } }, @@ -419,15 +419,15 @@ want to use the default host name."), ), ], complete => sub { - if ($netc->{dnsServer} and !is_ip($netc->{dnsServer})) { + if ($netc->{dnsServer} && !is_ip($netc->{dnsServer})) { $in->ask_warn('', N("DNS server address should be in format 1.2.3.4")); return 1; } - if ($netc->{GATEWAY} and !is_ip($netc->{GATEWAY})) { + if ($netc->{GATEWAY} && !is_ip($netc->{GATEWAY})) { $in->ask_warn('', N("Gateway address should be in format 1.2.3.4")); return 1; } - if ($netc->{ZEROCONF_HOSTNAME} and $netc->{ZEROCONF_HOSTNAME} =~ /\./) { + if ($netc->{ZEROCONF_HOSTNAME} && $netc->{ZEROCONF_HOSTNAME} =~ /\./) { $in->ask_warn('', N("Zeroconf host name must not contain a .")); return 1; } @@ -437,7 +437,7 @@ want to use the default host name."), } sub miscellaneous_choose { - my ($in, $u, $clicked, $_no_track_net) = @_; + my ($in, $u, $b_clicked) = @_; # $in->set_help('configureNetworkProxy') if $::isInstall; $in->ask_from('', @@ -450,7 +450,7 @@ sub miscellaneous_choose { $u->{ftp_proxy} =~ m,^($|ftp://|http://), or $in->ask_warn('', N("URL should begin with 'ftp:' or 'http:'")), return 1,1; 0; } - ) or return if $::expert || $clicked; + ) or return if $::expert || $b_clicked; 1; } |