From 9b41121078e861ebef38cd8d3659b88d73cb206a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Paul=20H=C3=A4nsch?= Date: Thu, 26 Sep 2019 10:42:10 +0200 Subject: [PATCH] hostname to hosts file correction --- modules/default.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/default.mk b/modules/default.mk index d4c9640..7719ce4 100644 --- a/modules/default.mk +++ b/modules/default.mk @@ -102,7 +102,7 @@ _users: ${CFGROOT} _hostname: ${CFGROOT} printf '%s\n' "$${hostname}" >"$${CFGROOT}/etc/hostname" - sed -Ei "/127.0.0.1/a $${hostname}" "$${CFGROOT}/etc/hosts" + sed -Ei "s;^127\.0\.0\.1.*$$;\1 $${hostname};" "$${CFGROOT}/etc/hosts" ifdef wifi _config: ${CFGROOT}/etc/network/interfaces.d/wifi -- 2.39.2