summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone
diff options
context:
space:
mode:
authorDamien Chaumette <dchaumette@mandriva.com>2004-02-18 17:34:09 +0000
committerDamien Chaumette <dchaumette@mandriva.com>2004-02-18 17:34:09 +0000
commit4886ee6c87f10661d02a8f1c96112dad96bd0610 (patch)
treeb8ea9679eb701eb054e5227e65d4bcf761d8c71f /perl-install/standalone
parent89883d9d9b1a8fc8622744b33103c466a6670f76 (diff)
downloaddrakx-backup-do-not-use-4886ee6c87f10661d02a8f1c96112dad96bd0610.tar
drakx-backup-do-not-use-4886ee6c87f10661d02a8f1c96112dad96bd0610.tar.gz
drakx-backup-do-not-use-4886ee6c87f10661d02a8f1c96112dad96bd0610.tar.bz2
drakx-backup-do-not-use-4886ee6c87f10661d02a8f1c96112dad96bd0610.tar.xz
drakx-backup-do-not-use-4886ee6c87f10661d02a8f1c96112dad96bd0610.zip
- add adsl_atboot() to check at boot status
- use it instead of chk_internet()
Diffstat (limited to 'perl-install/standalone')
-rwxr-xr-xperl-install/standalone/drakconnect4
1 files changed, 3 insertions, 1 deletions
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"));