From f648206940c7ff7dd2cba340bfab719f32f64c2c Mon Sep 17 00:00:00 2001 From: Damien Chaumette Date: Wed, 18 Feb 2004 15:30:56 +0000 Subject: fix adsl at boot, better and more clean --- perl-install/standalone/drakconnect | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'perl-install/standalone') diff --git a/perl-install/standalone/drakconnect b/perl-install/standalone/drakconnect index 928a0d103..2319c6078 100755 --- a/perl-install/standalone/drakconnect +++ b/perl-install/standalone/drakconnect @@ -252,7 +252,11 @@ sub build_tree { if ($interface eq 'adsl') { $intf->{pages} = { N("TCP/IP") => 1, N("Account") => 1, N("Options") => 1, N("Information") => 1 }; network::adsl::adsl_probe_info($intf, $netc, $protocol, $interface_kind); - $intf->{save} = sub { network::adsl::adsl_conf_backend($in, $intf, $netc, $interface_kind, $protocol) }; + $intf->{save} = sub { + $netc->{internet_cnx_choice} = 'adsl'; + $netc->{at_boot} = $intf->{ONBOOT} eq 'yes' ? 1 : 0; + network::adsl::adsl_conf_backend($in, $intf, $netc, $interface_kind, $protocol) + }; } elsif ($interface eq 'modem') { $intf->{pages} = { N("TCP/IP") => 1, N("Account") => 1, N("Options") => 1 }; @@ -546,11 +550,6 @@ sub save { $p->{$_}{intf}{save} ? $p->{$_}{intf}{save}->() : apply($netc, $p->{$_}{intf}); } - if (exists $p->{adsl}) { - $p->{adsl}{intf}{ONBOOT} ? system("/sbin/chkconfig --add internet 2> /dev/null") : - system("/sbin/chkconfig --del internet 2> /dev/null"); - }; - system("/etc/rc.d/init.d/network restart"); $apply_button->set_sensitive(0); } -- cgit v1.2.1