1995-10-04 07:55:05 +00:00
|
|
|
/*
|
|
|
|
* The new sysinstall program.
|
|
|
|
*
|
|
|
|
* This is probably the last attempt in the `sysinstall' line, the next
|
|
|
|
* generation being slated for what's essentially a complete rewrite.
|
|
|
|
*
|
1999-08-28 01:35:59 +00:00
|
|
|
* $FreeBSD$
|
1995-10-04 07:55:05 +00:00
|
|
|
*
|
|
|
|
* Copyright (c) 1995
|
|
|
|
* Jordan Hubbard. All rights reserved.
|
|
|
|
*
|
|
|
|
* Redistribution and use in source and binary forms, with or without
|
|
|
|
* modification, are permitted provided that the following conditions
|
|
|
|
* are met:
|
|
|
|
* 1. Redistributions of source code must retain the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer,
|
|
|
|
* verbatim and that no modifications are made prior to this
|
|
|
|
* point in the file.
|
|
|
|
* 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer in the
|
|
|
|
* documentation and/or other materials provided with the distribution.
|
|
|
|
*
|
|
|
|
* THIS SOFTWARE IS PROVIDED BY JORDAN HUBBARD ``AS IS'' AND
|
|
|
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
|
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
|
|
* ARE DISCLAIMED. IN NO EVENT SHALL JORDAN HUBBARD OR HIS PETS BE LIABLE
|
|
|
|
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
|
|
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
|
|
* OR SERVICES; LOSS OF USE, DATA, LIFE OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
|
|
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
|
|
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
|
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
|
|
* SUCH DAMAGE.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "sysinstall.h"
|
|
|
|
#include <ctype.h>
|
2001-09-22 22:25:35 +00:00
|
|
|
#include <curses.h>
|
|
|
|
#include <term.h>
|
1995-10-04 07:55:05 +00:00
|
|
|
|
2000-05-16 22:05:32 +00:00
|
|
|
int fixitTtyWhich(dialogMenuItem *);
|
|
|
|
|
1995-10-04 07:55:05 +00:00
|
|
|
static char *
|
2006-02-28 21:49:33 +00:00
|
|
|
varCheck(Option *opt)
|
1995-10-04 07:55:05 +00:00
|
|
|
{
|
1995-10-21 16:44:24 +00:00
|
|
|
char *cp = NULL;
|
|
|
|
|
2006-02-28 21:49:33 +00:00
|
|
|
if (opt->aux)
|
|
|
|
cp = variable_get((char *)opt->aux);
|
1995-10-21 16:44:24 +00:00
|
|
|
if (!cp)
|
1996-06-14 14:34:03 +00:00
|
|
|
return "NO";
|
1995-10-21 16:44:24 +00:00
|
|
|
return cp;
|
1995-10-04 07:55:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Show our little logo */
|
|
|
|
static char *
|
2006-02-28 21:49:33 +00:00
|
|
|
resetLogo(Option *opt)
|
1995-10-04 07:55:05 +00:00
|
|
|
{
|
1996-03-19 12:08:00 +00:00
|
|
|
return "[RESET!]";
|
1995-10-04 07:55:05 +00:00
|
|
|
}
|
|
|
|
|
1995-10-19 18:37:50 +00:00
|
|
|
static char *
|
2006-02-28 21:49:33 +00:00
|
|
|
mediaCheck(Option *opt)
|
1995-10-19 18:37:50 +00:00
|
|
|
{
|
|
|
|
if (mediaDevice) {
|
|
|
|
switch(mediaDevice->type) {
|
|
|
|
case DEVICE_TYPE_UFS:
|
|
|
|
case DEVICE_TYPE_DISK:
|
|
|
|
return "File system";
|
|
|
|
|
|
|
|
case DEVICE_TYPE_FLOPPY:
|
|
|
|
return "Floppy";
|
|
|
|
|
|
|
|
case DEVICE_TYPE_FTP:
|
|
|
|
return "FTP";
|
|
|
|
|
|
|
|
case DEVICE_TYPE_CDROM:
|
|
|
|
return "CDROM";
|
|
|
|
|
|
|
|
case DEVICE_TYPE_DOS:
|
|
|
|
return "DOS";
|
|
|
|
|
|
|
|
case DEVICE_TYPE_NFS:
|
|
|
|
return "NFS";
|
1995-10-20 07:02:53 +00:00
|
|
|
|
|
|
|
case DEVICE_TYPE_NONE:
|
|
|
|
case DEVICE_TYPE_NETWORK:
|
|
|
|
case DEVICE_TYPE_ANY:
|
|
|
|
default:
|
|
|
|
return "<unknown>";
|
1995-10-19 18:37:50 +00:00
|
|
|
}
|
|
|
|
}
|
1996-03-19 12:08:00 +00:00
|
|
|
return "<not yet set>";
|
1995-10-19 18:37:50 +00:00
|
|
|
}
|
|
|
|
|
1999-08-05 19:50:26 +00:00
|
|
|
#define NEWFS_PROMPT "Please enter newfs(8) parameters:"
|
2000-09-22 08:13:36 +00:00
|
|
|
#define RELNAME_PROMPT "Please specify the release you wish to load or\n\"any\" for a generic release install:"
|
1995-10-21 16:44:24 +00:00
|
|
|
#define BPKG_PROMPT "Please specify the name of the HTML browser package:"
|
|
|
|
#define BBIN_PROMPT "Please specify a full pathname to the HTML browser binary:"
|
1996-03-23 07:21:31 +00:00
|
|
|
#define EDITOR_PROMPT "Please specify the name of the text editor you wish to use:"
|
1995-11-06 12:49:27 +00:00
|
|
|
#define PKG_PROMPT "Please specify a temporary directory with lots of free space:"
|
1996-07-09 14:28:22 +00:00
|
|
|
#define INSTROOT_PROMPT "Please specify a root directory if installing somewhere other than /"
|
1997-01-18 19:18:26 +00:00
|
|
|
#define TIMEOUT_PROMPT "Please specify the number of seconds to wait for slow media:"
|
1995-10-21 16:44:24 +00:00
|
|
|
|
1995-10-04 07:55:05 +00:00
|
|
|
static Option Options[] = {
|
|
|
|
{ "NFS Secure", "NFS server talks only on a secure port",
|
1995-10-22 01:33:02 +00:00
|
|
|
OPT_IS_VAR, NULL, VAR_NFS_SECURE, varCheck },
|
1995-10-04 07:55:05 +00:00
|
|
|
{ "NFS Slow", "User is using a slow PC or ethernet card",
|
1995-10-22 01:33:02 +00:00
|
|
|
OPT_IS_VAR, NULL, VAR_SLOW_ETHER, varCheck },
|
2003-10-19 13:37:12 +00:00
|
|
|
{ "NFS TCP", "Use TCP protocol for NFS",
|
|
|
|
OPT_IS_VAR, NULL, VAR_NFS_TCP, varCheck },
|
|
|
|
{ "NFS version 3", "Use NFS version 3",
|
|
|
|
OPT_IS_VAR, NULL, VAR_NFS_V3, varCheck },
|
1995-10-18 00:12:55 +00:00
|
|
|
{ "Debugging", "Emit extra debugging output on VTY2 (ALT-F2)",
|
1995-10-22 01:33:02 +00:00
|
|
|
OPT_IS_VAR, NULL, VAR_DEBUG, varCheck },
|
1997-06-18 05:11:37 +00:00
|
|
|
{ "No Warnings", "Don't Warn the user when a setting seems incorrect",
|
|
|
|
OPT_IS_VAR, NULL, VAR_NO_WARN, varCheck },
|
1995-10-04 07:55:05 +00:00
|
|
|
{ "Yes to All", "Assume \"Yes\" answers to all non-critical dialogs",
|
1995-10-22 01:33:02 +00:00
|
|
|
OPT_IS_VAR, NULL, VAR_NO_CONFIRM, varCheck },
|
1999-09-02 00:51:16 +00:00
|
|
|
{ "DHCP", "Attempt automatic DHCP configuration of interfaces",
|
|
|
|
OPT_IS_VAR, NULL, VAR_TRY_DHCP, varCheck },
|
2000-07-14 08:33:10 +00:00
|
|
|
{ "IPv6", "Attempt IPv6 configuration of interfaces",
|
|
|
|
OPT_IS_VAR, NULL, VAR_TRY_RTSOL, varCheck },
|
1995-10-04 07:55:05 +00:00
|
|
|
{ "FTP username", "Username and password to use instead of anonymous",
|
1996-10-01 12:13:29 +00:00
|
|
|
OPT_IS_FUNC, mediaSetFTPUserPass, VAR_FTP_USER, varCheck },
|
1996-03-23 07:21:31 +00:00
|
|
|
{ "Editor", "Which text editor to use during installation",
|
|
|
|
OPT_IS_VAR, EDITOR_PROMPT, VAR_EDITOR, varCheck },
|
1995-10-18 00:12:55 +00:00
|
|
|
{ "Extract Detail", "How verbosely to display file name information during extractions",
|
1995-10-22 01:33:02 +00:00
|
|
|
OPT_IS_FUNC, mediaSetCPIOVerbosity, VAR_CPIO_VERBOSITY, varCheck },
|
1995-10-04 07:55:05 +00:00
|
|
|
{ "Release Name", "Which release to attempt to load from installation media",
|
1995-10-22 01:33:02 +00:00
|
|
|
OPT_IS_VAR, RELNAME_PROMPT, VAR_RELNAME, varCheck },
|
1996-07-09 14:28:22 +00:00
|
|
|
{ "Install Root", "Which directory to unpack distributions or packages relative to",
|
|
|
|
OPT_IS_VAR, INSTROOT_PROMPT, VAR_INSTALL_ROOT, varCheck },
|
OK, I've got two ideas to file in the "really seemed like a good idea
at the time, but on further reflection..." bucket with these changes.
1. Checking the media before frobbing the disks was a fine idea, and
I wish it could have worked, but that leads to a rather difficult
situation when you need to mount the media someplace and you're about
to:
a) Chroot away from your present root.
b) Newfs the root to be.
You're basically screwed since there's no place to stick the mount
point where it will be found following the newfs/chroot (and eliminating
the chroot in favor of just using the "root bias" feature would work
great for the distributions but not the pkg_add calls done by the
package installer).
2. Automatic timeout handling. I don't know why, but alarm() frequently
returns no residual even when the alarm didn't go off, which defies
the man page but hey, since when was that so unusual? Take out timeouts
but retain the code which temporarily replaces the SIGINT handler in
favor of a more media-specific handler. This way, at least, if it's hanging
you can at least whap it. I think the timeout code would have been losing
over *really slow* links anyway, so it's probably best that it go.
This should fix NFS, tape & CDROM installs again (serves me right for getting
complacent and using just the FTP installs in my testing).
1997-01-24 19:24:51 +00:00
|
|
|
{ "Browser package", "This is the browser package that will be used for viewing HTML docs",
|
1997-01-24 07:47:17 +00:00
|
|
|
OPT_IS_VAR, BPKG_PROMPT, VAR_BROWSER_PACKAGE, varCheck },
|
|
|
|
{ "Browser Exec", "This is the path to the main binary of the browser package",
|
|
|
|
OPT_IS_VAR, BBIN_PROMPT, VAR_BROWSER_BINARY, varCheck },
|
1995-10-20 07:02:53 +00:00
|
|
|
{ "Media Type", "The current installation media type.",
|
1995-10-22 01:33:02 +00:00
|
|
|
OPT_IS_FUNC, mediaGetType, VAR_MEDIA_TYPE, mediaCheck },
|
1997-01-18 19:18:26 +00:00
|
|
|
{ "Media Timeout", "Timeout value in seconds for slow media.",
|
|
|
|
OPT_IS_VAR, TIMEOUT_PROMPT, VAR_MEDIA_TIMEOUT, varCheck },
|
1995-11-06 12:49:27 +00:00
|
|
|
{ "Package Temp", "The directory where package temporary files should go",
|
1996-06-14 14:34:03 +00:00
|
|
|
OPT_IS_VAR, PKG_PROMPT, VAR_PKG_TMPDIR, varCheck },
|
1999-08-05 19:50:26 +00:00
|
|
|
{ "Newfs Args", "Default parameters for newfs(8)",
|
|
|
|
OPT_IS_VAR, NEWFS_PROMPT, VAR_NEWFS_ARGS, varCheck },
|
2000-05-16 22:05:32 +00:00
|
|
|
{ "Fixit Console", "Which tty to use for the Fixit action.",
|
|
|
|
OPT_IS_FUNC, fixitTtyWhich, VAR_FIXIT_TTY, varCheck },
|
1999-04-06 08:25:53 +00:00
|
|
|
{ "Re-scan Devices", "Re-run sysinstall's initial device probe",
|
2006-02-28 21:49:33 +00:00
|
|
|
OPT_IS_FUNC, deviceRescan, NULL, NULL },
|
1995-10-18 05:02:02 +00:00
|
|
|
{ "Use Defaults", "Reset all values to startup defaults",
|
2006-02-28 21:49:33 +00:00
|
|
|
OPT_IS_FUNC, installVarDefaults, NULL, resetLogo },
|
|
|
|
{ NULL, NULL, 0, NULL, NULL, NULL },
|
1995-10-04 07:55:05 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#define OPT_START_ROW 4
|
1996-03-24 12:06:13 +00:00
|
|
|
#define OPT_END_ROW 19
|
1995-10-04 07:55:05 +00:00
|
|
|
#define OPT_NAME_COL 0
|
|
|
|
#define OPT_VALUE_COL 16
|
1995-10-04 10:34:08 +00:00
|
|
|
#define GROUP_OFFSET 40
|
1995-10-04 07:55:05 +00:00
|
|
|
|
|
|
|
static char *
|
|
|
|
value_of(Option opt)
|
|
|
|
{
|
|
|
|
static char ival[40];
|
|
|
|
|
|
|
|
switch (opt.type) {
|
|
|
|
case OPT_IS_STRING:
|
|
|
|
return (char *)opt.data;
|
|
|
|
|
|
|
|
case OPT_IS_INT:
|
2001-09-22 22:25:35 +00:00
|
|
|
sprintf(ival, "%lu", (long)opt.data);
|
1995-10-04 07:55:05 +00:00
|
|
|
return ival;
|
|
|
|
|
|
|
|
case OPT_IS_FUNC:
|
1995-10-18 00:12:55 +00:00
|
|
|
case OPT_IS_VAR:
|
1995-10-04 07:55:05 +00:00
|
|
|
if (opt.check)
|
2006-02-28 21:49:33 +00:00
|
|
|
return opt.check(&opt);
|
1995-10-04 07:55:05 +00:00
|
|
|
else
|
|
|
|
return "<*>";
|
|
|
|
}
|
|
|
|
return "<unknown>";
|
|
|
|
}
|
|
|
|
|
1996-10-01 12:13:29 +00:00
|
|
|
static int
|
1995-10-04 07:55:05 +00:00
|
|
|
fire(Option opt)
|
|
|
|
{
|
1996-10-01 12:13:29 +00:00
|
|
|
int status = 0;
|
|
|
|
|
1995-10-21 16:44:24 +00:00
|
|
|
if (opt.type == OPT_IS_FUNC) {
|
1996-10-01 12:13:29 +00:00
|
|
|
int (*cp)(char *) = opt.data, rcode;
|
1995-10-04 07:55:05 +00:00
|
|
|
|
1996-10-01 12:13:29 +00:00
|
|
|
rcode = cp(NULL);
|
1999-12-19 04:06:46 +00:00
|
|
|
status = 1;
|
1995-10-04 07:55:05 +00:00
|
|
|
}
|
1995-10-18 00:12:55 +00:00
|
|
|
else if (opt.type == OPT_IS_VAR) {
|
1995-10-21 16:44:24 +00:00
|
|
|
if (opt.data) {
|
1999-09-02 00:51:16 +00:00
|
|
|
(void)variable_get_value(opt.aux, opt.data, -1);
|
1996-10-01 12:13:29 +00:00
|
|
|
status = 1;
|
1995-10-21 16:44:24 +00:00
|
|
|
}
|
1999-09-02 00:51:16 +00:00
|
|
|
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);
|
|
|
|
}
|
1995-10-21 16:44:24 +00:00
|
|
|
else
|
1999-09-02 00:51:16 +00:00
|
|
|
variable_set2(opt.aux, "YES", 0);
|
1995-10-18 00:12:55 +00:00
|
|
|
}
|
1995-10-04 07:55:05 +00:00
|
|
|
if (opt.check)
|
2006-02-28 21:49:33 +00:00
|
|
|
opt.check(&opt);
|
1995-10-19 18:37:50 +00:00
|
|
|
refresh();
|
1996-10-01 12:13:29 +00:00
|
|
|
return status;
|
1995-10-04 07:55:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
int
|
1996-04-07 03:52:36 +00:00
|
|
|
optionsEditor(dialogMenuItem *self)
|
1995-10-04 07:55:05 +00:00
|
|
|
{
|
|
|
|
int i, optcol, optrow, key;
|
|
|
|
static int currOpt = 0;
|
1999-12-14 04:25:29 +00:00
|
|
|
WINDOW *w = savescr();
|
|
|
|
|
1999-12-19 19:42:02 +00:00
|
|
|
dialog_clear();
|
1995-10-04 07:55:05 +00:00
|
|
|
clear();
|
|
|
|
|
|
|
|
while (1) {
|
|
|
|
/* Whap up the header */
|
1995-10-04 10:34:08 +00:00
|
|
|
attrset(A_REVERSE); mvaddstr(0, 0, "Options Editor"); attrset(A_NORMAL);
|
1995-10-04 07:55:05 +00:00
|
|
|
for (i = 0; i < 2; i++) {
|
|
|
|
mvaddstr(OPT_START_ROW - 2, OPT_NAME_COL + (i * GROUP_OFFSET), "Name");
|
|
|
|
mvaddstr(OPT_START_ROW - 1, OPT_NAME_COL + (i * GROUP_OFFSET), "----");
|
|
|
|
|
|
|
|
mvaddstr(OPT_START_ROW - 2, OPT_VALUE_COL + (i * GROUP_OFFSET), "Value");
|
|
|
|
mvaddstr(OPT_START_ROW - 1, OPT_VALUE_COL + (i * GROUP_OFFSET), "-----");
|
|
|
|
}
|
|
|
|
/* And the footer */
|
1996-06-14 14:34:03 +00:00
|
|
|
mvprintw(OPT_END_ROW + 1, 0, "Use SPACE to select/toggle an option, arrow keys to move,");
|
|
|
|
mvprintw(OPT_END_ROW + 2, 0, "? or F1 for more help. When you're done, type Q to Quit.");
|
1995-10-04 07:55:05 +00:00
|
|
|
|
|
|
|
optrow = OPT_START_ROW;
|
|
|
|
optcol = OPT_NAME_COL;
|
|
|
|
for (i = 0; Options[i].name; i++) {
|
|
|
|
/* Names are painted somewhat gratuitously each time, but it's easier this way */
|
|
|
|
mvprintw(optrow, OPT_NAME_COL + optcol, Options[i].name);
|
1996-05-09 09:42:17 +00:00
|
|
|
if (currOpt == i)
|
1996-06-08 09:08:51 +00:00
|
|
|
attrset(ATTR_SELECTED);
|
1995-10-04 07:55:05 +00:00
|
|
|
mvprintw(optrow++, OPT_VALUE_COL + optcol, value_of(Options[i]));
|
1996-05-09 09:42:17 +00:00
|
|
|
if (currOpt == i)
|
|
|
|
attrset(A_NORMAL);
|
1995-10-04 07:55:05 +00:00
|
|
|
if (optrow == OPT_END_ROW) {
|
|
|
|
optrow = OPT_START_ROW;
|
|
|
|
optcol += GROUP_OFFSET;
|
|
|
|
}
|
|
|
|
clrtoeol();
|
|
|
|
}
|
1996-06-14 14:34:03 +00:00
|
|
|
attrset(ATTR_TITLE);
|
|
|
|
mvaddstr(OPT_END_ROW + 4, 0, Options[currOpt].desc);
|
1996-05-09 09:42:17 +00:00
|
|
|
attrset(A_NORMAL);
|
1995-10-04 07:55:05 +00:00
|
|
|
clrtoeol();
|
1995-10-04 10:34:08 +00:00
|
|
|
move(0, 14);
|
1996-04-25 17:31:27 +00:00
|
|
|
refresh();
|
1995-10-06 08:47:40 +00:00
|
|
|
|
1995-10-04 07:55:05 +00:00
|
|
|
/* Start the edit loop */
|
|
|
|
key = toupper(getch());
|
|
|
|
switch (key) {
|
|
|
|
case KEY_F(1):
|
|
|
|
case '?':
|
1995-10-19 15:57:23 +00:00
|
|
|
systemDisplayHelp("options");
|
1996-10-01 12:13:29 +00:00
|
|
|
clear();
|
1995-10-04 07:55:05 +00:00
|
|
|
break;
|
|
|
|
|
1997-01-15 02:52:00 +00:00
|
|
|
case '\020': /* ^P */
|
1995-10-04 07:55:05 +00:00
|
|
|
case KEY_UP:
|
|
|
|
if (currOpt)
|
|
|
|
--currOpt;
|
|
|
|
else
|
1996-06-14 14:34:03 +00:00
|
|
|
for (currOpt = 0; Options[currOpt + 1].name; currOpt++);
|
1995-10-04 07:55:05 +00:00
|
|
|
continue;
|
|
|
|
|
1997-01-15 02:52:00 +00:00
|
|
|
case '\016': /* ^N */
|
1995-10-04 07:55:05 +00:00
|
|
|
case KEY_DOWN:
|
|
|
|
if (Options[currOpt + 1].name)
|
|
|
|
++currOpt;
|
|
|
|
else
|
1996-06-14 14:34:03 +00:00
|
|
|
currOpt = 0;
|
1995-10-04 07:55:05 +00:00
|
|
|
continue;
|
|
|
|
|
|
|
|
case KEY_HOME:
|
|
|
|
currOpt = 0;
|
|
|
|
continue;
|
|
|
|
|
|
|
|
case KEY_END:
|
|
|
|
while (Options[currOpt + 1].name)
|
|
|
|
++currOpt;
|
|
|
|
continue;
|
|
|
|
|
|
|
|
case ' ':
|
1996-10-01 12:13:29 +00:00
|
|
|
if (fire(Options[currOpt]))
|
|
|
|
clear();
|
1995-10-04 07:55:05 +00:00
|
|
|
continue;
|
|
|
|
|
1997-01-15 02:52:00 +00:00
|
|
|
case '\033': /* ESC */
|
1995-10-04 07:55:05 +00:00
|
|
|
case 'Q':
|
1995-10-11 00:54:01 +00:00
|
|
|
clear();
|
1995-10-19 15:57:23 +00:00
|
|
|
dialog_clear();
|
1999-12-14 04:25:29 +00:00
|
|
|
restorescr(w);
|
2003-07-13 07:29:06 +00:00
|
|
|
return DITEM_SUCCESS | DITEM_CONTINUE;
|
1995-10-04 07:55:05 +00:00
|
|
|
|
|
|
|
default:
|
|
|
|
beep();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/* NOTREACHED */
|
1999-12-14 04:25:29 +00:00
|
|
|
return DITEM_SUCCESS;
|
1995-10-04 07:55:05 +00:00
|
|
|
}
|
1996-04-23 01:29:35 +00:00
|
|
|
|
2000-05-16 22:05:32 +00:00
|
|
|
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;
|
|
|
|
}
|