Merge remote-tracking branch 'stevee/wlan-client' into next

Conflicts:
	config/cfgroot/general-functions.pl
This commit is contained in:
Arne Fitzenreiter
2013-07-06 11:50:01 +02:00
23 changed files with 1599 additions and 113 deletions

View File

@@ -1008,4 +1008,26 @@ sub MakeUserAgent() {
return $user_agent;
}
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