@@ -10,6 +10,9 @@ SECTION = "base"
LICENSE = "LGPL-2.1-only"
DEPENDS = "sqlite3 attr"
+#Set PW_SUBDIR to pwdb to get passwd files in /etc/pwdb
+PW_SUBDIR ?= ""
+
FILES:${PN} = "${prefix}/lib/pseudo/lib*/libpseudo.so ${bindir}/* ${localstatedir}/pseudo ${prefix}/var/pseudo"
INSANE_SKIP:${PN} += "libdir"
INSANE_SKIP:${PN}-dbg += "libdir"
@@ -131,10 +134,12 @@ do_install () {
do_install:append:class-native () {
chrpath ${D}${bindir}/pseudo -r `chrpath ${D}${bindir}/pseudo | cut -d = -f 2 | sed s/XORIGIN/\\$ORIGIN/`
- install -d ${D}${sysconfdir}
+ install -d ${D}${sysconfdir}/${PW_SUBDIR}
# The fallback files should never be modified
- install -m 444 ${WORKDIR}/fallback-passwd ${D}${sysconfdir}/passwd
- install -m 444 ${WORKDIR}/fallback-group ${D}${sysconfdir}/group
+ install -m 444 ${WORKDIR}/fallback-passwd ${D}${sysconfdir}/${PW_SUBDIR}/passwd
+ [ -n "${PW_SUBDIR}" ] && ln -fs ${PW_SUBDIR}/passwd ${D}${sysconfdir}/passwd
+ install -m 444 ${WORKDIR}/fallback-group ${D}${sysconfdir}/${PW_SUBDIR}/group
+ [ -n "${PW_SUBDIR}" ] && ln -fs ${PW_SUBDIR}/group ${D}${sysconfdir}/group
# Two native/nativesdk entries below are the same
# If necessary install for the alternative machine arch. This is only
Add support for creating passwd files in a /etc subdir Set PW_SUBIR to pwdb to get passwd files in /etc/pwdb Signed-off-by: Joakim Tjernlund <joakim.tjernlund@infinera.com> --- meta/recipes-devtools/pseudo/pseudo.inc | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-)