Ensure to test if the entry really exist in /etc/hosts.

This commit is contained in:
Jeremy Gardais 2017-12-08 08:49:44 +01:00
parent 1e18ddb88e
commit a48427c412
1 changed files with 1 additions and 1 deletions

View File

@ -129,7 +129,7 @@ EOF
fi fi
#### DÉFINIR LE NOM D'HOTE POUR LE SYSTEME #### #### DÉFINIR LE NOM D'HOTE POUR LE SYSTEME ####
if [[ ! $(grep "${ip}" "${system_hosts}") ]]; then if [[ ! $(grep "${ip} ${username}.${hostname}" "${system_hosts}") ]]; then
echo "${ip} ${username}.${hostname}" >> "${system_hosts}" echo "${ip} ${username}.${hostname}" >> "${system_hosts}"
#echo "WRITE TO ${system_hosts}: ${ip} ${username}.${hostname}" #echo "WRITE TO ${system_hosts}: ${ip} ${username}.${hostname}"
else else