mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-20 03:16:12 +00:00
src: remove symlink trickery previously used for nanobsd images
It's ok to write /etc/resolv.conf.
This commit is contained in:
parent
4222528665
commit
5337532e52
@ -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
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
<?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">
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user