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
|
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
|
||||||
|
|
Loading…
Reference in New Issue