mirror of
https://git.yoctoproject.org/poky
synced 2026-05-09 05:29:32 +00:00
netbase/base-files: move /etc/hosts from netbase to base-files
Move /etc/hosts to base-files, and also add entry to it according to hostname setting. This fixes the problem of commands like `hostname -f' failing due to lack of such entry. (From OE-Core rev: 31e6d08f20a804fccb958e19045d8f9e9806071a) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -13,6 +13,7 @@ LIC_FILES_CHKSUM = "file://licenses/GPL-2;md5=94d55d512a9ba36caa9b7df079bae19f"
|
||||
SRC_URI = "file://rotation \
|
||||
file://nsswitch.conf \
|
||||
file://motd \
|
||||
file://hosts \
|
||||
file://host.conf \
|
||||
file://profile \
|
||||
file://shells \
|
||||
@@ -113,6 +114,7 @@ do_install () {
|
||||
ln -snf ../run ${D}${localstatedir}/run
|
||||
ln -snf ../run/lock ${D}${localstatedir}/lock
|
||||
|
||||
install -m 0644 ${WORKDIR}/hosts ${D}${sysconfdir}/hosts
|
||||
${BASEFILESISSUEINSTALL}
|
||||
|
||||
rotation=`cat ${WORKDIR}/rotation`
|
||||
@@ -140,6 +142,7 @@ DISTRO_VERSION[vardepsexclude] += "DATE"
|
||||
do_install_basefilesissue () {
|
||||
if [ "${hostname}" ]; then
|
||||
echo ${hostname} > ${D}${sysconfdir}/hostname
|
||||
echo "127.0.1.1 ${hostname}" >> ${D}${sysconfdir}/hosts
|
||||
fi
|
||||
|
||||
install -m 644 ${WORKDIR}/issue* ${D}${sysconfdir}
|
||||
@@ -177,5 +180,5 @@ FILES_${PN}-doc = "${docdir} ${datadir}/common-licenses"
|
||||
|
||||
PACKAGE_ARCH = "${MACHINE_ARCH}"
|
||||
|
||||
CONFFILES_${PN} = "${sysconfdir}/fstab ${@['', '${sysconfdir}/hostname'][(d.getVar('hostname') != '')]} ${sysconfdir}/shells"
|
||||
CONFFILES_${PN} = "${sysconfdir}/fstab ${@['', '${sysconfdir}/hostname ${sysconfdir}/hosts'][(d.getVar('hostname') != '')]} ${sysconfdir}/shells"
|
||||
CONFFILES_${PN} += "${sysconfdir}/motd ${sysconfdir}/nsswitch.conf ${sysconfdir}/profile"
|
||||
|
||||
@@ -7,8 +7,7 @@ LIC_FILES_CHKSUM = "file://debian/copyright;md5=3dd6192d306f582dee7687da3d8748ab
|
||||
PE = "1"
|
||||
|
||||
SRC_URI = "${DEBIAN_MIRROR}/main/n/${BPN}/${BPN}_${PV}.tar.xz \
|
||||
file://netbase-add-rpcbind-as-an-alias-to-sunrpc.patch \
|
||||
file://hosts"
|
||||
file://netbase-add-rpcbind-as-an-alias-to-sunrpc.patch"
|
||||
|
||||
SRC_URI[md5sum] = "15f2d9b3783802f7f48f6734b6540ac4"
|
||||
SRC_URI[sha256sum] = "309bddc69a43b98e5a450992b70cdfc0e3d1afb9107bc631d04b0714be98f88b"
|
||||
@@ -16,10 +15,7 @@ SRC_URI[sha256sum] = "309bddc69a43b98e5a450992b70cdfc0e3d1afb9107bc631d04b0714be
|
||||
UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/n/netbase/"
|
||||
do_install () {
|
||||
install -d ${D}/${mandir}/man8 ${D}${sysconfdir}
|
||||
install -m 0644 ${WORKDIR}/hosts ${D}${sysconfdir}/hosts
|
||||
install -m 0644 etc-rpc ${D}${sysconfdir}/rpc
|
||||
install -m 0644 etc-protocols ${D}${sysconfdir}/protocols
|
||||
install -m 0644 etc-services ${D}${sysconfdir}/services
|
||||
}
|
||||
|
||||
CONFFILES_${PN} = "${sysconfdir}/hosts"
|
||||
|
||||
Reference in New Issue
Block a user