1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-29 10:18:30 +00:00

Convert ${SU} to ${SU_CMD}. This allows to use sudo instead of su

by defining 'SU_CMD=/usr/local/bin/sudo sh -c'.
Provide an example of using sudo instead of su as well.

Approved by:	kris, des
This commit is contained in:
Max Khon 2003-07-30 08:53:49 +00:00
parent 114db71bc7
commit 358875200d
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=85905

View File

@ -795,7 +795,8 @@ SED?= /usr/bin/sed
SETENV?= /usr/bin/env
SH?= /bin/sh
STRIP_CMD?= /usr/bin/strip
SU?= /usr/bin/su
SU_CMD?= /usr/bin/su root -c
#SU_CMD?= /usr/local/bin/sudo su -c
TAIL?= /usr/bin/tail
TEST?= test # Shell builtin
TR?= /usr/bin/tr
@ -3258,7 +3259,7 @@ ${${target:U}_COOKIE}: ${_${target:U}_DEP} ${_${target:U}_SEQ}
.endif
@echo "===> Switching to root credentials for '${target}' target"
@cd ${.CURDIR} && \
${SU} root -c "${MAKE} ${__softMAKEFLAGS} ${_${target:U}_SUSEQ}"
${SU_CMD} "${MAKE} ${__softMAKEFLAGS} ${_${target:U}_SUSEQ}"
@echo "===> Returning to user credentials"
@${TOUCH} ${TOUCH_FLAGS} ${.TARGET}
.elif defined(USE_SUBMAKE)