pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mk Pay attention to the setting of $ROOT_USER when che...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/103fbe5caf16
branches:  trunk
changeset: 464051:103fbe5caf16
user:      erh <erh%pkgsrc.org@localhost>
date:      Wed Dec 03 18:25:05 2003 +0000

description:
Pay attention to the setting of $ROOT_USER when checking whether we're root.

diffstat:

 mk/bsd.pkg.mk |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 9a18effa6ca7 -r 103fbe5caf16 mk/bsd.pkg.mk
--- a/mk/bsd.pkg.mk     Wed Dec 03 18:13:28 2003 +0000
+++ b/mk/bsd.pkg.mk     Wed Dec 03 18:25:05 2003 +0000
@@ -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 @@
        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-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}."; \



Home | Main Index | Thread Index | Old Index