summaryrefslogtreecommitdiffstats
path: root/netconfig
diff options
context:
space:
mode:
Diffstat (limited to 'netconfig')
-rw-r--r--netconfig4
1 files changed, 2 insertions, 2 deletions
diff --git a/netconfig b/netconfig
index f7cdc9a..fcb607e 100644
--- a/netconfig
+++ b/netconfig
@@ -305,8 +305,8 @@ chmod 644 $ETCNETWORKS
127.0.0.1 localhost
::1 localhost
EOF
-[ -n "${IPADDRS[0]}" ] && echo -e "${IPADDRS[0]}\t\t$HOSTNM.$DOMAIN $HOSTNM" >>$HOSTS
-[ -n "${IP6ADDRS[0]}" ] && echo -e "${IP6ADDRS[0]}\t\t$HOSTNM.$DOMAIN $HOSTNM" >>$HOSTS
+[ -n "${IPADDRS[0]}" ] && echo -e "${IPADDRS[0]%%/*}\t\t$HOSTNM.$DOMAIN $HOSTNM" >>$HOSTS
+[ -n "${IP6ADDRS[0]}" ] && echo -e "${IP6ADDRS[0]%%/*}\t\t$HOSTNM.$DOMAIN $HOSTNM" >>$HOSTS
chmod 644 $HOSTS
#
############################################################################