diff options
author | erh <erh> | 2003-12-03 18:25:05 +0000 |
---|---|---|
committer | erh <erh> | 2003-12-03 18:25:05 +0000 |
commit | 61a7051a238995a2f7020064b12f783c58b5cd14 (patch) | |
tree | 475aedcc43dda6239cebd74b591709e56bf921d3 /mk | |
parent | 2e08ae17b1f84ae6a2b0b710f0925481a2b8c6e0 (diff) | |
download | pkgsrc-61a7051a238995a2f7020064b12f783c58b5cd14.tar.gz |
Pay attention to the setting of $ROOT_USER when checking whether we're root.
Diffstat (limited to 'mk')
-rw-r--r-- | mk/bsd.pkg.mk | 6 |
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}."; \ |