Skip to contentSkip to conversation

Why hostname is not in /etc/hosts?

DISCUSSION Marcin Juszkiewicz 1 participant 1 message Nov 28, 2012

lore
Share & tools
lore
#0 lore raw

When I start Apache on my target I get this:

AH00557: httpd: apr_sockaddr_info_get() failed for genericarmv8
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message

Solution is "echo '127.0.0.1 genericarmv8' >>/etc/hosts" but this is not what I would like to have to do on each first boot.

I looked more and found that /etc/hostname is set in base-files (package_arch:machine) while /etc/hosts is in netbase (package_arch:$arch (while package_arch:all would be enough)).

One solution which comes to my mind is to add $MACHINE entry in netbase and make it p_arch:$MACHINE.

Other is do that in postinst but this will generate more work as upgrade paths should not be broken.

Any other ideas?