当前位置: 首页>>代码示例>>PHP>>正文


PHP interface_sync_wireless_clones函数代码示例

本文整理汇总了PHP中interface_sync_wireless_clones函数的典型用法代码示例。如果您正苦于以下问题:PHP interface_sync_wireless_clones函数的具体用法?PHP interface_sync_wireless_clones怎么用?PHP interface_sync_wireless_clones使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了interface_sync_wireless_clones函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: array

                     }
                     /* check for wireless interfaces, set or clear ['wireless'] */
                     if (preg_match($g['wireless_regex'], $ifport)) {
                         if (!is_array($config['interfaces'][$ifname]['wireless'])) {
                             $config['interfaces'][$ifname]['wireless'] = array();
                         }
                     } else {
                         unset($config['interfaces'][$ifname]['wireless']);
                     }
                     /* make sure there is a descr for all interfaces */
                     if (!isset($config['interfaces'][$ifname]['descr'])) {
                         $config['interfaces'][$ifname]['descr'] = strtoupper($ifname);
                     }
                     if ($reloadif == true) {
                         if (preg_match($g['wireless_regex'], $ifport)) {
                             interface_sync_wireless_clones($config['interfaces'][$ifname], false);
                         }
                         /* Reload all for the interface. */
                         interface_configure($ifname, true);
                     }
                 }
             }
         }
         write_config();
         enable_rrd_graphing();
     }
 } else {
     unset($delbtn);
     if (!empty($_POST['del'])) {
         $delbtn = key($_POST['del']);
     }
开发者ID:michaeleino,项目名称:pfsense,代码行数:31,代码来源:interfaces_assign.php

示例2: handle_wireless_post


//.........这里部分代码省略.........
        }
    }
    if ($_POST['wpa_strict_rekey'] == "yes") {
        $wancfg['wireless']['wpa']['wpa_strict_rekey'] = true;
    } else {
        if (isset($wancfg['wireless']['wpa']['wpa_strict_rekey'])) {
            unset($wancfg['wireless']['wpa']['wpa_strict_rekey']);
        }
    }
    if ($_POST['debug_mode'] == "yes") {
        $wancfg['wireless']['wpa']['debug_mode'] = true;
    } else {
        if (isset($wancfg['wireless']['wpa']['debug_mode'])) {
            sunset($wancfg['wireless']['wpa']['debug_mode']);
        }
    }
    if ($_POST['wpa_enable'] == "yes") {
        $wancfg['wireless']['wpa']['enable'] = $_POST['wpa_enable'] = true;
    } else {
        if (isset($wancfg['wireless']['wpa']['enable'])) {
            unset($wancfg['wireless']['wpa']['enable']);
        }
    }
    if (ALLOWWEP) {
        if ($_POST['wep_enable'] == "yes") {
            if (!is_array($wancfg['wireless']['wep'])) {
                $wancfg['wireless']['wep'] = array();
            }
            $wancfg['wireless']['wep']['enable'] = $_POST['wep_enable'] = true;
        } else {
            if (isset($wancfg['wireless']['wep'])) {
                unset($wancfg['wireless']['wep']);
            }
        }
    }
    if ($_POST['wme_enable'] == "yes") {
        if (!is_array($wancfg['wireless']['wme'])) {
            $wancfg['wireless']['wme'] = array();
        }
        $wancfg['wireless']['wme']['enable'] = $_POST['wme_enable'] = true;
    } else {
        if (isset($wancfg['wireless']['wme']['enable'])) {
            unset($wancfg['wireless']['wme']['enable']);
        }
    }
    if ($_POST['puremode'] == "11g") {
        if (!is_array($wancfg['wireless']['pureg'])) {
            $wancfg['wireless']['pureg'] = array();
        }
        $wancfg['wireless']['pureg']['enable'] = true;
    } else {
        if ($_POST['puremode'] == "11n") {
            if (!is_array($wancfg['wireless']['puren'])) {
                $wancfg['wireless']['puren'] = array();
            }
            $wancfg['wireless']['puren']['enable'] = true;
        } else {
            if (isset($wancfg['wireless']['pureg'])) {
                unset($wancfg['wireless']['pureg']);
            }
            if (isset($wancfg['wireless']['puren'])) {
                unset($wancfg['wireless']['puren']);
            }
        }
    }
    if ($_POST['apbridge_enable'] == "yes") {
        if (!is_array($wancfg['wireless']['apbridge'])) {
            $wancfg['wireless']['apbridge'] = array();
        }
        $wancfg['wireless']['apbridge']['enable'] = $_POST['apbridge_enable'] = true;
    } else {
        if (isset($wancfg['wireless']['apbridge']['enable'])) {
            unset($wancfg['wireless']['apbridge']['enable']);
        }
    }
    if ($_POST['standard'] == "11g Turbo" || $_POST['standard'] == "11a Turbo") {
        if (!is_array($wancfg['wireless']['turbo'])) {
            $wancfg['wireless']['turbo'] = array();
        }
        $wancfg['wireless']['turbo']['enable'] = true;
    } else {
        if (isset($wancfg['wireless']['turbo']['enable'])) {
            unset($wancfg['wireless']['turbo']['enable']);
        }
    }
    if (ALLOWWEP) {
        $wancfg['wireless']['wep']['key'] = array();
        for ($i = 1; $i <= 4; $i++) {
            if ($_POST['key' . $i]) {
                $newkey = array();
                $newkey['value'] = $_POST['key' . $i];
                if ($_POST['txkey'] == $i) {
                    $newkey['txkey'] = true;
                }
                $wancfg['wireless']['wep']['key'][] = $newkey;
            }
        }
    }
    interface_sync_wireless_clones($wancfg, true);
}
开发者ID:simudream,项目名称:pfsense,代码行数:101,代码来源:interfaces.php

示例3: array

         if (!isset($config['wireless']) || !is_array($config['wireless'])) {
             $config['wireless'] = array();
         }
         if (!isset($config['wireless']['interfaces']) || !is_array($config['wireless']['interfaces'])) {
             $config['wireless']['interfaces'] = array();
         }
         if (empty($config['wireless']['interfaces'][$wlanbaseif])) {
             $config['wireless']['interfaces'][$wlanbaseif] = array();
         }
     } else {
         if (isset($config['wireless']['interfaces'][$wlanbaseif])) {
             unset($config['wireless']['interfaces'][$wlanbaseif]);
         }
     }
     // quite obscure this... copies parts of the config
     interface_sync_wireless_clones($new_config, true);
 }
 if (count($new_ppp_config) > 0) {
     // ppp details changed
     $a_ppps[$pppid] = $new_ppp_config;
 } elseif (!empty($a_ppps[$pppid])) {
     // ppp removed
     $new_config['if'] = $a_ppps[$pppid]['ports'];
     unset($a_ppps[$pppid]);
 }
 // save interface details
 $a_interfaces[$if] = $new_config;
 if (!empty($old_config['ipaddr']) && $old_config['ipaddr'] == 'dhcp' && $new_config['ipaddr'] != 'dhcp') {
     // change from dhcp to something else, kill dhclient
     kill_dhclient_process($old_config['if']);
 }
开发者ID:paudam,项目名称:opnsense-core,代码行数:31,代码来源:interfaces.php


注:本文中的interface_sync_wireless_clones函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。