summaryrefslogtreecommitdiff
path: root/Mk
diff options
context:
space:
mode:
authorSatoshi Asami <asami@FreeBSD.org>1995-06-26 00:30:48 +0000
committerSatoshi Asami <asami@FreeBSD.org>1995-06-26 00:30:48 +0000
commit35f8d33b122ba02a520352ca23c6e9f837fc8a41 (patch)
treef562a28f08fdba493d5420ad6301e17a1eb955b5 /Mk
parentUpdated to version 2.1.7 (diff)
Check if uid is 0 before running mtree. If you aren't root, you just
get a message (instead of a bunch of crap from mtree).
Notes
Notes: svn path=/head/; revision=1882
Diffstat (limited to 'Mk')
-rw-r--r--Mk/bsd.port.mk9
1 files changed, 7 insertions, 2 deletions
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk
index d75bc11187a7..d12e5e06b89c 100644
--- a/Mk/bsd.port.mk
+++ b/Mk/bsd.port.mk
@@ -3,7 +3,7 @@
# bsd.port.mk - 940820 Jordan K. Hubbard.
# This file is in the public domain.
#
-# $Id: bsd.port.mk,v 1.166 1995/06/24 10:27:23 asami Exp $
+# $Id: bsd.port.mk,v 1.167 1995/06/25 06:30:51 asami Exp $
#
# Please view me with 4 column tabs!
@@ -775,7 +775,12 @@ install: build ${INSTALL_COOKIE}
${INSTALL_COOKIE}:
@${ECHO_MSG} "===> Installing for ${PKGNAME}"
.if !defined(NO_MTREE)
- @${MTREE_CMD} ${MTREE_ARGS} ${PREFIX}/;
+ @if [ `id -u` = 0 ]; then \
+ ${MTREE_CMD} ${MTREE_ARGS} ${PREFIX}/; \
+ else \
+ echo "Warning: not superuser, can't run mtree."; \
+ echo "Become root and try again to ensure correct permissions."; \
+ fi
.endif
.if target(pre-install)
@${MAKE} ${.MAKEFLAGS} pre-install