summaryrefslogtreecommitdiffstats
path: root/perl-install/network/netconnect.pm
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2004-10-03 16:45:32 +0000
committerOlivier Blin <oblin@mandriva.org>2004-10-03 16:45:32 +0000
commitbde4bc56d15563dae0595ff3ce3e4d5b9f617993 (patch)
tree3588a173218731fe19916e752cee3fd4f494b8c6 /perl-install/network/netconnect.pm
parentcac3edcde5419f6e514adbd9e3cb0994f14a4c08 (diff)
downloaddrakx-bde4bc56d15563dae0595ff3ce3e4d5b9f617993.tar
drakx-bde4bc56d15563dae0595ff3ce3e4d5b9f617993.tar.gz
drakx-bde4bc56d15563dae0595ff3ce3e4d5b9f617993.tar.bz2
drakx-bde4bc56d15563dae0595ff3ce3e4d5b9f617993.tar.xz
drakx-bde4bc56d15563dae0595ff3ce3e4d5b9f617993.zip
misc sagem fixes:
- allow to write static ip in eagle-usb.conf (write this file later) - load sagem specific modules/programs before config is written - do not reset IP address each time it is configured - automatically guess gateway for static connections
Diffstat (limited to 'perl-install/network/netconnect.pm')
-rw-r--r--perl-install/network/netconnect.pm16
1 files changed, 13 insertions, 3 deletions
diff --git a/perl-install/network/netconnect.pm b/perl-install/network/netconnect.pm
index ef82e07b0..02d066593 100644
--- a/perl-install/network/netconnect.pm
+++ b/perl-install/network/netconnect.pm
@@ -192,6 +192,10 @@ sub real_main {
} else {
undef $netc->{NET_DEVICE};
}
+ if ($netcnx->{type} eq 'adsl' && member($adsl_type, qw(manual dhcp)) && member($ntf_name, qw(sagem))) {
+ #- we need to write sagem specific parameters and load corresponding modules/programs
+ network::adsl::adsl_conf_backend($in, $modules_conf, $netcnx, $netc, $intf, $ntf_name, $adsl_type, $netcnx);
+ }
network::network::configureNetwork2($in, $modules_conf, $::prefix, $netc, $intf);
$network_configured = 1;
return "restart" if $need_restart_network && $::isStandalone && !$::expert;
@@ -810,8 +814,9 @@ If you don't know, choose 'use PPPoE'"),
if ($ntf_name eq "sagem" && member($adsl_type, qw(manual dhcp))) {
#- "fctStartAdsl -i" builds ifcfg-ethX from ifcfg-sagem and echoes ethX
#- it auto-detects dhcp/static modes thanks to encapsulation setting
- $ethntf = $intf->{sagem} = { DEVICE => "`/usr/sbin/fctStartAdsl -i`", MII_NOT_SUPPORTED => "yes" };
- network::adsl::sagem_set_parameters($netc); #- FIXME: should be delayed
+ $ethntf = $intf->{sagem} ||= {};
+ $ethntf->{DEVICE} = "`/usr/sbin/fctStartAdsl -i`";
+ $ethntf->{MII_NOT_SUPPORTED} = "yes";
}
# process static/dhcp ethernet devices:
if (exists($intf->{$ntf_name}) && member($adsl_type, qw(manual dhcp))) {
@@ -994,7 +999,7 @@ notation (for example, 1.2.3.4).")),
return 1;
}
#- test if IP address is already used (do not test for sagem DSL devices since it may use many ifcfg files)
- if ($ethntf->{DEVICE} !~ /eagle/ && find { $_->{DEVICE} ne $ethntf->{DEVICE} && $_->{IPADDR} eq $ethntf->{IPADDR} } values %$intf) {
+ if ($ntf_name ne "sagem" && find { $_->{DEVICE} ne $ethntf->{DEVICE} && $_->{IPADDR} eq $ethntf->{IPADDR} } values %$intf) {
$in->ask_warn(N("Error"), N("%s already in use\n", $ethntf->{IPADDR}));
return 1;
}
@@ -1107,6 +1112,11 @@ See iwpriv(8) man page for further information."),
$netc->{dnsServer} ||= dns($ethntf->{IPADDR});
$gateway_ex = gateway($ethntf->{IPADDR});
# $netc->{GATEWAY} ||= gateway($ethntf->{IPADDR});
+ if ($ntf_name eq "sagem") {
+ my @sagem_ip = split(/\./, $ethntf->{IPADDR});
+ @sagem_ip[3] = 254;
+ $netc->{GATEWAY} = join(".", @sagem_ip);
+ }
}
},
name => N("Please enter your host name.