summaryrefslogtreecommitdiffstats
path: root/etc/inc/system.inc
diff options
context:
space:
mode:
authorWarren Baker <warren@decoy.co.za>2014-12-19 22:37:29 +0200
committerChris Buechler <cmb@pfsense.org>2014-12-22 17:36:49 -0600
commit0000cdf7bd8a29c30dcdd3ee651ca5f95a2c98bf (patch)
treeb397b0b523e43dada0e1b06db7122ec4d946de7a /etc/inc/system.inc
parent792dbafd7b83e40e5bb9383294e2abb2b2ad083c (diff)
downloadpfsense-0000cdf7bd8a29c30dcdd3ee651ca5f95a2c98bf.zip
pfsense-0000cdf7bd8a29c30dcdd3ee651ca5f95a2c98bf.tar.gz
Prevent resolvconf(8) from stomping all over our newly generated
resolv.conf and subsequent updates.
Diffstat (limited to 'etc/inc/system.inc')
-rw-r--r--etc/inc/system.inc9
1 files changed, 9 insertions, 0 deletions
diff --git a/etc/inc/system.inc b/etc/inc/system.inc
index 2463882..ba24c88 100644
--- a/etc/inc/system.inc
+++ b/etc/inc/system.inc
@@ -182,6 +182,15 @@ function system_resolvconf_generate($dynupdate = false) {
fwrite($fd, $resolvconf);
fclose($fd);
+ // Prevent resolvconf(8) from rewriting our resolv.conf
+ $fd = fopen("{$g['varetc_path']}/resolvconf.conf", "w");
+ if (!$fd) {
+ printf("Error: cannot open resolvconf.conf in system_resolvconf_generate().\n");
+ return 1;
+ }
+ fwrite($fd, "resolv_conf=\"/dev/null\"\n");
+ fclose($fd);
+
if (!platform_booting()) {
/* restart dhcpd (nameservers may have changed) */
if (!$dynupdate)
OpenPOWER on IntegriCloud