[Asterisk-code-review] BuildSystem: Avoid $EUID and use id -u instead. (asterisk[15])

Alexander Traud asteriskteam at digium.com
Tue Jan 16 06:36:43 CST 2018


Alexander Traud has uploaded this change for review. ( https://gerrit.asterisk.org/7974


Change subject: BuildSystem: Avoid $EUID and use id -u instead.
......................................................................

BuildSystem: Avoid $EUID and use id -u instead.

Makefile included a call to ${EUID} which requires the shell bash. To keep
compatibility with other shells like dash or ksh, use id -u instead.

ASTERISK-27589

Change-Id: Ia6e74f5bc9aab4e6dc62b7439f647b7964e6f657
---
M Makefile
1 file changed, 1 insertion(+), 1 deletion(-)



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/74/7974/1

diff --git a/Makefile b/Makefile
index afd50c3..6bc63a1 100644
--- a/Makefile
+++ b/Makefile
@@ -624,7 +624,7 @@
 ld-cache-update:
 ifneq ($(LDCONFIG),)
 ifeq ($(DESTDIR),)  # DESTDIR means binary archive creation; ldconfig should be run on postinst
-	@if [ $${EUID} -eq 0 ] ; then \
+	@if [ $$(id -u) -eq 0 ] ; then \
 		$(LDCONFIG) "$(ASTLIBDIR)/" ; \
 	else \
 		echo " WARNING WARNING WARNING" ;\

-- 
To view, visit https://gerrit.asterisk.org/7974
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 15
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia6e74f5bc9aab4e6dc62b7439f647b7964e6f657
Gerrit-Change-Number: 7974
Gerrit-PatchSet: 1
Gerrit-Owner: Alexander Traud <pabstraud at compuserve.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180116/b3b85d11/attachment.html>


More information about the asterisk-code-review mailing list