Implement wireless client on RED.

http://wishlist.ipfire.org/wish/wireless-client-on-red

Conflicts:
	doc/language_issues.de
	doc/language_issues.en
	doc/language_issues.es
	doc/language_issues.fr
	doc/language_issues.pl
	doc/language_issues.ru
	src/misc-progs/Makefile
This commit is contained in:
Michael Tremer
2013-01-10 16:07:52 +01:00
committed by Stefan Schantl
parent 139e30d135
commit 61027579bb
19 changed files with 1360 additions and 7 deletions

View File

@@ -980,4 +980,27 @@ sub GetIcmpDescription ($) {
'Experimental');
if ($index>41) {return 'unknown'} else {return @icmp_description[$index]};
}
sub RedIsWireless() {
# This function checks if a network device is a wireless device.
my %settings = ();
&readhash("${General::swroot}/ethernet/settings", \%settings);
# Find the name of the network device.
my $device = $settings{'RED_DEV'};
# Exit, if no device is configured.
return 0 if ($device eq "");
# Return 1 if the device is a wireless one.
my $path = "/sys/class/net/$device/wireless";
if (-d $path) {
return 1;
}
# Otherwise return zero.
return 0;
}
1;

View File

@@ -157,6 +157,10 @@ sub genmenu {
if ( $ethsettings{'CONFIG_TYPE'} =~ /^(1|2|3|4)$/ && $ethsettings{'RED_TYPE'} eq 'STATIC' ) {
$menu->{'03.network'}{'subMenu'}->{'70.aliases'}{'enabled'} = 1;
}
if (&General::RedIsWireless()) {
$menu->{'01.system'}{'subMenu'}->{'21.wlan'}{'enabled'} = 1;
}
}
sub showhttpheaders