Ensure to test if the entry really exist in /etc/hosts.
This commit is contained in:
parent
1e18ddb88e
commit
a48427c412
|
@ -129,7 +129,7 @@ EOF
|
|||
fi
|
||||
|
||||
#### 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 "WRITE TO ${system_hosts}: ${ip} ${username}.${hostname}"
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue