From: Paul Hänsch Date: Wed, 25 Sep 2019 20:14:00 +0000 (+0200) Subject: write hostname to hosts file, in particular to prevent sudo warnings X-Git-Url: http://git.plutz.net/?p=blast;a=commitdiff_plain;h=ecd120fe86c59f4104a72c4869b2e9efd829c67d write hostname to hosts file, in particular to prevent sudo warnings --- diff --git a/modules/default.mk b/modules/default.mk index 6a1907a..d4c9640 100644 --- a/modules/default.mk +++ b/modules/default.mk @@ -102,6 +102,7 @@ _users: ${CFGROOT} _hostname: ${CFGROOT} printf '%s\n' "$${hostname}" >"$${CFGROOT}/etc/hostname" + sed -Ei "/127.0.0.1/a $${hostname}" "$${CFGROOT}/etc/hosts" ifdef wifi _config: ${CFGROOT}/etc/network/interfaces.d/wifi