]> git.plutz.net Git - blast/blobdiff - modules/default.mk
write hostname to hosts file, in particular to prevent sudo warnings
[blast] / 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