From 0380a62c8804dae45b7b6e0d96a93751b351b03f Mon Sep 17 00:00:00 2001 From: ereti <43418802+ereti@users.noreply.github.com> Date: Wed, 3 Nov 2021 00:31:14 +0000 Subject: [PATCH 1/2] Whitespace... --- server/hosts.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/hosts.sh b/server/hosts.sh index 8e6b1179c..f4ff909a7 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\s+localhost.localdomain /' ~/hosts +sed -i "s/${ip}\s+/${ip}\s+${hostname}.localdomain /" ~/hosts cp ~/hosts /etc/hosts rm ~/hosts From 8e4994b0fc2c01f0aca0a437d0ac85728ab1ab58 Mon Sep 17 00:00:00 2001 From: ereti <43418802+ereti@users.noreply.github.com> Date: Wed, 3 Nov 2021 00:32:22 +0000 Subject: [PATCH 2/2] ...is sometimes deceiving --- server/hosts.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/hosts.sh b/server/hosts.sh index f4ff909a7..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\s+/127\.0\.0\.1\s+localhost.localdomain /' ~/hosts -sed -i "s/${ip}\s+/${ip}\s+${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