mirror of
https://github.com/billz/raspap-webgui.git
synced 2023-10-10 13:37:24 +02:00
Merge pull request #604 from zbchristian/zbchristian-wlan-switch
Zbchristian wlan switch
This commit is contained in:
commit
95c5126776
@ -304,9 +304,18 @@ function SaveHostAPDConfig($wpa_array, $enc_types, $modes, $interfaces, $status)
|
||||
$domain_name_server = ($intConfig['domain_name_server'] =='') ? '1.1.1.1 8.8.8.8' : $intConfig['domain_name_server'];
|
||||
$routers = ($intConfig['routers'] == '') ? '10.3.141.1' : $intConfig['routers'];
|
||||
|
||||
// load the defaults for dhcpcd.conf
|
||||
$config = file_get_contents(RASPI_CONFIG_NETWORKING.'/defaults')."\n\n";
|
||||
$config = explode('\n', $config);
|
||||
// write options to dhcpcd.conf
|
||||
$config = [ '# RaspAP '.$_POST['interface'].' configuration' ];
|
||||
$config[] = 'hostname';
|
||||
$config[] = 'clientid';
|
||||
$config[] = 'persistent';
|
||||
$config[] = 'option rapid_commit';
|
||||
$config[] = 'option domain_name_servers, domain_name, domain_search, host_name';
|
||||
$config[] = 'option classless_static_routes';
|
||||
$config[] = 'option ntp_servers';
|
||||
$config[] = 'require dhcp_server_identifier';
|
||||
$config[] = 'slaac private';
|
||||
$config[] = 'nohook lookup-hostname';
|
||||
|
||||
if ($bridgedEnable == 1) {
|
||||
$config[] = 'denyinterfaces eth0 wlan0';
|
||||
|
@ -5,8 +5,8 @@ if ($arrHostapdConf['WifiAPEnable'] == 1) {
|
||||
} else {
|
||||
$client_iface = RASPI_WIFI_CLIENT_INTERFACE;
|
||||
}
|
||||
exec('cat '.RASPI_HOSTAPD_CONFIG.' | sed -rn "s/interface=(wlan[0-9])/\1/p" ',$ap_iface);
|
||||
$ap_iface = $ap_iface[0];
|
||||
$pars=parse_ini_file(RASPI_HOSTAPD_CONFIG,false,INI_SCANNER_RAW );
|
||||
$ap_iface = $pars['interface'];
|
||||
$MACPattern = '"([[:xdigit:]]{2}:){5}[[:xdigit:]]{2}"';
|
||||
if ($arrHostapdConf['BridgedEnable'] == 1) {
|
||||
$moreLink = "index.php?page=hostapd_conf";
|
||||
|
Loading…
Reference in New Issue
Block a user