package/util-linux: create $(TARGET_DIR)/etc/pam.d if necessary
authorCarlos Santos <unixmania@gmail.com>
Sat, 14 Sep 2019 16:41:43 +0000 (13:41 -0300)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Sun, 15 Sep 2019 12:41:44 +0000 (14:41 +0200)
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>
package/util-linux/util-linux.mk

index 99ec39467f0d8532c78fd82acd2fa4ac40f60561..6daca6b5e6bd3b31b3391b909a9c610a939049e3 100644 (file)
@@ -236,9 +236,9 @@ endif
 # Install PAM configuration files
 ifeq ($(BR2_PACKAGE_UTIL_LINUX_SU)$(BR2_PACKAGE_LINUX_PAM),yy)
 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
-       $(INSTALL) -m 0644 package/util-linux/su.pam \
+       $(INSTALL) -D -m 0644 package/util-linux/su.pam \
                $(TARGET_DIR)/etc/pam.d/su-l
        $(UTIL_LINUX_SELINUX_PAMFILES_TWEAK)
 endef