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
This commit is contained in:
Alexander Traud
2018-01-16 13:34:23 +01:00
parent 6f1f16d887
commit a046305fae

View File

@@ -624,7 +624,7 @@ oldmodcheck:
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" ;\