Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/pkg_install don't assume mtree is in BINDIR, allow ...
details: https://anonhg.NetBSD.org/src/rev/cb319ce860f8
branches: trunk
changeset: 552288:cb319ce860f8
user: grant <grant%NetBSD.org@localhost>
date: Tue Sep 23 06:19:45 2003 +0000
description:
don't assume mtree is in BINDIR, allow it to be overridden by
MTREE_CMD.
diffstat:
usr.sbin/pkg_install/add/perform.c | 6 +++---
usr.sbin/pkg_install/lib/lib.h | 10 +++++++++-
2 files changed, 12 insertions(+), 4 deletions(-)
diffs (50 lines):
diff -r 893a4f60c8ce -r cb319ce860f8 usr.sbin/pkg_install/add/perform.c
--- a/usr.sbin/pkg_install/add/perform.c Tue Sep 23 05:39:41 2003 +0000
+++ b/usr.sbin/pkg_install/add/perform.c Tue Sep 23 06:19:45 2003 +0000
@@ -1,11 +1,11 @@
-/* $NetBSD: perform.c,v 1.87 2003/09/08 07:00:10 jlam Exp $ */
+/* $NetBSD: perform.c,v 1.88 2003/09/23 06:19:46 grant Exp $ */
#include <sys/cdefs.h>
#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.87 2003/09/08 07:00:10 jlam Exp $");
+__RCSID("$NetBSD: perform.c,v 1.88 2003/09/23 06:19:46 grant Exp $");
#endif
#endif
@@ -640,7 +640,7 @@
if (Verbose)
printf("mtree -U -f %s -d -e -p %s\n", MTREE_FNAME, p ? p->name : "/");
if (!Fake) {
- if (vsystem("%s/mtree -U -f %s -d -e -p %s", BINDIR, MTREE_FNAME, p ? p->name : "/"))
+ if (vsystem("%s -U -f %s -d -e -p %s", MTREE_CMD, MTREE_FNAME, p ? p->name : "/"))
warnx("mtree returned a non-zero status - continuing");
}
unlink(MTREE_FNAME); /* remove this line to tar up pkg later - HF */
diff -r 893a4f60c8ce -r cb319ce860f8 usr.sbin/pkg_install/lib/lib.h
--- a/usr.sbin/pkg_install/lib/lib.h Tue Sep 23 05:39:41 2003 +0000
+++ b/usr.sbin/pkg_install/lib/lib.h Tue Sep 23 06:19:45 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lib.h,v 1.57 2003/09/17 13:27:42 agc Exp $ */
+/* $NetBSD: lib.h,v 1.58 2003/09/23 06:19:45 grant Exp $ */
/* from FreeBSD Id: lib.h,v 1.25 1997/10/08 07:48:03 charnier Exp */
@@ -89,6 +89,14 @@
#define CHGRP_CMD "chgrp"
#endif
+#ifndef MTREE_CMD
+# ifdef BINDIR
+# define MTREE_CMD BINDIR "/mtree"
+# else
+# define MTREE_CMD "mtree"
+# endif
+#endif
+
/* The names of our "special" files */
#define CONTENTS_FNAME "+CONTENTS"
#define COMMENT_FNAME "+COMMENT"
Home |
Main Index |
Thread Index |
Old Index