From 4886ee6c87f10661d02a8f1c96112dad96bd0610 Mon Sep 17 00:00:00 2001 From: Damien Chaumette Date: Wed, 18 Feb 2004 17:34:09 +0000 Subject: - add adsl_atboot() to check at boot status - use it instead of chk_internet() --- perl-install/standalone/drakconnect | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'perl-install/standalone/drakconnect') diff --git a/perl-install/standalone/drakconnect b/perl-install/standalone/drakconnect index 2319c6078..e6f276624 100755 --- a/perl-install/standalone/drakconnect +++ b/perl-install/standalone/drakconnect @@ -38,6 +38,7 @@ use c; use modules; use network::isdn; use network::adsl; +use network::tools; use MDK::Common::Globals "network", qw($in); use POSIX ":sys_wait_h"; @@ -412,7 +413,7 @@ sub build_notebook { $dialing_mode_radio[1]->signal_connect(toggled => sub { $gui->{intf_radio}{dialing_mode} = 'static'; $apply->() }); $speed_radio[0]->signal_connect(toggled => sub { $gui->{intf_radio}{speed} = '64'; $apply->() }); $speed_radio[1]->signal_connect(toggled => sub { $gui->{intf_radio}{speed} = '128'; $apply->() }); - $gui->{intf_bool}{ONBOOT}->set_active($interface eq 'adsl' ? chk_internet() : ($intf->{ONBOOT} eq 'yes' ? 1 : 0)); + $gui->{intf_bool}{ONBOOT}->set_active($interface eq 'adsl' ? adsl_atboot() : ($intf->{ONBOOT} eq 'yes' ? 1 : 0)); $gui->{intf_bool}{MII_NOT_SUPPORTED}->set_active($intf->{MII_NOT_SUPPORTED} eq 'no' ? 1 : 0); $gui->{intf_bool}{HWADDR}->set_active($intf->{HWADDR}); } @@ -670,6 +671,7 @@ sub apply { sub ethisup { `LC_ALL=C LANGUAGE=C /sbin/ifconfig $_[0]` =~ /inet/ } sub chk_internet() { `LC_ALL=C LANGUAGE=C /sbin/chkconfig --list | grep internet` =~ /:on/ ? 1 : 0 }; +sub adsl_atboot() { (any { /x--boot_time/ } cat_($network::tools::connect_file)) ? 0 : 1}; sub update_intbutt() { $int_state->set($isconnected ? N("Connected") : N("Not connected")); -- cgit v1.2.1