diff options
author | agc <agc@pkgsrc.org> | 2001-09-12 11:05:12 +0000 |
---|---|---|
committer | agc <agc@pkgsrc.org> | 2001-09-12 11:05:12 +0000 |
commit | fb0b85e623a9f9a161ff0394e5f2ab0ba9bdf178 (patch) | |
tree | adb9ff7bc2b4bc04310471faaa36fb429d5ea1f6 /mail | |
parent | 5d918d6e52f9299515a9d4ec8304ce19c740261c (diff) | |
download | pkgsrc-fb0b85e623a9f9a161ff0394e5f2ab0ba9bdf178.tar.gz |
Use common just-in-time su code from bsd.pkg.mk, rather than homegrown
one.
Diffstat (limited to 'mail')
-rw-r--r-- | mail/majordomo/Makefile | 27 |
1 files changed, 3 insertions, 24 deletions
diff --git a/mail/majordomo/Makefile b/mail/majordomo/Makefile index ee44dc44d17..66a7f8c10bf 100644 --- a/mail/majordomo/Makefile +++ b/mail/majordomo/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.14 2001/06/04 21:46:57 jtb Exp $ +# $NetBSD: Makefile,v 1.15 2001/09/12 11:05:12 agc Exp $ DISTNAME= majordomo-1.94.5 CATEGORIES= mail @@ -63,33 +63,12 @@ require-uid: ${TOUCH} "/tmp/grouptestmajordomo1.$$"; \ if ! ${CHGRP} ${MAJORDOMO_GROUP} \ "/tmp/grouptestmajordomo1.$$" >/dev/null 2>&1; then \ - ${MAKE} ${.MAKEFLAGS} su-require-uid; \ + realtarget="root-require-uid"; \ + ${_SU_TARGET}; \ fi; \ ${RM} -f "/tmp/grouptestmajordomo1.$$"; \ fi -su-require-uid: - ${_PKG_SILENT}${_PKG_DEBUG} \ - if [ `${ID} -u` = 0 ]; then \ - ${MAKE} ${.MAKEFLAGS} root-require-uid; \ - elif [ "X${BATCH}" != X"" ]; then \ - ${ECHO_MSG} "Warning: Batch mode, not superuser, can't create majordomo user."; \ - ${ECHO_MSG} "Become root and try again."; \ - else \ - make=`${TYPE} ${MAKE} | ${AWK} '{ print $$NF }'`; \ - args=""; \ - if [ "X${PKG_DEBUG_LEVEL}" != X"" ]; then \ - args="$$args PKG_DEBUG_LEVEL=${PKG_DEBUG_LEVEL}"; \ - fi; \ - if [ "X${PRE_ROOT_CMD}" != "X${TRUE}" ]; then \ - ${ECHO} "*** WARNING *** Running: ${PRE_ROOT_CMD}"; \ - ${PRE_ROOT_CMD}; \ - fi; \ - ${ECHO_MSG} "===> Becoming root@`/bin/hostname` to create majordomo user."; \ - ${ECHO_MSG} -n "`${ECHO} ${SU_CMD} | ${AWK} '{ print $$1 }'` ";\ - ${SU_CMD} "cd ${.CURDIR}; $$make $$args ${.MAKEFLAGS} root-require-uid"; \ - fi - root-require-uid: @${SH} ${INSTALL_FILE} ${PKGNAME} PRE-INSTALL |