Revision 89289853
Added by Ermal LUÇI almost 14 years ago
etc/inc/system.inc | ||
---|---|---|
90 | 90 |
if($syscfg['domain']) |
91 | 91 |
$resolvconf = "domain {$syscfg['domain']}\n"; |
92 | 92 |
|
93 |
$resolvconf .= "nameserver 127.0.0.1\n"; |
|
93 |
if (!isset($config['system']['dnslocalhost'])) |
|
94 |
$resolvconf .= "nameserver 127.0.0.1\n"; |
|
94 | 95 |
|
95 | 96 |
if (isset($syscfg['dnsallowoverride'])) { |
96 | 97 |
/* get dynamically assigned DNS servers (if any) */ |
usr/local/www/system_advanced_misc.php | ||
---|---|---|
65 | 65 |
$pconfig['glxsb_enable'] = isset($config['system']['glxsb_enable']); |
66 | 66 |
$pconfig['schedule_states'] = isset($config['system']['schedule_states']); |
67 | 67 |
$pconfig['kill_states'] = isset($config['system']['kill_states']); |
68 |
$pconfig['dnslocalhost'] = isset($config['system']['dnslocalhost']); |
|
68 | 69 |
|
69 | 70 |
if ($_POST) { |
70 | 71 |
|
... | ... | |
158 | 159 |
else |
159 | 160 |
unset($config['system']['kill_states']); |
160 | 161 |
|
162 |
if($_POST['dnslocalhost'] == "yes") |
|
163 |
$config['system']['dnslocalhost'] = true; |
|
164 |
else |
|
165 |
unset($config['system']['dnslocalhost']); |
|
166 |
|
|
161 | 167 |
write_config(); |
162 | 168 |
|
163 | 169 |
$retval = 0; |
170 |
system_resolvconf_generate(true); |
|
164 | 171 |
$retval = filter_configure(); |
165 | 172 |
if(stristr($retval, "error") <> true) |
166 | 173 |
$savemsg = get_std_save_message(gettext($retval)); |
... | ... | |
390 | 397 |
<tr> |
391 | 398 |
<td colspan="2" class="list" height="12"> </td> |
392 | 399 |
</tr> |
400 |
<tr> |
|
401 |
<td colspan="2" valign="top" class="listtopic"><?=gettext("DNS Forwarder"); ?></td> |
|
402 |
</tr> |
|
403 |
<tr> |
|
404 |
<td width="22%" valign="top" class="vncell"><?=gettext("Localhost"); ?></td> |
|
405 |
<td width="78%" class="vtable"> |
|
406 |
<input name="dnslocalhost" type="checkbox" id="dnslocalhost" value="yes" <?php if ($pconfig['dnslocalhost']) echo "checked"; ?> /> |
|
407 |
<br /> |
|
408 |
<?=gettext("By default localhost(127.0.0.1) will be used as the first dns server. ". |
|
409 |
"This option allows to override this setting by not including localhost in the list of dns servers."); ?> |
|
410 |
</td> |
|
411 |
</tr> |
|
412 |
<tr> |
|
413 |
<td colspan="2" class="list" height="12"> </td> |
|
414 |
</tr> |
|
393 | 415 |
<tr> |
394 | 416 |
<td colspan="2" valign="top" class="listtopic"><?=gettext("Gateway Monitoring"); ?></td> |
395 | 417 |
</tr> |
Also available in: Unified diff
Allow disabling having localhost in resolv.conf. There are some special setups that might need this.