summaryrefslogtreecommitdiffstats
path: root/release/sysinstall/package.c
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1995-10-18 00:12:55 +0000
committerjkh <jkh@FreeBSD.org>1995-10-18 00:12:55 +0000
commit858000205b94eb93e362e0df9c79b8a8c96e5e9a (patch)
tree588619f5829503b9d60bea3a9c5368aa0356eaae /release/sysinstall/package.c
parent7309d9d4a4fc7b9630ea8fc33558f26d44058316 (diff)
downloadFreeBSD-src-858000205b94eb93e362e0df9c79b8a8c96e5e9a.zip
FreeBSD-src-858000205b94eb93e362e0df9c79b8a8c96e5e9a.tar.gz
Almost snapshot time..
Merge today's work. Now support an attributes file loaded at startup (true front-loaded install). Add fuller debugging support to all device I/O routines. Lots-o-bug fixes.
Diffstat (limited to 'release/sysinstall/package.c')
-rw-r--r--release/sysinstall/package.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/release/sysinstall/package.c b/release/sysinstall/package.c
index f1cd085..5fe2f20 100644
--- a/release/sysinstall/package.c
+++ b/release/sysinstall/package.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: package.c,v 1.1 1995/10/15 12:41:05 jkh Exp $
+ * $Id: package.c,v 1.2 1995/10/16 15:14:21 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -62,20 +62,22 @@ package_extract(Device *dev, char *name)
int i, fd, ret;
/* Check to make sure it's not already there */
- if (!vsystem("pkg_info -e %s"))
+ if (!vsystem("pkg_info -e %s", name))
return RET_SUCCESS;
- if (!dev->init(dev))
+ if (!dev->init(dev)) {
+ msgConfirm("Unable to initialize media type for package add.");
return RET_FAIL;
+ }
ret = RET_FAIL;
- sprintf(path, "packages/%s%s", name, strstr(name, ".tgz") ? "" : ".tgz");
- fd = dev->get(dev, path, NULL);
+ sprintf(path, "packages/All/%s%s", name, strstr(name, ".tgz") ? "" : ".tgz");
+ msgDebug("pkg_extract: Attempting to fetch %s\n", path);
+ fd = dev->get(dev, path, TRUE);
if (fd >= 0) {
pid_t tpid;
- if (isDebug())
- msgDebug("Got target %s from media type %d\n", path, dev->type);
+ msgNotify("Fetching %s from %s\n", path, dev->name);
pen[0] = '\0';
if ((where = make_playpen(pen, 0)) != NULL) {
if (isDebug())
@@ -114,6 +116,8 @@ package_extract(Device *dev, char *name)
if (dev->type == DEVICE_TYPE_TAPE)
unlink(path);
}
+ else
+ msgDebug("pkg_extract: get operation returned %d\n", fd);
return ret;
}
OpenPOWER on IntegriCloud