diff options
-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")); |