diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2002-07-31 11:59:03 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2002-07-31 11:59:03 +0000 |
commit | aaff6dff3ac0e9b19810fc1bc836f30c19918e5d (patch) | |
tree | 24d563bb50162681d48011773d41f501c720d888 /perl-install/network | |
parent | 8eb45d87d70be8b1802f5f6c79cf53b3099b0596 (diff) | |
download | drakx-backup-do-not-use-aaff6dff3ac0e9b19810fc1bc836f30c19918e5d.tar drakx-backup-do-not-use-aaff6dff3ac0e9b19810fc1bc836f30c19918e5d.tar.gz drakx-backup-do-not-use-aaff6dff3ac0e9b19810fc1bc836f30c19918e5d.tar.bz2 drakx-backup-do-not-use-aaff6dff3ac0e9b19810fc1bc836f30c19918e5d.tar.xz drakx-backup-do-not-use-aaff6dff3ac0e9b19810fc1bc836f30c19918e5d.zip |
make new perl_checker happy
Diffstat (limited to 'perl-install/network')
-rw-r--r-- | perl-install/network/adsl.pm | 2 | ||||
-rw-r--r-- | perl-install/network/ethernet.pm | 8 | ||||
-rw-r--r-- | perl-install/network/isdn.pm | 8 | ||||
-rw-r--r-- | perl-install/network/netconnect.pm | 51 | ||||
-rw-r--r-- | perl-install/network/tools.pm | 8 |
5 files changed, 38 insertions, 39 deletions
diff --git a/perl-install/network/adsl.pm b/perl-install/network/adsl.pm index d27292cf4..8df96aa00 100644 --- a/perl-install/network/adsl.pm +++ b/perl-install/network/adsl.pm @@ -71,7 +71,7 @@ sub adsl_detect { return 0; my ($interface) = @_; run_program::rooted($prefix, "ifconfig $interface 10.0.0.10 netmask 255.255.255.0"); - my $ret=run_program::rooted($prefix, "/bin/ping -c 1 10.0.0.138 2> /dev/null"); + my $ret = run_program::rooted($prefix, "/bin/ping -c 1 10.0.0.138 2> /dev/null"); run_program::rooted($prefix, "ifconfig $interface 0.0.0.0 netmask 255.255.255.0"); run_program::rooted($prefix, "/etc/init.d/network restart"); $ret; diff --git a/perl-install/network/ethernet.pm b/perl-install/network/ethernet.pm index 1bdaec245..aa2339fe2 100644 --- a/perl-install/network/ethernet.pm +++ b/perl-install/network/ethernet.pm @@ -25,7 +25,7 @@ sub configure_cable { # such as ``mybox.mylab.myco.com''."), # [_("Host name:")], [ \$netcnx->{cable}{hostname} ]); if ($::expert) { - my @m=( + my @m = ( { description => "dhcpcd", c => 1}, { description => "dhcpxd", @@ -83,7 +83,7 @@ sub conf_network_card { my ($netc, $intf, $type, $ipadr, $netadr) = @_; #-type =static or dhcp any::load_category($in, 'network/main|usb', !$::expert, 1); - my @all_cards=conf_network_card_backend($netc, $intf, $type, undef, $ipadr, $netadr); + my @all_cards = conf_network_card_backend($netc, $intf, $type, undef, $ipadr, $netadr); my $interface; @all_cards == () and $in->ask_warn('', _("No ethernet network adapter has been detected on your system. I cannot set up this connection type.")) and return; @@ -97,7 +97,7 @@ I cannot set up this connection type.")) and return; l1: $::isStandalone and modules::write_conf($prefix); - my $device=conf_network_card_backend($netc, $intf, $type, $interface, $ipadr, $netadr, $interface); + my $device = conf_network_card_backend($netc, $intf, $type, $interface, $ipadr, $netadr, $interface); # if ( $::isStandalone and !($type eq "dhcp")) { # $in->ask_yesorno(_("Network interface"), # _("I'm about to restart the network device:\n") . $device . _("\nDo you agree?"), 1) and configureNetwork2($in, $prefix, $netc, $intf) and system("$prefix/sbin/ifdown $device;$prefix/sbin/ifup $device"); @@ -179,7 +179,7 @@ sub configureNetwork { my @all_cards = conf_network_card_backend ($netc, $intf, undef, undef, undef, undef); configureNetwork_step_1: - my $n_card=0; + my $n_card = 0; $netc ||= {}; my $last; foreach (@l) { my $intf2 = findIntf($intf ||= {}, $_); diff --git a/perl-install/network/isdn.pm b/perl-install/network/isdn.pm index 504655d11..f9c8bd409 100644 --- a/perl-install/network/isdn.pm +++ b/perl-install/network/isdn.pm @@ -74,7 +74,7 @@ sub isdn_write_config_backend { if ($isdn->{id}) { isdn_detect_backend($isdn); } else { - my $a=""; + my $a = ""; defined $isdn->{$_} and $a .= "$_=" . $isdn->{$_} . " " foreach qw(type protocol mem io io0 io1 irq); $isdn->{driver} eq "hisax" and $a.="id=HiSax"; modules::set_options($isdn->{driver}, $a); @@ -86,7 +86,7 @@ sub isdn_write_config_backend { chmod 0600, $f; } foreach my $f ('isdn1B.conf', 'isdn2B.conf') { - my $a=1; + my $a = 1; substInFile { s/EAZ =.*/EAZ = $isdn->{phone_in}/; s/PHONE_OUT =.*/PHONE_OUT = $isdn->{phone_out}/; @@ -167,7 +167,7 @@ sub isdn_ask_info { my ($isdn, $netc) = @_; my $f = "$ENV{SHARE_PATH}/ldetect-lst/isdn.db"; $f = "$prefix$f" if !-e $f; - my $str= $in->ask_from_treelist(_("ISDN Configuration"), _("Select your provider.\nIf it isn't listed, choose Unlisted."), + my $str = $in->ask_from_treelist(_("ISDN Configuration"), _("Select your provider.\nIf it isn't listed, choose Unlisted."), '|', ['Unlisted - edit manually', read_providers_backend($f)], 'Unlisted - edit manually') or return; @@ -179,7 +179,7 @@ sub isdn_ask_info { } sub isdn_ask_protocol { - my @toto=( + my @toto = ( { description => $::expert ? _("Europe protocol (EDSS1)") : _("Europe protocol"), protokol => 2}, { description => $::expert ? _("Protocol for the rest of the world\nNo D-Channel (leased lines)") : _("Protocol for the rest of the world"), diff --git a/perl-install/network/netconnect.pm b/perl-install/network/netconnect.pm index f15797687..8aef0b3c8 100644 --- a/perl-install/network/netconnect.pm +++ b/perl-install/network/netconnect.pm @@ -1,4 +1,3 @@ - package network::netconnect; use diagnostics; @@ -31,13 +30,13 @@ sub intro { read_net_conf($prefix, $netcnx, $netc); if (!$::isWizard) { if (connected()) { - $text=_("You are currently connected to internet.") . (-e $disconnect_file ? _("\nYou can disconnect or reconfigure your connection.") : _("\nYou can reconfigure your connection.")); - $connected=1; + $text = _("You are currently connected to internet.") . (-e $disconnect_file ? _("\nYou can disconnect or reconfigure your connection.") : _("\nYou can reconfigure your connection.")); + $connected = 1; } else { - $text=_("You are not currently connected to Internet.") . (-e $connect_file ? _("\nYou can connect to Internet or reconfigure your connection.") : _("\nYou can reconfigure your connection.")); - $connected=0; + $text = _("You are not currently connected to Internet.") . (-e $connect_file ? _("\nYou can connect to Internet or reconfigure your connection.") : _("\nYou can reconfigure your connection.")); + $connected = 0; } - my @l=( + my @l = ( !$connected && -e $connect_file ? { description => _("Connect"), c => 1} : (), $connected && -e $disconnect_file ? { description => _("Disconnect"), @@ -62,11 +61,11 @@ sub intro { sub detect { my ($auto_detect, $net_install) = @_; - my $isdn={}; + my $isdn = {}; require network::isdn; network::isdn->import; isdn_detect_backend($isdn); - $auto_detect->{isdn}{$_}=$isdn->{$_} foreach qw(description vendor id driver card_type type); + $auto_detect->{isdn}{$_} = $isdn->{$_} foreach qw(description vendor id driver card_type type); $auto_detect->{isdn}{description} =~ s/.*\|//; modules::load_category('network/main|usb'); @@ -76,20 +75,20 @@ sub detect { require network::adsl; network::adsl->import; map { - (!$net_install and adsl_detect($_->[0])) ? $auto_detect->{adsl}=$_->[0] : $auto_detect->{lan}{$_->[0]}=$_->[1] } @all_cards; - my $modem={}; + (!$net_install and adsl_detect($_->[0])) ? $auto_detect->{adsl} = $_->[0] : $auto_detect->{lan}{$_->[0]} = $_->[1] } @all_cards; + my $modem = {}; require network::modem; network::modem->import; modem_detect_backend($modem); - $modem->{device} and $auto_detect->{modem}=$modem->{device}; + $modem->{device} and $auto_detect->{modem} = $modem->{device}; } sub pre_func { my ($text) = @_; $in->isa('interactive_gtk') or return; - $::Wizard_no_previous=1; + $::Wizard_no_previous = 1; if ($::isStandalone) { - $::Wizard_splash=1; + $::Wizard_splash = 1; require my_gtk; my_gtk->import(qw(:wrappers)); my $W = my_gtk->new(_("Network Configuration Wizard")); @@ -103,7 +102,7 @@ sub pre_func { ) ); $W->main; - $::Wizard_splash=0; + $::Wizard_splash = 0; } else { #- for i18n : %s is the type of connection of the list: (modem, isdn, adsl, cable, local network); $in->ask_okcancel(_("Network Configuration Wizard"), _("\n\n\nWe are now going to configure the %s connection.\n\n\nPress OK to continue.",_($_[0])), 1); @@ -160,7 +159,7 @@ ifdown eth0 step_1: $::Wizard_no_previous=1; - my @profiles=get_profiles(); + my @profiles = get_profiles(); $in->ask_from(_("Network Configuration Wizard"), _("Welcome to The Network Configuration Wizard. @@ -193,8 +192,8 @@ If you don't want to use the auto detection, deselect the checkbox. [_("Cable connection"), $netc->{autodetect}{cable}, __("cable connection detected"), \$conf{cable}], [_("LAN connection"), $netc->{autodetect}{lan}, __("ethernet card(s) detected"), \$conf{lan}] ); - my $i=0; - map { defined $set_default or do { $_->[1] and $set_default=$i }; $i++ } @l; + my $i = 0; + map { defined $set_default or do { $_->[1] and $set_default = $i }; $i++ } @l; @l = ( [_("Normal modem connection") . if_($netc->{autodetect}{modem}, " - " . _("detected on port %s", $netc->{autodetect}{modem})), \$conf{modem}], [_("ISDN connection") . if_($netc->{autodetect}{isdn}{description}, " - " . _("detected %s", $netc->{autodetect}{isdn}{description})), \$conf{isdn}], @@ -352,9 +351,9 @@ sub save_conf { my $adsl; my $modem; my $isdn; - $netcnx->{type} =~ /adsl/ and $adsl=$netcnx->{$netcnx->{type}}; - $netcnx->{type} eq 'isdn_external' || $netcnx->{type} eq 'modem' and $modem=$netcnx->{$netcnx->{type}}; - $netcnx->{type} eq 'isdn_internal' and $isdn=$netcnx->{$netcnx->{type}}; + $netcnx->{type} =~ /adsl/ and $adsl = $netcnx->{$netcnx->{type}}; + $netcnx->{type} eq 'isdn_external' || $netcnx->{type} eq 'modem' and $modem = $netcnx->{$netcnx->{type}}; + $netcnx->{type} eq 'isdn_internal' and $isdn = $netcnx->{$netcnx->{type}}; modules::load_category('network/main|usb'); require network::ethernet; network::ethernet->import; @@ -500,7 +499,7 @@ sub add_profile { sub get_profiles { my @a; - my $i=0; + my $i = 0; foreach (glob("/etc/sysconfig/network-scripts/drakconnect_conf.*")) { s/.*\.//; $a[$i] = $_; @@ -511,11 +510,11 @@ sub get_profiles { sub load_conf { my ($netcnx, $netc, $intf)=@_; - my $adsl_pptp={}; - my $adsl_pppoe={}; - my $modem={}; - my $isdn_external={}; - my $isdn={}; + my $adsl_pptp = {}; + my $adsl_pppoe = {}; + my $modem = {}; + my $isdn_external = {}; + my $isdn = {}; my $system_name; my $domain_name; diff --git a/perl-install/network/tools.pm b/perl-install/network/tools.pm index 33f3bb6be..c2a1b28cd 100644 --- a/perl-install/network/tools.pm +++ b/perl-install/network/tools.pm @@ -46,12 +46,12 @@ sub ask_connect_now { my $w = $in->wait_message('', _("Testing your connection..."), 1); connect_backend(); my $s = 30; - $type =~ /modem/ and $s=50; - $type =~ /adsl/ and $s=35; - $type =~ /isdn/ and $s=20; + $type =~ /modem/ and $s = 50; + $type =~ /adsl/ and $s = 35; + $type =~ /isdn/ and $s = 20; sleep $s; my $netc = {}; - $up=connected(); + $up = connected(); } my $m = $up ? (_("The system is now connected to Internet.") . if_($::isInstall, _("For security reason, it will be disconnected now.")) ) : |