On Sun, Oct 04, 2020 at 05:50:17PM +0200, Marco d'Itri wrote: > On Sep 09, Antonio Terceiro <terce...@debian.org> wrote: > > > Systems installed by d-i get such an entry, but chroots created with > This is a bit questionable, because non-toy systems already have their > name in the DNS and hence using 127.0.1.1 will be wrong. > A better solution would be to have d-i install libnss-myhostname. > > > The attached patch makes /etc/hosts in chroots consistent with the one > > in systems installed by d-i. > I am not sure if this is a good idea: often the systems created by > debootstrap are actually intended to be booted somehwere else, and then > using the host system hostname will be wrong. > Hence this workaround would only be needed if all these conditions are > true: > - the installed system is intended to be used with chroot on the system > where it was built > - the host system hostname is not in the DNS > - libnss-myhostname has not been installed
Good points. I thought that netbase was the place to fix this issue, but maybe it's not. OTOH fixing this elsewhere spreads the handling of /etc/hosts to yet another place.
signature.asc
Description: PGP signature