nfs-utils_1.3.3.bbappend: Check for CONFIG NFSD in kernel config [YOCIMX-1736] [YOCIMX-1737]

If using systemd and NFSD is not configured in kernel then remove
the unnecessary files to avoid the failure massages at boot.

Signed-off-by: Cristinel Panfir <cristinel.panfir@nxp.com>
This commit is contained in:
Cristinel Panfir 2017-12-08 11:01:33 +02:00
parent 90e5748489
commit 586837c146

View File

@ -0,0 +1,12 @@
do_install_append () {
# If using systemd and NFSD is not configured in kernel then remove
# the unnecessary files to avoid the failure massages at boot.
if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
if [ "$(grep "CONFIG_NFSD" ${STAGING_KERNEL_BUILDDIR}/.config)" != "CONFIG_NFSD=m" ]; then
rm ${D}${sysconfdir}/modules-load.d/nfsd.conf
if [ "$(grep "CONFIG_NFSD" ${STAGING_KERNEL_BUILDDIR}/.config)" != "CONFIG_NFSD=y" ]; then
rm ${D}${systemd_unitdir}/system/sysinit.target.wants/proc-fs-nfsd.mount
fi
fi
fi
}