本文整理汇总了PHP中system_routing_configure函数的典型用法代码示例。如果您正苦于以下问题:PHP system_routing_configure函数的具体用法?PHP system_routing_configure怎么用?PHP system_routing_configure使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了system_routing_configure函数的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: interface_bring_down
} else {
interface_bring_down($ifapply, true, $ifcfgo);
if (isset($config['dhcpd'][$ifapply]['enable']) || isset($config['dhcpdv6'][$ifapply]['enable'])) {
services_dhcpd_configure();
}
}
}
}
/* restart snmp so that it binds to correct address */
services_snmpd_configure();
/* sync filter configuration */
setup_gateways_monitor();
clear_subsystem_dirty('interfaces');
filter_configure();
enable_rrd_graphing();
if (is_subsystem_dirty('staticroutes') && system_routing_configure() == 0) {
clear_subsystem_dirty('staticroutes');
}
}
@unlink("{$g['tmp_path']}/.interfaces.apply");
header("Location: interfaces.php?if={$if}");
exit;
} else {
if ($_POST && $_POST['enable'] != "yes") {
unset($wancfg['enable']);
if (isset($wancfg['wireless'])) {
interface_sync_wireless_clones($wancfg, false);
}
write_config("Interface {$_POST['descr']}({$if}) is now disabled.");
mark_subsystem_dirty('interfaces');
if (file_exists("{$g['tmp_path']}/.interfaces.apply")) {
示例2: return_gateways_array
$a_routes =& $config['staticroutes']['route'];
$a_gateways = return_gateways_array(true, true, true);
$changedesc_prefix = gettext("Static Routes") . ": ";
unset($input_errors);
if ($_POST) {
$pconfig = $_POST;
if ($_POST['apply']) {
$retval = 0;
if (file_exists("{$g['tmp_path']}/.system_routes.apply")) {
$toapplylist = unserialize(file_get_contents("{$g['tmp_path']}/.system_routes.apply"));
foreach ($toapplylist as $toapply) {
mwexec("{$toapply}");
}
@unlink("{$g['tmp_path']}/.system_routes.apply");
}
$retval = system_routing_configure();
$retval |= filter_configure();
/* reconfigure our gateway monitor */
setup_gateways_monitor();
$savemsg = get_std_save_message($retval);
if ($retval == 0) {
clear_subsystem_dirty('staticroutes');
}
}
}
function delete_static_route($id)
{
global $config, $a_routes, $changedesc_prefix;
if (!isset($a_routes[$id])) {
return;
}
示例3: type_change
</td>
</tr>
</table>
</form>
<script language="JavaScript">
<!--
type_change();
//-->
</script>
<?php
include "fend.inc";
?>
</body>
</html>
<?php
if ($_POST) {
if (!$input_errors) {
unlink_if_exists("{$g['tmp_path']}/config.cache");
ob_flush();
flush();
sleep(1);
interfaces_wan_configure();
reset_carp();
/* sync filter configuration */
filter_configure();
/* set up static routes */
system_routing_configure();
}
}
示例4: filter_configure_xmlrpc
function filter_configure_xmlrpc($raw_params)
{
global $xmlrpc_g, $config;
$params = xmlrpc_params_to_php($raw_params);
if (!xmlrpc_auth($params)) {
xmlrpc_authfail();
return $xmlrpc_g['return']['authfail'];
}
filter_configure();
system_routing_configure();
setup_gateways_monitor();
relayd_configure();
require_once "openvpn.inc";
openvpn_resync_all();
if (isset($config['dnsmasq']['enable'])) {
services_dnsmasq_configure();
} elseif (isset($config['unbound']['enable'])) {
services_unbound_configure();
} else {
# Both calls above run services_dhcpd_configure(), then we just
# need to call it when they are not called to avoid restarting dhcpd
# twice, as described on ticket #3797
services_dhcpd_configure();
}
local_sync_accounts();
return $xmlrpc_g['return']['true'];
}
示例5: filter_configure
/**
* Wrapper for filter_configure()
*
* @param string $username
* @param string $password
*
* @return bool
*/
public function filter_configure($username, $password)
{
$this->auth($username, $password);
global $g, $config;
filter_configure();
system_routing_configure();
setup_gateways_monitor();
relayd_configure();
require_once "openvpn.inc";
openvpn_resync_all();
/*
* The DNS Resolver and the DNS Forwarder may both be active so
* long as * they are running on different ports.
* See ticket #5882
*/
if (isset($config['dnsmasq']['enable'])) {
/* Configure dnsmasq but tell it NOT to restart DHCP */
services_dnsmasq_configure(false);
} else {
/* kill any running dnsmasq instance */
if (isvalidpid("{$g['varrun_path']}/dnsmasq.pid")) {
sigkillbypid("{$g['varrun_path']}/dnsmasq.pid", "TERM");
}
}
if (isset($config['unbound']['enable'])) {
/* Configure unbound but tell it NOT to restart DHCP */
services_unbound_configure(false);
} else {
/* kill any running Unbound instance */
if (isvalidpid("{$g['varrun_path']}/unbound.pid")) {
sigkillbypid("{$g['varrun_path']}/unbound.pid", "TERM");
}
}
/*
* Call this separately since the above are manually set to
* skip the DHCP restart they normally perform.
* This avoids restarting dhcpd twice as described on
* ticket #3797
*/
services_dhcpd_configure();
local_sync_accounts();
return true;
}
示例6: filter_configure_xmlrpc
function filter_configure_xmlrpc($raw_params)
{
global $xmlrpc_g;
$params = xmlrpc_params_to_php($raw_params);
if (!xmlrpc_auth($params)) {
return $xmlrpc_g['return']['authfail'];
}
require_once "vslb.inc";
slbd_configure();
filter_configure();
system_routing_configure();
return $xmlrpc_g['return']['true'];
}
示例7: filter_configure_xmlrpc
function filter_configure_xmlrpc($raw_params)
{
global $xmlrpc_g, $g, $config;
$params = xmlrpc_params_to_php($raw_params);
if (!xmlrpc_auth($params)) {
xmlrpc_authfail();
return $xmlrpc_g['return']['authfail'];
}
filter_configure();
system_routing_configure();
setup_gateways_monitor();
relayd_configure();
require_once "openvpn.inc";
openvpn_resync_all();
/* The DNS Resolver and the DNS Forwarder may both be active so long as
* they are running on different ports. See ticket #5882
*/
$need_dhcp_start = true;
if (isset($config['dnsmasq']['enable'])) {
/* Configure dnsmasq but tell it NOT to restart DHCP */
services_dnsmasq_configure(false);
} else {
/* kill any running dnsmasq since it is not enabled. */
if (file_exists("{$g['varrun_path']}/dnsmasq.pid")) {
sigkillbypid("{$g['varrun_path']}/dnsmasq.pid", "TERM");
}
}
if (isset($config['unbound']['enable'])) {
/* Configure unbound but tell it NOT to restart DHCP */
services_unbound_configure(false);
} else {
/* kill any running Unbound instance since it is not enabled. */
if (file_exists("{$g['varrun_path']}/unbound.pid")) {
sigkillbypid("{$g['varrun_path']}/unbound.pid", "TERM");
}
}
/* Call this separately since the above are manually set to skip the DHCP restart they normally perform.
* This avoids restarting dhcpd twice as described on ticket #3797
*/
services_dhcpd_configure();
local_sync_accounts();
return $xmlrpc_g['return']['true'];
}
示例8: filter_configure_xmlrpc
function filter_configure_xmlrpc($raw_params)
{
global $xmlrpc_g;
$params = xmlrpc_params_to_php($raw_params);
if (!xmlrpc_auth($params)) {
xmlrpc_authfail();
return $xmlrpc_g['return']['authfail'];
}
filter_configure();
system_routing_configure();
setup_gateways_monitor();
relayd_configure();
require_once "openvpn.inc";
openvpn_resync_all();
services_dhcpd_configure();
services_dnsmasq_configure();
local_sync_accounts();
return $xmlrpc_g['return']['true'];
}