summaryrefslogtreecommitdiffstats
path: root/perl-install/network
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/network')
-rw-r--r--perl-install/network/adsl.pm2
-rw-r--r--perl-install/network/drakfirewall.pm2
-rw-r--r--perl-install/network/ethernet.pm4
-rw-r--r--perl-install/network/isdn.pm3
-rw-r--r--perl-install/network/modem.pm2
-rw-r--r--perl-install/network/netconnect.pm21
-rw-r--r--perl-install/network/network.pm1
-rw-r--r--perl-install/network/nfs.pm10
-rw-r--r--perl-install/network/smb.pm8
-rw-r--r--perl-install/network/smbnfs.pm4
-rw-r--r--perl-install/network/tools.pm3
11 files changed, 27 insertions, 33 deletions
diff --git a/perl-install/network/adsl.pm b/perl-install/network/adsl.pm
index 2d3a6bee2..b895f90fd 100644
--- a/perl-install/network/adsl.pm
+++ b/perl-install/network/adsl.pm
@@ -83,7 +83,7 @@ If you don't know, choose 'use pppoe'"), $l) or return;
}
sub adsl_ask_info {
- my ($adsl, $netc, $intf, $adsl_type) = @_;
+ my ($adsl, $netc, $_intf, $adsl_type) = @_;
my $pppoe_file = "/etc/ppp/pppoe.conf";
my $pppoe_conf = { getVarsFromSh($pppoe_file) } if $adsl_type =~ /pppoe/ && -f $pppoe_file;
add2hash($netc, { dnsServer2 => '', dnsServer3 => '', DOMAINNAME2 => '' });
diff --git a/perl-install/network/drakfirewall.pm b/perl-install/network/drakfirewall.pm
index 1611626e5..8951ecd44 100644
--- a/perl-install/network/drakfirewall.pm
+++ b/perl-install/network/drakfirewall.pm
@@ -100,7 +100,7 @@ sub default_from_pkgs {
}
sub get_ports {
- my ($ports) = @_;
+ my ($_ports) = @_;
my $shorewall = network::shorewall::read() or return;
\$shorewall->{ports};
}
diff --git a/perl-install/network/ethernet.pm b/perl-install/network/ethernet.pm
index bee1c283a..410b81e13 100644
--- a/perl-install/network/ethernet.pm
+++ b/perl-install/network/ethernet.pm
@@ -96,7 +96,7 @@ I cannot set up this connection type.")) and return;
}
$::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(N("Network interface"),
# N("I'm about to restart the network device:\n") . $device . N("\nDo you agree?"), 1) and configureNetwork2($in, $prefix, $netc, $intf) and system("$prefix/sbin/ifdown $device;$prefix/sbin/ifup $device");
@@ -170,7 +170,7 @@ sub go_ethernet {
}
sub configureNetwork {
- my ($netc, $intf, $first_time) = @_;
+ my ($netc, $intf, $_first_time) = @_;
local $_;
any::load_category($in, 'network/main|usb|pcmcia', !$::expert, 1) or return;
my @l = detect_devices::getNet() or die N("no network card found");
diff --git a/perl-install/network/isdn.pm b/perl-install/network/isdn.pm
index be13b4021..a5c45d7cf 100644
--- a/perl-install/network/isdn.pm
+++ b/perl-install/network/isdn.pm
@@ -86,7 +86,6 @@ sub isdn_write_config_backend {
chmod 0600, $f;
}
foreach my $f ('isdn1B.conf', 'isdn2B.conf') {
- my $a = 1;
substInFile {
s/EAZ =.*/EAZ = $isdn->{phone_in}/;
s/PHONE_OUT =.*/PHONE_OUT = $isdn->{phone_out}/;
@@ -148,7 +147,7 @@ defaultroute
}
sub get_info_providers_backend {
- my ($isdn, $netc, $name, $file) = @_;
+ my ($isdn, $_netc, $name, $file) = @_;
$name eq 'Unlisted - edit manually' and return;
foreach (catMaybeCompressed($file)) {
chop;
diff --git a/perl-install/network/modem.pm b/perl-install/network/modem.pm
index 08fafc265..87f042208 100644
--- a/perl-install/network/modem.pm
+++ b/perl-install/network/modem.pm
@@ -49,7 +49,7 @@ killall pppd
}
sub pppConfig {
- my ($modem, $mouse, $netc, $intf) = @_;
+ my ($modem, $mouse, $netc, $_intf) = @_;
$mouse ||= {};
$mouse->{device} ||= readlink "$prefix/dev/mouse";
diff --git a/perl-install/network/netconnect.pm b/perl-install/network/netconnect.pm
index 8abb0085e..585b3a075 100644
--- a/perl-install/network/netconnect.pm
+++ b/perl-install/network/netconnect.pm
@@ -116,7 +116,7 @@ sub init_globals {
}
sub main {
- my ($prefix, $netcnx, $netc, $mouse, $in, $intf, $first_time, $direct_fr, $noauto) = @_;
+ 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
$::isInstall and $in->set_help('configureNetwork');
@@ -168,17 +168,17 @@ If you don't want to use the auto detection, deselect the checkbox.
undef $::Wizard_no_previous;
set_profile($netcnx);
if ($netc->{autodetection}) {
- my $w = $in->wait_message(N("Network Configuration Wizard"), N("Detecting devices..."));
+ my $_w = $in->wait_message(N("Network Configuration Wizard"), N("Detecting devices..."));
detect($netc->{autodetect}, $::isInstall && ($in->{method} eq "ftp" || $in->{method} eq "http" || $in->{method} eq "nfs"));
}
step_2:
- my $set_default;
+# my $set_default;
my %conf;
$conf{$_} = $netc->{autodetect}{$_} ? 1 : 0 foreach 'modem', 'winmodem', 'adsl', 'cable', 'lan';
$conf{isdn} = $netc->{autodetect}{isdn}{description} ? 1 : 0;
- my %l;
+# my %l;
# my @l = (
# [N("Normal modem connection"), $netc->{autodetect}{modem}, N_("detected on port %s"), \$conf{modem}],
# [N("ISDN connection"), $netc->{autodetect}{isdn}{description}, N_("detected %s"), \$conf{isdn}],
@@ -186,7 +186,7 @@ If you don't want to use the auto detection, deselect the checkbox.
# [N("Cable connection"), $netc->{autodetect}{cable}, N_("cable connection detected"), \$conf{cable}],
# [N("LAN connection"), $netc->{autodetect}{lan}, N_("ethernet card(s) detected"), \$conf{lan}]
# );
- my $i = 0;
+# my $i = 0;
# map { defined $set_default or do { $_->[1] and $set_default = $i }; $i++ } @l;
# my %l = (
# 1 => [N("Normal modem connection") . if_($netc->{autodetect}{modem}, " - " . N("detected on port %s", $netc->{autodetect}{modem})), "modem"],
@@ -198,7 +198,6 @@ If you don't want to use the auto detection, deselect the checkbox.
# );
$::isInstall and $in->set_help('configureNetwork');
- my $tata;
# my $e = $in->ask_from(N("Network Configuration Wizard"), N("Choose the connection you want to configure"),
# [{ val => \$cnx_type, list => [sort keys %l], format => sub { $l{$_}[0] },
# changed => sub {
@@ -220,7 +219,7 @@ If you don't want to use the auto detection, deselect the checkbox.
[N("LAN connection") . if_($netc->{autodetect}{lan}, " - " . N("ethernet card(s) detected")), \$conf{lan}]
);
$::isInstall and $in->set_help('configureNetwork');
- my $e = $in->ask_from(N("Network Configuration Wizard"), N("Choose the connection you want to configure"),
+ $in->ask_from(N("Network Configuration Wizard"), N("Choose the connection you want to configure"),
[ map { { label => $_->[0], val => $_->[1], type => 'bool' } } @l ],
changed => sub {
return if !$netc->{autodetection};
@@ -363,7 +362,7 @@ sub save_conf {
modules::load_category('network/main|usb');
require network::ethernet;
network::ethernet->import;
- my @all_cards = conf_network_card_backend($netc, $intf, undef, undef, undef, undef);
+ my @_all_cards = conf_network_card_backend($netc, $intf, undef, undef, undef, undef);
$intf = { %$intf };
output_with_perm("$prefix/etc/sysconfig/network-scripts/drakconnect_conf", 0600,
@@ -488,7 +487,7 @@ sub set_profile {
}
sub del_profile {
- my ($netcnx, $profile) = @_;
+ my ($_netcnx, $profile) = @_;
$profile or return;
$profile eq "default" and return;
rm_rf("$prefix/etc/sysconfig/network-scripts/drakconnect_conf." . $profile);
@@ -516,8 +515,6 @@ sub load_conf {
my $modem = {};
my $isdn_external = {};
my $isdn = {};
- my $system_name;
- my $domain_name;
if (-e "$prefix/etc/sysconfig/network-scripts/drakconnect_conf") {
foreach (cat_("$prefix/etc/sysconfig/network-scripts/drakconnect_conf")) {
@@ -607,7 +604,7 @@ 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}} ||= {};
diff --git a/perl-install/network/network.pm b/perl-install/network/network.pm
index 4278136fb..84cffef27 100644
--- a/perl-install/network/network.pm
+++ b/perl-install/network/network.pm
@@ -236,7 +236,6 @@ sub masked_ip {
sub dns {
my ($ip) = @_;
- my $mask = masked_ip($ip);
my @masked = masked_ip($ip) =~ $ip_regexp;
$masked[3] = 2;
join(".", @masked);
diff --git a/perl-install/network/nfs.pm b/perl-install/network/nfs.pm
index ab8bcfcd7..87f336e36 100644
--- a/perl-install/network/nfs.pm
+++ b/perl-install/network/nfs.pm
@@ -15,20 +15,20 @@ sub to_fstab_entry {
$class->to_fstab_entry_raw($e, 'nfs');
}
sub comment_to_string {
- my ($class, $comment) = @_;
+ my ($_class, $comment) = @_;
member($comment, qw(* 0.0.0.0/0.0.0.0 (everyone))) ? '' : $comment;
}
sub from_dev {
- my ($class, $dev) = @_;
+ my ($_class, $dev) = @_;
$dev =~ m|(.*?):(.*)|;
}
sub to_dev_raw {
- my ($class, $server, $name) = @_;
+ my ($_class, $server, $name) = @_;
$server . ':' . $name;
}
sub check {
- my ($class, $in) = @_;
+ my ($_class, $in) = @_;
$in->do_pkgs->ensure_is_installed('nfs-utils-clients', '/usr/sbin/showmount');
}
@@ -51,7 +51,7 @@ sub find_servers {
}
sub find_exports {
- my ($class, $server) = @_;
+ my ($_class, $server) = @_;
my @l;
run_program::raw({ timeout => 1 }, "showmount", '>', \@l, "-e", $server->{ip} || $server->{name});
diff --git a/perl-install/network/smb.pm b/perl-install/network/smb.pm
index e3dfc9ce6..7adf01a3a 100644
--- a/perl-install/network/smb.pm
+++ b/perl-install/network/smb.pm
@@ -22,16 +22,16 @@ sub to_fstab_entry {
$part;
}
sub from_dev {
- my ($class, $dev) = @_;
+ my ($_class, $dev) = @_;
$dev =~ m|//(.*?)/(.*)|;
}
sub to_dev_raw {
- my ($class, $server, $name) = @_;
+ my ($_class, $server, $name) = @_;
'//' . $server . '/' . $name;
}
sub check {
- my ($class, $in) = @_;
+ my ($_class, $in) = @_;
$in->do_pkgs->ensure_is_installed('samba-client', '/usr/bin/nmblookup');
}
@@ -84,7 +84,7 @@ sub find_servers {
}
sub find_exports {
- my ($class, $server) = @_;
+ my ($_class, $server) = @_;
my @l;
foreach (smbclient($server)) {
diff --git a/perl-install/network/smbnfs.pm b/perl-install/network/smbnfs.pm
index 8bd29ea92..528a87be2 100644
--- a/perl-install/network/smbnfs.pm
+++ b/perl-install/network/smbnfs.pm
@@ -12,11 +12,11 @@ sub new {
}
sub server_to_string {
- my ($class, $server) = @_;
+ my ($_class, $server) = @_;
$server->{name} || $server->{ip};
}
sub comment_to_string {
- my ($class, $comment) = @_;
+ my ($_class, $comment) = @_;
$comment;
}
sub to_dev {
diff --git a/perl-install/network/tools.pm b/perl-install/network/tools.pm
index 8eff41c9b..c86f9de4c 100644
--- a/perl-install/network/tools.pm
+++ b/perl-install/network/tools.pm
@@ -58,14 +58,13 @@ sub ask_connect_now {
N("Do you want to try to connect to the Internet now?")
)) {
{
- my $w = $in->wait_message('', N("Testing your connection..."), 1);
+ my $_w = $in->wait_message('', N("Testing your connection..."), 1);
connect_backend();
my $s = 30;
$type =~ /modem/ and $s = 50;
$type =~ /adsl/ and $s = 35;
$type =~ /isdn/ and $s = 20;
sleep $s;
- my $netc = {};
$up = connected();
}
my $m = $up ? N("The system is now connected to Internet.") .