• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP system_resolvconf_generate函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: mwexec

             if (is_ipaddrv4($olddnsservers[$dnscounter - 1])) {
                 mwexec("/sbin/route delete " . escapeshellarg($olddnsservers[$dnscounter - 1]));
             } else {
                 if (is_ipaddrv6($olddnsservers[$dnscounter - 1])) {
                     mwexec("/sbin/route delete -inet6 " . escapeshellarg($olddnsservers[$dnscounter - 1]));
                 }
             }
         }
     }
     if ($changecount > 0) {
         write_config($changedesc);
     }
     $retval = 0;
     $retval = system_hostname_configure();
     $retval |= system_hosts_generate();
     $retval |= system_resolvconf_generate();
     if (isset($config['dnsmasq']['enable'])) {
         $retval |= services_dnsmasq_configure();
     } elseif (isset($config['unbound']['enable'])) {
         $retval |= services_unbound_configure();
     }
     $retval |= system_timezone_configure();
     $retval |= system_ntp_configure();
     if ($olddnsallowoverride != $config['system']['dnsallowoverride']) {
         $retval |= send_event("service reload dns");
     }
     // Reload the filter - plugins might need to be run.
     $retval |= filter_configure();
     $savemsg = get_std_save_message($retval);
 }
 unset($ignore_posted_dnsgw);
开发者ID:LFCavalcanti,项目名称:pfsense,代码行数:31,代码来源:system.php


示例2: explode

    $pconfig['outgoing_interface'] = explode(",", $a_unboundcfg['outgoing_interface']);
}
if (empty($a_unboundcfg['system_domain_local_zone_type'])) {
    $pconfig['system_domain_local_zone_type'] = "transparent";
} else {
    $pconfig['system_domain_local_zone_type'] = $a_unboundcfg['system_domain_local_zone_type'];
}
if ($_POST) {
    if ($_POST['apply']) {
        $retval = services_unbound_configure();
        $savemsg = get_std_save_message($retval);
        if ($retval == 0) {
            clear_subsystem_dirty('unbound');
        }
        /* Update resolv.conf in case the interface bindings exclude localhost. */
        system_resolvconf_generate();
        /* Start or restart dhcpleases when it's necessary */
        system_dhcpleases_configure();
    } else {
        $pconfig = $_POST;
        unset($input_errors);
        if (isset($pconfig['enable']) && isset($config['dnsmasq']['enable'])) {
            if ($pconfig['port'] == $config['dnsmasq']['port']) {
                $input_errors[] = gettext("The DNS Forwarder is enabled using this port. Choose a non-conflicting port, or disable the DNS Forwarder.");
            }
        }
        if (empty($pconfig['active_interface'])) {
            $input_errors[] = gettext("One or more Network Interfaces must be selected for binding.");
        } else {
            if (!isset($config['system']['dnslocalhost']) && (!in_array("lo0", $pconfig['active_interface']) && !in_array("all", $pconfig['active_interface']))) {
                $input_errors[] = gettext("This system is configured to use the DNS Resolver as its DNS server, so Localhost or All must be selected in Network Interfaces.");
开发者ID:dirkx,项目名称:pfsense,代码行数:31,代码来源:services_unbound.php


示例3: unset

                unset($config['system']['dhcpbackup']);
            }
        }
        // Add/Remove RAM disk periodic backup cron jobs according to settings and installation type.
        // Remove the cron jobs on full install if not using RAM disk.
        // Add the cron jobs on all others if the periodic backup option is set.  Otherwise the cron job is removed.
        if ($g['platform'] == $g['product_name'] && !isset($config['system']['use_mfs_tmpvar'])) {
            install_cron_job("/etc/rc.backup_rrd.sh", false);
            install_cron_job("/etc/rc.backup_dhcpleases.sh", false);
        } else {
            install_cron_job("/etc/rc.backup_rrd.sh", $config['system']['rrdbackup'] > 0, $minute = "0", "*/{$config['system']['rrdbackup']}");
            install_cron_job("/etc/rc.backup_dhcpleases.sh", $config['system']['dhcpbackup'] > 0, $minute = "0", "*/{$config['system']['dhcpbackup']}");
        }
        write_config();
        $retval = 0;
        system_resolvconf_generate(true);
        $retval = filter_configure();
        if (stristr($retval, "error") != true) {
            $savemsg = get_std_save_message(gettext($retval));
        } else {
            $savemsg = gettext($retval);
        }
        activate_powerd();
        load_crypto();
        load_thermal_hardware();
        if ($need_relayd_restart) {
            relayd_configure();
        }
    }
}
$pgtitle = array(gettext("System"), gettext("Advanced"), gettext("Miscellaneous"));
开发者ID:LFCavalcanti,项目名称:pfsense,代码行数:31,代码来源:system_advanced_misc.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP system_routing_configure函数代码示例发布时间:2022-05-23
下一篇:
PHP system_region_list函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap