Avoid hardcoding /usr/bin/ftp in the pkg_add binary.

Fixes provided by Stoned Elipot <seb@script.jussieu.fr> in PR 17323
This commit is contained in:
agc 2002-06-21 14:49:40 +00:00
parent e78903dcee
commit 2d3a1701d3
3 changed files with 19 additions and 6 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile.inc,v 1.17 2002/06/10 09:14:26 yamt Exp $
# $NetBSD: Makefile.inc,v 1.18 2002/06/21 14:49:40 agc Exp $
# Original from FreeBSD, no rcs id.
.include <bsd.own.mk>
@ -22,11 +22,14 @@ CHOWN?= /usr/sbin/chown
CHGRP?= /usr/bin/chgrp
WARNS=2
.elif ${OPSYS} == "SunOS"
LOCALBASE?= /usr/local
LOCALBASE?= /usr/pkg
TAR_CMD?= tar
FTP_CMD?= tar
ZOULARISBASE?= ${LOCALBASE}/bsd
TAR_FULLPATHNAME?= ${ZOULARISBASE}/bin/${TAR_CMD}
FTP_FULLPATHNAME?= ${ZOULARISBASE}/bin/${FTP_CMD}
CPPFLAGS+=-DTAR_CMD='"${TAR_CMD}"' -DTAR_FULLPATHNAME='"${TAR_FULLPATHNAME}"'
CPPFLAGS+=-DFTP_CMD='"${FTP_CMD}"' -DFTP_FULLPATHNAME='"${FTP_FULLPATHNAME}"'
BINDIR=${ZOULARISBASE}/bin
CHMOD?= /usr/bin/chmod
CHOWN?= /usr/bin/chown

View File

@ -1,8 +1,8 @@
/* $NetBSD: ftpio.c,v 1.37 2002/06/10 09:14:28 yamt Exp $ */
/* $NetBSD: ftpio.c,v 1.38 2002/06/21 14:49:41 agc Exp $ */
#include <sys/cdefs.h>
#ifndef lint
__RCSID("$NetBSD: ftpio.c,v 1.37 2002/06/10 09:14:28 yamt Exp $");
__RCSID("$NetBSD: ftpio.c,v 1.38 2002/06/21 14:49:41 agc Exp $");
#endif
/*
@ -297,7 +297,7 @@ setupCoproc(const char *base)
if (Verbose)
fprintf(stderr, "ftp -detv %s\n", base);
rc1 = execl("/usr/bin/ftp", "ftp", "-detv", base, NULL);
rc1 = execl(FTP_FULLPATHNAME, FTP_CMD, "-detv", base, NULL);
warn("setupCoproc: execl() failed");
exit(1);
break;

View File

@ -1,4 +1,4 @@
/* $NetBSD: lib.h,v 1.41 2002/06/10 09:14:28 yamt Exp $ */
/* $NetBSD: lib.h,v 1.42 2002/06/21 14:49:41 agc Exp $ */
/* from FreeBSD Id: lib.h,v 1.25 1997/10/08 07:48:03 charnier Exp */
@ -66,6 +66,16 @@
#define TAR_FULLPATHNAME "/usr/bin/tar"
#endif
/* Define ftp as a string, in case the ftp client is called something else */
#ifndef FTP_CMD
#define FTP_CMD "ftp"
#endif
/* Full path name of FTP_CMD */
#ifndef FTP_FULLPATHNAME
#define FTP_FULLPATHNAME "/usr/bin/ftp"
#endif
/* Where we put logging information by default, else ${PKG_DBDIR} if set */
#ifndef DEF_LOG_DIR
#define DEF_LOG_DIR "/var/db/pkg"