From: Paul Hänsch Date: Thu, 26 Sep 2019 08:42:10 +0000 (+0200) Subject: hostname to hosts file correction X-Git-Url: https://git.plutz.net/?a=commitdiff_plain;h=9b41121078e861ebef38cd8d3659b88d73cb206a;p=blast hostname to hosts file correction --- 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