@@ -129,7 +129,8 @@ FILES:${PN}-runuser = "${sysconfdir}/pam.d/runuser*"
FILES:${PN}-su = "${sysconfdir}/pam.d/su-l"
CONFFILES:${PN}-su = "${sysconfdir}/pam.d/su-l"
FILES:${PN}-lastlog2 += "${base_libdir}/security/pam_lastlog2.so \
- ${nonarch_libdir}/tmpfiles.d/lastlog2.conf"
+ ${nonarch_libdir}/tmpfiles.d/lastlog2.conf \
+ ${sysconfdir}/default/volatiles/99_lastlog2"
FILES:${PN}-pylibmount = "${PYTHON_SITEPACKAGES_DIR}/libmount/pylibmount.so \
${PYTHON_SITEPACKAGES_DIR}/libmount/__init__.* \
${PYTHON_SITEPACKAGES_DIR}/libmount/__pycache__/*"
@@ -222,6 +223,12 @@ do_install:append:class-target () {
install -m 0644 ${S}/misc-utils/lastlog2-tmpfiles.conf.in \
${D}${nonarch_libdir}/tmpfiles.d/lastlog2.conf
fi
+
+ if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
+ install -d ${D}${sysconfdir}/default/volatiles
+ echo "d root root 0755 /var/lib/lastlog none" \
+ > ${D}${sysconfdir}/default/volatiles/99_lastlog2
+ fi
fi
}
# nologin causes a conflict with shadow-native
Add volatile file for lastlog2 to fix runtime error with sysvinit: $ lastlog2 lastlog2: Couldn't read entries for all users lastlog2: Cannot open database (/var/lib/lastlog/lastlog2.db): unable to open database file Signed-off-by: Yi Zhao <yi.zhao@windriver.com> --- meta/recipes-core/util-linux/util-linux_2.40.2.bb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)