summaryrefslogtreecommitdiffstats
path: root/src/etc
diff options
context:
space:
mode:
Diffstat (limited to 'src/etc')
-rw-r--r--src/etc/inc/system.inc7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/etc/inc/system.inc b/src/etc/inc/system.inc
index b6b1444..295641d 100644
--- a/src/etc/inc/system.inc
+++ b/src/etc/inc/system.inc
@@ -549,10 +549,11 @@ function system_hosts_generate() {
$hosts_array = system_hosts_entries($dnsmasqcfg);
foreach ($hosts_array as $host) {
$hosts .= "{$host['ipaddr']}\t";
- if (!empty($host['name'])) {
- $hosts .= "{$host['name']} ";
+ if ($host['name'] == "localhost") {
+ $hosts .= "{$host['name']} {$host['fqdn']}";
+ } else {
+ $hosts .= "{$host['fqdn']} {$host['name']}";
}
- $hosts .= "{$host['fqdn']}";
$hosts .= "\n";
}
unset($hosts_array);
OpenPOWER on IntegriCloud