From 6c8dd68e7062a96d88a59cc128ac01ec28490a97 Mon Sep 17 00:00:00 2001 From: damien Date: Mon, 30 Jul 2001 15:54:38 +0000 Subject: added internet connection selection in case of multiple configurations --- perl-install/network/adsl.pm | 27 +++++---------------------- 1 file changed, 5 insertions(+), 22 deletions(-) (limited to 'perl-install/network/adsl.pm') 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", -- cgit v1.2.1