summaryrefslogtreecommitdiffstats
path: root/perl-install/network/tools.pm
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2005-04-19 16:19:56 +0000
committerOlivier Blin <oblin@mandriva.org>2005-04-19 16:19:56 +0000
commitb7459f3dbbd35b6cc41e04fad99163a4b73151f5 (patch)
treee33aa737e691727110a1d205a6d1e3a7398f451b /perl-install/network/tools.pm
parente507ca693ee23532885e30b5c6c5c6c577a17dc0 (diff)
downloaddrakx-b7459f3dbbd35b6cc41e04fad99163a4b73151f5.tar
drakx-b7459f3dbbd35b6cc41e04fad99163a4b73151f5.tar.gz
drakx-b7459f3dbbd35b6cc41e04fad99163a4b73151f5.tar.bz2
drakx-b7459f3dbbd35b6cc41e04fad99163a4b73151f5.tar.xz
drakx-b7459f3dbbd35b6cc41e04fad99163a4b73151f5.zip
move wireless stuff in wireless.pm
Diffstat (limited to 'perl-install/network/tools.pm')
-rw-r--r--perl-install/network/tools.pm51
1 files changed, 0 insertions, 51 deletions
diff --git a/perl-install/network/tools.pm b/perl-install/network/tools.pm
index 84b35a70b..6d7c5b7af 100644
--- a/perl-install/network/tools.pm
+++ b/perl-install/network/tools.pm
@@ -210,32 +210,6 @@ sub is_dynamic_host {
any { defined $_->{DHCP_HOSTNAME} } values %$intf;
}
-sub convert_wep_key_for_iwconfig {
- #- 5 or 13 characters, consider the key as ASCII and prepend "s:"
- #- else consider the key as hexadecimal, do not strip dashes
- #- always quote the key as string
- my ($key) = @_;
- member(length($key), (5, 13)) ? "s:$key" : $key;
-}
-
-sub get_wep_key_from_iwconfig {
- #- strip "s:" if the key is 5 or 13 characters (ASCII)
- #- else the key as hexadecimal, do not modify
- my ($key) = @_;
- $key =~ s/^s:// if member(length($key), (7,15));
- $key;
-}
-
-sub convert_key_for_wpa_supplicant {
- my ($key) = @_;
- if ($key =~ /^([[:xdigit:]]{4}[\:-])+[[:xdigit:]]{2,}$/) {
- $key =~ s/[\:-]//g;
- return lc($key);
- } else {
- return qq("$key");
- }
-}
-
#- returns interface whose IP address matchs given IP address, according to its network mask
sub find_matching_interface {
my ($intf, $address) = @_;
@@ -296,29 +270,4 @@ sub get_default_metric {
$idx * 10;
}
-sub ndiswrapper_installed_drivers() {
- `ndiswrapper -l` =~ /(\w+)\s+driver present/mg;
-}
-
-sub ndiswrapper_available_drivers() {
- `ndiswrapper -l` =~ /(\w+)\s+driver present, hardware present/mg;
-}
-
-sub ndiswrapper_setup() {
- eval { modules::unload("ndiswrapper") };
- #- unload ndiswrapper first so that the newly installed .inf files will be read
- eval { modules::load("ndiswrapper") };
-
- #- FIXME: move this somewhere in get_eth_cards, so that configure_eth_aliases correctly writes ndiswrapper
- #- find the first interface matching an ndiswrapper driver, try ethtool then sysfs
- my @available_drivers = network::tools::ndiswrapper_available_drivers();
- my $ntf_name = find {
- my $drv = c::getNetDriver($_) || readlink("/sys/class/net/$_/driver");
- $drv =~ s!.*/!!;
- member($drv, @available_drivers);
- } detect_devices::getNet();
- #- fallback on wlan0
- return $ntf_name || "wlan0";
-}
-
1;