summaryrefslogtreecommitdiffstats
path: root/netconfig
diff options
context:
space:
mode:
Diffstat (limited to 'netconfig')
-rw-r--r--netconfig6
1 files changed, 2 insertions, 4 deletions
diff --git a/netconfig b/netconfig
index f125455..f314c4e 100644
--- a/netconfig
+++ b/netconfig
@@ -318,11 +318,9 @@ chmod 644 $ETCNETWORKS
# For loopbacking.
127.0.0.1 localhost
::1 localhost
-$IPADDR $HOSTNM.$DOMAIN $HOSTNM
-
-# End of hosts.
-
EOF
+[ -n "$IPADDR" ] && echo -e "$IPADDR\t\t$HOSTNM.$DOMAIN $HOSTNM" >>$HOSTS
+[ -n "$IPADDR6" ] && echo -e "$IPADDR6\t\t$HOSTNM.$DOMAIN $HOSTNM" >>$HOSTS
chmod 644 $HOSTS
#
############################################################################