X-Git-Url: https://plomlompom.com/repos/foo.html?a=blobdiff_plain;f=all_new_2018%2Fset_hostname_and_fqdn.sh;h=3f95590bce3b4ff47abeb206cdc60bd36fadabe0;hb=51f9a28f9bd2e65cdaf51062a9586a0f747cf41b;hp=f39a359b551ab7f06055293af65a855a03ba99af;hpb=42a2d6cceef620fc31200b9c4c3fcdde34941306;p=config
diff --git a/all_new_2018/set_hostname_and_fqdn.sh b/all_new_2018/set_hostname_and_fqdn.sh
index f39a359..3f95590 100755
--- a/all_new_2018/set_hostname_and_fqdn.sh
+++ b/all_new_2018/set_hostname_and_fqdn.sh
@@ -18,7 +18,6 @@ if [ "${hostname}" = "" ]; then
echo "Need hostname as argument."
false
fi
-
echo "${hostname}" > /etc/hostname
hostname "${hostname}"
@@ -39,8 +38,8 @@ for ip in $(hostname -I); do
continue
fi
fi
- echo 'SETTING' $ip
final_ip="${ip}"
done
+
echo "127.0.0.1 localhost.localdomain localhost" > /etc/hosts
echo "${final_ip} ${fqdn} ${hostname}" >> /etc/hosts