[OE-core] [PATCH 9/9] base-files: default hostname to localhost

Chen Qi Qi.Chen at windriver.com
Fri Nov 23 02:16:32 UTC 2018


Previously we default hostname to be ${MACHINE}, but there's no entry
in /etc/hosts, and `hostname -f' command fails. So change it to
'localhost'.

Signed-off-by: Chen Qi <Qi.Chen at windriver.com>
---
 meta/recipes-core/base-files/base-files_3.0.14.bb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-core/base-files/base-files_3.0.14.bb b/meta/recipes-core/base-files/base-files_3.0.14.bb
index 6e75652..3a0eb4e 100644
--- a/meta/recipes-core/base-files/base-files_3.0.14.bb
+++ b/meta/recipes-core/base-files/base-files_3.0.14.bb
@@ -60,13 +60,13 @@ conffiles = "${sysconfdir}/debian_version ${sysconfdir}/host.conf \
              ${sysconfdir}/nsswitch.conf ${sysconfdir}/profile \
              ${sysconfdir}/default"
 
-# By default the hostname is the machine name. If the hostname is unset then a
+# By default the hostname is 'localhost'. If the hostname is unset then a
 # /etc/hostname file isn't written, suitable for environments with dynamic
 # hostnames.
 #
 # The hostname can be changed outside of this recipe by using
 # hostname_pn-base-files = "my-host-name".
-hostname = "${MACHINE}"
+hostname = "localhost"
 
 BASEFILESISSUEINSTALL ?= "do_install_basefilesissue"
 
-- 
1.9.1



More information about the Openembedded-core mailing list