diff options
author | jkh <jkh@FreeBSD.org> | 1996-05-16 11:47:46 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 1996-05-16 11:47:46 +0000 |
commit | 7560ec91cb3ab69ac43c0b950636e8fb5cd679a8 (patch) | |
tree | ad4bc78c2672e660c67bf48d392df7569092418a /usr.sbin/sade/system.c | |
parent | 996907c1963a00f3889ca45db47ef7ec7d08c25c (diff) | |
download | FreeBSD-src-7560ec91cb3ab69ac43c0b950636e8fb5cd679a8.zip FreeBSD-src-7560ec91cb3ab69ac43c0b950636e8fb5cd679a8.tar.gz |
Fix some long-standing malloc bugs in the package handling code (freeing garbage
in one place, leaking memory in another).
Add a facility to invoke subsystems directly by naming them on
sysinstall's command-line when running post-install. A replacement
for pkg_manage might, for example, be `/stand/sysinstall configPackages'
Fix bogon where upgrade shell was entered with tty modes spammed.
Fix bug with release name checking in ftp_strat. Turned a bunch of
bogus exit()s into proper calls to systemShutdown().
Diffstat (limited to 'usr.sbin/sade/system.c')
-rw-r--r-- | usr.sbin/sade/system.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/usr.sbin/sade/system.c b/usr.sbin/sade/system.c index 46d664b..b826f3e 100644 --- a/usr.sbin/sade/system.c +++ b/usr.sbin/sade/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.57 1996/04/29 21:15:44 jkh Exp $ + * $Id: system.c,v 1.58 1996/05/01 03:31:08 jkh Exp $ * * Jordan Hubbard * @@ -33,7 +33,7 @@ static void handle_intr(int sig) { if (!msgYesNo("Are you sure you want to abort the installation?")) - systemShutdown(); + systemShutdown(1); } /* Initialize system defaults */ @@ -79,12 +79,21 @@ systemInitialize(int argc, char **argv) /* Close down and prepare to exit */ void -systemShutdown(void) +systemShutdown(int status) { + /* If some media is open, close it down */ + if (mediaDevice) + mediaDevice->shutdown(mediaDevice); + + /* Shut down the dialog library */ if (DialogActive) { end_dialog(); DialogActive = FALSE; } + + /* Shut down curses */ + endwin(); + /* REALLY exit! */ if (RunningAsInit) { /* Put the console back */ @@ -92,7 +101,7 @@ systemShutdown(void) reboot(0); } else - exit(1); + exit(status); } /* Run some general command */ @@ -154,6 +163,9 @@ systemHelpFile(char *file, char *buf) snprintf(buf, FILENAME_MAX, "/stand/help/%s.hlp", file); if (file_readable(buf)) return buf; + snprintf(buf, FILENAME_MAX, "/usr/src/release/sysinstall/help/%s.hlp", file); + if (file_readable(buf)) + return buf; return NULL; } |