Revision de7d6cb8
Added by Jim Pingle almost 8 years ago
src/etc/inc/system.inc | ||
---|---|---|
583 | 583 |
$hosts_array = system_hosts_entries($dnsmasqcfg); |
584 | 584 |
foreach ($hosts_array as $host) { |
585 | 585 |
$hosts .= "{$host['ipaddr']}\t"; |
586 |
if (!empty($host['name'])) { |
|
587 |
$hosts .= "{$host['name']} "; |
|
586 |
if ($host['name'] == "localhost") { |
|
587 |
$hosts .= "{$host['name']} {$host['fqdn']}"; |
|
588 |
} else { |
|
589 |
$hosts .= "{$host['fqdn']} {$host['name']}"; |
|
588 | 590 |
} |
589 |
$hosts .= "{$host['fqdn']}"; |
|
590 | 591 |
$hosts .= "\n"; |
591 | 592 |
} |
592 | 593 |
unset($hosts_array); |
Also available in: Unified diff
Put the FQDN first in /etc/hosts to make dnsmasq happy when reverse resolving hostnames. Make a special exception for localhost. Fixes #7771
(cherry picked from commit 0e78c2f544ad577234a0a2f87ce2e8caefdfdb77)