summaryrefslogtreecommitdiffstats
path: root/perl-install/network/adsl.pm
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2004-09-06 13:54:27 +0000
committerOlivier Blin <oblin@mandriva.org>2004-09-06 13:54:27 +0000
commitcb7d3147e0f39f1addb1247a50318bc2b4d93193 (patch)
tree61391650c1217ef8d323abdbc4c4446558ceded8 /perl-install/network/adsl.pm
parentf4fe8d6c753b5e1ee2985a1f2359ba2405e9054c (diff)
downloaddrakx-backup-do-not-use-cb7d3147e0f39f1addb1247a50318bc2b4d93193.tar
drakx-backup-do-not-use-cb7d3147e0f39f1addb1247a50318bc2b4d93193.tar.gz
drakx-backup-do-not-use-cb7d3147e0f39f1addb1247a50318bc2b4d93193.tar.bz2
drakx-backup-do-not-use-cb7d3147e0f39f1addb1247a50318bc2b4d93193.tar.xz
drakx-backup-do-not-use-cb7d3147e0f39f1addb1247a50318bc2b4d93193.zip
(adsl_conf_backend) explode sagem specific stuff to sagem_set_parameters()
Diffstat (limited to 'perl-install/network/adsl.pm')
-rw-r--r--perl-install/network/adsl.pm28
1 files changed, 15 insertions, 13 deletions
diff --git a/perl-install/network/adsl.pm b/perl-install/network/adsl.pm
index 97f5127c8..97bd57d96 100644
--- a/perl-install/network/adsl.pm
+++ b/perl-install/network/adsl.pm
@@ -93,6 +93,18 @@ sub adsl_detect() {
return $adsl;
}
+sub sagem_set_parameters {
+ my ($netc) = @_;
+ my %l = map { $_ => sprintf("%08s", $netc->{$_}) } qw(vci vpi Encapsulation);
+ foreach my $cfg_file (qw(/etc/analog/adiusbadsl.conf /etc/eagle-usb/eagle-usb.conf)) {
+ substInFile {
+ s/VCI=.*\n/VCI=$l{vci}\n/;
+ s/VPI=.*\n/VPI=$l{vpi}\n/;
+ s/Encapsulation=.*\n/Encapsulation=$l{Encapsulation}\n/;
+ } "$::prefix$cfg_file";
+ }
+}
+
sub adsl_conf_backend {
my ($in, $modules_conf, $adsl, $netc, $intf, $adsl_device, $adsl_type, $o_netcnx) = @_;
# FIXME: should not be needed:
@@ -310,19 +322,9 @@ TYPE=$kind
METRIC=$metric
));
- # sagem specific stuff
- if ($adsl_device eq 'sagem') {
- my %l = map { $_ => sprintf("%08s", $netc->{$_}) } qw(vci vpi Encapsulation);
- # set vpi and vci parameters for sagem
- foreach my $cfg_file (qw(/etc/analog/adiusbadsl.conf /etc/eagle-usb/eagle-usb.conf)) {
- substInFile {
- s/VCI=.*\n/VCI=$l{vci}\n/;
- s/VPI=.*\n/VPI=$l{vpi}\n/;
- s/Encapsulation=.*\n/Encapsulation=$l{Encapsulation}\n/;
- } "$::prefix$cfg_file";
- }
- }
-
+ #- set vpi, vci and encapsulation parameters for sagem
+ sagem_set_parameters($netc) if $adsl_device eq 'sagem';
+
# set aliases:
if (exists $modems{$adsl_device}{aliases}) {
$modules_conf->set_alias($_->[0], $_->[1]) foreach @{$modems{$adsl_device}{aliases}};