Op 7 sep. 2012, om 23:51 heeft Mark Hatle <[email protected]> het volgende geschreven:
> From: Mark Asselstine <[email protected]> > > 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. > > Signed-off-by: Mark Asselstine <[email protected]> > Signed-off-by: Jason Wessel <[email protected]> > Signed-off-by: Mark Hatle <[email protected]> > --- > meta/recipes-core/base-files/base-files_3.0.14.bb | 12 +++++++----- > 1 files changed, 7 insertions(+), 5 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 6bab040..cda13f4 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 > @@ -107,10 +107,12 @@ do_install () { > } > > do_install_basefilesissue () { > - if [ -n "${MACHINE}" -a "${hostname}" = "openembedded" ]; then > - echo ${MACHINE} > ${D}${sysconfdir}/hostname > - else > - echo ${hostname} > ${D}${sysconfdir}/hostname > + if [ "${hostname}" != "" ]; then > + if [ -n "${MACHINE}" -a "${hostname}" = "openembedded" ]; then > + echo ${MACHINE} > ${D}${sysconfdir}/hostname > + else > + echo ${hostname} > ${D}${sysconfdir}/hostname > + fi > fi > > install -m 644 ${WORKDIR}/issue* ${D}${sysconfdir} > @@ -144,5 +146,5 @@ FILES_${PN}-doc = "${docdir} ${datadir}/common-licenses" > > PACKAGE_ARCH = "${MACHINE_ARCH}" > > -CONFFILES_${PN} = "${sysconfdir}/fstab ${sysconfdir}/hostname" > +CONFFILES_${PN} = "${sysconfdir}/fstab ${@['', > '${sysconfdir}/hostname'][(d.getVar('hostname', True) != '')]}" MIssing PR bump _______________________________________________ Openembedded-core mailing list [email protected] http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
