Commit 5337532e authored by Franco Fichtner's avatar Franco Fichtner

src: remove symlink trickery previously used for nanobsd images

It's ok to write /etc/resolv.conf.
parent 42225286
......@@ -124,7 +124,7 @@ function system_resolvconf_generate($dynupdate = false)
$dnslock = lock('resolvconf', LOCK_EX);
$fd = fopen("{$g['varetc_path']}/resolv.conf", "w");
$fd = fopen('/etc/resolv.conf', 'w');
if (!$fd) {
printf("Error: cannot open resolv.conf in system_resolvconf_generate().\n");
unlock($dnslock);
......@@ -133,7 +133,7 @@ function system_resolvconf_generate($dynupdate = false)
fwrite($fd, $resolvconf);
fclose($fd);
chmod("{$g['varetc_path']}/resolv.conf", 0644);
chmod('/etc/resolv.conf', 0644);
if (!file_exists("/var/run/booting")) {
/* restart dhcpd (nameservers may have changed) */
......
......@@ -175,10 +175,8 @@ if [ ! -L /etc/hosts ]; then
/bin/ln -s /var/etc/hosts /etc/hosts
fi
if [ ! -L /etc/resolv.conf ]; then
/bin/rm -rf /etc/resolv.conf
/bin/ln -s /var/etc/resolv.conf /etc/resolv.conf
fi
# Remove symlinks that are no longer needed
if [ -L /etc/resolv.conf ]; then rm /etc/resolv.conf; fi
# Setup compatibility link for packages that
# have trouble overriding the PREFIX configure
......
<?php
/*
Copyright (C) 2014-2015 Deciso B.V.
Copyright (C) 2009 Scott Ullrich <sullrich@gmail.com>.
......@@ -305,7 +306,7 @@ include("head.inc");
<?=htmlspecialchars($ifinfo['gatewayv6']);?>
</td>
</tr>
<?php endif; if ($ifdescr == "wan" && file_exists("{$g['varetc_path']}/resolv.conf")): ?>
<?php endif; if ($ifdescr == 'wan' && file_exists('/etc/resolv.conf')): ?>
<tr>
<td width="22%" class="vncellt"><?=gettext("ISP DNS servers");?></td>
<td width="78%" class="listr">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment