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

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


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


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/73/7973/1

diff --git a/Makefile b/Makefile
index e9972af..28245aa 100644
--- a/Makefile
+++ b/Makefile
@@ -625,7 +625,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/7973
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia6e74f5bc9aab4e6dc62b7439f647b7964e6f657
Gerrit-Change-Number: 7973
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/4460209b/attachment.html>


More information about the asterisk-code-review mailing list