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