summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorChris Buechler <cmb@pfsense.org>2014-12-22 17:32:31 -0600
committerChris Buechler <cmb@pfsense.org>2014-12-22 17:32:31 -0600
commit07499022f16be530ad6caab2ef0452c1cc6dd7a2 (patch)
treec4b3b00d1df643d41aa1c844095e1dfb23308c83 /etc
parentccf30846e7b7651da65ab0b5f44e77c70ba8c0d9 (diff)
parent3050152665e71172b145a814160fb88e4b036481 (diff)
downloadpfsense-07499022f16be530ad6caab2ef0452c1cc6dd7a2.zip
pfsense-07499022f16be530ad6caab2ef0452c1cc6dd7a2.tar.gz
Merge pull request #1398 from wagonza/patch-2
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/system.inc9
-rwxr-xr-xetc/rc5
2 files changed, 14 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)
diff --git a/etc/rc b/etc/rc
index 601f3f3..52d342d 100755
--- a/etc/rc
+++ b/etc/rc
@@ -273,6 +273,11 @@ if [ ! -L /etc/resolv.conf ]; then
/bin/ln -s /var/etc/resolv.conf /etc/resolv.conf
fi
+if [ ! -L /etc/resolvconf.conf ]; then
+ /bin/rm -rf /etc/resolvconf.conf
+ /bin/ln -s /var/etc/resolvconf.conf /etc/resolvconf.conf
+fi
+
# Setup compatibility link for packages that
# have trouble overriding the PREFIX configure
# argument since we build our packages in a
OpenPOWER on IntegriCloud