From 68a790b569ddfafe3171c7afedcc59e1f676ca82 Mon Sep 17 00:00:00 2001 From: Itxaka Date: Tue, 15 Oct 2024 10:48:29 +0200 Subject: [PATCH] Fix host add wrongly checking for execution (#1113) --- packages/static/kairos-overlay-files/collection.yaml | 2 +- .../kairos-overlay-files/files/system/oem/31_hosts.yaml | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/static/kairos-overlay-files/collection.yaml b/packages/static/kairos-overlay-files/collection.yaml index a969535..752ed6c 100644 --- a/packages/static/kairos-overlay-files/collection.yaml +++ b/packages/static/kairos-overlay-files/collection.yaml @@ -1,4 +1,4 @@ packages: - name: "kairos-overlay-files" category: "static" - version: "1.3.3" + version: "1.3.4" diff --git a/packages/static/kairos-overlay-files/files/system/oem/31_hosts.yaml b/packages/static/kairos-overlay-files/files/system/oem/31_hosts.yaml index 3cbddaa..49dc0f3 100644 --- a/packages/static/kairos-overlay-files/files/system/oem/31_hosts.yaml +++ b/packages/static/kairos-overlay-files/files/system/oem/31_hosts.yaml @@ -4,8 +4,7 @@ stages: # is populated when running the configuration. For those cases we insert a record so it can be # manipulated later on by yip's hostname plugin # Read more: https://wiki.debian.org/ConfigPackages - - name: "Make sure hosts file is present and includes a record for 127.0.0.1" - if: | - ! [[ -f /etc/hosts ]] || ! [[ $(grep '127.0.0.1' /etc/hosts) ]] + - name: "Make sure hosts file includes a record for localhost" + if: "! grep -q 'localhost' /etc/hosts" commands: - echo '127.0.0.1\tlocalhost' >> /etc/hosts