summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--usr.sbin/sysinstall/tcpip.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/usr.sbin/sysinstall/tcpip.c b/usr.sbin/sysinstall/tcpip.c
index 48e62af..27f353f 100644
--- a/usr.sbin/sysinstall/tcpip.c
+++ b/usr.sbin/sysinstall/tcpip.c
@@ -349,6 +349,18 @@ tcpOpenDialog(Device *devp)
}
else { /* See if there are any defaults */
char *cp;
+ char *old_interactive = NULL;
+
+ /*
+ * This is a hack so that the dialogs below are interactive in a
+ * script if we have requested interactive behavior.
+ */
+ if (variable_get(VAR_NONINTERACTIVE) &&
+ variable_get(VAR_NETINTERACTIVE)) {
+ old_interactive = strdup(VAR_NONINTERACTIVE);
+ variable_unset(VAR_NONINTERACTIVE);
+ }
+
/*
* Try a RTSOL scan if such behavior is desired.
@@ -402,6 +414,12 @@ tcpOpenDialog(Device *devp)
use_dhcp = FALSE;
}
+ /* Restore old VAR_NONINTERACTIVE if needed. */
+ if (old_interactive != NULL) {
+ variable_set2(VAR_NONINTERACTIVE, old_interactive, 0);
+ free(old_interactive);
+ }
+
/* Special hack so it doesn't show up oddly in the tcpip setup menu */
if (!strcmp(gateway, "NO"))
gateway[0] = '\0';
OpenPOWER on IntegriCloud