So that sysvinit images don't warn on every login only add it to common-session
if systemd is a DISTRO_FEATURE.
[ YOCTO #3805 ]
(From OE-Core rev:
3ccb0855a7a6b147e5025855c6376747ba72986a)
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
session required pam_permit.so
# and here are more per-package modules (the "Additional" block)
session required pam_unix.so
-# Register with logind to make screen/tmux/etc work
-session optional pam_systemd.so
# The lsb requires unix_chkpwd has setuid permission
chmod 4755 ${D}${sbindir}/unix_chkpwd
+
+ if ${@base_contains('DISTRO_FEATURES','systemd','true','false',d)}; then
+ echo "session optional pam_systemd.so" >> ${D}${sysconfdir}/pam.d/common-session
+ fi
}
python do_pam_sanity () {