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

Message ID 20190914164143.4644-1-unixmania@gmail.com
State Accepted
Headers show
Series
  • package/util-linux: create $(TARGET_DIR)/etc/pam.d if necessary
Related show

Commit Message

Carlos Santos Sept. 14, 2019, 4:41 p.m. UTC
From: Carlos Santos <unixmania@gmail.com>

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>
---
 package/util-linux/util-linux.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Thomas Petazzoni Sept. 15, 2019, 12:54 p.m. UTC | #1
On Sat, 14 Sep 2019 13:41:43 -0300
unixmania@gmail.com wrote:

> From: Carlos Santos <unixmania@gmail.com>
> 
> 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>
> ---
>  package/util-linux/util-linux.mk | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Even if not strictly needed, I have changed the second $(INSTALL)
invocation to also pass -D, and applied. Thanks!

Thomas
Peter Korsgaard Sept. 25, 2019, 7:45 p.m. UTC | #2
>>>>> "unixmania" == unixmania  <unixmania@gmail.com> writes:

 > From: Carlos Santos <unixmania@gmail.com>
 > 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>

Committed to 2019.02.x, 2019.05.x and 2019.08.x, thanks.

Patch
diff mbox series

diff --git a/package/util-linux/util-linux.mk b/package/util-linux/util-linux.mk
index 99ec39467f..cd69838046 100644
--- a/package/util-linux/util-linux.mk
+++ b/package/util-linux/util-linux.mk
@@ -236,7 +236,7 @@  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 \
 		$(TARGET_DIR)/etc/pam.d/su-l