summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/base-files
diff options
context:
space:
mode:
authorMark Asselstine <mark.asselstine@windriver.com>2012-09-08 08:42:21 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-09-12 15:13:36 +0100
commit9c2bb6822cd23759fbaf4ef5f05f27cf766f3bfb (patch)
tree4663a5b25b31b2f5ab904dd2b7b0cd8cf6d93902 /meta/recipes-core/base-files
parent03109ba97d83185d11c7f049671efcb28f188e77 (diff)
downloadpoky-9c2bb6822cd23759fbaf4ef5f05f27cf766f3bfb.tar.gz
base-files: provide a mechanism to skip creation of the hostname file
The existence of a /etc/hostname file causes any hostname provided on the kernel command line or via dhcp to be overwritten by the initscripts 'init.d/hostname.sh'. This change allows you to set a value of "" for 'hostname' which will skip the creation of the /etc/hostname file by the base-files package. (From OE-Core rev: 5fd3503d4a438d126f44fe8118e9ea465e7699c2) Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com> Signed-off-by: Jason Wessel <jason.wessel@windriver.com> Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/base-files')
-rw-r--r--meta/recipes-core/base-files/base-files_3.0.14.bb14
1 files changed, 8 insertions, 6 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 6bab040e4f..e80cff1790 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
@@ -1,7 +1,7 @@
1SUMMARY = "Miscellaneous files for the base system." 1SUMMARY = "Miscellaneous files for the base system."
2DESCRIPTION = "The base-files package creates the basic system directory structure and provides a small set of key configuration files for the system." 2DESCRIPTION = "The base-files package creates the basic system directory structure and provides a small set of key configuration files for the system."
3SECTION = "base" 3SECTION = "base"
4PR = "r71" 4PR = "r72"
5LICENSE = "GPLv2" 5LICENSE = "GPLv2"
6LIC_FILES_CHKSUM = "file://licenses/GPL-2;md5=94d55d512a9ba36caa9b7df079bae19f" 6LIC_FILES_CHKSUM = "file://licenses/GPL-2;md5=94d55d512a9ba36caa9b7df079bae19f"
7# Removed all license related tasks in this recipe as license.bbclass 7# Removed all license related tasks in this recipe as license.bbclass
@@ -107,10 +107,12 @@ do_install () {
107} 107}
108 108
109do_install_basefilesissue () { 109do_install_basefilesissue () {
110 if [ -n "${MACHINE}" -a "${hostname}" = "openembedded" ]; then 110 if [ "${hostname}" != "" ]; then
111 echo ${MACHINE} > ${D}${sysconfdir}/hostname 111 if [ -n "${MACHINE}" -a "${hostname}" = "openembedded" ]; then
112 else 112 echo ${MACHINE} > ${D}${sysconfdir}/hostname
113 echo ${hostname} > ${D}${sysconfdir}/hostname 113 else
114 echo ${hostname} > ${D}${sysconfdir}/hostname
115 fi
114 fi 116 fi
115 117
116 install -m 644 ${WORKDIR}/issue* ${D}${sysconfdir} 118 install -m 644 ${WORKDIR}/issue* ${D}${sysconfdir}
@@ -144,5 +146,5 @@ FILES_${PN}-doc = "${docdir} ${datadir}/common-licenses"
144 146
145PACKAGE_ARCH = "${MACHINE_ARCH}" 147PACKAGE_ARCH = "${MACHINE_ARCH}"
146 148
147CONFFILES_${PN} = "${sysconfdir}/fstab ${sysconfdir}/hostname" 149CONFFILES_${PN} = "${sysconfdir}/fstab ${@['', '${sysconfdir}/hostname'][(d.getVar('hostname', True) != '')]}"
148 150