diff options
author | Eugeni Dodonov <eugeni@mandriva.org> | 2009-10-20 09:55:08 +0000 |
---|---|---|
committer | Eugeni Dodonov <eugeni@mandriva.org> | 2009-10-20 09:55:08 +0000 |
commit | cbe4034f0d0df51ad5388862a6af97d5d10646ba (patch) | |
tree | 24a62d87ad82d8767c5dbc7b758c77f27469a18e /lib/network/netcenter.pm | |
parent | 38c7b34132a1dc08010dbe9df99335ef1f6c247f (diff) | |
download | drakx-net-cbe4034f0d0df51ad5388862a6af97d5d10646ba.tar drakx-net-cbe4034f0d0df51ad5388862a6af97d5d10646ba.tar.gz drakx-net-cbe4034f0d0df51ad5388862a6af97d5d10646ba.tar.bz2 drakx-net-cbe4034f0d0df51ad5388862a6af97d5d10646ba.tar.xz drakx-net-cbe4034f0d0df51ad5388862a6af97d5d10646ba.zip |
Allow changing CRDA settings without reboot (#54600).
Diffstat (limited to 'lib/network/netcenter.pm')
-rwxr-xr-x | lib/network/netcenter.pm | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/network/netcenter.pm b/lib/network/netcenter.pm index 7f5c151..cc8c746 100755 --- a/lib/network/netcenter.pm +++ b/lib/network/netcenter.pm @@ -12,6 +12,7 @@ use network::connection; use network::connection_manager; use network::tools; use network::network; +use run_program; sub build_cmanager { my ($in, $net, $w, $pixbufs, $connection) = @_; @@ -131,8 +132,16 @@ sub get_connections() { sub advanced_settings { my ($in, $net) = @_; my $u = network::network::advanced_settings_read(); + my $old_crda = $net->{network}{CRDA_DOMAIN}; if (network::network::advanced_choose($in, $net, $u)) { network::network::advanced_settings_write($u); + # check if the CRDA changed + if ($old_crda ne $net->{network}{CRDA_DOMAIN}) { + if ($in->ask_okcancel(N("Wireless configuration"), N("Do you want to apply new wireless regulation settings now?"), 1)) { + # restarting network + run_program::run("iw", "reg", "set", $net->{network}{CRDA_DOMAIN}); + } + } network::network::write_network_conf($net); } } |