summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarren 'Tadgy' Austin <darren@afterdark.org.uk>2020-05-23 21:54:50 +0100
committerDarren 'Tadgy' Austin <darren@afterdark.org.uk>2020-05-23 21:54:50 +0100
commit7096310a858bf6b10afb8e83cd4316cc6908c2fd (patch)
treeb88cd163b59d185b7a6b2ab21db6cd5c92fcd1d8
parent7d8536a1ab1c4e1f5a38c987207dbd119a6455af (diff)
downloadslacknetsetup-7096310a858bf6b10afb8e83cd4316cc6908c2fd.tar.xz
Include the IPv6 address + hostnames in /etc/networks.
-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
#
############################################################################