summaryrefslogtreecommitdiffstats
path: root/usr.sbin/sade
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1997-06-22 09:45:41 +0000
committerjkh <jkh@FreeBSD.org>1997-06-22 09:45:41 +0000
commite1b0f042d8097b0b28e3664cf648bc59c1eb4d6b (patch)
tree36a4a0d849414378fe6d58d460628caf3cc293dc /usr.sbin/sade
parent77d89f55335c4c042462b46609579e3ee8704eb4 (diff)
downloadFreeBSD-src-e1b0f042d8097b0b28e3664cf648bc59c1eb4d6b.zip
FreeBSD-src-e1b0f042d8097b0b28e3664cf648bc59c1eb4d6b.tar.gz
Adjust my installation script to more closely match reality.
Add a system command to script mechanism (so you can call things like tzsetup from scripts). Add noError variable for causing script errors to be ignored.
Diffstat (limited to 'usr.sbin/sade')
-rw-r--r--usr.sbin/sade/dispatch.c19
-rw-r--r--usr.sbin/sade/sade.h3
2 files changed, 19 insertions, 3 deletions
diff --git a/usr.sbin/sade/dispatch.c b/usr.sbin/sade/dispatch.c
index e72303a..8251f9b 100644
--- a/usr.sbin/sade/dispatch.c
+++ b/usr.sbin/sade/dispatch.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: dispatch.c,v 1.17 1997/06/13 17:55:32 jkh Exp $
+ * $Id: dispatch.c,v 1.18 1997/06/21 15:45:08 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -38,6 +38,7 @@
#include <ctype.h>
static int _shutdown(dialogMenuItem *unused);
+static int _systemExecute(dialogMenuItem *unused);
static struct _word {
char *name;
@@ -102,6 +103,7 @@ static struct _word {
{ "addGroup", userAddGroup },
{ "addUser", userAddUser },
{ "shutdown", _shutdown },
+ { "system", _systemExecute },
{ NULL, NULL },
};
@@ -122,12 +124,25 @@ call_possible_resword(char *name, dialogMenuItem *value, int *status)
}
/* Just convenience */
-static int _shutdown(dialogMenuItem *unused)
+static int
+_shutdown(dialogMenuItem *unused)
{
systemShutdown(0);
return DITEM_FAILURE;
}
+static int
+_systemExecute(dialogMenuItem *unused)
+{
+ char *cmd = variable_get("command");
+
+ if (cmd)
+ return systemExecute(cmd) ? DITEM_FAILURE : DITEM_SUCCESS;
+ else
+ msgDebug("_systemExecute: No command passed in `command' variable.\n");
+ return DITEM_FAILURE;
+}
+
/* For a given string, call it or spit out an undefined command diagnostic */
int
dispatchCommand(char *str)
diff --git a/usr.sbin/sade/sade.h b/usr.sbin/sade/sade.h
index a7b26fb..85d984d 100644
--- a/usr.sbin/sade/sade.h
+++ b/usr.sbin/sade/sade.h
@@ -4,7 +4,7 @@
* This is probably the last attempt in the `sysinstall' line, the next
* generation being slated to essentially a complete rewrite.
*
- * $Id: sysinstall.h,v 1.135 1997/06/18 05:11:37 jkh Exp $
+ * $Id: sysinstall.h,v 1.136 1997/06/21 15:45:15 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -135,6 +135,7 @@
#define VAR_NFS_SECURE "nfsSecure"
#define VAR_NFS_SERVER "nfs_server_enable"
#define VAR_NO_CONFIRM "noConfirm"
+#define VAR_NO_ERROR "noError"
#define VAR_NO_WARN "noWarn"
#define VAR_NONINTERACTIVE "nonInteractive"
#define VAR_NOVELL "novell"
OpenPOWER on IntegriCloud