From 406f1714dbaea520814643504466a34dd4d78bad Mon Sep 17 00:00:00 2001 From: obrien Date: Tue, 16 May 2000 22:05:32 +0000 Subject: Add an option to select the Fix-it tty. The current behavior is utterly *useless* on serial consoled machines. --- release/sysinstall/options.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'release/sysinstall/options.c') diff --git a/release/sysinstall/options.c b/release/sysinstall/options.c index 2d2b98b..b6fed23 100644 --- a/release/sysinstall/options.c +++ b/release/sysinstall/options.c @@ -37,6 +37,8 @@ #include "sysinstall.h" #include +int fixitTtyWhich(dialogMenuItem *); + static char * varCheck(Option opt) { @@ -140,6 +142,8 @@ static Option Options[] = { OPT_IS_VAR, PKG_PROMPT, VAR_PKG_TMPDIR, varCheck }, { "Newfs Args", "Default parameters for newfs(8)", OPT_IS_VAR, NEWFS_PROMPT, VAR_NEWFS_ARGS, varCheck }, +{ "Fixit Console", "Which tty to use for the Fixit action.", + OPT_IS_FUNC, fixitTtyWhich, VAR_FIXIT_TTY, varCheck }, { "Config save", "Whether or not to save installation kernel config changes", OPT_IS_VAR, NULL, VAR_KGET, varCheck }, { "Re-scan Devices", "Re-run sysinstall's initial device probe", @@ -310,3 +314,20 @@ optionsEditor(dialogMenuItem *self) return DITEM_SUCCESS; } +int +fixitTtyWhich(dialogMenuItem *self) +{ + char *cp = variable_get(VAR_FIXIT_TTY); + + if (!cp) { + msgConfirm("The Fix-it TTY setting is not set to anything!"); + return DITEM_FAILURE; + } + else { + if (!strcmp(cp, "standard")) + variable_set2(VAR_FIXIT_TTY, "serial", 0); + else /* must be "serial" - wrap around */ + variable_set2(VAR_FIXIT_TTY, "standard", 0); + } + return DITEM_SUCCESS; +} -- cgit v1.1