diff --git a/usr.sbin/pkg_install/Makefile.inc b/usr.sbin/pkg_install/Makefile.inc index 00c44ca5cfe8..46d7443141cc 100644 --- a/usr.sbin/pkg_install/Makefile.inc +++ b/usr.sbin/pkg_install/Makefile.inc @@ -1,9 +1,9 @@ -# $NetBSD: Makefile.inc,v 1.5 1997/10/25 06:58:29 lukem Exp $ +# $NetBSD: Makefile.inc,v 1.6 1999/08/19 14:37:36 agc Exp $ # Original from Freebsd, no rcs id. LIBINSTALL != cd ${.CURDIR}/../lib;\ printf "xxx: .MAKE\n\t@echo \$${.OBJDIR}\n" | ${MAKE} -s -f- -CPPFLAGS+=-I${.CURDIR}/../lib ${DEBUG} +CPPFLAGS+=-I${.CURDIR}/../lib ${DEBUG} -DBINDIR='"${BINDIR}"' DPADD+= ${LIBINSTALL}/libinstall.a LDADD+= -L${LIBINSTALL} -linstall diff --git a/usr.sbin/pkg_install/add/perform.c b/usr.sbin/pkg_install/add/perform.c index 3fc321c4337f..c4db7553e074 100644 --- a/usr.sbin/pkg_install/add/perform.c +++ b/usr.sbin/pkg_install/add/perform.c @@ -1,11 +1,11 @@ -/* $NetBSD: perform.c,v 1.35 1999/08/19 14:12:34 agc Exp $ */ +/* $NetBSD: perform.c,v 1.36 1999/08/19 14:37:37 agc Exp $ */ #include #ifndef lint #if 0 static const char *rcsid = "from FreeBSD Id: perform.c,v 1.44 1997/10/13 15:03:46 jkh Exp"; #else -__RCSID("$NetBSD: perform.c,v 1.35 1999/08/19 14:12:34 agc Exp $"); +__RCSID("$NetBSD: perform.c,v 1.36 1999/08/19 14:37:37 agc Exp $"); #endif #endif @@ -327,7 +327,8 @@ pkg_do(char *pkg) if (cp) { if (Verbose) printf("Loading it from %s.\n", cp); - if (vsystem("/usr/sbin/pkg_add %s%s %s%s", + if (vsystem("%s/pkg_add %s%s %s%s", + BINDIR, Prefix ? "-p " : "", Prefix ? Prefix : "", Verbose ? "-v " : "", cp)) { @@ -441,7 +442,7 @@ pkg_do(char *pkg) if (Verbose) printf("mtree -U -f %s -d -e -p %s\n", MTREE_FNAME, p ? p->name : "/"); if (!Fake) { - if (vsystem("/usr/sbin/mtree -U -f %s -d -e -p %s", MTREE_FNAME, p ? p->name : "/")) + if (vsystem("%s/mtree -U -f %s -d -e -p %s", BINDIR, MTREE_FNAME, p ? p->name : "/")) warnx("mtree returned a non-zero status - continuing"); } unlink(MTREE_FNAME);