diff mbox series

postgresql: make sure pam conf installed when pam enabled

Message ID 20220829085629.816811-1-mingli.yu@windriver.com
State Under Review
Headers show
Series postgresql: make sure pam conf installed when pam enabled | expand

Commit Message

Yu, Mingli Aug. 29, 2022, 8:56 a.m. UTC
From: Mingli Yu <mingli.yu@windriver.com>

Update the pam check logic to make sure pam conf installed.

Before the patch:
root@intel-x86-64:~# rpm -ql postgresql | grep pam.d | grep postgresql
root@intel-x86-64:~#

After the patch:
root@intel-x86-64:~# rpm -ql postgresql | grep pam.d | grep postgresql
/etc/pam.d/postgresql
root@intel-x86-64:~#

Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
---
 meta-oe/recipes-dbs/postgresql/postgresql.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/meta-oe/recipes-dbs/postgresql/postgresql.inc b/meta-oe/recipes-dbs/postgresql/postgresql.inc
index bef33e6bb..60d44ce97 100644
--- a/meta-oe/recipes-dbs/postgresql/postgresql.inc
+++ b/meta-oe/recipes-dbs/postgresql/postgresql.inc
@@ -205,7 +205,7 @@  do_install:append() {
     # multiple server config directory
     install -d -m 700 ${D}${sysconfdir}/default/${BPN}
 
-    if [ "${@d.getVar('enable_pam')}" = "pam" ]; then
+    if ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'true', 'false', d)}; then
         install -d ${D}${sysconfdir}/pam.d
         install -m 644 ${WORKDIR}/postgresql.pam ${D}${sysconfdir}/pam.d/postgresql
     fi