From 9bc8b5b56be1f30afe485f9b867b9b22a6e1ac61 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Wed, 22 Jan 2003 09:21:36 +0000 Subject: perl_checker fixes --- perl-install/network/netconnect.pm | 6 +++--- perl-install/network/network.pm | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'perl-install/network') diff --git a/perl-install/network/netconnect.pm b/perl-install/network/netconnect.pm index 328c9437b..1c10b680a 100644 --- a/perl-install/network/netconnect.pm +++ b/perl-install/network/netconnect.pm @@ -163,7 +163,7 @@ If you don't want to use the auto detection, deselect the checkbox. { label => N("Use auto detection"), val => \$netc->{autodetection}, type => 'bool' }, if_($::isStandalone, { label => N("Expert Mode"), val => \$::expert, type => 'bool' }), ] - ) or goto step_5; }; $in->exit(0) if $@ =~ /wizcancel/; + ) or goto step_5 }; $in->exit(0) if $@ =~ /wizcancel/; undef $::Wizard_no_previous; set_profile($netcnx); if ($netc->{autodetection}) { @@ -212,7 +212,7 @@ If you don't want to use the auto detection, deselect the checkbox. eval { $in->ask_from(N("Network Configuration Wizard"), N("You have configured multiple ways to connect to the Internet.\nChoose the one you want to use.\n\n") . if_(!$::isStandalone, "You may want to configure some profiles after the installation, in the Mandrake Control Center"), [ { label => N("Internet connection"), val => \$netc->{internet_cnx_choice}, list => [ keys %{$netc->{internet_cnx}} ] } ] - ) or goto step_2; }; $in->exit(0) if $@ =~ /wizcancel/; + ) or goto step_2 }; $in->exit(0) if $@ =~ /wizcancel/; } elsif ($nb == 1) { $netc->{internet_cnx_choice} = (keys %{$netc->{internet_cnx}})[0]; } @@ -256,7 +256,7 @@ Test your connection via net_monitor or mcc. If your connection doesn't work, yo if ($::isWizard) { $::Wizard_no_previous = 1; $::Wizard_finished = 1; - eval { $in->ask_okcancel(N("Network Configuration"), $m, 1); }; $in->exit(0) if $@ =~ /wizcancel/; + eval { $in->ask_okcancel(N("Network Configuration"), $m, 1) }; $in->exit(0) if $@ =~ /wizcancel/; undef $::Wizard_no_previous; undef $::Wizard_finished; } else { $::isStandalone and $in->ask_warn('', $m) } diff --git a/perl-install/network/network.pm b/perl-install/network/network.pm index d156f257e..f182d8013 100644 --- a/perl-install/network/network.pm +++ b/perl-install/network/network.pm @@ -70,7 +70,7 @@ sub write_conf { if_(!$netc->{DHCP}, HOSTNAME => "localhost.$netc->{DOMAINNAME}"), }); - setVarsInSh($file, $netc, if_(!$netc->{DHCP}, HOSTNAME), qw(NETWORKING FORWARD_IPV4 DOMAINNAME GATEWAY GATEWAYDEV NISDOMAIN)); + setVarsInSh($file, $netc, if_(!$netc->{DHCP}, 'HOSTNAME'), qw(NETWORKING FORWARD_IPV4 DOMAINNAME GATEWAY GATEWAYDEV NISDOMAIN)); } sub write_resolv_conf { @@ -146,7 +146,7 @@ sub write_interface_conf { $intf->{BOOTPROTO} =~ s/dhcp.*/dhcp/; #- TODO: avoid obfuscating BOOTPROTO, waiting for zeroconf conf details - setVarsInSh($file, $intf, qw(DEVICE BOOTPROTO IPADDR NETMASK NETWORK BROADCAST ONBOOT HWADDR), if_($intf->{wireless_eth}, qw(WIRELESS_MODE WIRELESS_ESSID WIRELESS_NWID WIRELESS_FREQ WIRELESS_SENS WIRELESS_RATE WIRELESS_ENC_KEY WIRELESS_RTS WIRELESS_FRAG WIRELESS_IWCONFIG WIRELESS_IWSPY WIRELESS_IWPRIV)), if_($dhcp_hostname, DHCP_HOSTNAME), if_(!$dhcp_hostname, NEEDHOSTNAME)); + setVarsInSh($file, $intf, qw(DEVICE BOOTPROTO IPADDR NETMASK NETWORK BROADCAST ONBOOT HWADDR), if_($intf->{wireless_eth}, qw(WIRELESS_MODE WIRELESS_ESSID WIRELESS_NWID WIRELESS_FREQ WIRELESS_SENS WIRELESS_RATE WIRELESS_ENC_KEY WIRELESS_RTS WIRELESS_FRAG WIRELESS_IWCONFIG WIRELESS_IWSPY WIRELESS_IWPRIV)), if_($dhcp_hostname, 'DHCP_HOSTNAME'), if_(!$dhcp_hostname, 'NEEDHOSTNAME')); } sub add2hosts { @@ -330,9 +330,9 @@ notation (for example, 1.2.3.4)."); ], complete => sub { $intf->{BOOTPROTO} = $pump ? if_($dhcp, "dhcp") . if_($zeroconf, "zeroconf") : "static"; - if ($pump and !$dhcp and !$zeroconf ) { + if ($pump and !$dhcp and !$zeroconf) { $in->ask_warn('', N("For an Automatic IP you have to select at least one protocol : dhcp or zeroconf")); - return (1,$i); + return 1; } return 0 if $pump; for (my $i = 0; $i < @fields; $i++) { @@ -433,7 +433,7 @@ sub read_all_conf { } sub easy_dhcp { - my ($in, $netc, $intf) = @_; + my ($_in, $netc, $intf) = @_; return if text2bool($netc->{NETWORKING}); -- cgit v1.2.1