summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordamien <damien@mandriva.com>2001-09-24 15:36:51 +0000
committerdamien <damien@mandriva.com>2001-09-24 15:36:51 +0000
commitf5524ba0ac03c8a9d0c8d7f302c465a1f9314b3b (patch)
tree3dd05ca390c430ba70ac4a29179d0dbe0dc6c324
parent5dfd972e954b44f54eef8abbfc9c41754aa45d31 (diff)
downloaddrakx-f5524ba0ac03c8a9d0c8d7f302c465a1f9314b3b.tar
drakx-f5524ba0ac03c8a9d0c8d7f302c465a1f9314b3b.tar.gz
drakx-f5524ba0ac03c8a9d0c8d7f302c465a1f9314b3b.tar.bz2
drakx-f5524ba0ac03c8a9d0c8d7f302c465a1f9314b3b.tar.xz
drakx-f5524ba0ac03c8a9d0c8d7f302c465a1f9314b3b.zip
type assignation bug fix
-rw-r--r--perl-install/network/adsl.pm11
-rw-r--r--perl-install/network/isdn.pm9
2 files changed, 11 insertions, 9 deletions
diff --git a/perl-install/network/adsl.pm b/perl-install/network/adsl.pm
index f26a45708..10bf80ec2 100644
--- a/perl-install/network/adsl.pm
+++ b/perl-install/network/adsl.pm
@@ -84,13 +84,14 @@ sub adsl_conf {
adsl_ask_info ($adsl, $netc, $intf) or return;
adsl_conf_step_2:
$adsl_type eq 'speedtouch' or conf_network_card($netc, $intf, 'static' , '10.0.0.10' ) or goto adsl_conf_step_1;
- adsl_conf_backend($adsl, $netc, $adsl_type, $netcnx);
+ adsl_conf_backend($adsl, $netc, $adsl_type);
1;
}
sub adsl_conf_backend {
my ($adsl, $netc, $adsl_type, $netcnx) = @_;
-
+ defined $netcnx and $netc->{adsltype} = $netcnx->{type};
+ $netc->{adsltype} ||= "adsl_$adsl_type";
mkdir_p("$prefix/etc/ppp");
output("$prefix/etc/ppp/options",
'lock
@@ -160,19 +161,19 @@ and copy the mgmt.o in /usr/share/speedtouch'));
/usr/bin/pptp 10.0.0.138 name $adsl->{login}
",
'/usr/bin/killall pptp pppd
-', $netcnx->{type}) } elsif ($adsl_type eq 'pppoe') {
+', $netc->{adsltype}) } elsif ($adsl_type eq 'pppoe') {
write_cnx_script($netc, "adsl",
"/sbin/route del default
LC_ALL=C LANG=C LANGUAGE=C LC_MESSAGES=C /usr/sbin/adsl-start $netc->{NET_DEVICE} $adsl->{login}
",
'/usr/sbin/adsl-stop
/usr/bin/killall pppoe pppd
-', $netcnx->{type}) } elsif ($adsl_type eq 'speedtouch') {
+', $netc->{adsltype}) } elsif ($adsl_type eq 'speedtouch') {
write_cnx_script($netc, 'adsl',
'/usr/share/speedtouch/speedtouch.sh start
',
'/usr/share/speedtouch/speedtouch.sh stop
-', $netcnx->{type}) }
+', $netc->{adsltype}) }
$netc->{NET_INTERFACE}='ppp0';
}
diff --git a/perl-install/network/isdn.pm b/perl-install/network/isdn.pm
index c08f2dd5b..5646ca01f 100644
--- a/perl-install/network/isdn.pm
+++ b/perl-install/network/isdn.pm
@@ -23,12 +23,12 @@ sub configure {
) or return;
if ($e =~ /card/) {
intern_pci:
- $netcnx->{type}='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 {
- $netcnx->{type}='isdn_external';
+ $netc->{isdntype}='isdn_external';
$netcnx->{isdn_external}={};
$netcnx->{isdn_external}{device}=$netc->{autodetect}{modem};
$netcnx->{isdn_external}{special_command}='AT&F&O2B40';
@@ -62,12 +62,13 @@ We recommand the light configuration.
run_program::rooted($prefix, "rpm", "-e", "$rmpackage");
$in->do_pkgs->install($instpackage, if_($isdn->{speed} =~ /128/, 'ibod'), 'isdn4k-utils');
my $light = $e =~ /light/ ? 1 : 0;
- isdn_write_config_backend($isdn, $light, $netc, $netcnx);
+ isdn_write_config_backend($isdn, $light, $netc);
1;
}
sub isdn_write_config_backend {
my ($isdn, $light, $netc, $netcnx) = @_;
+ defined $netcnx and $netc->{isdntype} = $netcnx->{type};
if ($light) {
modules::mergein_conf("$prefix/etc/modules.conf");
if ($isdn->{id}) {
@@ -145,7 +146,7 @@ defaultroute
"/sbin/isdnctrl hangup ippp0
/sbin/ifdown ippp0
" . if_($isdn->{speed} =~ /128/, "service ibod stop
-"), $netcnx->{type});
+"), $netc->{isdntype});
1;
}