summaryrefslogtreecommitdiffstats
path: root/perl-install/network
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-11-13 14:25:59 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-11-13 14:25:59 +0000
commitb7661719bc1f1ebd078c7e7adb2eb25c83526c27 (patch)
tree9cedb533d18ccd4640a30488b731f83c3c438d58 /perl-install/network
parentf47690a41184c9f99a6fbf003b1045c3f4c0220b (diff)
downloaddrakx-b7661719bc1f1ebd078c7e7adb2eb25c83526c27.tar
drakx-b7661719bc1f1ebd078c7e7adb2eb25c83526c27.tar.gz
drakx-b7661719bc1f1ebd078c7e7adb2eb25c83526c27.tar.bz2
drakx-b7661719bc1f1ebd078c7e7adb2eb25c83526c27.tar.xz
drakx-b7661719bc1f1ebd078c7e7adb2eb25c83526c27.zip
add/remove spaces to make perl_checker happy
Diffstat (limited to 'perl-install/network')
-rw-r--r--perl-install/network/adsl.pm2
-rw-r--r--perl-install/network/ethernet.pm12
-rw-r--r--perl-install/network/isdn.pm18
-rw-r--r--perl-install/network/modem.pm10
-rw-r--r--perl-install/network/netconnect.pm56
-rw-r--r--perl-install/network/network.pm4
-rw-r--r--perl-install/network/tools.pm14
7 files changed, 58 insertions, 58 deletions
diff --git a/perl-install/network/adsl.pm b/perl-install/network/adsl.pm
index b5eea7742..a8f51e2e3 100644
--- a/perl-install/network/adsl.pm
+++ b/perl-install/network/adsl.pm
@@ -212,7 +212,7 @@ LC_ALL=C LANG=C LANGUAGE=C LC_MESSAGES=C /usr/sbin/adsl-start $netc->{NET_DEVICE
echo 'not yet implemented, still beta software'
", $netc->{adsltype}) }
- $netc->{NET_INTERFACE}='ppp0';
+ $netc->{NET_INTERFACE} = 'ppp0';
}
1;
diff --git a/perl-install/network/ethernet.pm b/perl-install/network/ethernet.pm
index 3754cfd4a..bda415549 100644
--- a/perl-install/network/ethernet.pm
+++ b/perl-install/network/ethernet.pm
@@ -16,7 +16,7 @@ use MDK::Common::Globals "network", qw($in $prefix);
sub configure_cable {
my ($netcnx, $netc, $intf, $first_time) = @_;
$::isInstall and $in->set_help('configureNetworkCable');
- $netcnx->{type}='cable';
+ $netcnx->{type} = 'cable';
# $netcnx->{cable}={};
# $in->ask_from_entries_ref(N("Cable connection"),
# N("Please enter your host name if you know it.
@@ -38,9 +38,9 @@ sub configure_cable {
Default is dhcpcd"),
sub { $_[0]{description} },
\@m)) {
- $f->{c}==1 and $netcnx->{dhcp_client}="dhcpcd" and $in->do_pkgs->install(qw(dhcpcd));
- $f->{c}==3 and $netcnx->{dhcp_client}="dhcpxd" and $in->do_pkgs->install(qw(dhcpxd));
- $f->{c}==4 and $netcnx->{dhcp_client}="dhcp-client" and $in->do_pkgs->install(qw(dhcp-client));
+ $f->{c} == 1 and $netcnx->{dhcp_client} = "dhcpcd" and $in->do_pkgs->install(qw(dhcpcd));
+ $f->{c} == 3 and $netcnx->{dhcp_client} = "dhcpxd" and $in->do_pkgs->install(qw(dhcpxd));
+ $f->{c} == 4 and $netcnx->{dhcp_client} = "dhcp-client" and $in->do_pkgs->install(qw(dhcp-client));
}
} else {
$in->do_pkgs->install(qw(dhcpcd));
@@ -63,7 +63,7 @@ sub configure_lan {
configureNetwork2($in, $prefix, $netc, $intf);
$netc->{NETWORKING} = "yes";
if ($netc->{GATEWAY} || grep { $_->{BOOTPROTO} eq 'dhcp' } values %$intf) {
- $netcnx->{type}='lan';
+ $netcnx->{type} = 'lan';
$netcnx->{NET_DEVICE} = $netc->{NET_DEVICE} = '';
$netcnx->{NET_INTERFACE} = 'lan'; #$netc->{NET_INTERFACE};
write_cnx_script($netc, "local network",
@@ -162,7 +162,7 @@ sub conf_network_card_backend {
sub go_ethernet {
my ($netc, $intf, $type, $ipadr, $netadr, $first_time) = @_;
conf_network_card($netc, $intf, $type, $ipadr, $netadr) or return;
- $netc->{NET_INTERFACE}=$netc->{NET_DEVICE};
+ $netc->{NET_INTERFACE} = $netc->{NET_DEVICE};
configureNetwork($netc, $intf, $first_time) or return;
# if ( $::isStandalone and $netc->{NET_DEVICE}) {
# $in->ask_yesorno(N("Network interface"),
diff --git a/perl-install/network/isdn.pm b/perl-install/network/isdn.pm
index 8e1c00261..e6997351e 100644
--- a/perl-install/network/isdn.pm
+++ b/perl-install/network/isdn.pm
@@ -23,15 +23,15 @@ sub configure {
) or return;
if ($e =~ /card/) {
intern_pci:
- $netc->{isdntype}='isdn_internal';
- $netcnx->{isdn_internal}={};
+ $netc->{isdntype} = 'isdn_internal';
+ $netcnx->{isdn_internal} = {};
$netcnx->{isdn_internal}{$_} = $netc->{autodetect}{isdn}{$_} foreach 'description', 'vendor', 'id', 'driver', 'card_type', 'type';
isdn_detect($netcnx->{isdn_internal}, $netc) or return;
} else {
- $netc->{isdntype}='isdn_external';
- $netcnx->{isdn_external}={};
- $netcnx->{isdn_external}{device}=$netc->{autodetect}{modem};
- $netcnx->{isdn_external}{special_command}='AT&F&O2B40';
+ $netc->{isdntype} = 'isdn_external';
+ $netcnx->{isdn_external} = {};
+ $netcnx->{isdn_external}{device} = $netc->{autodetect}{modem};
+ $netcnx->{isdn_external}{special_command} = 'AT&F&O2B40';
require network::modem;
network::modem::pppConfig($netcnx->{isdn_external}, $mouse, $netc) or goto isdn_step_1;
}
@@ -76,7 +76,7 @@ sub isdn_write_config_backend {
} else {
my $a = "";
defined $isdn->{$_} and $a .= "$_=" . $isdn->{$_} . " " foreach qw(type protocol mem io io0 io1 irq);
- $isdn->{driver} eq "hisax" and $a.="id=HiSax";
+ $isdn->{driver} eq "hisax" and $a .= "id=HiSax";
modules::set_options($isdn->{driver}, $a);
}
modules::add_alias("ippp0", $isdn->{driver});
@@ -243,7 +243,7 @@ sub isdn_detect {
isdn_ask($isdn, $netc, N("I have detected an ISDN PCI card, but I don't know its type. Please select a PCI card on the next screen.")) or return;
} else {
isdn_detect_step_1:
- $isdn->{protocol}=isdn_ask_protocol() or return;
+ $isdn->{protocol} = isdn_ask_protocol() or return;
isdn_detect_step_2:
isdn_ask_info($isdn, $netc) or goto isdn_detect_step_1;
isdn_write_config($isdn, $netc) or goto isdn_detect_step_2;
@@ -251,7 +251,7 @@ sub isdn_detect {
} else {
isdn_ask($isdn, $netc, N("No ISDN PCI card found. Please select one on the next screen.")) or return;
}
- $netc->{$_}='ippp0' foreach 'NET_DEVICE', 'NET_INTERFACE';
+ $netc->{$_} = 'ippp0' foreach 'NET_DEVICE', 'NET_INTERFACE';
1;
}
diff --git a/perl-install/network/modem.pm b/perl-install/network/modem.pm
index 1003cc637..a6eabf170 100644
--- a/perl-install/network/modem.pm
+++ b/perl-install/network/modem.pm
@@ -14,9 +14,9 @@ use MDK::Common::Globals "network", qw($in $prefix);
sub configure {
my ($netcnx, $mouse, $netc) = @_;
- $netcnx->{type}='modem';
- $netcnx->{$netcnx->{type}}={};
- $netcnx->{modem}{device}=$netc->{autodetect}{modem};
+ $netcnx->{type} = 'modem';
+ $netcnx->{$netcnx->{type}} = {};
+ $netcnx->{modem}{device} = $netc->{autodetect}{modem};
modem_step_1:
pppConfig($netcnx->{$netcnx->{type}}, $mouse, $netc) or return;
write_cnx_script($netc, "modem",
@@ -33,7 +33,7 @@ killall pppd
sub pppConfig {
my ($modem, $mouse, $netc) = @_;
- $mouse ||={};
+ $mouse ||= {};
$mouse->{device} ||= readlink "$prefix/dev/mouse";
$::isInstall and $in->set_help('selectSerialPort');
$modem->{device} ||= $in->ask_from_listf('', N("Please choose which serial port your modem is connected to."),
@@ -53,7 +53,7 @@ sub pppConfig {
]) or return;
$netc->{DOMAINNAME2} = $modem->{domain};
any::pppConfig($in, $modem, $prefix);
- $netc->{$_}='ppp0' foreach 'NET_DEVICE', 'NET_INTERFACE';
+ $netc->{$_} = 'ppp0' foreach 'NET_DEVICE', 'NET_INTERFACE';
1;
}
diff --git a/perl-install/network/netconnect.pm b/perl-install/network/netconnect.pm
index c91e39672..007dfbe30 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);
}
@@ -123,11 +123,11 @@ sub init_globals {
sub main {
my ($prefix, $netcnx, $netc, $mouse, $in, $intf, $first_time, $direct_fr, $noauto) = @_;
init_globals ($in, $prefix);
- $netc->{minus_one}=0; #When one configure an eth in dhcp without gateway
+ $netc->{minus_one} = 0; #When one configure an eth in dhcp without gateway
$::isInstall and $in->set_help('configureNetwork');
$::isStandalone and read_net_conf($prefix, $netcnx, $netc); # REDONDANCE with intro. FIXME
- $netc->{NET_DEVICE}=$netcnx->{NET_DEVICE} if $netcnx->{NET_DEVICE}; # REDONDANCE with read_conf. FIXME
- $netc->{NET_INTERFACE}=$netcnx->{NET_INTERFACE} if $netcnx->{NET_INTERFACE}; # REDONDANCE with read_conf. FIXME
+ $netc->{NET_DEVICE} = $netcnx->{NET_DEVICE} if $netcnx->{NET_DEVICE}; # REDONDANCE with read_conf. FIXME
+ $netc->{NET_INTERFACE} = $netcnx->{NET_INTERFACE} if $netcnx->{NET_INTERFACE}; # REDONDANCE with read_conf. FIXME
network::read_all_conf($prefix, $netc ||= {}, $intf ||= {});
modules::mergein_conf("$prefix/etc/modules.conf");
@@ -138,7 +138,7 @@ sub main {
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 {
- $netcnx->{type}='lan';
+ $netcnx->{type} = 'lan';
output "$prefix$connect_file",
qq(
ifup eth0
@@ -154,11 +154,11 @@ ifdown eth0
};
}
- $netc->{autodetection}=1;
- $netc->{autodetect}={};
+ $netc->{autodetection} = 1;
+ $netc->{autodetect} = {};
step_1:
- $::Wizard_no_previous=1;
+ $::Wizard_no_previous = 1;
my @profiles = get_profiles();
$in->ask_from(N("Network Configuration Wizard"),
N("Welcome to The Network Configuration Wizard.
@@ -272,8 +272,8 @@ N("After this is done, we recommend that you restart your X environment to avoid
N("Problems occured during configuration.
Test your connection via net_monitor or mcc. If your connection doesn't work, you might want to relaunch the configuration.");
if ($::isWizard) {
- $::Wizard_no_previous=1;
- $::Wizard_finished=1;
+ $::Wizard_no_previous = 1;
+ $::Wizard_finished = 1;
$in->ask_okcancel(N("Network Configuration"), $m, 1);
undef $::Wizard_no_previous;
undef $::Wizard_finished;
@@ -327,7 +327,7 @@ fi
);
}
chmod 0755, "$prefix$connect_prog";
- $netcnx->{$_}=$netc->{$_} foreach qw(NET_DEVICE NET_INTERFACE);
+ $netcnx->{$_} = $netc->{$_} foreach qw(NET_DEVICE NET_INTERFACE);
$netcnx->{NET_INTERFACE} and set_net_conf($netcnx, $netc);
$netcnx->{type} =~ /adsl/ or system("/sbin/chkconfig --del adsl 2> /dev/null");
@@ -354,7 +354,7 @@ fi
}
sub save_conf {
- my ($netcnx, $netc, $intf)=@_;
+ my ($netcnx, $netc, $intf) = @_;
my $adsl;
my $modem;
my $isdn;
@@ -471,7 +471,7 @@ sub set_profile {
$profile or return;
my $f = "$prefix/etc/sysconfig/network-scripts/drakconnect_conf";
-e ($f . "." . $profile) or return;
- $netcnx->{PROFILE}=$profile;
+ $netcnx->{PROFILE} = $profile;
cp_af($f . "." . $profile, $f);
foreach (["$prefix$connect_file", "up"],
["$prefix$disconnect_file", "down"],
@@ -511,7 +511,7 @@ sub get_profiles {
}
sub load_conf {
- my ($netcnx, $netc, $intf)=@_;
+ my ($netcnx, $netc, $intf) = @_;
my $adsl_pptp = {};
my $adsl_pppoe = {};
my $modem = {};
@@ -574,14 +574,14 @@ sub load_conf {
/^DOMAINNAME2=(.*)$/ and $netc->{DOMAINNAME2} = $1;
}
}
- $system_name && $domain_name and $netc->{HOSTNAME}=join ('.', $system_name, $domain_name);
- $adsl_pptp->{$_}=$adsl_pppoe->{$_} foreach 'login', 'passwd', 'passwd2';
- $isdn_external->{$_}=$modem->{$_} foreach 'device', 'connection', 'phone', 'domain', 'dns1', 'dns2', 'login', 'passwd', 'auth';
- $netcnx->{adsl_pptp}=$adsl_pptp;
- $netcnx->{adsl_pppoe}=$adsl_pppoe;
- $netcnx->{modem}=$modem;
- $netcnx->{modem}=$isdn_external;
- $netcnx->{isdn_internal}=$isdn;
+ $system_name && $domain_name and $netc->{HOSTNAME} = join ('.', $system_name, $domain_name);
+ $adsl_pptp->{$_} = $adsl_pppoe->{$_} foreach 'login', 'passwd', 'passwd2';
+ $isdn_external->{$_} = $modem->{$_} foreach 'device', 'connection', 'phone', 'domain', 'dns1', 'dns2', 'login', 'passwd', 'auth';
+ $netcnx->{adsl_pptp} = $adsl_pptp;
+ $netcnx->{adsl_pppoe} = $adsl_pppoe;
+ $netcnx->{modem} = $modem;
+ $netcnx->{modem} = $isdn_external;
+ $netcnx->{isdn_internal} = $isdn;
-e "$prefix/etc/sysconfig/network" and put_in_hash($netc, network::read_conf("$prefix/etc/sysconfig/network"));
foreach (glob_("$prefix/etc/sysconfig/ifcfg-*")) {
my $l = network::read_interface_conf($_);
@@ -607,15 +607,15 @@ sub get_net_device {
}
sub read_net_conf {
- my ($prefix, $netcnx, $netc)=@_;
+ my ($prefix, $netcnx, $netc) = @_;
add2hash($netcnx, { read_raw_net_conf('_conf') });
$netc->{$_} = $netcnx->{$_} foreach 'NET_DEVICE', 'NET_INTERFACE';
- $netcnx->{$netcnx->{type}}||={};
+ $netcnx->{$netcnx->{type}} ||= {};
add2hash($netcnx->{$netcnx->{type}}, { read_raw_net_conf($netcnx->{type}) });
}
sub set_net_conf {
- my ($netcnx, $netc)=@_;
+ my ($netcnx, $netc) = @_;
setVarsInShMode("$prefix/etc/sysconfig/drakconnect", 0600, $netcnx, "NET_DEVICE", "NET_INTERFACE", "type", "PROFILE");
setVarsInShMode("$prefix/etc/sysconfig/drakconnect." . $netcnx->{type}, 0600, $netcnx->{$netcnx->{type}}); #- doesn't work, don't know why
setVarsInShMode("$prefix/etc/sysconfig/drakconnect.netc", 0600, $netc); #- doesn't work, don't know why
diff --git a/perl-install/network/network.pm b/perl-install/network/network.pm
index 3c4a75895..79884887a 100644
--- a/perl-install/network/network.pm
+++ b/perl-install/network/network.pm
@@ -269,7 +269,7 @@ sub configureNetworkIntf {
my @wireless_modules = qw(aironet_cs aironet4500_cs hermes airo orinoco_cs orinoco airo_cs netwave_cs ray_cs wavelan_cs wvlan_cs airport);
my $flag = 0;
foreach (@wireless_modules) {
- $module =~ /$_/ and $flag =1;
+ $module =~ /$_/ and $flag = 1;
}
if ($flag) {
$intf->{wireless_eth} = 1;
@@ -305,7 +305,7 @@ notation (for example, 1.2.3.4).");
my @fields = qw(IPADDR NETMASK);
$::isStandalone or $in->set_help('configureNetworkIP');
$in->ask_from(N("Configuring network device %s", $intf->{DEVICE}),
- (N("Configuring network device %s", $intf->{DEVICE}) . ($module ? N(" (driver %s)", $module) : '') ."\n\n") .
+ (N("Configuring network device %s", $intf->{DEVICE}) . ($module ? N(" (driver %s)", $module) : '') . "\n\n") .
$text,
[ { label => N("IP address"), val => \$intf->{IPADDR}, disabled => sub { $pump } },
{ label => N("Netmask"), val => \$intf->{NETMASK}, disabled => sub { $pump } },
diff --git a/perl-install/network/tools.pm b/perl-install/network/tools.pm
index c7f337da4..88cacba9d 100644
--- a/perl-install/network/tools.pm
+++ b/perl-install/network/tools.pm
@@ -14,7 +14,7 @@ use MDK::Common::System qw(getVarsFromSh);
sub write_cnx_script {
my ($netc, $type, $up, $down, $type2) = @_;
if ($type) {
- $netc->{internet_cnx}{$type}{$_->[0]}=$_->[1] foreach [$connect_file, $up], [$disconnect_file, $down];
+ $netc->{internet_cnx}{$type}{$_->[0]} = $_->[1] foreach [$connect_file, $up], [$disconnect_file, $down];
$netc->{internet_cnx}{$type}{type} = $type2;
} else {
foreach ($connect_file, $disconnect_file) {
@@ -36,7 +36,7 @@ sub write_secret_backend {
sub ask_connect_now {
my ($type) = @_;
- $::Wizard_no_previous=1;
+ $::Wizard_no_previous = 1;
#- FIXME : code the exception to be generated by ask_yesorno, to be able to remove the $::Wizard_no_previous=1;
if ($in->ask_yesorno(N("Internet configuration"),
N("Do you want to try to connect to the Internet now?")
@@ -58,8 +58,8 @@ sub ask_connect_now {
N("The system doesn't seem to be connected to internet.
Try to reconfigure your connection.");
if ($::isWizard) {
- $::Wizard_no_previous=1;
- $::Wizard_finished=1;
+ $::Wizard_no_previous = 1;
+ $::Wizard_finished = 1;
$in->ask_okcancel(N("Network Configuration"), $m, 1);
undef $::Wizard_no_previous;
undef $::Wizard_finished;
@@ -128,7 +128,7 @@ sub detect_timezone {
sub type2interface {
my ($i) = @_;
- $i=~/$_->[0]/ and return $_->[1] foreach [ modem => 'ppp'],
+ $i =~ /$_->[0]/ and return $_->[1] foreach [ modem => 'ppp'],
[ isdn_internal => 'ippp'],
[ isdn_external => 'ppp'],
[ adsl => 'ppp'],
@@ -140,7 +140,7 @@ sub connected { gethostbyname("mandrakesoft.com") ? 1 : 0 }
my $kid_pipe;
sub connected_bg {
- local $|=1;
+ local $| = 1;
my ($ref) = @_;
if (defined $kid_pipe) {
local *F;
@@ -169,7 +169,7 @@ my $kid_pid;
my $current_connection_status;
sub test_connected {
- local $|=1;
+ local $| = 1;
my ($cmd) = @_;
if (!defined $current_connection_status) { $current_connection_status = -1 }