mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Prevent resolvconf(8) from stomping all over our newly generated
resolv.conf and subsequent updates.
This commit is contained in:
parent
792dbafd7b
commit
0000cdf7bd
@ -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)
|
||||
|
||||
5
etc/rc
5
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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user