package/util-linux: create $(TARGET_DIR)/etc/pam.d if necessary

Useful for test purposes when we want to install util-linux with a
custom TARGET_DIR, e.g.

    $ make util-linux-reinstall TARGET_DIR=/tmp/util-linux

Signed-off-by: Carlos Santos <unixmania@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
(cherry picked from commit 40af3a6661)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
This commit is contained in:
Carlos Santos 2019-09-14 13:41:43 -03:00 committed by Peter Korsgaard
parent 70c5b3c4ee
commit 658838df1d

View File

@ -232,9 +232,9 @@ endif
# Install PAM configuration files # Install PAM configuration files
ifeq ($(BR2_PACKAGE_UTIL_LINUX_SU)$(BR2_PACKAGE_LINUX_PAM),yy) ifeq ($(BR2_PACKAGE_UTIL_LINUX_SU)$(BR2_PACKAGE_LINUX_PAM),yy)
define UTIL_LINUX_INSTALL_PAMFILES define UTIL_LINUX_INSTALL_PAMFILES
$(INSTALL) -m 0644 package/util-linux/su.pam \ $(INSTALL) -D -m 0644 package/util-linux/su.pam \
$(TARGET_DIR)/etc/pam.d/su $(TARGET_DIR)/etc/pam.d/su
$(INSTALL) -m 0644 package/util-linux/su.pam \ $(INSTALL) -D -m 0644 package/util-linux/su.pam \
$(TARGET_DIR)/etc/pam.d/su-l $(TARGET_DIR)/etc/pam.d/su-l
$(UTIL_LINUX_SELINUX_PAMFILES_TWEAK) $(UTIL_LINUX_SELINUX_PAMFILES_TWEAK)
endef endef