diff options
author | Darren 'Tadgy' Austin <darren@afterdark.org.uk> | 2021-02-28 21:13:35 +0000 |
---|---|---|
committer | Darren 'Tadgy' Austin <darren@afterdark.org.uk> | 2021-02-28 21:13:35 +0000 |
commit | e3b061d899af3bc38c5b2ae7972a8e80935b97a6 (patch) | |
tree | 98dff8218f9d02f31e00c36f3759e4536c42d38d | |
parent | dd89f423ded06bc7ff3e9be6bda7090d44fd22f4 (diff) | |
download | slacknetsetup-e3b061d899af3bc38c5b2ae7972a8e80935b97a6.tar.xz |
Fix bug where the CIDR mask was included in /etc/hosts.
-rw-r--r-- | netconfig | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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 # ############################################################################ |