diff options
author | Olivier Blin <oblin@mandriva.org> | 2005-02-24 16:45:25 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.org> | 2005-02-24 16:45:25 +0000 |
commit | e24ddaf60e543e311ef9bb3107d6208c5a92aaea (patch) | |
tree | 237af3d89d2ffa69a13583ba187828a260dfea0c /perl-install/network/netconnect.pm | |
parent | 6e6334967583b3a3e227129063afc7bb09f60cba (diff) | |
download | drakx-e24ddaf60e543e311ef9bb3107d6208c5a92aaea.tar drakx-e24ddaf60e543e311ef9bb3107d6208c5a92aaea.tar.gz drakx-e24ddaf60e543e311ef9bb3107d6208c5a92aaea.tar.bz2 drakx-e24ddaf60e543e311ef9bb3107d6208c5a92aaea.tar.xz drakx-e24ddaf60e543e311ef9bb3107d6208c5a92aaea.zip |
move wlan-ng stuff in network::network
Diffstat (limited to 'perl-install/network/netconnect.pm')
-rw-r--r-- | perl-install/network/netconnect.pm | 41 |
1 files changed, 1 insertions, 40 deletions
diff --git a/perl-install/network/netconnect.pm b/perl-install/network/netconnect.pm index 1f4558b48..479bc4f5c 100644 --- a/perl-install/network/netconnect.pm +++ b/perl-install/network/netconnect.pm @@ -1196,46 +1196,7 @@ See iwpriv(8) man page for further information."), post => sub { # untranslate parameters $ethntf->{WIRELESS_MODE} = $wireless_mode{$ethntf->{WIRELESS_MODE}}; - if ($module =~ /^prism2_/) { - $in->do_pkgs->install('prism2-utils'); - if ($ethntf->{WIRELESS_ESSID}) { - my $update_vars_in_wlan = sub { #- FIXME: to be improved (quotes, comments) and moved in common files - my ($file, $vars) = @_; - substInFile { - while (my ($key, $value) = each(%$vars)) { - s/^#?\Q$key\E=(?:"[^#]*"|[^#\s]*)(\s*#.*)?/$key=$value$1/ and delete $vars->{$key}; - } - $_ .= join('', map { "$_=$vars->{$_}\n" } keys %$vars) if eof; - } $file; - }; - my $wlan_conf_file = "$::prefix/etc/wlan/wlan.conf"; - my @wlan_devices = split(/ /, (cat_($wlan_conf_file) =~ /^WLAN_DEVICES="(.*)"/m)[0]); - push @wlan_devices, $ethntf->{DEVICE} unless member($ethntf->{DEVICE}, @wlan_devices); - #- enable device and make it use the choosen ESSID - $update_vars_in_wlan->($wlan_conf_file, - { - WLAN_DEVICES => qq("@wlan_devices"), - "SSID_$ethntf->{DEVICE}" => qq("$ethntf->{WIRELESS_ESSID}"), - "ENABLE_$ethntf->{DEVICE}" => "y" - }); - my $wlan_ssid_file = "$::prefix/etc/wlan/wlancfg-$ethntf->{WIRELESS_ESSID}"; - #- copy default settings for this ESSID if config file does not exist - -f $wlan_ssid_file or cp_f("$::prefix/etc/wlan/wlancfg-DEFAULT", $wlan_ssid_file); - #- enable/disable encryption - $update_vars_in_wlan->($wlan_ssid_file, - { - (map { $_ => $ethntf->{WIRELESS_ENC_KEY} ? "true" : "false" } qw(lnxreq_hostWEPEncrypt lnxreq_hostWEPDecrypt dot11PrivacyInvoked dot11ExcludeUnencrypted)), - AuthType => $ethntf->{WIRELESS_ENC_KEY} ? qq("sharedkey") : qq("opensystem"), - if_($ethntf->{WIRELESS_ENC_KEY}, - dot11WEPDefaultKeyID => 0, - dot11WEPDefaultKey0 => qq("$ethntf->{WIRELESS_ENC_KEY}") - ) - }); - #- apply settings on wlan interface - require services; - services::restart($module eq 'prism2_cs' ? 'pcmcia' : 'wlan'); - } - } + $module =~ /^prism2_/ and network::network::wlan_ng_configure($in, $ethntf, $module); return "static_hostname"; }, }, |