summaryrefslogtreecommitdiffstats
path: root/release
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1996-04-25 17:31:27 +0000
committerjkh <jkh@FreeBSD.org>1996-04-25 17:31:27 +0000
commit553bed49c44aafc3cba97d0dd96e45ce7bcca3b6 (patch)
treeeed63e3f1a52745b1f4775b9da1bfc44ade22ebb /release
parentbd013f51f73fe7618393e72f501e20ecd6f63f56 (diff)
downloadFreeBSD-src-553bed49c44aafc3cba97d0dd96e45ce7bcca3b6.zip
FreeBSD-src-553bed49c44aafc3cba97d0dd96e45ce7bcca3b6.tar.gz
Quite a few changes:
1. Fix the last display bugs (I hope) by use of dialog rebuilds at stategic points. 2. Clean up the distributions menus so that everybody (that's reasonable) has All and Clear options for setting/clearing things en-masse. 3. Various attempts at display optimization. 4. Change the wording of the `Don't use Write!' dialogs to make them more explicitly define when and when not to use the option.
Diffstat (limited to 'release')
-rw-r--r--release/sysinstall/disks.c14
-rw-r--r--release/sysinstall/dist.c27
-rw-r--r--release/sysinstall/dist.h1
-rw-r--r--release/sysinstall/dmenu.c12
-rw-r--r--release/sysinstall/doc.c6
-rw-r--r--release/sysinstall/install.c30
-rw-r--r--release/sysinstall/installFinal.c4
-rw-r--r--release/sysinstall/installUpgrade.c14
-rw-r--r--release/sysinstall/label.c11
-rw-r--r--release/sysinstall/media.c34
-rw-r--r--release/sysinstall/menus.c197
-rw-r--r--release/sysinstall/options.c3
-rw-r--r--release/sysinstall/sysinstall.h5
-rw-r--r--release/sysinstall/system.c3
14 files changed, 201 insertions, 160 deletions
diff --git a/release/sysinstall/disks.c b/release/sysinstall/disks.c
index 54f0fc6..7208cd1 100644
--- a/release/sysinstall/disks.c
+++ b/release/sysinstall/disks.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: disks.c,v 1.40 1996/04/13 13:31:28 jkh Exp $
+ * $Id: disks.c,v 1.41 1996/04/23 01:29:14 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -336,12 +336,11 @@ diskPartition(Device *dev, Disk *d)
break;
case 'W':
- if (!msgYesNo("Are you SURE you want to write this now? You do also\n"
- "have the option of not modifying the disk until *all*\n"
- "configuration information has been entered, at which\n"
- "point you can do it all at once. If you're unsure, then\n"
- "PLEASE CHOOSE NO at this dialog! This option is DANGEROUS\n"
- "if you do not know EXACTLY what you are doing!")) {
+ if (!msgYesNo("WARNING: This should only be used for modifying an\n"
+ "EXISTING installation - DO NOT USE this option if you\n"
+ "are installing FreeBSD for the first time! This is not\n"
+ "an option for use during the standard install.\n\n"
+ "Are you absolutely sure you want to do this now?")) {
variable_set2(DISK_PARTITIONED, "yes");
clear();
@@ -469,6 +468,7 @@ diskPartitionEditor(dialogMenuItem *self)
i = dmenuOpenSimple(menu) ? DITEM_SUCCESS : DITEM_FAILURE;
free(menu);
}
+ i = i | DITEM_RESTORE | DITEM_RECREATE;
}
return i;
}
diff --git a/release/sysinstall/dist.c b/release/sysinstall/dist.c
index 52573c2..5194891 100644
--- a/release/sysinstall/dist.c
+++ b/release/sysinstall/dist.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: dist.c,v 1.41 1996/04/13 13:31:30 jkh Exp $
+ * $Id: dist.c,v 1.42 1996/04/23 01:29:17 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -161,6 +161,7 @@ int
distReset(dialogMenuItem *self)
{
Dists = 0;
+ DESDists = 0;
SrcDists = 0;
XF86Dists = 0;
XF86ServerDists = 0;
@@ -169,14 +170,6 @@ distReset(dialogMenuItem *self)
}
int
-distSrcReset(dialogMenuItem *self)
-{
- Dists &= ~DIST_SRC;
- SrcDists = 0;
- return DITEM_SUCCESS | DITEM_REDRAW;
-}
-
-int
distSetDeveloper(dialogMenuItem *self)
{
distReset(NULL);
@@ -254,11 +247,12 @@ distSetDES(dialogMenuItem *self)
if (DESDists & DIST_DES_KERBEROS)
DESDists |= DIST_DES_DES;
Dists |= DIST_DES;
+ msgDebug("SetDES Masks: DES: %0x, Dists: %0x\n", DESDists, Dists);
}
}
else
i = DITEM_FAILURE;
- return i | DITEM_RESTORE;
+ return i | DITEM_RECREATE | DITEM_RESTORE;
}
int
@@ -267,12 +261,14 @@ distSetSrc(dialogMenuItem *self)
int i = DITEM_SUCCESS;
if (dmenuOpenSimple(&MenuSrcDistributions)) {
- if (SrcDists)
+ if (SrcDists) {
Dists |= DIST_SRC;
+ msgDebug("SetSrc Masks: Srcs: %0x, Dists: %0x\n", SrcDists, Dists);
+ }
}
else
i = DITEM_FAILURE;
- return i | DITEM_RESTORE;
+ return i | DITEM_RECREATE | DITEM_RESTORE;
}
int
@@ -287,13 +283,12 @@ distSetXF86(dialogMenuItem *self)
XF86Dists |= DIST_XF86_FONTS;
if (XF86Dists)
Dists |= DIST_XF86;
- if (isDebug())
- msgDebug("SetXF86 Masks: Server: %0x, Fonts: %0x, XDists: %0x, Dists: %0x\n",
- XF86ServerDists, XF86FontDists, XF86Dists, Dists);
+ msgDebug("SetXF86 Masks: Server: %0x, Fonts: %0x, XDists: %0x, Dists: %0x\n",
+ XF86ServerDists, XF86FontDists, XF86Dists, Dists);
}
else
i = DITEM_FAILURE;
- return i | DITEM_RESTORE;
+ return i | DITEM_RECREATE | DITEM_RESTORE;
}
static Boolean
diff --git a/release/sysinstall/dist.h b/release/sysinstall/dist.h
index 685e8b4..fc102dde4 100644
--- a/release/sysinstall/dist.h
+++ b/release/sysinstall/dist.h
@@ -66,6 +66,7 @@
#define DIST_XF86_XINIT 0x0800
#define DIST_XF86_XDMCF 0x1000
#define DIST_XF86_SRC 0x2000
+#define DIST_XF86_MISC_ALL 0x3FFF
#define DIST_XF86_SERVER 0x4000
#define DIST_XF86_SERVER_8514 0x0001
#define DIST_XF86_SERVER_AGX 0x0002
diff --git a/release/sysinstall/dmenu.c b/release/sysinstall/dmenu.c
index 8081dd7..7880770 100644
--- a/release/sysinstall/dmenu.c
+++ b/release/sysinstall/dmenu.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: dmenu.c,v 1.16 1996/04/13 13:31:31 jkh Exp $
+ * $Id: dmenu.c,v 1.17 1996/04/23 01:29:18 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -51,10 +51,8 @@ dmenuDisplayFile(dialogMenuItem *tmp)
int
dmenuSubmenu(dialogMenuItem *tmp)
{
- int i;
-
- i = dmenuOpenSimple((DMenu *)tmp->data) ? DITEM_SUCCESS : DITEM_FAILURE;
- return i | DITEM_RESTORE;
+ return (dmenuOpenSimple((DMenu *)(tmp->data)) ? DITEM_SUCCESS : DITEM_FAILURE) |
+ DITEM_RESTORE | DITEM_RECREATE;
}
int
@@ -201,10 +199,10 @@ dmenuOpen(DMenu *menu, int *choice, int *scroll, int *curr, int *max)
menu_height(menu, n), -n, menu->items, NULL);
else
msgFatal("Menu: `%s' is of an unknown type\n", menu->title);
-
+ clearok(stdscr, TRUE);
if (rval)
return FALSE;
- else if (cancelled || (menu->type & (DMENU_SELECTION_RETURNS | DMENU_RADIO_TYPE | DMENU_CHECKLIST_TYPE))) {
+ else if (cancelled || menu->type & DMENU_SELECTION_RETURNS) {
cancelled = FALSE;
return TRUE;
}
diff --git a/release/sysinstall/doc.c b/release/sysinstall/doc.c
index dc3e20f..dd92a4c 100644
--- a/release/sysinstall/doc.c
+++ b/release/sysinstall/doc.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: doc.c,v 1.12 1996/04/13 13:31:32 jkh Exp $
+ * $Id: doc.c,v 1.13 1996/04/23 01:29:18 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -75,9 +75,9 @@ docBrowser(dialogMenuItem *self)
/* Run browser on the appropriate doc */
if (dmenuOpenSimple(&MenuHTMLDoc))
- return DITEM_SUCCESS;
+ return DITEM_SUCCESS | DITEM_RESTORE | DITEM_RECREATE;
else
- return DITEM_FAILURE;
+ return DITEM_FAILURE | DITEM_RESTORE | DITEM_RECREATE;
}
/* Try to show one of the documents requested from the HTML doc menu */
diff --git a/release/sysinstall/install.c b/release/sysinstall/install.c
index 0c712e1..45ac1ed 100644
--- a/release/sysinstall/install.c
+++ b/release/sysinstall/install.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: install.c,v 1.83 1996/04/13 13:31:41 jkh Exp $
+ * $Id: install.c,v 1.84 1996/04/23 01:29:22 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -287,18 +287,18 @@ installExpress(dialogMenuItem *self)
if (!Dists) {
if (!dmenuOpenSimple(&MenuDistributions))
- return DITEM_FAILURE;
+ return DITEM_FAILURE | DITEM_RESTORE | DITEM_RECREATE;
}
if (!mediaDevice) {
if (!dmenuOpenSimple(&MenuMedia) || !mediaDevice)
- return DITEM_FAILURE;
+ return DITEM_FAILURE | DITEM_RESTORE | DITEM_RECREATE;
}
if (installCommit(self) == DITEM_FAILURE)
- return DITEM_FAILURE;
+ return DITEM_FAILURE | DITEM_RESTORE | DITEM_RECREATE;
- return DITEM_LEAVE_MENU;
+ return DITEM_LEAVE_MENU | DITEM_RESTORE | DITEM_RECREATE;
}
/* Novice mode installation */
@@ -306,6 +306,7 @@ int
installNovice(dialogMenuItem *self)
{
variable_set2(SYSTEM_STATE, "novice");
+ dialog_clear();
msgConfirm("In the next menu, you will need to set up a DOS-style (\"fdisk\") partitioning\n"
"scheme for your hard disk. If you simply wish to devote all disk space\n"
"to FreeBSD (overwritting anything else that might be on the disk(s) selected)\n"
@@ -316,6 +317,7 @@ installNovice(dialogMenuItem *self)
if (diskPartitionEditor(self) == DITEM_FAILURE)
return DITEM_FAILURE;
+ dialog_clear();
msgConfirm("Next, you need to create BSD partitions inside of the fdisk partition(s)\n"
"just created. If you have a reasonable amount of disk space (200MB or more)\n"
"and don't have any special requirements, simply use the (A)uto command to\n"
@@ -326,28 +328,30 @@ installNovice(dialogMenuItem *self)
if (diskLabelEditor(self) == DITEM_FAILURE)
return DITEM_FAILURE;
+ dialog_clear();
msgConfirm("Now it is time to select an installation subset. There are a number of\n"
"canned distribution sets, ranging from minimal installation sets to full\n"
"X11 developer oriented configurations. You can also select a custom set\n"
"of distributions if none of the provided ones are suitable.");
while (1) {
if (!dmenuOpenSimple(&MenuDistributions))
- return DITEM_FAILURE;
+ return DITEM_FAILURE | DITEM_RESTORE | DITEM_RECREATE;
if (Dists || !msgYesNo("No distributions selected. Are you sure you wish to continue?"))
break;
}
if (!mediaDevice) {
+ dialog_clear();
msgConfirm("Finally, you must specify an installation medium.");
if (!dmenuOpenSimple(&MenuMedia) || !mediaDevice)
- return DITEM_FAILURE;
+ return DITEM_FAILURE | DITEM_RESTORE | DITEM_RECREATE;
}
if (installCommit(self) == DITEM_FAILURE)
- return DITEM_FAILURE;
+ return DITEM_FAILURE | DITEM_RESTORE | DITEM_RECREATE;
- return DITEM_LEAVE_MENU;
+ return DITEM_LEAVE_MENU | DITEM_RESTORE | DITEM_RECREATE;
}
/*
@@ -463,7 +467,7 @@ installCommit(dialogMenuItem *self)
/* Final menu of last resort */
if (!msgYesNo("Would you like to go to the general configuration menu for a chance to set\n"
- "any last configuration options?"))
+ "any last options?"))
dmenuOpenSimple(&MenuConfigure);
/* Write out any changes .. */
@@ -482,7 +486,7 @@ installCommit(dialogMenuItem *self)
"see the Interfaces configuration item on the Configuration menu.");
}
else if (!strcmp(str, "novice")) {
- if (Dists || i == DITEM_FAILURE) {
+ if (Dists || DITEM_STATUS(i) == DITEM_FAILURE) {
msgConfirm("Installation completed with some errors. You may wish to\n"
"scroll through the debugging messages on VTY1 with the\n"
"scroll-lock feature. You can also chose \"No\" at the next\n"
@@ -498,9 +502,9 @@ installCommit(dialogMenuItem *self)
"may do so by typing: /stand/sysinstall.");
}
}
- variable_set2(SYSTEM_STATE, i == DITEM_FAILURE ? "error-install" : "full-install");
+ variable_set2(SYSTEM_STATE, DITEM_STATUS(i) == DITEM_FAILURE ? "error-install" : "full-install");
- return i;
+ return i | DITEM_RESTORE | DITEM_RECREATE;
}
int
diff --git a/release/sysinstall/installFinal.c b/release/sysinstall/installFinal.c
index 39370b6..ad441d6 100644
--- a/release/sysinstall/installFinal.c
+++ b/release/sysinstall/installFinal.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: installFinal.c,v 1.26 1996/04/13 13:31:42 jkh Exp $
+ * $Id: installFinal.c,v 1.27 1996/04/23 01:29:24 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard & Coranth Gryphon. All rights reserved.
@@ -178,7 +178,7 @@ configSamba(dialogMenuItem *self)
msgConfirm("Unable to open temporary smb.conf file.\n"
"Samba will have to be configured by hand.");
}
- return i;
+ return i | DITEM_RESTORE | DITEM_RECREATE;
}
int
diff --git a/release/sysinstall/installUpgrade.c b/release/sysinstall/installUpgrade.c
index aa06e72..72393bd3 100644
--- a/release/sysinstall/installUpgrade.c
+++ b/release/sysinstall/installUpgrade.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: installUpgrade.c,v 1.20 1996/04/13 13:31:43 jkh Exp $
+ * $Id: installUpgrade.c,v 1.21 1996/04/23 01:29:24 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -198,7 +198,7 @@ installUpgrade(dialogMenuItem *self)
"to select those portions of 2.1 you wish to install on top of your 2.0.5\n"
"system.");
if (!dmenuOpenSimple(&MenuDistributions))
- return DITEM_FAILURE;
+ return DITEM_FAILURE | DITEM_RESTORE | DITEM_RECREATE;
}
/* No bin selected? Not much of an upgrade.. */
@@ -218,7 +218,7 @@ installUpgrade(dialogMenuItem *self)
if (!mediaDevice) {
msgConfirm("Now you must specify an installation medium for the upgrade.");
if (!dmenuOpenSimple(&MenuMedia) || !mediaDevice)
- return DITEM_FAILURE;
+ return DITEM_FAILURE | DITEM_RESTORE | DITEM_RECREATE;
}
msgConfirm("OK. First, we're going to go to the disk label editor. In this editor\n"
@@ -233,7 +233,7 @@ installUpgrade(dialogMenuItem *self)
if (diskLabelEditor(self) == DITEM_FAILURE) {
msgConfirm("The disk label editor failed to work properly! Upgrade operation\n"
"aborted.");
- return DITEM_FAILURE;
+ return DITEM_FAILURE | DITEM_RESTORE | DITEM_RECREATE;
}
/* Don't write out MBR info */
@@ -242,20 +242,20 @@ installUpgrade(dialogMenuItem *self)
msgConfirm("Not all file systems were properly mounted. Upgrade operation\n"
"aborted.");
variable_unset(DISK_PARTITIONED);
- return DITEM_FAILURE;
+ return DITEM_FAILURE | DITEM_RESTORE | DITEM_RECREATE;
}
if (!copySelf()) {
msgConfirm("Couldn't clone the boot floppy onto the root file system.\n"
"Aborting.");
- return DITEM_FAILURE;
+ return DITEM_FAILURE | DITEM_RESTORE | DITEM_RECREATE;
}
if (chroot("/mnt") == DITEM_FAILURE) {
msgConfirm("Unable to chroot to /mnt - something is wrong with the\n"
"root partition or the way it's mounted if this doesn't work.");
variable_unset(DISK_PARTITIONED);
- return DITEM_FAILURE;
+ return DITEM_FAILURE | DITEM_RESTORE | DITEM_RECREATE;
}
chdir("/");
diff --git a/release/sysinstall/label.c b/release/sysinstall/label.c
index c924084..239b3a5 100644
--- a/release/sysinstall/label.c
+++ b/release/sysinstall/label.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: label.c,v 1.42 1996/04/13 13:31:45 jkh Exp $
+ * $Id: label.c,v 1.43 1996/04/23 01:29:25 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -834,11 +834,10 @@ diskLabel(char *str)
break;
case 'W':
- if (!msgYesNo("Are you SURE that you wish to make and mount all filesystems\n"
- "at this time? You also have the option of doing it later in\n"
- "one final 'commit' operation, and if you're at all unsure as\n"
- "to which option to chose, then PLEASE CHOSE NO! This option\n"
- "is DANGEROUS if you're not EXACTLY sure what you are doing!")) {
+ if (!msgYesNo("You also have the option of doing this later in one final 'commit'\n"
+ "operation, and it should also be noted that this option is NOT for\n"
+ "use during new installations but rather for modifying existing ones.\n\n"
+ "Are you absolutely SURE you want to do this now?")) {
variable_set2(DISK_LABELLED, "yes");
clear();
diskLabelCommit(NULL);
diff --git a/release/sysinstall/media.c b/release/sysinstall/media.c
index 9ac9eb9..384d358 100644
--- a/release/sysinstall/media.c
+++ b/release/sysinstall/media.c
@@ -4,7 +4,7 @@
* This is probably the last attempt in the `sysinstall' line, the next
* generation being slated to essentially a complete rewrite.
*
- * $Id: media.c,v 1.32 1996/04/13 13:31:54 jkh Exp $
+ * $Id: media.c,v 1.33 1996/04/23 01:29:26 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -99,11 +99,11 @@ mediaSetCDROM(dialogMenuItem *self)
status = dmenuOpenSimple(menu);
free(menu);
if (!status)
- return DITEM_FAILURE;
+ return DITEM_FAILURE | DITEM_RESTORE | DITEM_RECREATE;
}
else
mediaDevice = devs[0];
- return mediaDevice ? DITEM_LEAVE_MENU : DITEM_FAILURE;
+ return (mediaDevice ? DITEM_LEAVE_MENU : DITEM_FAILURE) | DITEM_RESTORE | DITEM_RECREATE;
}
static int
@@ -140,11 +140,11 @@ mediaSetFloppy(dialogMenuItem *self)
status = dmenuOpenSimple(menu);
free(menu);
if (!status)
- return DITEM_FAILURE;
+ return DITEM_FAILURE | DITEM_RESTORE | DITEM_RECREATE;
}
else
mediaDevice = devs[0];
- return mediaDevice ? DITEM_LEAVE_MENU : DITEM_FAILURE;
+ return (mediaDevice ? DITEM_LEAVE_MENU : DITEM_FAILURE) | DITEM_RESTORE | DITEM_RECREATE;
}
static int
@@ -179,11 +179,11 @@ mediaSetDOS(dialogMenuItem *self)
status = dmenuOpenSimple(menu);
free(menu);
if (!status)
- return DITEM_FAILURE;
+ return DITEM_FAILURE | DITEM_RESTORE | DITEM_RECREATE;
}
else
mediaDevice = devs[0];
- return mediaDevice ? DITEM_LEAVE_MENU : DITEM_FAILURE;
+ return (mediaDevice ? DITEM_LEAVE_MENU : DITEM_FAILURE) | DITEM_RESTORE | DITEM_RECREATE;
}
static int
@@ -220,7 +220,7 @@ mediaSetTape(dialogMenuItem *self)
status = dmenuOpenSimple(menu);
free(menu);
if (!status)
- return DITEM_FAILURE;
+ return DITEM_FAILURE | DITEM_RESTORE | DITEM_RECREATE;
}
else
mediaDevice = devs[0];
@@ -237,7 +237,7 @@ mediaSetTape(dialogMenuItem *self)
else
mediaDevice->private = strdup(val);
}
- return mediaDevice ? DITEM_LEAVE_MENU : DITEM_FAILURE;
+ return (mediaDevice ? DITEM_LEAVE_MENU : DITEM_FAILURE) | DITEM_RESTORE | DITEM_RECREATE;
}
/*
@@ -251,12 +251,12 @@ mediaSetFTP(dialogMenuItem *self)
char *cp;
if (!dmenuOpenSimple(&MenuMediaFTP))
- return DITEM_FAILURE;
+ return DITEM_FAILURE | DITEM_RESTORE | DITEM_RECREATE;
else
cp = variable_get(VAR_FTP_PATH);
if (!cp) {
msgConfirm("%s not set! Not setting an FTP installation path, OK?", VAR_FTP_PATH);
- return DITEM_FAILURE;
+ return DITEM_FAILURE | DITEM_RESTORE | DITEM_RECREATE;
}
else if (!strcmp(cp, "other")) {
variable_set2(VAR_FTP_PATH, "ftp://");
@@ -268,16 +268,16 @@ mediaSetFTP(dialogMenuItem *self)
"Where <path> is relative to the anonymous ftp directory or the\n"
"home directory of the user being logged in as.");
if (!cp || !*cp)
- return DITEM_FAILURE;
+ return DITEM_FAILURE | DITEM_RESTORE | DITEM_RECREATE;
}
if (strncmp("ftp://", cp, 6)) {
msgConfirm("Sorry, %s is an invalid URL!", cp);
- return DITEM_FAILURE;
+ return DITEM_FAILURE | DITEM_RESTORE | DITEM_RECREATE;
}
strcpy(ftpDevice.name, cp);
if (!tcpDeviceSelect())
- return DITEM_FAILURE;
+ return DITEM_FAILURE | DITEM_RESTORE | DITEM_RECREATE;
ftpDevice.type = DEVICE_TYPE_FTP;
ftpDevice.init = mediaInitFTP;
@@ -286,7 +286,7 @@ mediaSetFTP(dialogMenuItem *self)
ftpDevice.shutdown = mediaShutdownFTP;
ftpDevice.private = mediaDevice; /* Set to network device by tcpDeviceSelect() */
mediaDevice = &ftpDevice;
- return DITEM_LEAVE_MENU;
+ return DITEM_LEAVE_MENU | DITEM_RESTORE | DITEM_RECREATE;
}
int
@@ -493,8 +493,8 @@ int
mediaGetType(dialogMenuItem *self)
{
if (!dmenuOpenSimple(&MenuMedia))
- return DITEM_FAILURE;
- return DITEM_SUCCESS;
+ return DITEM_FAILURE | DITEM_RESTORE | DITEM_RECREATE;
+ return DITEM_SUCCESS | DITEM_RESTORE | DITEM_RECREATE;
}
/* Return TRUE if all the media variables are set up correctly */
diff --git a/release/sysinstall/menus.c b/release/sysinstall/menus.c
index 9ce6905..5a44ac1 100644
--- a/release/sysinstall/menus.c
+++ b/release/sysinstall/menus.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: menus.c,v 1.50 1996/04/13 13:31:58 jkh Exp $
+ * $Id: menus.c,v 1.51 1996/04/23 01:29:28 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -36,6 +36,76 @@
#include "sysinstall.h"
+/* Miscellaneous work routines for menus */
+static int
+setSrc(dialogMenuItem *self)
+{
+ Dists |= DIST_SRC;
+ SrcDists = DIST_SRC_ALL | DIST_SRC_SMAILCF;
+ return DITEM_SUCCESS | DITEM_REDRAW;
+}
+
+static int
+clearSrc(dialogMenuItem *self)
+{
+ Dists &= ~DIST_SRC;
+ SrcDists = 0;
+ return DITEM_SUCCESS | DITEM_REDRAW;
+}
+
+static int
+setX11All(dialogMenuItem *self)
+{
+ XF86Dists = DIST_XF86_ALL;
+ XF86ServerDists = DIST_XF86_SERVER_ALL;
+ XF86FontDists = DIST_XF86_FONTS_ALL;
+ Dists |= DIST_XF86;
+ return DITEM_SUCCESS | DITEM_REDRAW;
+}
+
+static int
+clearX11All(dialogMenuItem *self)
+{
+ XF86Dists = 0;
+ XF86ServerDists = 0;
+ XF86FontDists = 0;
+ Dists &= ~DIST_XF86;
+ return DITEM_SUCCESS | DITEM_REDRAW;
+}
+
+static int
+setX11Misc(dialogMenuItem *self)
+{
+ XF86Dists |= DIST_XF86_MISC_ALL;
+ Dists |= DIST_XF86;
+ return DITEM_SUCCESS | DITEM_REDRAW;
+}
+
+static int
+clearX11Misc(dialogMenuItem *self)
+{
+ XF86Dists &= ~DIST_XF86_MISC_ALL;
+ if (!XF86ServerDists && !XF86FontDists)
+ Dists &= ~DIST_XF86;
+ return DITEM_SUCCESS | DITEM_REDRAW;
+}
+
+static int
+setX11Servers(dialogMenuItem *self)
+{
+ XF86Dists |= DIST_XF86_SERVER;
+ XF86ServerDists = DIST_XF86_SERVER_ALL;
+ return DITEM_SUCCESS | DITEM_REDRAW;
+}
+
+static int
+clearX11Servers(dialogMenuItem *self)
+{
+ XF86Dists &= ~DIST_XF86_SERVER;
+ XF86ServerDists = 0;
+ return DITEM_SUCCESS | DITEM_REDRAW;
+}
+
/* All the system menus go here.
*
* Hardcoded things like version number strings will disappear from
@@ -62,7 +132,7 @@ option by pressing [ENTER].", /* prompt */
{ "7 Fixit", "Go into repair mode with CDROM or floppy", NULL, dmenuSubmenu, NULL, &MenuFixit },
{ "8 Upgrade","Upgrade an existing 2.0.5 system", NULL, installUpgrade },
{ "9 Configure","Do post-install configuration of FreeBSD", NULL, dmenuSubmenu, NULL, &MenuConfigure },
- { "0 Exit", "Exit this menu (and the installation)", NULL },
+ { "0 Exit", "Exit this menu (and the installation)", NULL, dmenuCancel },
{ NULL } },
};
@@ -130,7 +200,7 @@ whichMouse(dialogMenuItem *self)
}
DMenu MenuMouse = {
- DMENU_RADIO_TYPE,
+ DMENU_RADIO_TYPE | DMENU_SELECTION_RETURNS,
"Please select your mouse type from the following menu",
"There are many different types of mice currently on the market,\n\
but this configuration menu should at least narrow down the choices\n\
@@ -195,7 +265,7 @@ distribution files.",
};
DMenu MenuMediaFTP = {
- DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
+ DMENU_RADIO_TYPE | DMENU_SELECTION_RETURNS,
"Please select a FreeBSD FTP distribution site",
"Please select the site closest to you or \"other\" if you'd like to\n\
specify a different choice. Also note that not every site listed here\n\
@@ -375,7 +445,7 @@ whichMedia(dialogMenuItem *self)
/* The media selection menu */
DMenu MenuMedia = {
- DMENU_RADIO_TYPE,
+ DMENU_RADIO_TYPE | DMENU_SELECTION_RETURNS,
"Choose Installation Media",
"FreeBSD can be installed from a variety of different installation\n\
media, ranging from floppies to an Internet FTP server. If you're\n\
@@ -427,11 +497,11 @@ When you are finished, select Cancel or chose Exit.",
NULL, distSetXUser },
{ "6 Minimal", "The smallest configuration possible [44MB]",
NULL, distSetMinimum },
- { "7 Everything", "All sources, binaries and XFree86 binaries [700MB]",
- NULL, distSetEverything },
- { "8 Custom", "Specify your own distribution set [?]",
+ { "7 Custom", "Specify your own distribution set [?]",
NULL, dmenuSubmenu, NULL, &MenuSubDistributions },
- { "9 Clear", "Reset selected distribution list to None",
+ { "8 All", "All sources, binaries and XFree86 binaries [700MB]",
+ NULL, distSetEverything },
+ { "9 Clear", "Reset selected distribution list to nothing [0MB]",
NULL, distReset },
{ "0 Exit", "Exit this menu (returning to previous)",
NULL, dmenuCancel },
@@ -441,23 +511,23 @@ When you are finished, select Cancel or chose Exit.",
static int
DESFlagCheck(dialogMenuItem *item)
{
- return Dists & DIST_DES;
+ return DESDists;
}
static int
srcFlagCheck(dialogMenuItem *item)
{
- return Dists & DIST_SRC;
+ return SrcDists;
}
static int
x11FlagCheck(dialogMenuItem *item)
{
- return Dists & DIST_XF86;
+ return XF86Dists;
}
DMenu MenuSubDistributions = {
- DMENU_CHECKLIST_TYPE,
+ DMENU_CHECKLIST_TYPE | DMENU_SELECTION_RETURNS,
"Select the distributions you wish to install.",
"Please check off the distributions you wish to install. At the\n\
very minimum, this should be \"bin\". WARNING: Do not export the\n\
@@ -494,7 +564,9 @@ DES distribution out of the U.S.! It is for U.S. customers only.",
x11FlagCheck, distSetXF86 },
{ "xperimnt", "Experimental work in progress!",
dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_EXPERIMENTAL },
- { "Clear", "Reset selected distribution list to None",
+ { "All", "All sources, binaries and XFree86 binaries [700MB]",
+ NULL, distSetEverything },
+ { "Clear", "Reset all of the above [0MB]",
NULL, distReset, NULL, NULL, ' ', ' ', ' ' },
{ "Exit", "Exit this menu (returning to previous)",
NULL, dmenuCancel, NULL, NULL, ' ', ' ', ' ' },
@@ -502,7 +574,7 @@ DES distribution out of the U.S.! It is for U.S. customers only.",
};
DMenu MenuDESDistributions = {
- DMENU_CHECKLIST_TYPE,
+ DMENU_CHECKLIST_TYPE | DMENU_SELECTION_RETURNS,
"Select the encryption facilities you wish to install.",
"Please check off any special DES-based encryption distributions\n\
you would like to install. Please note that these services are NOT FOR\n\
@@ -525,7 +597,7 @@ software, please consult the release notes.",
};
DMenu MenuSrcDistributions = {
- DMENU_CHECKLIST_TYPE,
+ DMENU_CHECKLIST_TYPE | DMENU_SELECTION_RETURNS ,
"Select the sub-components of src you wish to install.",
"Please check off those portions of the FreeBSD source tree\n\
you wish to install.",
@@ -563,52 +635,17 @@ you wish to install.",
dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_USBIN },
{ "smailcf", "/usr/src/usr.sbin (sendmail config macros) [341K]",
dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_SMAILCF },
- { "Clear", "Reset selected source distribution list to None",
- NULL, distSrcReset, NULL, NULL, ' ', ' ', ' ' },
+ { "All", "Select all of the above [120MB]",
+ NULL, setSrc, NULL, NULL, ' ', ' ', ' ' },
+ { "Clear", "Reset all of the above [0MB]",
+ NULL, clearSrc, NULL, NULL, ' ', ' ', ' ' },
{ "Exit", "Exit this menu (returning to previous)",
NULL, dmenuCancel, NULL, NULL, ' ', ' ', ' ' },
{ NULL } },
};
-static int
-clearx11(dialogMenuItem *self)
-{
- XF86Dists = 0;
- XF86ServerDists = 0;
- XF86FontDists = 0;
- Dists &= ~DIST_XF86;
- return DITEM_SUCCESS | DITEM_REDRAW;
-}
-
-static int
-clearx11Servers(dialogMenuItem *self)
-{
- XF86Dists &= ~DIST_XF86_SERVER;
- XF86ServerDists = 0;
- return DITEM_SUCCESS | DITEM_REDRAW;
-}
-
-static int
-checkx11Basic(dialogMenuItem *self)
-{
- return XF86Dists;
-}
-
-static int
-checkx11Servers(dialogMenuItem *self)
-{
- return XF86ServerDists;
-}
-
-static int
-checkx11Fonts(dialogMenuItem *self)
-{
- return XF86FontDists;
-}
-
-
DMenu MenuXF86Select = {
- DMENU_CHECKLIST_TYPE,
+ DMENU_NORMAL_TYPE,
"XFree86 3.1.2-S Distribution",
"Please select the components you need from the XFree86 3.1.2-S\n\
distribution. We recommend that you select what you need from the basic\n\
@@ -616,20 +653,22 @@ component set and at least one entry from the Server and Font set menus.",
"Press F1 to read the XFree86 release notes for FreeBSD",
"XF86",
{ { "Basic", "Basic component menu (required)",
- checkx11Basic, dmenuSubmenu, NULL, &MenuXF86SelectCore },
+ NULL, dmenuSubmenu, NULL, &MenuXF86SelectCore },
{ "Server", "X server menu",
- checkx11Servers, dmenuSubmenu, NULL, &MenuXF86SelectServer },
+ NULL, dmenuSubmenu, NULL, &MenuXF86SelectServer },
{ "Fonts", "Font set menu",
- checkx11Fonts, dmenuSubmenu, NULL, &MenuXF86SelectFonts },
+ NULL, dmenuSubmenu, NULL, &MenuXF86SelectFonts },
+ { "All", "Select the entire XFree86 distribution",
+ NULL, setX11All },
{ "Clear", "Reset XFree86 distribution list",
- NULL, clearx11, NULL, NULL, ' ', ' ', ' ' },
+ NULL, clearX11All },
{ "Exit", "Exit this menu (returning to previous)",
NULL, dmenuCancel, NULL, NULL, ' ', ' ', ' ' },
{ NULL } },
};
DMenu MenuXF86SelectCore = {
- DMENU_CHECKLIST_TYPE,
+ DMENU_CHECKLIST_TYPE | DMENU_SELECTION_RETURNS,
"XFree86 3.1.2-S base distribution types",
"Please check off the basic XFree86 components you wish to install.\n\
Bin, lib, xicf, and xdcf are recommended for a minimum installaion.",
@@ -661,15 +700,17 @@ Bin, lib, xicf, and xdcf are recommended for a minimum installaion.",
dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_PEX },
{ "sources", "XFree86 3.1.2-S standard + contrib sources [200MB]",
dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_SRC },
- { "Clear", "Reset XFree86 distribution list",
- NULL, clearx11, NULL, NULL, ' ', ' ', ' ' },
+ { "All", "Select all of the above [20MB]",
+ NULL, setX11Misc, NULL, NULL, ' ', ' ', ' ' },
+ { "Clear", "Reset all of the above [0MB]",
+ NULL, clearX11Misc, NULL, NULL, ' ', ' ', ' ' },
{ "Exit", "Exit this menu (returning to previous)",
NULL, dmenuCancel, NULL, NULL, ' ', ' ', ' ' },
{ NULL } },
};
DMenu MenuXF86SelectFonts = {
- DMENU_CHECKLIST_TYPE,
+ DMENU_CHECKLIST_TYPE | DMENU_SELECTION_RETURNS ,
"Font distribution selection.",
"Please check off the individual font distributions you wish to\n\
install. At the minimum, you should install the standard\n\
@@ -695,7 +736,7 @@ install. At the minimum, you should install the standard\n\
};
DMenu MenuXF86SelectServer = {
- DMENU_CHECKLIST_TYPE,
+ DMENU_CHECKLIST_TYPE | DMENU_SELECTION_RETURNS,
"X Server selection.",
"Please check off the types of X servers you wish to install.\n\
If you are unsure as to which server will work for your graphics card,\n\
@@ -727,23 +768,25 @@ Mono servers are particularly well-suited to most LCD displays).",
dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_W32 },
{ "nest", "A nested server for testing purposes [1.8MB]",
dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_NEST },
- { "Clear", "Reset XFree86 server list",
- NULL, clearx11Servers, NULL, NULL, ' ', ' ', ' ' },
+ { "All", "Select all of the above [25MB]",
+ NULL, setX11Servers, NULL, NULL, ' ', ' ', ' ' },
+ { "Clear", "Reset all of the above [0MB]",
+ NULL, clearX11Servers, NULL, NULL, ' ', ' ', ' ' },
{ "Exit", "Exit this menu (returning to previous)",
NULL, dmenuCancel, NULL, NULL, ' ', ' ', ' ' },
{ NULL } },
};
DMenu MenuDiskDevices = {
- DMENU_CHECKLIST_TYPE,
+ DMENU_CHECKLIST_TYPE | DMENU_SELECTION_RETURNS,
"Select Drive(s)",
"Please select the drive, or drives, on which you wish to perform\n\
this operation. If you are attempting to install a boot partition\n\
on a drive other than the first one or have multiple operating\n\
systems on your machine, you will have the option to install a boot\n\
manager later. To select a drive, use the arrow keys to move to it\n\
-and press [SPACE]. When you're finished, select Cancel to go on to\n\
-the next step.",
+and press [SPACE].\n\n\
+When you're finished, select Cancel to go on to the next step.",
"Press F1 for important information regarding disk geometry!",
"drives",
{ { NULL } },
@@ -786,7 +829,7 @@ to install it from and how you wish to allocate disk storage to FreeBSD.",
/* MBR type menu */
DMenu MenuMBRType = {
- DMENU_RADIO_TYPE,
+ DMENU_RADIO_TYPE | DMENU_SELECTION_RETURNS,
"overwrite me", /* will be disk specific label */
"FreeBSD comes with a boot selector that allows you to easily\n"
"select between FreeBSD and any other operating systems on your machine\n"
@@ -795,8 +838,8 @@ DMenu MenuMBRType = {
"to do so (limitations in the PC BIOS usually prevent this otherwise).\n"
"If you do not want a boot selector, or wish to replace an existing\n"
"one, select \"standard\". If you would prefer your Master Boot\n"
-"Record to remain untouched then select \"none\". NOTE: PC-DOS users\n"
-"will almost certainly NOT want to select one!",
+"Record to remain untouched then select \"None\".\n\n"
+" NOTE: PC-DOS users will almost certainly require \"None\"!",
"Press F1 to read the installation guide",
"install",
{ { "BootMgr", "Install the FreeBSD Boot Manager (\"Booteasy\")",
@@ -886,7 +929,7 @@ aspects of your system's network configuration.",
};
DMenu MenuNTP = {
- DMENU_RADIO_TYPE,
+ DMENU_RADIO_TYPE | DMENU_SELECTION_RETURNS,
"NTPDATE Server Selection",
"There are a number of time syncronization servers available\n\
for public use around the Internet. Please select one reasonably\n\
@@ -953,7 +996,7 @@ When you are done setting configuration options, select Cancel.",
};
DMenu MenuSysconsKeymap = {
- DMENU_RADIO_TYPE,
+ DMENU_RADIO_TYPE | DMENU_SELECTION_RETURNS,
"System Console Keymap",
"The default system console driver for FreeBSD (syscons) defaults\n\
to a standard \"American\" keyboard map. Users in other countries\n\
@@ -980,7 +1023,7 @@ the other keymaps below.",
};
DMenu MenuSysconsKeyrate = {
- DMENU_RADIO_TYPE,
+ DMENU_RADIO_TYPE | DMENU_SELECTION_RETURNS,
"System Console Keyboard Repeat Rate",
"This menu allows you to set the speed at which keys repeat\n\
when held down.",
@@ -994,7 +1037,7 @@ when held down.",
};
DMenu MenuSysconsSaver = {
- DMENU_RADIO_TYPE,
+ DMENU_RADIO_TYPE | DMENU_SELECTION_RETURNS,
"System Console Screen Saver",
"By default, the console driver will not attempt to do anything\n\
special with your screen when it's idle. If you expect to leave your\n\
diff --git a/release/sysinstall/options.c b/release/sysinstall/options.c
index de51b5e..003a0bd 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.33 1996/04/13 13:32:06 jkh Exp $
+ * $Id: options.c,v 1.34 1996/04/23 01:29:31 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -231,6 +231,7 @@ optionsEditor(dialogMenuItem *self)
standend();
clrtoeol();
move(0, 14);
+ refresh();
/* Start the edit loop */
key = toupper(getch());
diff --git a/release/sysinstall/sysinstall.h b/release/sysinstall/sysinstall.h
index 00ce68d..bdf8068 100644
--- a/release/sysinstall/sysinstall.h
+++ b/release/sysinstall/sysinstall.h
@@ -4,7 +4,7 @@
* This is probably the last attempt in the `sysinstall' line, the next
* generation being slated to essentially a complete rewrite.
*
- * $Id: sysinstall.h,v 1.50 1996/04/13 13:32:09 jkh Exp $
+ * $Id: sysinstall.h,v 1.51 1996/04/23 01:29:32 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -381,9 +381,8 @@ extern int diskPartitionWrite(dialogMenuItem *self);
extern void diskPartition(Device *dev, Disk *d);
/* dist.c */
-extern int distSetCustom(char *str);
extern int distReset(dialogMenuItem *self);
-extern int distSrcReset(dialogMenuItem *self);
+extern int distSetCustom(char *str);
extern int distSetDeveloper(dialogMenuItem *self);
extern int distSetXDeveloper(dialogMenuItem *self);
extern int distSetKernDeveloper(dialogMenuItem *self);
diff --git a/release/sysinstall/system.c b/release/sysinstall/system.c
index 5258eb8..94b2a44 100644
--- a/release/sysinstall/system.c
+++ b/release/sysinstall/system.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: system.c,v 1.50 1996/04/13 13:32:10 jkh Exp $
+ * $Id: system.c,v 1.51 1996/04/23 01:29:33 jkh Exp $
*
* Jordan Hubbard
*
@@ -67,6 +67,7 @@ systemInitialize(int argc, char **argv)
/* XXX - libdialog has particularly bad return value checking */
init_dialog();
+
/* If we haven't crashed I guess dialog is running ! */
DialogActive = TRUE;
OpenPOWER on IntegriCloud