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

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


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


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/72/7972/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/7972
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia6e74f5bc9aab4e6dc62b7439f647b7964e6f657
Gerrit-Change-Number: 7972
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/9cdd8654/attachment-0001.html>


More information about the asterisk-code-review mailing list