summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorerh <erh@pkgsrc.org>2003-12-03 18:25:05 +0000
committererh <erh@pkgsrc.org>2003-12-03 18:25:05 +0000
commitb43041a271d74b4408839ffcbe4d35f9ad206be8 (patch)
tree475aedcc43dda6239cebd74b591709e56bf921d3
parent5522ce89d047592beafd68cb02ed40c478e336fb (diff)
downloadpkgsrc-b43041a271d74b4408839ffcbe4d35f9ad206be8.tar.gz
Pay attention to the setting of $ROOT_USER when checking whether we're root.
-rw-r--r--mk/bsd.pkg.mk6
1 files changed, 3 insertions, 3 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk
index cfb0a32fd48..bfcf3e6db3b 100644
--- a/mk/bsd.pkg.mk
+++ b/mk/bsd.pkg.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.mk,v 1.1309 2003/12/03 18:13:28 erh Exp $
+# $NetBSD: bsd.pkg.mk,v 1.1310 2003/12/03 18:25:05 erh Exp $
#
# This file is in the public domain.
#
@@ -2568,7 +2568,7 @@ real-su-install: ${MESSAGE}
done
.endif # INSTALLATION_DIRS
.if !defined(NO_MTREE)
- ${_PKG_SILENT}${_PKG_DEBUG}if [ `${ID} -u` = 0 ]; then \
+ ${_PKG_SILENT}${_PKG_DEBUG}if [ `${ID} -u` = `${ID} -u ${ROOT_USER}` ]; then \
if [ ! -f ${MTREE_FILE} ]; then \
${ECHO_MSG} "Error: mtree file \"${MTREE_FILE}\" is missing."; \
exit 1; \
@@ -3177,7 +3177,7 @@ real-replace: do-su-replace
real-undo-replace: do-su-undo-replace
_SU_TARGET= \
- if [ `${ID} -u` = 0 ]; then \
+ if [ `${ID} -u` = `${ID} -u ${ROOT_USER}` ]; then \
${MAKE} ${MAKEFLAGS} $$realtarget; \
elif [ "X${BATCH}" != X"" ]; then \
${ECHO_MSG} "Warning: Batch mode, not superuser, can't run $$action for ${PKGNAME}."; \