summaryrefslogtreecommitdiffstats
path: root/usr.sbin/sysinstall
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1996-07-10 11:38:29 +0000
committerjkh <jkh@FreeBSD.org>1996-07-10 11:38:29 +0000
commit9e15f9a31f4d8a51406b555accf7c66520a583c8 (patch)
treef8e5d5bea94366a483571cdf0d8f296fdf3e8ca1 /usr.sbin/sysinstall
parente63b920bacf1d4ea8002f3fff5029c62c7c1b46a (diff)
downloadFreeBSD-src-9e15f9a31f4d8a51406b555accf7c66520a583c8.zip
FreeBSD-src-9e15f9a31f4d8a51406b555accf7c66520a583c8.tar.gz
Better error checking in helpfile expander.
Tart up some of the output a little.
Diffstat (limited to 'usr.sbin/sysinstall')
-rw-r--r--usr.sbin/sysinstall/dist.c4
-rw-r--r--usr.sbin/sysinstall/msg.c4
-rw-r--r--usr.sbin/sysinstall/package.c4
-rw-r--r--usr.sbin/sysinstall/system.c6
4 files changed, 7 insertions, 11 deletions
diff --git a/usr.sbin/sysinstall/dist.c b/usr.sbin/sysinstall/dist.c
index 0ecdbd0..79b7218 100644
--- a/usr.sbin/sysinstall/dist.c
+++ b/usr.sbin/sysinstall/dist.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: dist.c,v 1.63 1996/07/09 16:28:59 jkh Exp $
+ * $Id: dist.c,v 1.64 1996/07/09 16:57:14 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -461,7 +461,7 @@ distExtract(char *parent, Distribution *me)
seconds = stop.tv_sec + (stop.tv_usec / 1000000.0);
if (!seconds)
seconds = 1;
- msgInfo("%d bytes read from %s dist, chunk %d of %d @ %-4.1f KB/sec.",
+ msgInfo("%10d bytes read from %s dist, chunk %2d of %2d @ %4.1f KB/sec.",
total, dist, chunk + 1, numchunks, (chunktotal / seconds) / 1024.0);
retval = write(fd2, buf, n);
if (retval != n) {
diff --git a/usr.sbin/sysinstall/msg.c b/usr.sbin/sysinstall/msg.c
index fe40ce6..f37b0d3 100644
--- a/usr.sbin/sysinstall/msg.c
+++ b/usr.sbin/sysinstall/msg.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: msg.c,v 1.35 1996/06/08 09:08:43 jkh Exp $
+ * $Id: msg.c,v 1.36 1996/06/14 14:33:57 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -319,8 +319,6 @@ msgWeHaveOutput(char *fmt, ...)
msgDebug("Notify: %s\n", errstr);
dialog_clear();
dialog_msgbox("Information Dialog", errstr, -1, -1, 0);
- if (OnVTY)
- msgInfo("Command output is on VTY2 - type ALT-F2 to see it");
}
/* Simple versions of msgConfirm() and msgNotify() for calling from scripts */
diff --git a/usr.sbin/sysinstall/package.c b/usr.sbin/sysinstall/package.c
index 881facb..9357cc1 100644
--- a/usr.sbin/sysinstall/package.c
+++ b/usr.sbin/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.41 1996/07/08 08:54:32 jkh Exp $
+ * $Id: package.c,v 1.42 1996/07/09 14:28:20 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -155,7 +155,7 @@ package_extract(Device *dev, char *name, Boolean depended)
seconds = stop.tv_sec + (stop.tv_usec / 1000000.0);
if (!seconds)
seconds = 1;
- msgInfo("%d bytes read from package %s @ %.1f KBytes/second", tot, name, (tot / seconds) / 1024.0);
+ msgInfo("%10d bytes read from package %s @ %4.1f KBytes/second", tot, name, (tot / seconds) / 1024.0);
/* Write it out */
if (write(pfd[1], buf, i) != i) {
msgInfo("Write failure to pkg_add! Package may be corrupt.");
diff --git a/usr.sbin/sysinstall/system.c b/usr.sbin/sysinstall/system.c
index 4dce756..3cb6e47 100644
--- a/usr.sbin/sysinstall/system.c
+++ b/usr.sbin/sysinstall/system.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: system.c,v 1.60 1996/07/05 08:36:02 jkh Exp $
+ * $Id: system.c,v 1.61 1996/07/08 08:54:34 jkh Exp $
*
* Jordan Hubbard
*
@@ -47,7 +47,7 @@ expand(char *fname)
{
Mkdir(DOC_TMP_DIR);
unlink(DOC_TMP_FILE);
- if (vsystem("gzip -c -d %s > %s", fname, DOC_TMP_FILE))
+ if (!file_readable(fname) || vsystem("gzip -c -d %s > %s", fname, DOC_TMP_FILE))
return NULL;
return DOC_TMP_FILE;
}
@@ -249,8 +249,6 @@ vsystem(char *fmt, ...)
else if (!pid) { /* Junior */
(void)sigsetmask(omask);
if (DebugFD != -1) {
- if (OnVTY && isDebug() && RunningAsInit)
- msgInfo("Command output is on VTY2 - type ALT-F2 to see it");
dup2(DebugFD, 0);
dup2(DebugFD, 1);
dup2(DebugFD, 2);
OpenPOWER on IntegriCloud