summaryrefslogtreecommitdiffstats
path: root/release/sysinstall/options.c
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1999-07-16 11:13:09 +0000
committerjkh <jkh@FreeBSD.org>1999-07-16 11:13:09 +0000
commit62771172f4e1b703f46fbece196e1c900c35dd79 (patch)
tree85fa8dd97edf88f579dd64c9af0b98050ce011ac /release/sysinstall/options.c
parent62a15a73f51b97c0ffc57c2da9aaa25cffb8cc07 (diff)
downloadFreeBSD-src-62771172f4e1b703f46fbece196e1c900c35dd79.zip
FreeBSD-src-62771172f4e1b703f46fbece196e1c900c35dd79.tar.gz
Re-enable DHCP client support again (but optional and turned off by default
for the time being) for debugging purposes. Fix bug in options selection.
Diffstat (limited to 'release/sysinstall/options.c')
-rw-r--r--release/sysinstall/options.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/release/sysinstall/options.c b/release/sysinstall/options.c
index 59b5727..f8f7de9 100644
--- a/release/sysinstall/options.c
+++ b/release/sysinstall/options.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: options.c,v 1.59 1999/04/27 14:33:28 jkh Exp $
+ * $Id: options.c,v 1.60 1999/05/07 11:02:57 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -113,6 +113,8 @@ static Option Options[] = {
OPT_IS_VAR, NULL, VAR_NO_WARN, varCheck },
{ "Yes to All", "Assume \"Yes\" answers to all non-critical dialogs",
OPT_IS_VAR, NULL, VAR_NO_CONFIRM, varCheck },
+{ "DHCP", "Attempt automatic DHCP configuration of interfaces",
+ OPT_IS_VAR, NULL, VAR_TRY_DHCP, varCheck },
{ "FTP username", "Username and password to use instead of anonymous",
OPT_IS_FUNC, mediaSetFTPUserPass, VAR_FTP_USER, varCheck },
{ "Editor", "Which text editor to use during installation",
@@ -187,13 +189,17 @@ fire(Option opt)
}
else if (opt.type == OPT_IS_VAR) {
if (opt.data) {
- (void)variable_get_value(opt.aux, opt.data, 1);
+ (void)variable_get_value(opt.aux, opt.data, -1);
status = 1;
}
- else if (variable_get(opt.aux))
- variable_unset(opt.aux);
+ else if (variable_get(opt.aux)) {
+ if (!variable_cmp(opt.aux, "YES"))
+ variable_set2(opt.aux, "NO", -1);
+ else
+ variable_set2(opt.aux, "YES", -1);
+ }
else
- variable_set2(opt.aux, "YES", 1);
+ variable_set2(opt.aux, "YES", 0);
}
if (opt.check)
opt.check(opt);
OpenPOWER on IntegriCloud