[Asterisk-code-review] BuildSystem: Avoid $EUID and use id -u instead. (asterisk[13])
Jenkins2
asteriskteam at digium.com
Thu Jan 18 19:37:45 CST 2018
Jenkins2 has submitted this change and it was merged. ( 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(-)
Approvals:
Joshua Colp: Looks good to me, but someone else must approve
Corey Farrell: Looks good to me, but someone else must approve
Kevin Harwell: Looks good to me, approved
Jenkins2: Approved for Submit
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: merged
Gerrit-Change-Id: Ia6e74f5bc9aab4e6dc62b7439f647b7964e6f657
Gerrit-Change-Number: 7973
Gerrit-PatchSet: 1
Gerrit-Owner: Alexander Traud <pabstraud at compuserve.com>
Gerrit-Reviewer: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180118/751d522c/attachment.html>
More information about the asterisk-code-review
mailing list