Duplicated entry in /etc/hosts
This commit is contained in:
parent
4181356aa1
commit
cf0011c11c
|
@ -4396,8 +4396,11 @@ function set_your_domain_name {
|
|||
fi
|
||||
echo "$DEFAULT_DOMAIN_NAME" > /etc/hostname
|
||||
hostname $DEFAULT_DOMAIN_NAME
|
||||
if grep -q "127.0.1.1" /etc/hosts; then
|
||||
sed -i "s/127.0.1.1.*/127.0.1.1 $DEFAULT_DOMAIN_NAME/g" /etc/hosts
|
||||
else
|
||||
echo "127.0.1.1 $DEFAULT_DOMAIN_NAME" >> /etc/hosts
|
||||
fi
|
||||
echo 'set_your_domain_name' >> $COMPLETION_FILE
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue