diff --git a/server/hosts.sh b/server/hosts.sh index 8e6b1179c..ccaec18c5 100755 --- a/server/hosts.sh +++ b/server/hosts.sh @@ -5,8 +5,8 @@ ip=$(hostname -i) cp /etc/hosts ~/hosts -sed -i 's/127\.0\.0\.1 /127\.0\.0\.1 localhost.localdomain /' ~/hosts -sed -i "s/${ip} /${ip} ${hostname}.localdomain /" ~/hosts +sed -i 's/127\.0\.0\.1\s+/127\.0\.0\.1 localhost.localdomain /' ~/hosts +sed -i "s/${ip}\s+/${ip} ${hostname}.localdomain /" ~/hosts cp ~/hosts /etc/hosts rm ~/hosts