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


PHP set_single_sysctl函数代码示例

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


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

示例1: sprintf

                        break;
                }
            }
            $savemsg = sprintf(gettext("%s IPs have been disabled. Please note that disabling does not survive a reboot."), $carp_counter);
        } else {
            $savemsg = gettext("CARP has been enabled.");
            foreach ($a_vip as $vip) {
                switch ($vip['mode']) {
                    case "carp":
                        interface_carp_configure($vip);
                        sleep(1);
                        break;
                }
            }
            interfaces_carp_setup();
            set_single_sysctl('net.inet.carp.allow', '1');
        }
    }
}
$carpcount = 0;
foreach ($a_vip as $carp) {
    if ($carp['mode'] == "carp") {
        $carpcount++;
        break;
    }
}
// fetch pfsync info
$pfsyncnodes = json_decode(configd_run("filter list pfsync json"), true);
legacy_html_escape_form_data($a_vip);
$status = get_single_sysctl('net.inet.carp.allow') > 0;
$carp_detected_problems = array_pop(get_sysctl("net.inet.carp.demotion")) > 0;
开发者ID:8191,项目名称:opnsense-core,代码行数:31,代码来源:carp_status.php

示例2: interface_proxyarp_configure

                            interface_proxyarp_configure($a_vip[$vid]['interface']);
                            break;
                        case "carp":
                            $check_carp = true;
                            interface_carp_configure($a_vip[$vid]);
                            break;
                        default:
                            break;
                    }
                }
            }
            @unlink("{$g['tmp_path']}/.firewall_virtual_ip.apply");
        }
        /* Before changing check #4633 */
        if ($check_carp === true && !get_carp_status()) {
            set_single_sysctl("net.inet.carp.allow", "1");
        }
        $retval = 0;
        $retval |= filter_configure();
        $savemsg = get_std_save_message($retval);
        clear_subsystem_dirty('vip');
    }
}
if ($_GET['act'] == "del") {
    if ($a_vip[$_GET['id']]) {
        /* make sure no inbound NAT mappings reference this entry */
        if (is_array($config['nat']['rule'])) {
            foreach ($config['nat']['rule'] as $rule) {
                if ($rule['destination']['address'] != "") {
                    if ($rule['destination']['address'] == $a_vip[$_GET['id']]['subnet']) {
                        $input_errors[] = gettext("This entry cannot be deleted because it is still referenced by at least one NAT mapping.");
开发者ID:geijt,项目名称:pfsense,代码行数:31,代码来源:firewall_virtual_ip.php

示例3: interface_ipalias_configure

                    case 'ipalias':
                        if (substr($vip['interface'], 0, 4) == "_vip") {
                            interface_ipalias_configure($vip);
                        }
                        break;
                }
            }
        }
        interfaces_sync_setup();
        set_single_sysctl('net.inet.carp.allow', '1');
        $status = 1;
    }
}
$carp_detected_problems = get_single_sysctl("net.inet.carp.demotion");
if (!empty($_POST['resetdemotion'])) {
    set_single_sysctl("net.inet.carp.demotion", "-{$carp_detected_problems}");
    sleep(1);
    $carp_detected_problems = get_single_sysctl("net.inet.carp.demotion");
}
$pgtitle = array(gettext("Status"), gettext("CARP"));
$shortcut_section = "carp";
include "head.inc";
if ($savemsg) {
    print_info_box($savemsg, 'success');
}
$carpcount = 0;
if (is_array($config['virtualip']['vip'])) {
    foreach ($config['virtualip']['vip'] as $carp) {
        if ($carp['mode'] == "carp") {
            $carpcount++;
            break;
开发者ID:nwholloway,项目名称:pfsense,代码行数:31,代码来源:status_carp.php


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