]> git.plutz.net Git - blast/commitdiff
write hostname to hosts file, in particular to prevent sudo warnings
authorPaul Hänsch <paul@plutz.net>
Wed, 25 Sep 2019 20:14:00 +0000 (22:14 +0200)
committerPaul Hänsch <paul@plutz.net>
Wed, 25 Sep 2019 20:14:00 +0000 (22:14 +0200)
modules/default.mk

index 6a1907a93cb6eaec01a4c278f4d69b3448bc4ff9..d4c9640e5a15642053de226431e53a0e333d7add 100644 (file)
@@ -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