diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2004-11-18 13:25:45 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2004-11-18 13:25:45 +0000 |
commit | 459eedd7dc7ef289f379d2fc1dc691a057d1e144 (patch) | |
tree | a042f6f973b37076d459c3ec80404f9e4ffaa202 /perl-install/network | |
parent | fb67876005b9f7002d56f96269da9e6fb5d03b0f (diff) | |
download | drakx-459eedd7dc7ef289f379d2fc1dc691a057d1e144.tar drakx-459eedd7dc7ef289f379d2fc1dc691a057d1e144.tar.gz drakx-459eedd7dc7ef289f379d2fc1dc691a057d1e144.tar.bz2 drakx-459eedd7dc7ef289f379d2fc1dc691a057d1e144.tar.xz drakx-459eedd7dc7ef289f379d2fc1dc691a057d1e144.zip |
remove some unneeded ";", add some for normalization (as told by perl_checker)
Diffstat (limited to 'perl-install/network')
-rw-r--r-- | perl-install/network/adsl.pm | 2 | ||||
-rw-r--r-- | perl-install/network/ethernet.pm | 4 | ||||
-rw-r--r-- | perl-install/network/isdn.pm | 2 | ||||
-rw-r--r-- | perl-install/network/netconnect.pm | 30 | ||||
-rw-r--r-- | perl-install/network/shorewall.pm | 8 |
5 files changed, 23 insertions, 23 deletions
diff --git a/perl-install/network/adsl.pm b/perl-install/network/adsl.pm index 5066f61ad..49850d1fa 100644 --- a/perl-install/network/adsl.pm +++ b/perl-install/network/adsl.pm @@ -62,7 +62,7 @@ If you don't know, choose 'use PPPoE'"), }, }, }); -}; +} sub adsl_probe_info { my ($adsl, $netc, $adsl_type, $o_adsl_modem) = @_; diff --git a/perl-install/network/ethernet.pm b/perl-install/network/ethernet.pm index 0a7a3d19f..4f55c780e 100644 --- a/perl-install/network/ethernet.pm +++ b/perl-install/network/ethernet.pm @@ -98,7 +98,7 @@ sub get_eth_cards { $description = $cards[0]{description} if @cards == 1; } $a and $saved_driver = $a; # handle multiple cards managed by the same driver - [ $interface, $saved_driver, if_($description, $description) ] + [ $interface, $saved_driver, if_($description, $description) ]; } @all_cards; } @@ -120,7 +120,7 @@ sub update_iftab() { my $descriptor = ${{ ether => 'mac', ieee1394 => 'mac_ieee1394' }}{$link_type} or next; substInFile { s/^$intf\s+.*\n//; - $_ .= qq($intf\t$descriptor $mac_address\n) if eof + $_ .= qq($intf\t$descriptor $mac_address\n) if eof; } "$::prefix/etc/iftab"; } } diff --git a/perl-install/network/isdn.pm b/perl-install/network/isdn.pm index e91810aba..b1439bbf7 100644 --- a/perl-install/network/isdn.pm +++ b/perl-install/network/isdn.pm @@ -186,7 +186,7 @@ sub get_capi_card { my ($isdn) = @_; my $capi_card = find { - hex($isdn->{vendor}) == $_->{vendor} && hex($isdn->{id}) == $_->{id} + hex($isdn->{vendor}) == $_->{vendor} && hex($isdn->{id}) == $_->{id}; } @isdn_capi or return; #- check if the capi driver is available diff --git a/perl-install/network/netconnect.pm b/perl-install/network/netconnect.pm index 1cf45a46c..4297d7361 100644 --- a/perl-install/network/netconnect.pm +++ b/perl-install/network/netconnect.pm @@ -56,7 +56,7 @@ sub detect_timezone() { foreach (keys %tmz2country) { if ($_ eq $tm_parse{ZONE}) { unshift @country, $tmz2country{$_}; - } else { push @country, $tmz2country{$_} }; + } else { push @country, $tmz2country{$_} } } \@country; } @@ -328,7 +328,7 @@ sub real_main { name => N("Select the network interface to configure:"), data => sub { [ { label => N("Net Device"), type => "list", val => \$isdn_name, allow_empty_list => 1, - list => [ $my_isdn, N("External ISDN modem"), keys %isdn_cards ] } ] + list => [ $my_isdn, N("External ISDN modem"), keys %isdn_cards ] } ]; }, post => sub { # !intern_pci: @@ -443,7 +443,7 @@ If you have a PCMCIA card, you have to know the \"irq\" and \"io\" of your card. ], post => sub { $isdn->{protocol} = $isdn_type; - return "isdn_db", + return "isdn_db"; } }, @@ -485,7 +485,7 @@ Take a look at http://www.linmodems.org"), list => [ keys %{$netc->{autodetect}{modem}}, N("Manual choice") ], } ], }, post => sub { - $modem ||= $netcnx->{modem} ||= {};; + $modem ||= $netcnx->{modem} ||= {}; return 'choose_serial_port' if $modem_name eq N("Manual choice"); $ntf_name = $netc->{autodetect}{modem}{$modem_name}{device} || $netc->{autodetect}{modem}{$modem_name}{description}; @@ -558,14 +558,14 @@ Take a look at http://www.linmodems.org"), s/%([0-9]{3})/chr(int($1))/eg; $countries{$country} ||= translate($country); join('', $countries{$country}, $_); - } grep { !/.directory$/ } glob_("$p_db_path/$country/*") + } grep { !/.directory$/ } glob_("$p_db_path/$country/*"); } map { s!$p_db_path/!!o; s!_! !g; $_ } glob_("$p_db_path/*"); $old_provider = $provider; }, name => N("Select your provider:"), data => sub { [ { label => N("Provider:"), type => "list", val => \$provider, separator => '/', - list => [ N("Unlisted - edit manually"), @isp ] } ] + list => [ N("Unlisted - edit manually"), @isp ] } ]; }, post => sub { if ($provider ne N("Unlisted - edit manually")) { @@ -932,7 +932,7 @@ Do you really want to reconfigure this device?"), name => sub { my $_msg = N("Zeroconf hostname resolution"); N("Configuring network device %s (driver %s)", $ethntf->{DEVICE}, $module) . "\n\n" . - N("The following protocols can be used to configure an ethernet connection. Please choose the one you want to use") + N("The following protocols can be used to configure an ethernet connection. Please choose the one you want to use"); }, data => sub { [ { val => \$protocol, type => "list", list => [ sort values %l10n_lan_protocols ] } ]; @@ -1010,7 +1010,7 @@ notation (for example, 1.2.3.4).")), } }, focus_out => sub { - $ethntf->{NETMASK} ||= netmask($ethntf->{IPADDR}) unless $_[0] + $ethntf->{NETMASK} ||= netmask($ethntf->{IPADDR}) unless $_[0]; }, post => sub { $ethntf->{ONBOOT} = bool2yesno($onboot); @@ -1101,7 +1101,7 @@ those interface specific commands and their effect. See iwpriv(8) man page for further information."), } - ] + ]; }, post => sub { # untranslate parameters @@ -1267,14 +1267,14 @@ It is not necessary on most networks."), ONBOOT => 1, DIAL_ON_IFUP => 0 }); my $method = find { $_->{ONBOOT} eq text2bool($intf->{ippp0}{ONBOOT}) && - $_->{DIAL_ON_IFUP} eq text2bool($intf->{ippp0}{DIAL_ON_IFUP}) + $_->{DIAL_ON_IFUP} eq text2bool($intf->{ippp0}{DIAL_ON_IFUP}); } @isdn_dial_methods; #- use net_applet by default $isdn->{dial_method} = $method->{name} || $isdn_dial_methods[1]{name}; }, name => N("How do you want to dial this connection?"), data => sub { - [ { type => "list", val => \$isdn->{dial_method}, list => [ map { $_->{name} } @isdn_dial_methods ] } ] + [ { type => "list", val => \$isdn->{dial_method}, list => [ map { $_->{name} } @isdn_dial_methods ] } ]; }, post => sub { my $method = find { $_->{name} eq $isdn->{dial_method} } @isdn_dial_methods; @@ -1367,7 +1367,7 @@ Click on Ok to keep your configuration, or cancel to reconfigure your Internet & $use_wizard = 0; }; } - }; + } if ($use_wizard) { require wizards; @@ -1432,14 +1432,14 @@ sub get_net_device() { my $connect_file = $network::tools::connect_file; my $network_file = "$::prefix/etc/sysconfig/network"; if (cat_("$::prefix$connect_file") =~ /ifup/) { - if_(cat_($connect_file) =~ /^\s*ifup\s+(.*)/m, split(' ', $1)) + if_(cat_($connect_file) =~ /^\s*ifup\s+(.*)/m, split(' ', $1)); } elsif (cat_("$::prefix$connect_file") =~ /network/) { ${{ getVarsFromSh("$::prefix$network_file") }}{GATEWAYDEV}; } elsif (cat_("$::prefix$connect_file") =~ /isdn/) { "ippp+"; } else { "ppp+"; - }; + } } sub read_net_conf { @@ -1450,7 +1450,7 @@ sub read_net_conf { network::network::read_all_conf($::prefix, $netc, $intf, $netcnx); foreach ('NET_DEVICE', 'NET_INTERFACE') { - $netc->{$_} = $netcnx->{$_} if $netcnx->{$_} + $netc->{$_} = $netcnx->{$_} if $netcnx->{$_}; } $netcnx->{$netcnx->{type}} ||= {} if $netcnx->{type}; } diff --git a/perl-install/network/shorewall.pm b/perl-install/network/shorewall.pm index 94ce0abb1..687c73798 100644 --- a/perl-install/network/shorewall.pm +++ b/perl-install/network/shorewall.pm @@ -105,7 +105,7 @@ sub read { put_in_hash(\%conf, default_interfaces_silent($in)); } else { put_in_hash(\%conf, default_interfaces($in)); - }; + } $conf{net_interface} && \%conf; } @@ -138,14 +138,14 @@ sub write { if_(cat_("$::prefix$connect_file") =~ /pptp/, [ 'ACCEPT', 'fw', 'loc:10.0.0.138', 'tcp', '1723' ]), if_(cat_("$::prefix$connect_file") =~ /pptp/, [ 'ACCEPT', 'fw', 'loc:10.0.0.138', 'gre' ]), (map { - map_each { [ 'ACCEPT', $_, 'fw', $::a, join(',', @$::b), '-' ] } %ports_by_proto + map_each { [ 'ACCEPT', $_, 'fw', $::a, join(',', @$::b), '-' ] } %ports_by_proto; } ('net', if_($conf->{loc_interface}[0], 'loc'))), ); if (cat_("/etc/shorewall/rules") !~ /^\s*REDIRECT\s*loc\s*$squid_port\s+(\S+)/mg && $squid_port && -f "/var/run/squid.pid" && grep { /Loc/i } cat_("/etc/shorewall/zones")) { substInFile { s/#LAST LINE -- ADD YOUR ENTRIES BEFORE THIS ONE -- DO NOT REMOVE/REDIRECT\tloc\t$squid_port\ttcp\twww\t-\nACCEPT\tfw\tnet\ttcp\twww\n#LAST LINE -- ADD YOUR ENTRIES BEFORE THIS ONE -- DO NOT REMOVE/; - } "/etc/shorewall/rules" -}; + } "/etc/shorewall/rules"; +} set_config_file('masq', $conf->{masquerade} ? [ $conf->{net_interface}, $conf->{masquerade}{subnet} ] : (), ); |