diff options
Diffstat (limited to 'usr.sbin/sade/main.c')
-rw-r--r-- | usr.sbin/sade/main.c | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/usr.sbin/sade/main.c b/usr.sbin/sade/main.c index c7cdffe..c74a867 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.20 1996/05/28 18:30:30 jkh Exp $ + * $Id: main.c,v 1.21 1996/06/08 07:02:20 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -42,7 +42,10 @@ static void screech(int sig) { fprintf(stderr, "\007Fatal signal %d caught! I'm dead..\n", sig); - pause(); + if (RunningAsInit) + pause(); + else + exit(1); } int @@ -89,14 +92,21 @@ main(int argc, char **argv) if (!mediaDevice->init(mediaDevice)) mediaDevice = NULL; } - if (argc > 1 && !RunningAsInit) { - int i; - for (i = 1; i < argc; i++) { + /* First, see if we have any arguments to process (and argv[0] counts if it's not "sysinstall") */ + if (!RunningAsInit) { + int i, start_arg; + + if (!strstr(argv[0], "sysinstall")) + start_arg = 0; + else + start_arg = 1; + for (i = start_arg; i < argc; i++) { if (DITEM_STATUS(dispatchCommand(argv[i])) != DITEM_SUCCESS) systemShutdown(1); - } - systemShutdown(0); + } + if (argc > start_arg) + systemShutdown(0); } /* Begin user dialog at outer menu */ |