[Midnightbsd-cvs] src [8373] trunk/usr.sbin/sysinstall/main.c: restore a lost feature
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Sun Sep 18 15:06:00 EDT 2016
Revision: 8373
http://svnweb.midnightbsd.org/src/?rev=8373
Author: laffer1
Date: 2016-09-18 15:05:59 -0400 (Sun, 18 Sep 2016)
Log Message:
-----------
restore a lost feature
Modified Paths:
--------------
trunk/usr.sbin/sysinstall/main.c
Modified: trunk/usr.sbin/sysinstall/main.c
===================================================================
--- trunk/usr.sbin/sysinstall/main.c 2016-09-18 19:05:19 UTC (rev 8372)
+++ trunk/usr.sbin/sysinstall/main.c 2016-09-18 19:05:59 UTC (rev 8373)
@@ -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.
*
- * $MidnightBSD: src/usr.sbin/sysinstall/main.c,v 1.8 2009/10/24 14:27:17 laffer1 Exp $
+ * $MidnightBSD$
* $FreeBSD: src/usr.sbin/sysinstall/main.c,v 1.71 2003/08/20 06:27:21 imp Exp $
*
* Copyright (c) 1995
@@ -157,7 +157,14 @@
/* First, see if we have any arguments to process (and argv[0] counts if it's not "sysinstall") */
if (!RunningAsInit) {
- for (i = optionArgs+1; i < argc; i++) {
+ int start_arg;
+
+ if (!strstr(argv[0], "sysinstall"))
+ start_arg = 0;
+ else
+ start_arg = optionArgs + 1;
+
+ for (i = start_arg; i < argc; i++) {
if (DITEM_STATUS(dispatchCommand(argv[i])) != DITEM_SUCCESS)
systemShutdown(1);
}
@@ -164,7 +171,7 @@
/* If we were given commands to process on the command line, just exit
* now */
- if (argc > optionArgs+1)
+ if (argc > start_arg)
systemShutdown(0);
}
else
More information about the Midnightbsd-cvs
mailing list