summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1996-02-16 11:19:00 +0000
committerjkh <jkh@FreeBSD.org>1996-02-16 11:19:00 +0000
commit5832c17c018c6ad6b10f04077e2792f4839635b2 (patch)
treee19c4605f8e6711a59a15e64643f46fa089a7a9c
parentdc6bd9734f25d3cb33b3c44649decbcaffff28b8 (diff)
downloadFreeBSD-src-5832c17c018c6ad6b10f04077e2792f4839635b2.zip
FreeBSD-src-5832c17c018c6ad6b10f04077e2792f4839635b2.tar.gz
Add a check for when the user tries to FTP over a symlink in ${DISTDIR}.
-rw-r--r--share/mk/bsd.port.mk14
1 files changed, 13 insertions, 1 deletions
diff --git a/share/mk/bsd.port.mk b/share/mk/bsd.port.mk
index 73c47a0..b53db03 100644
--- a/share/mk/bsd.port.mk
+++ b/share/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.191 1996/02/07 09:54:23 asami Exp $
+# $Id: bsd.port.mk,v 1.192 1996/02/08 00:44:33 adam Exp $
#
# Please view me with 4 column tabs!
@@ -488,6 +488,12 @@ do-fetch:
@(cd ${DISTDIR}; \
for file in ${DISTFILES}; do \
if [ ! -f $$file -a ! -f `/usr/bin/basename $$file` ]; then \
+ if [ -h $$file -o -h `/usr/bin/basename $$file` ]; then \
+ ${ECHO_MSG} ">> ${DISTDIR}/$$file is a broken symlink."; \
+ ${ECHO_MSG} ">> Perhaps a filesystem (most likely a CD) isn't mounted?"; \
+ ${ECHO_MSG} ">> Please correct this problem and try again."; \
+ exit 1; \
+ fi ; \
${ECHO_MSG} ">> $$file doesn't seem to exist on this system."; \
for site in ${MASTER_SITES}; do \
${ECHO_MSG} ">> Attempting to fetch from $${site}."; \
@@ -506,6 +512,12 @@ do-fetch:
@(cd ${PATCHDIST}; \
for file in ${PATCHFILES}; do \
if [ ! -f $$file -a ! -f `/usr/bin/basename $$file` ]; then \
+ if [ -h $$file -o -h `/usr/bin/basename $$file` ]; then \
+ ${ECHO_MSG} ">> ${PATCHDIST}/$$file is a broken symlink."; \
+ ${ECHO_MSG} ">> Perhaps a filesystem (most likely a CD) isn't mounted?"; \
+ ${ECHO_MSG} ">> Please correct this problem and try again."; \
+ exit 1; \
+ fi ; \
${ECHO_MSG} ">> $$file doesn't seem to exist on this system."; \
for site in ${PATCH_SITES}; do \
${ECHO_MSG} ">> Attempting to fetch from $${site}."; \
OpenPOWER on IntegriCloud