summaryrefslogtreecommitdiffstats
path: root/usr.sbin/sade/main.c
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1996-05-16 11:47:46 +0000
committerjkh <jkh@FreeBSD.org>1996-05-16 11:47:46 +0000
commit7560ec91cb3ab69ac43c0b950636e8fb5cd679a8 (patch)
treead4bc78c2672e660c67bf48d392df7569092418a /usr.sbin/sade/main.c
parent996907c1963a00f3889ca45db47ef7ec7d08c25c (diff)
downloadFreeBSD-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/main.c')
-rw-r--r--usr.sbin/sade/main.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/usr.sbin/sade/main.c b/usr.sbin/sade/main.c
index deb8524..c729158 100644
--- a/usr.sbin/sade/main.c
+++ b/usr.sbin/sade/main.c
@@ -4,7 +4,7 @@
* This is probably the last attempt in the `sysinstall' line, the next
* generation being slated for what's essentially a complete rewrite.
*
- * $Id: main.c,v 1.17 1996/04/13 13:31:51 jkh Exp $
+ * $Id: main.c,v 1.18 1996/04/28 20:54:03 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -72,6 +72,7 @@ main(int argc, char **argv)
variable_set2(VAR_DEBUG, "YES");
Fake = TRUE;
msgConfirm("I'll be just faking it from here on out, OK?");
+ --argc, ++argv;
}
/* Try to preserve our scroll-back buffer */
@@ -82,6 +83,16 @@ main(int argc, char **argv)
/* Probe for all relevant devices on the system */
deviceGetAll();
+ if (argc > 1) {
+ int i;
+
+ for (i = 1; i < argc; i++) {
+ if (DITEM_STATUS(dispatchCommand(argv[i])) != DITEM_SUCCESS)
+ systemShutdown(1);
+ }
+ systemShutdown(0);
+ }
+
/* Begin user dialog at outer menu */
while (1) {
choice = scroll = curr = max = 0;
@@ -92,8 +103,7 @@ main(int argc, char **argv)
}
/* Say goodnight, Gracie */
- systemShutdown();
+ systemShutdown(0);
- /* If we're running as init, we should never get here */
- return 0;
+ return 0; /* We should never get here */
}
OpenPOWER on IntegriCloud