summaryrefslogtreecommitdiffstats
path: root/perl-install/network/adsl.pm
diff options
context:
space:
mode:
authordamien <damien@mandriva.com>2001-07-30 15:54:38 +0000
committerdamien <damien@mandriva.com>2001-07-30 15:54:38 +0000
commit6c8dd68e7062a96d88a59cc128ac01ec28490a97 (patch)
treed4c1185a4853d53381e83894cd8f3b673495bd58 /perl-install/network/adsl.pm
parent7aab173af2151843199dc229641f643538c8c161 (diff)
downloaddrakx-6c8dd68e7062a96d88a59cc128ac01ec28490a97.tar
drakx-6c8dd68e7062a96d88a59cc128ac01ec28490a97.tar.gz
drakx-6c8dd68e7062a96d88a59cc128ac01ec28490a97.tar.bz2
drakx-6c8dd68e7062a96d88a59cc128ac01ec28490a97.tar.xz
drakx-6c8dd68e7062a96d88a59cc128ac01ec28490a97.zip
added internet connection selection in case of multiple configurations
Diffstat (limited to 'perl-install/network/adsl.pm')
-rw-r--r--perl-install/network/adsl.pm27
1 files changed, 5 insertions, 22 deletions
diff --git a/perl-install/network/adsl.pm b/perl-install/network/adsl.pm
index 5f3dd5db1..48a05dfa5 100644
--- a/perl-install/network/adsl.pm
+++ b/perl-install/network/adsl.pm
@@ -83,20 +83,6 @@ sub adsl_conf {
1;
}
-#- adsl_conf_backend : write adsl configuration
-#- input :
-#- $adsl
-#- $netc
-#- $adsl_type : type of cnx : string : "pptp" or "pppoe"
-#- $adsl input:
-#- $adsl->{login}, $adsl->{passwd}, $adsl->{atboot}
-#- $netc input:
-#- $netc->{NET_DEVICE}
-#- $netc->{dnsServer2}
-#- $netc->{dnsServer3}
-#- $netc->{DOMAINNAME2}
-#- $netc output:
-#- $netc->{NET_INTERFACE} is set to "ppp0"
sub adsl_conf_backend {
my ($adsl, $netc, $adsl_type) = @_;
@@ -125,8 +111,8 @@ lock
} "$prefix/etc/ppp/pppoe.conf";
}
- output ("$prefix$connect_file",
- $adsl_type eq 'pptp' ?
+ write_cnx_script($netc, "adsl",
+ $adsl_type eq 'pptp' ?
"#!/bin/bash
/sbin/route del default
/usr/bin/pptp 10.0.0.138 name $adsl->{login}
@@ -135,10 +121,9 @@ lock
"#!/bin/bash
/sbin/route del default
LC_ALL=C LANG=C LANGUAGE=C LC_MESSAGES=C /usr/sbin/adsl-start $netc->{NET_DEVICE} $adsl->{login}
-");
- output ("$prefix$disconnect_file",
- $adsl_type eq 'pptp' ?
- "#!/bin/bash
+",
+ $adsl_type eq 'pptp' ?
+"#!/bin/bash
/usr/bin/killall pptp pppd
"
:
@@ -146,8 +131,6 @@ LC_ALL=C LANG=C LANGUAGE=C LC_MESSAGES=C /usr/sbin/adsl-start $netc->{NET_DEVICE
/usr/sbin/adsl-stop
/usr/bin/killall pppoe pppd
");
- chmod 0755, "$prefix$disconnect_file";
- chmod 0755, "$prefix$connect_file";
if ($adsl->{atboot}) {
output ("$prefix/etc/rc.d/init.d/adsl",