本文整理汇总了PHP中find_dhcp6c_process函数的典型用法代码示例。如果您正苦于以下问题:PHP find_dhcp6c_process函数的具体用法?PHP find_dhcp6c_process怎么用?PHP find_dhcp6c_process使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了find_dhcp6c_process函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: elseif
// 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']);
}
if (!empty($old_config['ipaddrv6']) && $old_config['ipaddrv6'] == 'dhcp6' && $new_config['ipaddrv6'] != 'dhcp6') {
// change from dhcp to something else, kill dhcp6c
$pid = find_dhcp6c_process($old_config['if']);
if ($pid) {
exec('/bin/kill ' . $pid);
}
}
// yak... room for improvement here....
handle_pppoe_reset($pconfig);
// save to config
write_config();
// log changes for apply action
// (it would be better to diff the physical situation with the new config for changes)
if (file_exists('/tmp/.interfaces.apply')) {
$toapplylist = unserialize(file_get_contents('/tmp/.interfaces.apply'));
} else {
$toapplylist = array();
}
开发者ID:paudam,项目名称:opnsense-core,代码行数:31,代码来源:interfaces.php
示例2: explode
// These 3 fields can be a list of multiple data items when used for MLPPP.
// The UI in this code only processes the first of the list, so save the data here then we can preserve any other entries.
$poriginal['pptp_localip'] = explode(",", $a_ppps[$pppid]['localip']);
$poriginal['pptp_subnet'] = explode(",", $a_ppps[$pppid]['subnet']);
$poriginal['pptp_remote'] = explode(",", $a_ppps[$pppid]['gateway']);
if ($wancfg['ipaddr'] != $_POST['type']) {
if (in_array($wancfg['ipaddr'], array("ppp", "pppoe", "pptp", "l2tp"))) {
$wancfg['if'] = $a_ppps[$pppid]['ports'];
unset($a_ppps[$pppid]);
} else {
if ($wancfg['ipaddr'] == "dhcp") {
kill_dhclient_process($wancfg['if']);
}
}
if ($wancfg['ipaddrv6'] == "dhcp6") {
$pid = find_dhcp6c_process($wancfg['if']);
if ($pid) {
posix_kill($pid, SIGTERM);
}
}
}
$ppp = array();
if ($wancfg['ipaddr'] != "ppp") {
unset($wancfg['ipaddr']);
}
if ($wancfg['ipaddrv6'] != "ppp") {
unset($wancfg['ipaddrv6']);
}
unset($wancfg['subnet']);
unset($wancfg['gateway']);
unset($wancfg['subnetv6']);
开发者ID:simudream,项目名称:pfsense,代码行数:31,代码来源:interfaces.php
注:本文中的find_dhcp6c_process函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论