diff options
author | Damien Chaumette <dchaumette@mandriva.com> | 2004-02-17 17:25:16 +0000 |
---|---|---|
committer | Damien Chaumette <dchaumette@mandriva.com> | 2004-02-17 17:25:16 +0000 |
commit | dc7f56731962f6c7a1e2a7589fd15dd6d06102b8 (patch) | |
tree | 6b58725f33a3a04aba877f949d744611ab0e99a7 /perl-install/standalone | |
parent | e942ba80d408f92f51750ac930a50526dd6e9cc5 (diff) | |
download | drakx-backup-do-not-use-dc7f56731962f6c7a1e2a7589fd15dd6d06102b8.tar drakx-backup-do-not-use-dc7f56731962f6c7a1e2a7589fd15dd6d06102b8.tar.gz drakx-backup-do-not-use-dc7f56731962f6c7a1e2a7589fd15dd6d06102b8.tar.bz2 drakx-backup-do-not-use-dc7f56731962f6c7a1e2a7589fd15dd6d06102b8.tar.xz drakx-backup-do-not-use-dc7f56731962f6c7a1e2a7589fd15dd6d06102b8.zip |
- add chk_config() to test internet service state
- adsl onboot using chk_config()
Diffstat (limited to 'perl-install/standalone')
-rwxr-xr-x | perl-install/standalone/drakconnect | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/perl-install/standalone/drakconnect b/perl-install/standalone/drakconnect index abe332abb..651d7ccdc 100755 --- a/perl-install/standalone/drakconnect +++ b/perl-install/standalone/drakconnect @@ -408,7 +408,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($intf->{ONBOOT} eq 'yes' ? 1 : 0); + $gui->{intf_bool}{ONBOOT}->set_active($interface eq 'adsl' ? chk_internet() : ($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}); } @@ -545,6 +545,12 @@ sub save { save_notebook($netc, $p->{$_}{intf}, $p->{$_}{gui}) or return; $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); } @@ -664,6 +670,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 update_intbutt() { $int_state->set($isconnected ? N("Connected") : N("Not connected")); |