diff options
author | obrien <obrien@FreeBSD.org> | 2000-05-16 22:05:32 +0000 |
---|---|---|
committer | obrien <obrien@FreeBSD.org> | 2000-05-16 22:05:32 +0000 |
commit | 406f1714dbaea520814643504466a34dd4d78bad (patch) | |
tree | 3d8c1df5f0cf552d34e29e3e671dd2dd65bf1d78 /usr.sbin/sysinstall/options.c | |
parent | e3cda7421d1200af9960288af861554b935f0fcd (diff) | |
download | FreeBSD-src-406f1714dbaea520814643504466a34dd4d78bad.zip FreeBSD-src-406f1714dbaea520814643504466a34dd4d78bad.tar.gz |
Add an option to select the Fix-it tty. The current behavior is utterly
*useless* on serial consoled machines.
Diffstat (limited to 'usr.sbin/sysinstall/options.c')
-rw-r--r-- | usr.sbin/sysinstall/options.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/usr.sbin/sysinstall/options.c b/usr.sbin/sysinstall/options.c index 2d2b98b..b6fed23 100644 --- a/usr.sbin/sysinstall/options.c +++ b/usr.sbin/sysinstall/options.c @@ -37,6 +37,8 @@ #include "sysinstall.h" #include <ctype.h> +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; +} |