Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-4]: src/distrib/utils/sysinst Pull up revision 1.25 (requested ...
details: https://anonhg.NetBSD.org/src/rev/df9d0783a1e2
branches: netbsd-1-4
changeset: 470045:df9d0783a1e2
user: he <he%NetBSD.org@localhost>
date: Sat Jan 15 17:27:52 2000 +0000
description:
Pull up revision 1.25 (requested by mycroft):
Get rid of the side and bottom borders on command output windows,
so this works better on a terminal.
diffstat:
distrib/utils/sysinst/run.c | 29 +++++++++++++++++++----------
1 files changed, 19 insertions(+), 10 deletions(-)
diffs (52 lines):
diff -r 4cc57d52983e -r df9d0783a1e2 distrib/utils/sysinst/run.c
--- a/distrib/utils/sysinst/run.c Sat Jan 15 17:27:33 2000 +0000
+++ b/distrib/utils/sysinst/run.c Sat Jan 15 17:27:52 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: run.c,v 1.11.2.3 1999/07/15 03:04:43 perry Exp $ */
+/* $NetBSD: run.c,v 1.11.2.4 2000/01/15 17:27:52 he Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@@ -117,11 +117,15 @@
fflush(log);
fclose(log);
} else {
- sprintf(log_text[0], "Logging: On");
- logging = 1;
log = fopen("sysinst.log", "a");
- fprintf(log, "Log started at: %s\n", asctime(localtime(&tloc)));
- fflush(log);
+ if (log != NULL) {
+ sprintf(log_text[0], "Logging: On");
+ logging = 1;
+ fprintf(log, "Log started at: %s\n", asctime(localtime(&tloc)));
+ fflush(log);
+ } else {
+ msg_display(MSG_openfail, "log file", strerror(errno));
+ }
}
return(0);
}
@@ -139,12 +143,17 @@
fflush(script);
fclose(script);
} else {
- sprintf(log_text[1], "Scripting: On");
- scripting = 1;
script = fopen("sysinst.sh", "w");
- fprintf(script, "#!/bin/sh\n");
- fprintf(script, "# Script started at: %s\n", asctime(localtime(&tloc)));
- fflush(script);
+ if (script != NULL) {
+ sprintf(log_text[1], "Scripting: On");
+ scripting = 1;
+ fprintf(script, "#!/bin/sh\n");
+ fprintf(script, "# Script started at: %s\n",
+ asctime(localtime(&tloc)));
+ fflush(script);
+ } else {
+ msg_display(MSG_openfail, "script file", strerror(errno));
+ }
}
return(0);
}
Home |
Main Index |
Thread Index |
Old Index