summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1996-04-07 03:52:36 +0000
committerjkh <jkh@FreeBSD.org>1996-04-07 03:52:36 +0000
commit61af07d0231e53139c2d8c49081a0f43da46af74 (patch)
treea289c0714788a15dfb0bcf3c9030a3425c5072c3
parent318997a39fbec1e8347a1ff0431ca2713799510f (diff)
downloadFreeBSD-src-61af07d0231e53139c2d8c49081a0f43da46af74.zip
FreeBSD-src-61af07d0231e53139c2d8c49081a0f43da46af74.tar.gz
Major surgery.
1. Use new dialog menu hacks (no strings, just arrays of dialogMenuItem structs) so that I can create composite menus with radio/checkbox/... items in them, removing some long-standing UI bogons in various menus. This work isn't finished yet, but will be done in two phases. This is phase one. 2. Remove all the script installation stuff. I never got time to document it, it was arcane and it just complicated much of the code. There are better ways of doing this if I want to do auto-driven installations later. 3. Remove much dead code and otherwise attempt to remove as much historical grot as possible so that this code is easier to hack on. This is also a two-stage process, phase one of which is now complete.
-rw-r--r--release/sysinstall/Makefile6
-rw-r--r--release/sysinstall/anonFTP.c4
-rw-r--r--release/sysinstall/apache.c4
-rw-r--r--release/sysinstall/config.c30
-rw-r--r--release/sysinstall/decode.c154
-rw-r--r--release/sysinstall/devices.c17
-rw-r--r--release/sysinstall/disks.c100
-rw-r--r--release/sysinstall/dist.c89
-rw-r--r--release/sysinstall/dist.h11
-rw-r--r--release/sysinstall/dmenu.c163
-rw-r--r--release/sysinstall/doc.c13
-rw-r--r--release/sysinstall/install.c62
-rw-r--r--release/sysinstall/installFinal.c18
-rw-r--r--release/sysinstall/installPreconfig.c221
-rw-r--r--release/sysinstall/installUpgrade.c13
-rw-r--r--release/sysinstall/label.c132
-rw-r--r--release/sysinstall/main.c10
-rw-r--r--release/sysinstall/media.c53
-rw-r--r--release/sysinstall/menus.c1119
-rw-r--r--release/sysinstall/options.c4
-rw-r--r--release/sysinstall/sysinstall.h164
-rw-r--r--release/sysinstall/tcpip.c4
-rw-r--r--usr.sbin/sade/Makefile6
-rw-r--r--usr.sbin/sade/config.c30
-rw-r--r--usr.sbin/sade/devices.c17
-rw-r--r--usr.sbin/sade/disks.c100
-rw-r--r--usr.sbin/sade/dmenu.c163
-rw-r--r--usr.sbin/sade/install.c62
-rw-r--r--usr.sbin/sade/label.c132
-rw-r--r--usr.sbin/sade/main.c10
-rw-r--r--usr.sbin/sade/menus.c1119
-rw-r--r--usr.sbin/sade/sade.h164
-rw-r--r--usr.sbin/sysinstall/Makefile6
-rw-r--r--usr.sbin/sysinstall/anonFTP.c4
-rw-r--r--usr.sbin/sysinstall/config.c30
-rw-r--r--usr.sbin/sysinstall/devices.c17
-rw-r--r--usr.sbin/sysinstall/disks.c100
-rw-r--r--usr.sbin/sysinstall/dist.c89
-rw-r--r--usr.sbin/sysinstall/dist.h11
-rw-r--r--usr.sbin/sysinstall/dmenu.c163
-rw-r--r--usr.sbin/sysinstall/doc.c13
-rw-r--r--usr.sbin/sysinstall/install.c62
-rw-r--r--usr.sbin/sysinstall/installUpgrade.c13
-rw-r--r--usr.sbin/sysinstall/label.c132
-rw-r--r--usr.sbin/sysinstall/main.c10
-rw-r--r--usr.sbin/sysinstall/media.c53
-rw-r--r--usr.sbin/sysinstall/menus.c1119
-rw-r--r--usr.sbin/sysinstall/options.c4
-rw-r--r--usr.sbin/sysinstall/sysinstall.h164
-rw-r--r--usr.sbin/sysinstall/tcpip.c4
50 files changed, 2504 insertions, 3684 deletions
diff --git a/release/sysinstall/Makefile b/release/sysinstall/Makefile
index eb87590..afeb135 100644
--- a/release/sysinstall/Makefile
+++ b/release/sysinstall/Makefile
@@ -4,11 +4,11 @@ CLEANFILES= makedevs.c rtermcap
.PATH: ${.CURDIR}/../disklabel ${.CURDIR}/../../usr.bin/cksum
-SRCS= anonFTP.c apache.c attr.c cdrom.c command.c config.c decode.c \
+SRCS= anonFTP.c apache.c attr.c cdrom.c command.c config.c \
devices.c disks.c dist.c dmenu.c doc.c dos.c floppy.c ftp.c \
ftp_strat.c globals.c index.c install.c installFinal.c \
- installPreconfig.c installUpgrade.c label.c lndir.c main.c \
- makedevs.c media.c menus.c misc.c msg.c network.c nfs.c options.c \
+ installUpgrade.c label.c lndir.c main.c makedevs.c media.c \
+ menus.c misc.c msg.c network.c nfs.c options.c \
package.c system.c tape.c tcpip.c termcap.c ufs.c variable.c wizard.c
CFLAGS+= -Wall -I${.CURDIR}/../../gnu/lib/libdialog
diff --git a/release/sysinstall/anonFTP.c b/release/sysinstall/anonFTP.c
index 0af53be..3e02157 100644
--- a/release/sysinstall/anonFTP.c
+++ b/release/sysinstall/anonFTP.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: anonFTP.c,v 1.8 1996/03/18 15:27:39 jkh Exp $
+ * $Id: anonFTP.c,v 1.9 1996/03/23 07:21:28 jkh Exp $
*
* Copyright (c) 1995
* Coranth Gryphon. All rights reserved.
@@ -402,7 +402,7 @@ anonftpOpenDialog(void)
}
int
-configAnonFTP(char *unused)
+configAnonFTP(dialogMenuItem *self)
{
int i;
diff --git a/release/sysinstall/apache.c b/release/sysinstall/apache.c
index b058199..4bad209 100644
--- a/release/sysinstall/apache.c
+++ b/release/sysinstall/apache.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: apache.c,v 1.15 1996/03/18 15:27:41 jkh Exp $
+ * $Id: apache.c,v 1.16 1996/03/23 07:23:39 jkh Exp $
*
* Copyright (c) 1995
* Coranth Gryphon. All rights reserved.
@@ -400,7 +400,7 @@ apacheOpenDialog(void)
}
int
-configApache(char *unused)
+configApache(dialogMenuItem *self)
{
int i;
char company[64], file[128];
diff --git a/release/sysinstall/config.c b/release/sysinstall/config.c
index 40622be..5609ad0 100644
--- a/release/sysinstall/config.c
+++ b/release/sysinstall/config.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: config.c,v 1.21 1996/03/21 09:30:08 jkh Exp $
+ * $Id: config.c,v 1.22 1996/03/24 18:57:34 joerg Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -326,18 +326,32 @@ configSysconfig(void)
}
int
-configSaverTimeout(char *str)
+configSaverTimeout(dialogMenuItem *self)
{
- return variable_get_value(VAR_BLANKTIME, "Enter time-out period in seconds for screen saver")
- ? RET_SUCCESS : RET_FAIL;
+ return variable_get_value(VAR_BLANKTIME, "Enter time-out period in seconds for screen saver") ?
+ RET_SUCCESS : RET_FAIL;
}
int
-configNTP(char *str)
+configNTP(dialogMenuItem *self)
{
return variable_get_value(VAR_NTPDATE, "Enter the name of an NTP server") ? RET_SUCCESS : RET_FAIL;
}
+int
+configXFree86(dialogMenuItem *self)
+{
+ if (file_executable("/usr/X11R6/bin/xf86config")) {
+ systemExecute("/usr/X11R6/bin/xf86config");
+ return RET_SUCCESS;
+ }
+ else {
+ msgConfirm("XFree86 does not appear to be installed! Please install\n"
+ "The XFree86 distribution before attempting to configure it.");
+ return RET_FAIL;
+ }
+}
+
void
configResolv(void)
{
@@ -398,7 +412,7 @@ skip:
}
int
-configRoutedFlags(char *str)
+configRoutedFlags(dialogMenuItem *self)
{
return variable_get_value(VAR_ROUTEDFLAGS,
"Specify the flags for routed; -q is the default, -s is\n"
@@ -406,7 +420,7 @@ configRoutedFlags(char *str)
}
int
-configPackages(char *str)
+configPackages(dialogMenuItem *self)
{
static PkgNode top, plist;
static Boolean index_initted = FALSE;
@@ -483,7 +497,7 @@ configPackages(char *str)
}
int
-configPorts(char *str)
+configPorts(dialogMenuItem *self)
{
char *cp, *dist = NULL; /* Shut up compiler */
diff --git a/release/sysinstall/decode.c b/release/sysinstall/decode.c
deleted file mode 100644
index 68f97af..0000000
--- a/release/sysinstall/decode.c
+++ /dev/null
@@ -1,154 +0,0 @@
-/*
- * The new sysinstall program.
- *
- * This is probably the last program in the `sysinstall' line - the next
- * generation being essentially a complete rewrite.
- *
- * $Id: decode.c,v 1.6.2.5 1995/11/03 12:02:26 jkh Exp $
- *
- * 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.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Jordan Hubbard
- * for the FreeBSD Project.
- * 4. The name of Jordan Hubbard or the FreeBSD project may not be used to
- * endorse or promote products derived from this software without specific
- * prior written permission.
- *
- * 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"
-
-DMenuItem *
-decode(DMenu *menu, char *name)
-{
- DMenuItem *tmp;
-
- for (tmp = menu->items; tmp->title; tmp++)
- if (!strcmp(name, tmp->title))
- break;
- if (!tmp->title)
- return NULL;
- return tmp;
-}
-
-int
-dispatch(DMenuItem *tmp, char *name)
-{
- int val = RET_SUCCESS;
-
- switch (tmp->type) {
- /* We want to simply display a help file */
- case DMENU_DISPLAY_FILE:
- systemDisplayHelp((char *)tmp->ptr);
- break;
-
- /* It's a sub-menu; recurse on it */
- case DMENU_SUBMENU:
- (void)dmenuOpenSimple((DMenu *)tmp->ptr);
- break;
-
- /* Execute it as a direct exec */
- case DMENU_SYSTEM_COMMAND:
- (void)systemExecute((char *)tmp->ptr);
- break;
-
- /* Same as above, but execute it in a prgbox */
- case DMENU_SYSTEM_COMMAND_BOX:
- use_helpfile(NULL);
- use_helpline("Select OK to dismiss this dialog");
- dialog_prgbox(tmp->title, (char *)tmp->ptr, 22, 76, 1, 1);
- dialog_clear();
- break;
-
- case DMENU_CALL:
- val = (((int (*)())tmp->ptr)(name));
- break;
-
- case DMENU_CANCEL:
- val = RET_DONE;
- break;
-
- case DMENU_SET_VARIABLE:
- variable_set((char *)tmp->ptr);
- msgInfo("Set %s", tmp->ptr);
- break;
-
- case DMENU_SET_FLAG:
- *((unsigned int *)tmp->ptr) |= tmp->parm;
- break;
-
- case DMENU_SET_VALUE:
- *((unsigned int *)tmp->ptr) = tmp->parm;
- break;
-
- case DMENU_NOP:
- break;
-
- default:
- msgFatal("Don't know how to deal with menu type %d", tmp->type);
- }
- return val;
-}
-
-int
-decode_and_dispatch_multiple(DMenu *menu, char *names)
-{
- DMenuItem *tmp;
- int errors = 0;
-
- string_prune(names);
- names = string_skipwhite(names);
-
- /* KLUDGE ALERT:
- * To make multi-choice flag arrays work this assumes that ALL items in
- * a menu appear in the same mask!! If you need mixed masks, use
- * submenus.
- */
- if (menu->items[0].type == DMENU_SET_FLAG)
- *((unsigned int *)menu->items[0].ptr) = 0;
-
- while (names) {
- char *cp;
-
- cp = index(names, '\n');
- if (cp)
- *cp++ = 0;
- /* Were no options actually selected? */
- if (!*names)
- return FALSE;
- if ((tmp = decode(menu, names)) != NULL) {
- if (dispatch(tmp, names) != RET_SUCCESS)
- ++errors;
- }
- else
- msgFatal("Couldn't find a handler for item `%s' in menu `%s'!",
- names, menu->title);
- names = cp;
- }
- return errors;
-}
diff --git a/release/sysinstall/devices.c b/release/sysinstall/devices.c
index 06e537f..49b4c08 100644
--- a/release/sysinstall/devices.c
+++ b/release/sysinstall/devices.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: devices.c,v 1.41 1996/03/18 15:27:46 jkh Exp $
+ * $Id: devices.c,v 1.42 1996/03/24 09:36:41 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -368,24 +368,21 @@ deviceCreateMenu(DMenu *menu, DeviceType type, int (*hook)())
return NULL;
for (numdevs = 0; devs[numdevs]; numdevs++);
- tmp = (DMenu *)safe_malloc(sizeof(DMenu) + (sizeof(DMenuItem) * (numdevs + 1)));
+ tmp = (DMenu *)safe_malloc(sizeof(DMenu) + (sizeof(dialogMenuItem) * (numdevs + 1)));
bcopy(menu, tmp, sizeof(DMenu));
for (i = 0; devs[i]; i++) {
- tmp->items[i].title = devs[i]->name;
+ tmp->items[i].prompt = devs[i]->name;
for (j = 0; device_names[j].name; j++) {
if (!strncmp(devs[i]->name, device_names[j].name, strlen(device_names[j].name))) {
- tmp->items[i].prompt = device_names[j].description;
+ tmp->items[i].title = device_names[j].description;
break;
}
}
if (!device_names[j].name)
- tmp->items[i].prompt = "<unknown device type>";
- tmp->items[i].type = DMENU_CALL;
- tmp->items[i].ptr = hook;
- tmp->items[i].disabled = FALSE;
- tmp->items[i].check = NULL;
+ tmp->items[i].title = "<unknown device type>";
+ tmp->items[i].fire = hook;
+ tmp->items[i].checked = NULL;
}
- tmp->items[i].type = DMENU_NOP;
tmp->items[i].title = NULL;
return tmp;
}
diff --git a/release/sysinstall/disks.c b/release/sysinstall/disks.c
index c07afb0..6f8f3de 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.37 1996/03/20 14:11:21 jkh Exp $
+ * $Id: disks.c,v 1.38 1996/03/24 18:57:35 joerg Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -135,92 +135,6 @@ print_command_summary()
move(0, 0);
}
-/* Partition a disk based wholly on which variables are set */
-static void
-scriptPartition(Device *dev, Disk *d)
-{
- char *cp;
- int i, sz;
-
- record_chunks(d);
- cp = variable_get(VAR_GEOMETRY);
- if (cp) {
- msgDebug("Setting geometry from script to: %s\n", cp);
- d->bios_cyl = strtol(cp, &cp, 0);
- d->bios_hd = strtol(cp + 1, &cp, 0);
- d->bios_sect = strtol(cp + 1, 0, 0);
- }
-
- cp = variable_get(VAR_DISKSPACE);
- if (cp) {
- if (!strcmp(cp, "free")) {
- /* Do free disk space case */
- for (i = 0; chunk_info[i]; i++) {
- /* If a chunk is at least 10MB in size, use it. */
- if (chunk_info[i]->type == unused && chunk_info[i]->size > (10 * ONE_MEG)) {
- Create_Chunk(d, chunk_info[i]->offset, chunk_info[i]->size, freebsd, 3,
- (chunk_info[i]->flags & CHUNK_ALIGN));
- variable_set2(DISK_PARTITIONED, "yes");
- break;
- }
- }
- if (!chunk_info[i]) {
- dialog_clear();
- msgConfirm("Unable to find any free space on this disk!");
- return;
- }
- }
- else if (!strcmp(cp, "all")) {
- /* Do all disk space case */
- msgDebug("Warning: Devoting all of disk %s to FreeBSD.\n", d->name);
-
- All_FreeBSD(d, FALSE);
- }
- else if (!strcmp(cp, "exclusive")) {
- /* Do really-all-the-disk-space case */
- msgDebug("Warning: Devoting all of disk %s to FreeBSD.\n", d->name);
-
- All_FreeBSD(d, TRUE);
- }
- else if ((sz = strtol(cp, &cp, 0))) {
- /* Look for sz bytes free */
- if (*cp && toupper(*cp) == 'M')
- sz *= ONE_MEG;
- for (i = 0; chunk_info[i]; i++) {
- /* If a chunk is at least sz MB, use it. */
- if (chunk_info[i]->type == unused && chunk_info[i]->size >= sz) {
- Create_Chunk(d, chunk_info[i]->offset, sz, freebsd, 3, (chunk_info[i]->flags & CHUNK_ALIGN));
- variable_set2(DISK_PARTITIONED, "yes");
- break;
- }
- }
- if (!chunk_info[i]) {
- dialog_clear();
- msgConfirm("Unable to find %d free blocks on this disk!", sz);
- return;
- }
- }
- else if (!strcmp(cp, "existing")) {
- /* Do existing FreeBSD case */
- for (i = 0; chunk_info[i]; i++) {
- if (chunk_info[i]->type == freebsd)
- break;
- }
- if (!chunk_info[i]) {
- dialog_clear();
- msgConfirm("Unable to find any existing FreeBSD partitions on this disk!");
- return;
- }
- }
- else {
- dialog_clear();
- msgConfirm("`%s' is an invalid value for %s - is config file valid?", cp, VAR_DISKSPACE);
- return;
- }
- variable_set2(DISK_PARTITIONED, "yes");
- }
-}
-
static u_char *
getBootMgr(char *dname)
{
@@ -533,14 +447,15 @@ partitionHook(char *str)
}
int
-diskPartitionEditor(char *str)
+diskPartitionEditor(dialogMenuItem *self)
{
DMenu *menu;
Device **devs;
int i, cnt;
- char *cp;
+ char *cp, *str;
cp = variable_get(VAR_DISK);
+ str= variable_get(SYSTEM_STATE);
devs = deviceFind(cp, DEVICE_TYPE_DISK);
cnt = deviceCount(devs);
if (!cnt) {
@@ -552,10 +467,7 @@ diskPartitionEditor(char *str)
}
else if (cnt == 1) {
devs[0]->enabled = TRUE;
- if (str && !strcmp(str, "script"))
- scriptPartition(devs[0], (Disk *)devs[0]->private);
- else
- diskPartition(devs[0], (Disk *)devs[0]->private);
+ diskPartition(devs[0], (Disk *)devs[0]->private);
i = RET_SUCCESS;
variable_set2(DISK_SELECTED, "yes");
}
@@ -584,7 +496,7 @@ diskPartitionEditor(char *str)
}
int
-diskPartitionWrite(char *str)
+diskPartitionWrite(dialogMenuItem *self)
{
Device **devs;
char *cp;
diff --git a/release/sysinstall/dist.c b/release/sysinstall/dist.c
index 0966458..117b53e 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.38 1995/12/07 10:33:41 peter Exp $
+ * $Id: dist.c,v 1.39 1996/02/02 06:43:59 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -165,7 +165,7 @@ static Distribution XF86FontDistTable[] = {
};
int
-distReset(char *str)
+distReset(dialogMenuItem *self)
{
Dists = 0;
SrcDists = 0;
@@ -176,7 +176,7 @@ distReset(char *str)
}
int
-distSetDeveloper(char *str)
+distSetDeveloper(dialogMenuItem *self)
{
distReset(NULL);
Dists = _DIST_DEVELOPER;
@@ -185,7 +185,7 @@ distSetDeveloper(char *str)
}
int
-distSetXDeveloper(char *str)
+distSetXDeveloper(dialogMenuItem *self)
{
distReset(NULL);
Dists = _DIST_DEVELOPER | DIST_XF86;
@@ -198,7 +198,7 @@ distSetXDeveloper(char *str)
}
int
-distSetKernDeveloper(char *str)
+distSetKernDeveloper(dialogMenuItem *self)
{
distReset(NULL);
Dists = _DIST_DEVELOPER;
@@ -207,7 +207,7 @@ distSetKernDeveloper(char *str)
}
int
-distSetUser(char *str)
+distSetUser(dialogMenuItem *self)
{
distReset(NULL);
Dists = _DIST_USER;
@@ -215,7 +215,7 @@ distSetUser(char *str)
}
int
-distSetXUser(char *str)
+distSetXUser(dialogMenuItem *self)
{
distReset(NULL);
Dists = _DIST_USER;
@@ -227,7 +227,7 @@ distSetXUser(char *str)
}
int
-distSetMinimum(char *str)
+distSetMinimum(dialogMenuItem *self)
{
distReset(NULL);
Dists = DIST_BIN;
@@ -235,7 +235,7 @@ distSetMinimum(char *str)
}
int
-distSetEverything(char *str)
+distSetEverything(dialogMenuItem *self)
{
Dists = DIST_ALL;
SrcDists = DIST_SRC_ALL;
@@ -246,54 +246,47 @@ distSetEverything(char *str)
}
int
-distSetCustom(char *str)
+distSetDES(dialogMenuItem *self)
{
- /* These *ALL* have to be set at once. It's for power users only! :) */
- if (sscanf(str, "%d %d %d %d %d %d",
- &Dists, &DESDists, &SrcDists, &XF86Dists, &XF86ServerDists, &XF86FontDists) != 6) {
- dialog_clear();
- msgConfirm("Warning: A `%s' set was configured which did not set all\n"
- "distributions explicitly. Some distributions will default to\n"
- "unselected as a result.", str);
+ if (dmenuOpenSimple(&MenuDESDistributions)) {
+ if (DESDists) {
+ if (DESDists & DIST_DES_KERBEROS)
+ DESDists |= DIST_DES_DES;
+ Dists |= DIST_DES;
+ }
+ return RET_SUCCESS;
}
- return RET_SUCCESS;
+ else
+ return RET_FAIL;
}
int
-distSetDES(char *str)
+distSetSrc(dialogMenuItem *self)
{
- dmenuOpenSimple(&MenuDESDistributions);
- if (DESDists) {
- if (DESDists & DIST_DES_KERBEROS)
- DESDists |= DIST_DES_DES;
- Dists |= DIST_DES;
+ if (dmenuOpenSimple(&MenuSrcDistributions)) {
+ if (SrcDists)
+ Dists |= DIST_SRC;
+ return RET_SUCCESS;
}
- return RET_SUCCESS;
-}
-
-int
-distSetSrc(char *str)
-{
- dmenuOpenSimple(&MenuSrcDistributions);
- if (SrcDists)
- Dists |= DIST_SRC;
- return RET_SUCCESS;
+ return RET_FAIL;
}
int
-distSetXF86(char *str)
+distSetXF86(dialogMenuItem *self)
{
- dmenuOpenSimple(&MenuXF86Select);
- if (XF86ServerDists)
- XF86Dists |= DIST_XF86_SERVER;
- if (XF86FontDists)
- 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);
- return RET_SUCCESS;
+ if (dmenuOpenSimple(&MenuXF86Select)) {
+ if (XF86ServerDists)
+ XF86Dists |= DIST_XF86_SERVER;
+ if (XF86FontDists)
+ 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);
+ return RET_SUCCESS;
+ }
+ return RET_FAIL;
}
static Boolean
@@ -477,7 +470,7 @@ printSelected(char *buf, int selected, Distribution *me)
}
int
-distExtractAll(char *ptr)
+distExtractAll(dialogMenuItem *self)
{
int retries = 0;
char buf[512];
@@ -485,7 +478,7 @@ distExtractAll(char *ptr)
/* First try to initialize the state of things */
if (!mediaDevice->init(mediaDevice))
return RET_FAIL;
- if (!Dists && ptr) {
+ if (!Dists) {
msgConfirm("You haven't selected any distributions to extract.");
return RET_FAIL;
}
diff --git a/release/sysinstall/dist.h b/release/sysinstall/dist.h
index 06fa723..685e8b4 100644
--- a/release/sysinstall/dist.h
+++ b/release/sysinstall/dist.h
@@ -12,11 +12,12 @@
#define DIST_INFO 0x0080
#define DIST_COMPAT1X 0x0100
#define DIST_COMPAT20 0x0200
-#define DIST_XF86 0x0400
-#define DIST_COMMERCIAL 0x0800
-#define DIST_DES 0x1000
-#define DIST_EXPERIMENTAL 0x2000
-#define DIST_ALL 0x0FFF
+#define DIST_COMPAT21 0x0400
+#define DIST_XF86 0x0800
+#define DIST_COMMERCIAL 0x1000
+#define DIST_DES 0x2000
+#define DIST_EXPERIMENTAL 0x4000
+#define DIST_ALL 0x0FFF /* Don't include commerce, DES or experimental in "all" */
/* Canned distribution sets */
#define _DIST_DEVELOPER \
diff --git a/release/sysinstall/dmenu.c b/release/sysinstall/dmenu.c
index 64f457d..0633e3a 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.13 1995/12/07 10:33:44 peter Exp $
+ * $Id: dmenu.c,v 1.14 1996/03/02 07:31:51 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -46,6 +46,71 @@
#define MAX_MENU 15
+static Boolean cancelled;
+
+int
+dmenuDisplayFile(dialogMenuItem *tmp)
+{
+ systemDisplayHelp((char *)tmp->data);
+ return RET_SUCCESS;
+}
+
+int
+dmenuSubmenu(dialogMenuItem *tmp)
+{
+ dialog_clear();
+ return dmenuOpenSimple((DMenu *)tmp->data);
+}
+
+int
+dmenuSystemCommand(dialogMenuItem *tmp)
+{
+ int i;
+
+ i = systemExecute((char *)tmp->data) ? RET_FAIL : RET_SUCCESS;
+ dialog_clear();
+ return i;
+}
+
+int
+dmenuSystemCommandBox(dialogMenuItem *tmp)
+{
+ use_helpfile(NULL);
+ use_helpline("Select OK to dismiss this dialog");
+ dialog_prgbox(tmp->title, (char *)tmp->data, 22, 76, 1, 1);
+ dialog_clear();
+ return RET_SUCCESS;
+}
+
+int
+dmenuCancel(dialogMenuItem *tmp)
+{
+ cancelled = TRUE;
+ return RET_SUCCESS;
+}
+
+int
+dmenuSetVariable(dialogMenuItem *tmp)
+{
+ variable_set((char *)tmp->data);
+ msgInfo("Set %s", tmp->data);
+ return RET_SUCCESS;
+}
+
+int
+dmenuSetFlag(dialogMenuItem *tmp)
+{
+ *((unsigned int *)tmp->data) |= tmp->aux;
+ return RET_SUCCESS;
+}
+
+int
+dmenuSetValue(dialogMenuItem *tmp)
+{
+ *((unsigned int *)tmp->data) = tmp->aux;
+ return RET_SUCCESS;
+}
+
/* Traverse menu but give user no control over positioning */
Boolean
dmenuOpenSimple(DMenu *menu)
@@ -53,56 +118,44 @@ dmenuOpenSimple(DMenu *menu)
int choice, scroll, curr, max;
choice = scroll = curr = max = 0;
+ dialog_clear();
return dmenuOpen(menu, &choice, &scroll, &curr, &max);
}
/* Work functions for the state hook */
-char *
-dmenuFlagCheck(DMenuItem *item)
+int
+dmenuFlagCheck(dialogMenuItem *item)
{
- if (*((unsigned int *)item->ptr) & item->parm)
- return "ON";
- return "OFF";
+ return (*((unsigned int *)item->data) & item->aux);
}
-char *
-dmenuVarCheck(DMenuItem *item)
+int
+dmenuVarCheck(dialogMenuItem *item)
{
char *w, *cp, *cp2, tmp[256];
- w = (char *)item->parm;
+ w = (char *)item->aux;
if (!w)
- w = (char *)item->ptr;
+ w = (char *)item->data;
if (!w)
- return "OFF";
+ return FALSE;
strncpy(tmp, w, 256);
if ((cp = index(tmp, '=')) != NULL) {
*(cp++) = '\0';
cp2 = getenv(tmp);
if (cp2)
- return !strcmp(cp, cp2) ? "ON" : "OFF";
+ return !strcmp(cp, cp2);
else
- return "OFF";
+ return FALSE;
}
else
- return getenv(tmp) ? "ON" : "OFF";
+ return (int)getenv(tmp);
}
-char *
-dmenuRadioCheck(DMenuItem *item)
+int
+dmenuRadioCheck(dialogMenuItem *item)
{
- if (*((unsigned int *)item->ptr) == item->parm)
- return "ON";
- return "OFF";
-}
-
-static char *
-checkHookVal(DMenuItem *item)
-{
-
- if (!item->check)
- return "OFF";
- return (*item->check)(item);
+ return (*((unsigned int *)item->data) == item->aux);
}
static int
@@ -122,21 +175,10 @@ menu_height(DMenu *menu, int n)
Boolean
dmenuOpen(DMenu *menu, int *choice, int *scroll, int *curr, int *max)
{
- char result[FILENAME_MAX];
- char **nitems = NULL;
- DMenuItem *tmp;
- int rval = 0, n = 0;
-
- /* First, construct the menu */
- for (tmp = menu->items; tmp->title; tmp++) {
- if (!tmp->disabled) {
- nitems = item_add_pair(nitems, tmp->title, tmp->prompt, curr, max);
- if (menu->options & (DMENU_RADIO_TYPE | DMENU_MULTIPLE_TYPE))
- nitems = item_add(nitems, checkHookVal(tmp), curr, max);
- ++n;
- }
- }
- nitems = item_add(nitems, NULL, curr, max); /* Terminate it */
+ int n, rval = 0;
+
+ /* Count up all the items */
+ for (n = 0; menu->items[n].title; n++);
while (1) {
char buf[FILENAME_MAX];
@@ -146,40 +188,25 @@ dmenuOpen(DMenu *menu, int *choice, int *scroll, int *curr, int *max)
use_helpfile(systemHelpFile(menu->helpfile, buf));
/* Pop up that dialog! */
- if (menu->options & DMENU_NORMAL_TYPE)
+ if (menu->type == DMENU_NORMAL_TYPE)
rval = dialog_menu((u_char *)menu->title, (u_char *)menu->prompt, -1, -1,
- menu_height(menu, n), n, (u_char **)nitems, (u_char *)result, choice, scroll);
+ menu_height(menu, n), -n, menu->items, NULL, choice, scroll);
- else if (menu->options & DMENU_RADIO_TYPE)
+ else if (menu->type == DMENU_RADIO_TYPE)
rval = dialog_radiolist((u_char *)menu->title, (u_char *)menu->prompt, -1, -1,
- menu_height(menu, n), n, (u_char **)nitems, (u_char *)result);
+ menu_height(menu, n), -n, menu->items, NULL);
- else if (menu->options & DMENU_MULTIPLE_TYPE)
+ else if (menu->type == DMENU_CHECKLIST_TYPE)
rval = dialog_checklist((u_char *)menu->title, (u_char *)menu->prompt, -1, -1,
- menu_height(menu, n), n, (u_char **)nitems, (u_char *)result);
+ menu_height(menu, n), -n, menu->items, NULL);
/* This seems to be the only technique that works for getting the display to look right */
dialog_clear();
-
- if (!rval) {
- if (menu->options & DMENU_MULTIPLE_TYPE) {
- if (decode_and_dispatch_multiple(menu, result) || menu->options & DMENU_SELECTION_RETURNS) {
- items_free(nitems, curr, max);
- return TRUE;
- }
- }
- else {
- if ((tmp = decode(menu, result)) == NULL)
- return FALSE;
- }
- if (dispatch(tmp, result) == RET_DONE || (menu->options & DMENU_SELECTION_RETURNS)) {
- items_free(nitems, curr, max);
- return TRUE;
- }
- }
- else {
- items_free(nitems, curr, max);
+ if (rval)
return FALSE;
+ else if (cancelled) {
+ cancelled = FALSE;
+ return TRUE;
}
}
}
diff --git a/release/sysinstall/doc.c b/release/sysinstall/doc.c
index 187362d..013dd93 100644
--- a/release/sysinstall/doc.c
+++ b/release/sysinstall/doc.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: doc.c,v 1.9 1995/11/04 08:47:22 jkh Exp $
+ * $Id: doc.c,v 1.10 1995/11/06 12:49:23 jkh Exp $
*
* Jordan Hubbard
*
@@ -19,7 +19,7 @@
* and fire it up on the first copy of the handbook we can find.
*/
int
-docBrowser(char *junk)
+docBrowser(dialogMenuItem *self)
{
char *browser = variable_get(VAR_BROWSER_PACKAGE);
@@ -53,17 +53,20 @@ docBrowser(char *junk)
}
/* Run browser on the appropriate doc */
- dmenuOpenSimple(&MenuHTMLDoc);
- return RET_SUCCESS;
+ if (dmenuOpenSimple(&MenuHTMLDoc))
+ return RET_SUCCESS;
+ else
+ return RET_FAIL;
}
/* Try to show one of the documents requested from the HTML doc menu */
int
-docShowDocument(char *str)
+docShowDocument(dialogMenuItem *self)
{
char tmp[512], target[512];
char *where = NULL;
char *browser = variable_get(VAR_BROWSER_BINARY);
+ char *str = self->prompt;
if (!file_executable(browser)) {
dialog_clear();
diff --git a/release/sysinstall/install.c b/release/sysinstall/install.c
index 30475b3..f789fd7 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.80 1996/03/24 09:43:53 jkh Exp $
+ * $Id: install.c,v 1.81 1996/03/24 18:57:36 joerg Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -219,12 +219,13 @@ installInitial(void)
}
int
-installFixit(char *str)
+installFixit(dialogMenuItem *self)
{
struct ufs_args args;
pid_t child;
int waitstatus;
+ variable_set2(SYSTEM_STATE, "fixit");
memset(&args, 0, sizeof(args));
args.fspec = "/dev/fd0";
Mkdir("/mnt2", NULL);
@@ -297,12 +298,13 @@ installFixit(char *str)
}
int
-installExpress(char *str)
+installExpress(dialogMenuItem *self)
{
- if (diskPartitionEditor("express") == RET_FAIL)
+ variable_set2(SYSTEM_STATE, "express");
+ if (diskPartitionEditor(self) == RET_FAIL)
return RET_FAIL;
- if (diskLabelEditor("express") == RET_FAIL)
+ if (diskLabelEditor(self) == RET_FAIL)
return RET_FAIL;
if (!Dists) {
@@ -315,7 +317,7 @@ installExpress(char *str)
return RET_FAIL;
}
- if (installCommit("express") == RET_FAIL)
+ if (installCommit(self) == RET_FAIL)
return RET_FAIL;
return RET_DONE;
@@ -323,8 +325,9 @@ installExpress(char *str)
/* Novice mode installation */
int
-installNovice(char *str)
+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"
@@ -333,7 +336,7 @@ installNovice(char *str)
"by a (Q)uit. If you wish to allocate only free space to FreeBSD, move to a\n"
"partition marked \"unused\" and use the (C)reate command.");
- if (diskPartitionEditor("novice") == RET_FAIL)
+ if (diskPartitionEditor(self) == RET_FAIL)
return RET_FAIL;
dialog_clear();
@@ -344,7 +347,7 @@ installNovice(char *str)
"care for the layout chosen by (A)uto, press F1 for more information on\n"
"manual layout.");
- if (diskLabelEditor("novice") == RET_FAIL)
+ if (diskLabelEditor(self) == RET_FAIL)
return RET_FAIL;
dialog_clear();
@@ -367,7 +370,7 @@ installNovice(char *str)
return RET_FAIL;
}
- if (installCommit("novice") == RET_FAIL)
+ if (installCommit(self) == RET_FAIL)
return RET_FAIL;
return RET_DONE;
@@ -382,14 +385,16 @@ installNovice(char *str)
* DES dist.
*/
int
-installCommit(char *str)
+installCommit(dialogMenuItem *self)
{
int i;
extern int cdromMounted;
+ char *str;
if (!mediaVerify())
return RET_FAIL;
+ str = variable_get(SYSTEM_STATE);
i = RET_DONE;
if (RunningAsInit) {
if (installInitial() == RET_FAIL)
@@ -404,15 +409,12 @@ installCommit(char *str)
}
}
- if (distExtractAll(NULL) == RET_FAIL)
+ if (distExtractAll(self) == RET_FAIL)
i = RET_FAIL;
- if (installFixup(NULL) == RET_FAIL)
+ if (installFixup(self) == RET_FAIL)
i = RET_FAIL;
- if (i != RET_FAIL)
- variable_set2(SYSTEM_STATE, "base-install");
-
if (i != RET_FAIL && !strcmp(str, "novice")) {
dialog_clear();
msgConfirm("Since you're running the novice installation, a few post-configuration\n"
@@ -434,7 +436,7 @@ installCommit(char *str)
if (!msgYesNo("Would you like to configure Samba for connecting NETBUI clients to this\n"
"machine? Windows 95, Windows NT and Windows for Workgroups\n"
"machines can use NETBUI transport for disk and printer sharing."))
- configSamba(NULL);
+ configSamba(self);
dialog_clear();
if (!msgYesNo("Will this machine be an IP gateway (e.g. will it forward packets\n"
@@ -443,11 +445,11 @@ installCommit(char *str)
dialog_clear();
if (!msgYesNo("Do you want to allow anonymous FTP connections to this machine?"))
- configAnonFTP(NULL);
+ configAnonFTP(self);
dialog_clear();
if (!msgYesNo("Do you want to configure this machine as an NFS server?"))
- configNFSServer(NULL);
+ configNFSServer(self);
dialog_clear();
if (!msgYesNo("Do you want to configure this machine as an NFS client?"))
@@ -455,7 +457,7 @@ installCommit(char *str)
dialog_clear();
if (!msgYesNo("Do you want to configure this machine as a WEB server?"))
- configApache(NULL);
+ configApache(self);
dialog_clear();
if (!msgYesNo("Would you like to customize your system console settings?"))
@@ -482,14 +484,14 @@ installCommit(char *str)
"drive to use the ports collection, but at a substantial savings\n"
"in disk space (NOTE: This may take as long as 15 or 20 minutes\n"
"depending on the speed of your CDROM drive)."))
- configPorts(NULL);
+ configPorts(self);
}
dialog_clear();
if (!msgYesNo("The FreeBSD package collection is a collection of over 300 ready-to-run\n"
"applications, from text editors to games to WEB servers. Would you like\n"
"to browse the collection now?"))
- configPackages(NULL);
+ configPackages(self);
/* XXX Put whatever other nice configuration questions you'd like to ask the user here XXX */
@@ -505,8 +507,6 @@ installCommit(char *str)
configResolv();
configSysconfig();
- variable_set2(SYSTEM_STATE, i == RET_FAIL ? "error-install" : "full-install");
-
/* Don't print this if we're express or novice installing */
if (strcmp(str, "express") && strcmp(str, "novice")) {
if (Dists || i == RET_FAIL) {
@@ -541,11 +541,13 @@ installCommit(char *str)
"may do so by typing: /stand/sysinstall.");
}
}
+ variable_set2(SYSTEM_STATE, i == RET_FAIL ? "error-install" : "full-install");
+
return i;
}
int
-installFixup(char *str)
+installFixup(dialogMenuItem *self)
{
Device **devs;
int i;
@@ -625,18 +627,20 @@ installFixup(char *str)
/* Go newfs and/or mount all the filesystems we've been asked to */
int
-installFilesystems(char *str)
+installFilesystems(dialogMenuItem *self)
{
int i;
Disk *disk;
Chunk *c1, *c2, *rootdev, *swapdev, *usrdev;
Device **devs;
PartInfo *root;
- char dname[80];
+ char dname[80], *str;
extern int MakeDevChunk(Chunk *c, char *n);
Boolean upgrade = FALSE;
- if (!(str && !strcmp(str, "script")) && !checkLabels(&rootdev, &swapdev, &usrdev))
+ str = variable_get(SYSTEM_STATE);
+
+ if (!checkLabels(&rootdev, &swapdev, &usrdev))
return RET_FAIL;
root = (PartInfo *)rootdev->private_data;
@@ -779,7 +783,7 @@ installFilesystems(char *str)
}
int
-installVarDefaults(char *unused)
+installVarDefaults(dialogMenuItem *self)
{
/* Set default startup options */
variable_set2(VAR_ROUTEDFLAGS, "-q");
diff --git a/release/sysinstall/installFinal.c b/release/sysinstall/installFinal.c
index 241b522..d965267 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.23 1996/03/23 07:11:58 jkh Exp $
+ * $Id: installFinal.c,v 1.24 1996/03/23 07:21:30 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard & Coranth Gryphon. All rights reserved.
@@ -55,17 +55,17 @@
/* This file contains all the final configuration thingies */
static DMenu MenuSamba = {
- DMENU_MULTIPLE_TYPE | DMENU_SELECTION_RETURNS,
+ DMENU_CHECKLIST_TYPE,
"Samba Services Menu",
"This allows you to configure various aspects of your Samba server.",
NULL,
NULL,
{ { "Homes", "Make home directories available to users.",
- DMENU_SET_VARIABLE, "SAMBA_homes=YES", 0, 0, dmenuVarCheck },
+ dmenuVarCheck, dmenuSetVariable, NULL, "SAMBA_homes=YES" },
{ "Printers", "Allows for sharing of local printers.",
- DMENU_SET_VARIABLE, "SAMBA_printers=YES", 0, 0, dmenuVarCheck},
+ dmenuVarCheck, dmenuSetVariable, NULL, "SAMBA_printers=YES" },
{ "Export Paths", "Specify local directories to make available.",
- DMENU_SET_VARIABLE, "SAMBA_export=YES", 0, 0, dmenuVarCheck },
+ dmenuVarCheck, dmenuSetVariable, NULL, "SAMBA_export=YES" },
{ NULL } },
};
@@ -75,7 +75,7 @@ static DMenu MenuSamba = {
/* Load gated package */
int
-configGated(char *unused)
+configGated(dialogMenuItem *self)
{
if (package_add("gated-3.5a11") == RET_SUCCESS)
variable_set2("gated", "YES");
@@ -84,7 +84,7 @@ configGated(char *unused)
/* Load pcnfsd package */
int
-configPCNFSD(char *unused)
+configPCNFSD(dialogMenuItem *self)
{
if (package_add("pcnfsd-93.02.16") == RET_SUCCESS)
variable_set2("pcnfsd", "YES");
@@ -92,7 +92,7 @@ configPCNFSD(char *unused)
}
int
-configSamba(char *unused)
+configSamba(dialogMenuItem *self)
{
int i = RET_SUCCESS;
@@ -195,7 +195,7 @@ configSamba(char *unused)
}
int
-configNFSServer(char *unused)
+configNFSServer(dialogMenuItem *self)
{
char cmd[256];
diff --git a/release/sysinstall/installPreconfig.c b/release/sysinstall/installPreconfig.c
deleted file mode 100644
index e5f3232..0000000
--- a/release/sysinstall/installPreconfig.c
+++ /dev/null
@@ -1,221 +0,0 @@
-/*
- * The new sysinstall program.
- *
- * This is probably the last program in the `sysinstall' line - the next
- * generation being essentially a complete rewrite.
- *
- * $Id: installPreconfig.c,v 1.16 1995/10/27 17:00:23 jkh Exp $
- *
- * 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.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Jordan Hubbard
- * for the FreeBSD Project.
- * 4. The name of Jordan Hubbard or the FreeBSD project may not be used to
- * endorse or promote products derived from this software without specific
- * prior written permission.
- *
- * 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>
-#include <sys/disklabel.h>
-#include <sys/errno.h>
-#include <sys/ioctl.h>
-#include <sys/fcntl.h>
-#include <sys/wait.h>
-#include <sys/param.h>
-#define MSDOSFS
-#include <sys/mount.h>
-#undef MSDOSFS
-#include <sys/stat.h>
-#include <unistd.h>
-#include <sys/mount.h>
-
-static struct _word {
- char *name;
- int (*handler)(char *str);
-} resWords[] = {
- { "configAnonFTP", configAnonFTP },
- { "configApache", configApache },
- { "configGated", configGated },
- { "configNFSServer", configNFSServer },
- { "configSamba", configSamba },
- { "diskPartitionEditor", diskPartitionEditor },
- { "diskPartitionWrite", diskPartitionWrite },
- { "diskLabelEditor", diskLabelEditor },
- { "diskLabelCommit", diskLabelCommit },
- { "distReset", distReset },
- { "distSetCustom", distSetCustom },
- { "distSetDeveloper", distSetDeveloper },
- { "distSetXDeveloper", distSetXDeveloper },
- { "distSetKernDeveloper", distSetKernDeveloper },
- { "distSetUser", distSetUser },
- { "distSetXUser", distSetXUser },
- { "distSetMinimum", distSetMinimum },
- { "distSetEverything", distSetEverything },
- { "distSetDES", distSetDES },
- { "distSetSrc", distSetSrc },
- { "distSetXF86", distSetXF86 },
- { "distExtractAll", distExtractAll },
- { "docBrowser", docBrowser },
- { "docShowDocument", docShowDocument },
- { "installCommit", installCommit },
- { "installExpress", installExpress },
- { "installUpgrade", installUpgrade },
- { "installPreconfig", installPreconfig },
- { "installFixup", installFixup },
- { "installFilesystems", installFilesystems },
- { "mediaSetCDROM", mediaSetCDROM },
- { "mediaSetFloppy", mediaSetFloppy },
- { "mediaSetDOS", mediaSetDOS },
- { "mediaSetTape", mediaSetTape },
- { "mediaSetFTP", mediaSetFTP },
- { "mediaSetFTPActive", mediaSetFTPActive },
- { "mediaSetFTPPassive", mediaSetFTPPassive },
- { "mediaSetUFS", mediaSetUFS },
- { "mediaSetNFS", mediaSetNFS },
- { "mediaSetFtpUserPass", mediaSetFtpUserPass },
- { "mediaSetCPIOVerbosity", mediaSetCPIOVerbosity },
- { "mediaGetType", mediaGetType },
- { "msgConfirm", msgSimpleConfirm },
- { "msgNotify", msgSimpleNotify },
- { "packageAdd", package_add },
- { "system", (int (*)(char *))vsystem },
- { "systemInteractive", systemExecute },
- { "tcpInstallDevice", tcpInstallDevice },
- { NULL, NULL },
-};
-
-static int
-call_possible_resword(char *name, char *value, int *status)
-{
- int i, rval;
-
- rval = 0;
- for (i = 0; resWords[i].name; i++) {
- if (!strcmp(name, resWords[i].name)) {
- *status = resWords[i].handler(value);
- rval = 1;
- break;
- }
- }
- return rval;
-}
-
-/* From the top menu - try to mount the floppy and read a configuration file from it */
-int
-installPreconfig(char *str)
-{
- struct ufs_args u_args;
- struct msdosfs_args m_args;
- int fd, i;
- char buf[128];
- char *cfg_file;
-
- memset(&u_args, 0, sizeof(u_args));
- u_args.fspec = "/dev/fd0";
- Mkdir("/mnt2", NULL);
-
- memset(&m_args, 0, sizeof(m_args));
- m_args.fspec = "/dev/fd0";
- m_args.uid = m_args.gid = 0;
- m_args.mask = 0777;
-
- i = RET_FAIL;
- while (1) {
- if (!(cfg_file = variable_get_value(VAR_CONFIG_FILE,
- "Please insert the floppy containing this configuration file\n"
- "into drive A now and press [ENTER].")))
- break;
-
- if (mount(MOUNT_UFS, "/mnt2", MNT_RDONLY, (caddr_t)&u_args) == -1) {
- if (mount(MOUNT_MSDOS, "/mnt2", MNT_RDONLY, (caddr_t)&m_args) == -1) {
- dialog_clear();
- if (msgYesNo("Unable to mount the configuration floppy - do you want to try again?"))
- break;
- else
- continue;
- }
- }
- fnord:
- if (!cfg_file)
- break;
- sprintf(buf, "/mnt2/%s", cfg_file);
- msgDebug("Attempting to open configuration file: %s\n", buf);
- fd = open(buf, O_RDONLY);
- if (fd == -1) {
- dialog_clear();
- if (msgYesNo("Unable to find the configuration file: %s\n"
- "Do you want to try again?", buf)) {
- unmount("/mnt2", MNT_FORCE);
- break;
- }
- else
- goto fnord;
- }
- else {
- Attribs *cattr = safe_malloc(sizeof(Attribs) * MAX_ATTRIBS);
- int i, j;
-
- if (attr_parse(cattr, fd) == RET_FAIL) {
- dialog_clear();
- msgConfirm("Cannot parse configuration file %s! Please verify your media.", cfg_file);
- }
- else {
- i = RET_SUCCESS;
- for (j = 0; cattr[j].name[0]; j++) {
- int status;
-
- if (call_possible_resword(cattr[j].name, cattr[j].value, &status)) {
- if (status != RET_SUCCESS) {
- msgDebug("macro call to %s(%s) returns %d status!\n", cattr[j].name, cattr[j].value,
- status);
- i = status;
- }
- }
- else
- variable_set2(cattr[j].name, cattr[j].value);
- }
- if (i == RET_SUCCESS) {
- dialog_clear();
- msgConfirm("Configuration file %s loaded successfully!\n"
- "Some parameters may now have new default values.", buf);
- }
- else if (i == RET_FAIL) {
- dialog_clear();
- msgConfirm("Configuration file %s loaded with some errors.", buf);
- }
- }
- close(fd);
- safe_free(cattr);
- unmount("/mnt2", MNT_FORCE);
- break;
- }
- }
- return i;
-}
diff --git a/release/sysinstall/installUpgrade.c b/release/sysinstall/installUpgrade.c
index 2a2d19b..23acb9a 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.17 1995/11/08 07:09:27 jkh Exp $
+ * $Id: installUpgrade.c,v 1.18 1995/11/17 14:17:12 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -185,7 +185,7 @@ traverseHitlist(HitList *h)
}
int
-installUpgrade(char *str)
+installUpgrade(dialogMenuItem *self)
{
char *saved_etc = NULL;
Boolean extractingBin = TRUE;
@@ -198,6 +198,7 @@ installUpgrade(char *str)
return RET_FAIL;
}
+ variable_set2(SYSTEM_STATE, "upgrade");
systemDisplayHelp("upgrade");
if (msgYesNo("Given all that scary stuff you just read, are you sure you want to\n"
@@ -247,7 +248,7 @@ installUpgrade(char *str)
"Once you're done in the label editor, press Q to return here for the next\n"
"step.");
- if (diskLabelEditor(NULL) == RET_FAIL) {
+ if (diskLabelEditor(self) == RET_FAIL) {
dialog_clear();
msgConfirm("The disk label editor failed to work properly! Upgrade operation\n"
"aborted.");
@@ -256,7 +257,7 @@ installUpgrade(char *str)
/* Don't write out MBR info */
variable_set2(DISK_PARTITIONED, "written");
- if (diskLabelCommit("upgrade") == RET_FAIL) {
+ if (diskLabelCommit(self) == RET_FAIL) {
dialog_clear();
msgConfirm("Not all file systems were properly mounted. Upgrade operation\n"
"aborted.");
@@ -321,7 +322,7 @@ installUpgrade(char *str)
}
msgNotify("Beginning extraction of distributions..");
- if (distExtractAll("upgrade") == RET_FAIL) {
+ if (distExtractAll(self) == RET_FAIL) {
if (extractingBin && (Dists & DIST_BIN)) {
dialog_clear();
msgConfirm("Hmmmm. We couldn't even extract the bin distribution. This upgrade\n"
@@ -340,7 +341,7 @@ installUpgrade(char *str)
"/dev entries and such that a 2.1 system expects to see. I'll also perform a\n"
"few \"fixup\" operations to repair the effects of splatting a bin distribution\n"
"on top of an existing system..");
- if (installFixup("upgrade") == RET_FAIL) {
+ if (installFixup(self) == RET_FAIL) {
dialog_clear();
msgConfirm("Hmmmmm. The fixups don't seem to have been very happy.\n"
"You may wish to examine the system a little more closely when\n"
diff --git a/release/sysinstall/label.c b/release/sysinstall/label.c
index 96e9dbf..774a329 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.39 1996/03/20 14:11:22 jkh Exp $
+ * $Id: label.c,v 1.40 1996/03/24 18:57:37 joerg Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -81,7 +81,6 @@ static struct {
static int here;
static int diskLabel(char *str);
-static int scriptLabel(char *str);
static int
labelHook(char *str)
@@ -115,14 +114,15 @@ labelHook(char *str)
}
int
-diskLabelEditor(char *str)
+diskLabelEditor(dialogMenuItem *self)
{
Device **devs;
DMenu *menu;
int i, cnt;
- char *cp;
+ char *cp, *str;
cp = variable_get(VAR_DISK);
+ str = variable_get(SYSTEM_STATE);
devs = deviceFind(cp, DEVICE_TYPE_DISK);
cnt = deviceCount(devs);
if (!cnt) {
@@ -135,10 +135,7 @@ diskLabelEditor(char *str)
else if (cnt == 1 || variable_get(DISK_SELECTED)) {
if (cnt == 1)
devs[0]->enabled = TRUE;
- if (str && !strcmp(str, "script"))
- i = scriptLabel(str);
- else
- i = diskLabel(str);
+ i = diskLabel(str);
}
else {
menu = deviceCreateMenu(&MenuDiskDevices, DEVICE_TYPE_DISK, labelHook);
@@ -163,7 +160,7 @@ diskLabelEditor(char *str)
}
int
-diskLabelCommit(char *str)
+diskLabelCommit(dialogMenuItem *self)
{
char *cp;
int i;
@@ -179,9 +176,9 @@ diskLabelCommit(char *str)
i = RET_FAIL;
}
/* The routine will guard against redundant writes, just as this one does */
- else if (diskPartitionWrite(str) != RET_SUCCESS)
+ else if (diskPartitionWrite(self) != RET_SUCCESS)
i = RET_FAIL;
- else if (installFilesystems(str) != RET_SUCCESS)
+ else if (installFilesystems(self) != RET_SUCCESS)
i = RET_FAIL;
else {
msgInfo("All filesystem information written successfully.");
@@ -399,119 +396,6 @@ getNewfsCmd(PartInfo *p)
strncpy(p->newfs_cmd, val, NEWFS_CMD_MAX);
}
-static int
-scriptLabel(char *str)
-{
- char *cp;
- PartType type;
- PartInfo *p;
- u_long flags = 0;
- int i, status;
- Device **devs;
- Disk *d;
-
- status = RET_SUCCESS;
- cp = variable_get(VAR_DISK);
- if (!cp) {
- dialog_clear();
- msgConfirm("scriptLabel: No disk selected - can't label automatically.");
- return RET_FAIL;
- }
-
- devs = deviceFind(cp, DEVICE_TYPE_DISK);
- if (!devs) {
- dialog_clear();
- msgConfirm("scriptLabel: No disk device %s found!", cp);
- return RET_FAIL;
- }
- d = devs[0]->private;
-
- record_label_chunks(devs);
- for (i = 0; label_chunk_info[i].c; i++) {
- Chunk *c1 = label_chunk_info[i].c;
-
- if (label_chunk_info[i].type == PART_SLICE) {
- if ((cp = variable_get(c1->name)) != NULL) {
- int sz;
- char typ[10], mpoint[50];
-
- if (sscanf(cp, "%s %d %s", typ, &sz, mpoint) != 3) {
- dialog_clear();
- msgConfirm("For slice entry %s, got an invalid detail entry of: %s", c1->name, cp);
- status = RET_FAIL;
- continue;
- }
- else {
- Chunk *tmp;
-
- if (!strcmp(typ, "swap")) {
- type = PART_SWAP;
- strcpy(mpoint, "<swap>");
- }
- else {
- type = PART_FILESYSTEM;
- if (!strcmp(mpoint, "/"))
- flags |= CHUNK_IS_ROOT;
- }
- if (!sz)
- sz = space_free(c1);
- if (sz > space_free(c1)) {
- dialog_clear();
- msgConfirm("Not enough free space to create partition: %s", mpoint);
- status = RET_FAIL;
- continue;
- }
- if (!(tmp = Create_Chunk_DWIM(d, c1, sz, part,
- (type == PART_SWAP) ? FS_SWAP : FS_BSDFFS, flags))) {
- dialog_clear();
- msgConfirm("Unable to create from partition spec: %s. Too big?", cp);
- status = RET_FAIL;
- break;
- }
- else {
- tmp->private_data = new_part(mpoint, TRUE, sz);
- tmp->private_free = safe_free;
- status = RET_SUCCESS;
- }
- }
- }
- }
- else {
- /* Must be something we can set a mountpoint */
- cp = variable_get(c1->name);
- if (cp) {
- char mpoint[50], nwfs[8];
- Boolean newfs = FALSE;
-
- nwfs[0] = '\0';
- if (sscanf(cp, "%s %s", mpoint, nwfs) != 2) {
- dialog_clear();
- msgConfirm("For slice entry %s, got an invalid detail entry of: %s", c1->name, cp);
- status = RET_FAIL;
- continue;
- }
- newfs = toupper(nwfs[0]) == 'Y' ? TRUE : FALSE;
- if (c1->private_data) {
- p = c1->private_data;
- p->newfs = newfs;
- strcpy(p->mountpoint, mpoint);
- }
- else {
- c1->private_data = new_part(mpoint, newfs, 0);
- c1->private_free = safe_free;
- }
- if (!strcmp(mpoint, "/"))
- c1->flags |= CHUNK_IS_ROOT;
- else
- c1->flags &= ~CHUNK_IS_ROOT;
- }
- }
- }
- if (status == RET_SUCCESS)
- variable_set2(DISK_LABELLED, "yes");
- return status;
-}
-
#define MAX_MOUNT_NAME 12
#define PART_PART_COL 0
diff --git a/release/sysinstall/main.c b/release/sysinstall/main.c
index a94f133..9810b48 100644
--- a/release/sysinstall/main.c
+++ b/release/sysinstall/main.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: main.c,v 1.14 1995/09/18 16:52:29 peter Exp $
+ * $Id: main.c,v 1.15 1995/12/07 10:33:55 peter Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -57,14 +57,18 @@ main(int argc, char **argv)
{
int choice, scroll, curr, max;
+ /* Catch fatal signals and complain about them if running as init */
if (getpid() == 1) {
signal(SIGBUS, screech);
signal(SIGSEGV, screech);
}
+
+ /* We don't work too well when running as non-root anymore */
if (geteuid() != 0) {
- fprintf(stderr, "Warning: This utility should be run as root.\n");
- sleep(1);
+ fprintf(stderr, "Error: This utility should only be run as root.\n");
+ return 1;
}
+
/* Set up whatever things need setting up */
systemInitialize(argc, argv);
diff --git a/release/sysinstall/media.c b/release/sysinstall/media.c
index 9543c12..89bea6e 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.29 1996/03/19 12:02:20 jkh Exp $
+ * $Id: media.c,v 1.30 1996/03/21 17:20:31 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -87,7 +87,7 @@ cpioVerbosity()
* be a CD.
*/
int
-mediaSetCDROM(char *str)
+mediaSetCDROM(dialogMenuItem *self)
{
Device **devs;
int cnt;
@@ -130,7 +130,7 @@ floppyHook(char *str)
* be a floppy
*/
int
-mediaSetFloppy(char *str)
+mediaSetFloppy(dialogMenuItem *self)
{
Device **devs;
int cnt;
@@ -172,7 +172,7 @@ DOSHook(char *str)
* be a DOS partition.
*/
int
-mediaSetDOS(char *str)
+mediaSetDOS(dialogMenuItem *self)
{
Device **devs;
int cnt;
@@ -212,7 +212,7 @@ tapeHook(char *str)
* be a tape drive.
*/
int
-mediaSetTape(char *str)
+mediaSetTape(dialogMenuItem *self)
{
Device **devs;
int cnt;
@@ -261,12 +261,12 @@ mediaSetTape(char *str)
* be an ftp server
*/
int
-mediaSetFTP(char *str)
+mediaSetFTP(dialogMenuItem *self)
{
static Device ftpDevice;
char *cp;
- if (!(str && !strcmp(str, "script") && (cp = variable_get(VAR_FTP_PATH)))) {
+ if (!(cp = variable_get(VAR_FTP_PATH))) {
if (!dmenuOpenSimple(&MenuMediaFTP))
return RET_FAIL;
else
@@ -296,8 +296,7 @@ mediaSetFTP(char *str)
}
strcpy(ftpDevice.name, cp);
- /* If str == NULL || "script", we were called just to change FTP sites, not network devices */
- if (str && strcmp(str, "script") && !tcpDeviceSelect())
+ if (!tcpDeviceSelect())
return RET_FAIL;
ftpDevice.type = DEVICE_TYPE_FTP;
@@ -311,26 +310,26 @@ mediaSetFTP(char *str)
}
int
-mediaSetFTPActive(char *str)
+mediaSetFTPActive(dialogMenuItem *self)
{
variable_set2(VAR_FTP_STATE, "active");
- return mediaSetFTP(str);
+ return mediaSetFTP(self);
}
int
-mediaSetFTPPassive(char *str)
+mediaSetFTPPassive(dialogMenuItem *self)
{
variable_set2(VAR_FTP_STATE, "passive");
- return mediaSetFTP(str);
+ return mediaSetFTP(self);
}
int
-mediaSetUFS(char *str)
+mediaSetUFS(dialogMenuItem *self)
{
static Device ufsDevice;
char *val;
- if (!(str && !strcmp(str, "script") && (val = variable_get(VAR_UFS_PATH)))) {
+ if (!(val = variable_get(VAR_UFS_PATH))) {
val = variable_get_value(VAR_UFS_PATH, "Enter a fully qualified pathname for the directory\n"
"containing the FreeBSD distribution files:");
if (!val)
@@ -348,21 +347,19 @@ mediaSetUFS(char *str)
}
int
-mediaSetNFS(char *str)
+mediaSetNFS(dialogMenuItem *self)
{
static Device nfsDevice;
char *cp;
- if (!(str && !strcmp(str, "script") && (cp = variable_get(VAR_NFS_PATH)))) {
- cp = variable_get_value(VAR_NFS_PATH, "Please enter the full NFS file specification for the remote\n"
- "host and directory containing the FreeBSD distribution files.\n"
- "This should be in the format: hostname:/some/freebsd/dir");
- if (!cp)
- return RET_FAIL;
- }
+ cp = variable_get_value(VAR_NFS_PATH, "Please enter the full NFS file specification for the remote\n"
+ "host and directory containing the FreeBSD distribution files.\n"
+ "This should be in the format: hostname:/some/freebsd/dir");
+ if (!cp)
+ return RET_FAIL;
strncpy(nfsDevice.name, cp, DEV_NAME_MAX);
/* str == NULL means we were just called to change NFS paths, not network interfaces */
- if (str && strcmp(str, "script") && !tcpDeviceSelect())
+ if (!tcpDeviceSelect())
return RET_FAIL;
nfsDevice.type = DEVICE_TYPE_NFS;
nfsDevice.init = mediaInitNFS;
@@ -519,7 +516,7 @@ mediaExtractDist(char *dir, int fd)
}
int
-mediaGetType(char *unused)
+mediaGetType(dialogMenuItem *self)
{
if (!dmenuOpenSimple(&MenuMedia))
return RET_FAIL;
@@ -541,7 +538,7 @@ mediaVerify(void)
/* Set FTP error behavior */
int
-mediaSetFtpOnError(char *str)
+mediaSetFtpOnError(dialogMenuItem *self)
{
char *cp = variable_get(VAR_FTP_ONERROR);
@@ -563,7 +560,7 @@ mediaSetFtpOnError(char *str)
/* Set the FTP username and password fields */
int
-mediaSetFtpUserPass(char *str)
+mediaSetFtpUserPass(dialogMenuItem *self)
{
char *pass;
@@ -578,7 +575,7 @@ mediaSetFtpUserPass(char *str)
/* Set CPIO verbosity level */
int
-mediaSetCPIOVerbosity(char *str)
+mediaSetCPIOVerbosity(dialogMenuItem *self)
{
char *cp = variable_get(VAR_CPIO_VERBOSITY);
diff --git a/release/sysinstall/menus.c b/release/sysinstall/menus.c
index 6f98217..14edc86 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.47 1996/03/30 16:19:40 jkh Exp $
+ * $Id: menus.c,v 1.48 1996/04/03 06:55:09 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -53,119 +53,94 @@
/* The initial installation menu */
DMenu MenuInitial = {
DMENU_NORMAL_TYPE,
- "Welcome to FreeBSD!", /* title */
+ "Welcome to FreeBSD!", /* title */
"This is the main menu of the FreeBSD installation system. Please\n\
select one of the options below by using the arrow keys or typing the\n\
first character of the option name you're interested in. Invoke an\n\
-option by pressing [ENTER].", /* prompt */
+option by pressing [ENTER].", /* prompt */
"Press F1 for usage instructions", /* help line */
"usage", /* help file */
-{ { "Usage", "Quick start - How to use this menu system", /* U */
- DMENU_DISPLAY_FILE, "usage", 0, 0 },
- { "Doc", "More detailed documentation on FreeBSD", /* D */
- DMENU_SUBMENU, &MenuDocumentation, 0, 0 },
- { "Options", "Go to options editor", /* O */
- DMENU_CALL, optionsEditor, 0, 0 },
- { "Novice", "Begin a novice installation (for beginners)", /* N */
- DMENU_CALL, installNovice, 0, 0 },
- { "Express", "Begin a quick installation (for the impatient)", /* E */
- DMENU_CALL, installExpress, 0, 0 },
- { "Custom", "Begin a custom installation (for experts)", /* C */
- DMENU_SUBMENU, &MenuInstallCustom, 0, 0 },
- { "Fixit", "Mount fixit floppy and go into repair mode", /* F */
- DMENU_CALL, installFixit, 0, 0 },
- { "Upgrade", "Upgrade an existing 2.0.5 system", /* U */
- DMENU_CALL, installUpgrade, 0, 0 },
- { "Configure", "Do post-install configuration of FreeBSD", /* C (dup) */
- DMENU_SUBMENU, &MenuConfigure, 0, 0 },
- { "Quit", "Exit this menu (and the installation)", /* Q */
- DMENU_CANCEL, NULL, 0, 0 },
- { "Load", "Load a pre-configuration file from floppy",
- DMENU_CALL, installPreconfig, 0, },
+{ { "Usage", "Quick start - How to use this menu system", NULL, dmenuDisplayFile, NULL, "usage" },
+ { "Doc", "More detailed documentation on FreeBSD", NULL, dmenuSubmenu, NULL, &MenuDocumentation },
+ { "Options", "Go to options editor", NULL, optionsEditor },
+ { "Novice", "Begin a novice installation (for beginners)", NULL, installNovice },
+ { "Express", "Begin a quick installation (for the impatient)", NULL, installExpress },
+ { "Custom", "Begin a custom installation (for experts)", NULL, dmenuSubmenu, NULL, &MenuInstallCustom },
+ { "Fixit", "Mount fixit floppy and go into repair mode", NULL, installFixit },
+ { "Upgrade", "Upgrade an existing 2.0.5 system", NULL, installUpgrade },
+ { "Configure","Do post-install configuration of FreeBSD", NULL, dmenuSubmenu, NULL, &MenuConfigure },
+ { "Quit", "Exit this menu (and the installation)", NULL },
{ NULL } },
};
/* The main documentation menu */
DMenu MenuDocumentation = {
-DMENU_NORMAL_TYPE,
-"Documentation for FreeBSD " RELEASE_NAME, /* Title */
-"If you are at all unsure about the configuration of your hardware\n\
+ DMENU_NORMAL_TYPE,
+ "Documentation for FreeBSD " RELEASE_NAME,
+ "If you are at all unsure about the configuration of your hardware\n\
or are looking to build a system specifically for FreeBSD, read the\n\
Hardware guide! New users should also read the Install document for\n\
a step-by-step tutorial on installing FreeBSD. For general information,\n\
consult the README file.",
-"Confused? Press F1 for help.",
-"usage",
-{ { "README", "Read this for a general description of FreeBSD",
- DMENU_DISPLAY_FILE, "readme", 0, 0 },
- { "Hardware", "The FreeBSD survival guide for PC hardware.",
- DMENU_DISPLAY_FILE, "hardware", 0, 0 },
- { "Install", "A step-by-step guide to installing FreeBSD.",
- DMENU_DISPLAY_FILE, "install", 0, 0 },
- { "Copyright", "The FreeBSD Copyright notices.",
- DMENU_DISPLAY_FILE, "COPYRIGHT", 0, 0 },
- { "Release", "The release notes for this version of FreeBSD.",
- DMENU_DISPLAY_FILE, "relnotes", 0, 0 },
- { "HTML Docs", "Go to the HTML documentation menu (post-install).",
- DMENU_CALL, docBrowser, 0, 0 },
- { "Exit", "Exit this menu (returning to previous)",
- DMENU_CANCEL, NULL, 0, 0 },
+ "Confused? Press F1 for help.",
+ "usage",
+{ { "README", "A general description of FreeBSD. Read this!", NULL, dmenuDisplayFile, NULL, "readme" },
+ { "Hardware", "The FreeBSD survival guide for PC hardware.", NULL, dmenuDisplayFile, NULL, "hardware" },
+ { "Install", "A step-by-step guide to installing FreeBSD.", NULL, dmenuDisplayFile, NULL, "install" },
+ { "Copyright","The FreeBSD Copyright notices.", NULL, dmenuDisplayFile, NULL, "COPYRIGHT" },
+ { "Release", "The release notes for this version of FreeBSD.", NULL, dmenuDisplayFile, NULL, "relnotes" },
+ { "HTML Docs","Go to the HTML documentation menu (post-install).", NULL, docBrowser },
+ { "Exit", "Exit this menu (returning to previous)", NULL, dmenuCancel },
{ NULL } },
};
DMenu MenuMouse = {
-DMENU_NORMAL_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\
+ DMENU_NORMAL_TYPE,
+ "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\
somewhat. Once you've selected one of the below, you can specify\n\
/dev/mouse as your mouse device when running the XFree86 configuration\n\
utility (see Configuration menu). Please note that for PS/2 mice,\n\
a kernel recompile is also required! See the handbook for more details\n\
on building a kernel.",
-"For more information, visit the Documentation menu",
-NULL,
-{ { "COM1", "Serial mouse on COM1",
- DMENU_SYSTEM_COMMAND, "ln -fs /dev/cuaa0 /dev/mouse", 0, 0 },
- { "COM2", "Serial mouse on COM2",
- DMENU_SYSTEM_COMMAND, "ln -fs /dev/cuaa1 /dev/mouse", 0, 0 },
- { "COM3", "Serial mouse on COM3",
- DMENU_SYSTEM_COMMAND, "ln -fs /dev/cuaa2 /dev/mouse", 0, 0 },
- { "COM4", "Serial mouse on COM4",
- DMENU_SYSTEM_COMMAND, "ln -fs /dev/cuaa3 /dev/mouse", 0, 0 },
- { "BusMouse", "Logitech or ATI bus mouse",
- DMENU_SYSTEM_COMMAND, "ln -fs /dev/mse0 /dev/mouse", 0, 0 },
- { "PS/2", "PS/2 style mouse (requires new kernel)",
- DMENU_SYSTEM_COMMAND, "ln -fs /dev/psm0 /dev/mouse", 0, 0 },
+ "For more information, visit the Documentation menu",
+ NULL,
+{ { "COM1", "Serial mouse on COM1", NULL, dmenuSystemCommand, NULL, "ln -fs /dev/cuaa0 /dev/mouse" },
+ { "COM2", "Serial mouse on COM2", NULL, dmenuSystemCommand, NULL, "ln -fs /dev/cuaa1 /dev/mouse" },
+ { "COM3", "Serial mouse on COM3", NULL, dmenuSystemCommand, NULL, "ln -fs /dev/cuaa2 /dev/mouse" },
+ { "COM4", "Serial mouse on COM4", NULL, dmenuSystemCommand, NULL, "ln -fs /dev/cuaa3 /dev/mouse" },
+ { "BusMouse", "Logitech or ATI bus mouse", NULL, dmenuSystemCommand, NULL, "ln -fs /dev/mse0 /dev/mouse" },
+ { "PS/2", "PS/2 style mouse (requires kernel rebuild)", NULL, dmenuSystemCommand, NULL, "ln -fs /dev/psm0 /dev/mouse" },
{ NULL } },
};
DMenu MenuMediaCDROM = {
-DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
-"Choose a CDROM type",
-"FreeBSD can be installed directly from a CDROM containing a valid\n\
+ DMENU_NORMAL_TYPE,
+ "Choose a CDROM type",
+ "FreeBSD can be installed directly from a CDROM containing a valid\n\
FreeBSD distribution. If you are seeing this menu it is because\n\
more than one CDROM drive was found on your system. Please select one\n\
of the following CDROM drives as your installation drive.",
-"Press F1 to read the installation guide",
-"install",
-{ { NULL } },
+ "Press F1 to read the installation guide",
+ "install",
+ { { NULL } },
};
DMenu MenuMediaFloppy = {
-DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
-"Choose a Floppy drive",
-"You have more than one floppy drive. Please chose the drive\n\
+ DMENU_NORMAL_TYPE,
+ "Choose a Floppy drive",
+ "You have more than one floppy drive. Please chose the drive\n\
you would like to use for this operation",
-NULL,
-NULL,
-{ { NULL } },
+ NULL,
+ NULL,
+ { { NULL } },
};
DMenu MenuMediaDOS = {
-DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
-"Choose a DOS partition",
-"FreeBSD can be installed directly from a DOS partition\n\
+ DMENU_NORMAL_TYPE,
+ "Choose a DOS partition",
+ "FreeBSD can be installed directly from a DOS partition\n\
assuming, of course, that you have copied the relevant\n\
distributions into your DOS partition before starting this\n\
installation. If this is not the case then you should reboot\n\
@@ -173,151 +148,151 @@ DOS at this time and copy the distributions you wish to install\n\
into a \"FREEBSD\" subdirectory on one of your DOS partitions.\n\
Otherwise, please select the DOS partition containing the FreeBSD\n\
distribution files.",
-"Press F1 to read the installation guide",
-"install",
-{ { NULL } },
+ "Press F1 to read the installation guide",
+ "install",
+ { { NULL } },
};
DMenu MenuMediaFTP = {
-DMENU_NORMAL_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\
+ DMENU_NORMAL_TYPE,
+ "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\
carries more than the base distribution kits. Only the Primary site is\n\
guaranteed to carry the full range of possible distributions.",
-"Select a site that's close!",
-"install",
-{ { "Primary Site", "ftp.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "Other", "Specify some other ftp site by URL",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=other", 0, 0 },
- { "Australia", "ftp.au.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp.au.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "Australia #2", "ftp2.au.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp2.au.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "Australia #3", "ftp3.au.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp3.au.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "Australia #4", "ftp4.au.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp4.au.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "Brazil", "ftp.br.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp.br.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "Brazil #2", "ftp2.br.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp2.br.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "Brazil #3", "ftp3.br.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp3.br.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "Brazil #4", "ftp4.br.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp4.br.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "Brazil #5", "ftp5.br.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp5.br.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "Canada", "ftp.ca.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp.ca.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "Czech Republic", "sunsite.mff.cuni.cz",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://sunsite.mff.cuni.cz/OS/FreeBSD/", 0, 0 },
- { "Finland", "nic.funet.fi",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://nic.funet.fi/pub/unix/FreeBSD/", 0, 0 },
- { "France", "ftp.ibp.fr",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp.ibp.fr/pub/FreeBSD/", 0, 0 },
- { "Germany", "ftp.de.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp.de.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "Germany #2", "ftp2.de.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp2.de.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "Germany #3", "ftp3.de.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp3.de.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "Germany #4", "ftp4.de.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp4.de.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "Germany #5", "ftp5.de.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp5.de.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "Germany #6", "ftp6.de.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp6.de.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "Germany #7", "ftp7.de.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp7.de.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "Hong Kong", "ftp.hk.super.net",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp.hk.super.net/pub/FreeBSD/", 0, 0 },
- { "Ireland", "ftp.ie.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp.ie.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "Israel", "orgchem.weizmann.ac.il",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://orgchem.weizmann.ac.il/pub/FreeBSD/", 0, 0 },
- { "Israel #2", "xray4.weizmann.ac.il",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://xray4.weizmann.ac.il/pub/FreeBSD/", 0, 0 },
- { "Japan", "ftp.jp.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp.jp.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "Japan #2", "ftp2.jp.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp2.jp.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "Japan #3", "ftp3.jp.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp3.jp.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "Japan #4", "ftp4.jp.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp4.jp.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "Japan #5", "ftp5.jp.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp5.jp.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "Japan #6", "ftp6.jp.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp6.jp.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "Korea", "ftp.kr.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp.kr.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "Korea #2", "ftp2.kr.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp2.kr.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "Netherlands", "ftp.nl.net",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp.nl.net/pub/os/FreeBSD/", 0, 0 },
- { "Poland", "SunSITE.icm.edu.pl",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://SunSITE.icm.edu.pl/pub/FreeBSD/", 0, 0 },
- { "Portugal", "ftp.ua.pt",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp.ua.pt/pub/misc/FreeBSD/", 0, 0 },
- { "Russia", "ftp.kiae.su",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp.kiae.su/FreeBSD/", 0, 0 },
- { "South Africa", "ftp.za.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp.za.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "South Africa #2", "ftp2.za.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp2.za.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "Sweden", "ftp.luth.se",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp.luth.se/pub/FreeBSD/", 0, 0 },
- { "Taiwan", "ftp.tw.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp.tw.freebsd.org/pub/FreeBSD", 0, 0 },
- { "Taiwan #2", "ftp2.tw.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp2.tw.freebsd.org/pub/FreeBSD", 0, 0 },
- { "Taiwan #3", "ftp3.tw.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp3.tw.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "Thailand", "ftp.nectec.or.th",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp.nectec.or.th/pub/mirrors/FreeBSD/", 0, 0 },
- { "UK", "ftp.uk.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp.uk.freebsd.org/pub/BSD/FreeBSD/", 0, 0 },
- { "UK #2", "ftp2.uk.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp2.uk.freebsd.org/pub/BSD/FreeBSD/", 0, 0 },
- { "UK #3", "ftp3.uk.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp3.uk.freebsd.org/pub/BSD/FreeBSD/", 0, 0 },
- { "USA", "ftp.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "USA #2", "ftp2.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp2.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "USA #3", "ftp3.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp3.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "USA #4", "ftp4.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp4.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "USA #5", "ftp5.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp5.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "USA #6", "ftp6.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp6.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "USA #7", "ftp7.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp7.freebsd.org/pub/FreeBSD/", 0, 0 },
+ "Select a site that's close!",
+ "install",
+{ { "Primary Site", "ftp.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp.freebsd.org/pub/FreeBSD/" },
+ { "Other", "Specify some other ftp site by URL", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=other" },
+ { "Australia", "ftp.au.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp.au.freebsd.org/pub/FreeBSD/" },
+ { "Australia #2", "ftp2.au.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp2.au.freebsd.org/pub/FreeBSD/" },
+ { "Australia #3", "ftp3.au.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp3.au.freebsd.org/pub/FreeBSD/" },
+ { "Australia #4", "ftp4.au.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp4.au.freebsd.org/pub/FreeBSD/" },
+ { "Brazil", "ftp.br.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp.br.freebsd.org/pub/FreeBSD/" },
+ { "Brazil #2", "ftp2.br.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp2.br.freebsd.org/pub/FreeBSD/" },
+ { "Brazil #3", "ftp3.br.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp3.br.freebsd.org/pub/FreeBSD/" },
+ { "Brazil #4", "ftp4.br.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp4.br.freebsd.org/pub/FreeBSD/" },
+ { "Brazil #5", "ftp5.br.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp5.br.freebsd.org/pub/FreeBSD/" },
+ { "Canada", "ftp.ca.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp.ca.freebsd.org/pub/FreeBSD/" },
+ { "Czech Republic", "sunsite.mff.cuni.cz", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://sunsite.mff.cuni.cz/OS/FreeBSD/" },
+ { "Finland", "nic.funet.fi", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://nic.funet.fi/pub/unix/FreeBSD/" },
+ { "France", "ftp.ibp.fr", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp.ibp.fr/pub/FreeBSD/" },
+ { "Germany", "ftp.de.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp.de.freebsd.org/pub/FreeBSD/" },
+ { "Germany #2", "ftp2.de.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp2.de.freebsd.org/pub/FreeBSD/" },
+ { "Germany #3", "ftp3.de.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp3.de.freebsd.org/pub/FreeBSD/" },
+ { "Germany #4", "ftp4.de.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp4.de.freebsd.org/pub/FreeBSD/" },
+ { "Germany #5", "ftp5.de.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp5.de.freebsd.org/pub/FreeBSD/" },
+ { "Germany #6", "ftp6.de.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp6.de.freebsd.org/pub/FreeBSD/" },
+ { "Germany #7", "ftp7.de.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp7.de.freebsd.org/pub/FreeBSD/" },
+ { "Hong Kong", "ftp.hk.super.net", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp.hk.super.net/pub/FreeBSD/" },
+ { "Ireland", "ftp.ie.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp.ie.freebsd.org/pub/FreeBSD/" },
+ { "Israel", "orgchem.weizmann.ac.il", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://orgchem.weizmann.ac.il/pub/FreeBSD/" },
+ { "Israel #2", "xray4.weizmann.ac.il", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://xray4.weizmann.ac.il/pub/FreeBSD/" },
+ { "Japan", "ftp.jp.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp.jp.freebsd.org/pub/FreeBSD/" },
+ { "Japan #2", "ftp2.jp.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp2.jp.freebsd.org/pub/FreeBSD/" },
+ { "Japan #3", "ftp3.jp.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp3.jp.freebsd.org/pub/FreeBSD/" },
+ { "Japan #4", "ftp4.jp.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp4.jp.freebsd.org/pub/FreeBSD/" },
+ { "Japan #5", "ftp5.jp.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp5.jp.freebsd.org/pub/FreeBSD/" },
+ { "Japan #6", "ftp6.jp.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp6.jp.freebsd.org/pub/FreeBSD/" },
+ { "Korea", "ftp.kr.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp.kr.freebsd.org/pub/FreeBSD/" },
+ { "Korea #2", "ftp2.kr.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp2.kr.freebsd.org/pub/FreeBSD/" },
+ { "Netherlands", "ftp.nl.net", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp.nl.net/pub/os/FreeBSD/" },
+ { "Poland", "SunSITE.icm.edu.pl", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://SunSITE.icm.edu.pl/pub/FreeBSD/" },
+ { "Portugal", "ftp.ua.pt", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp.ua.pt/pub/misc/FreeBSD/" },
+ { "Russia", "ftp.kiae.su", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp.kiae.su/FreeBSD/" },
+ { "South Africa", "ftp.za.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp.za.freebsd.org/pub/FreeBSD/" },
+ { "South Africa #2", "ftp2.za.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp2.za.freebsd.org/pub/FreeBSD/" },
+ { "Sweden", "ftp.luth.se", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp.luth.se/pub/FreeBSD/" },
+ { "Taiwan", "ftp.tw.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp.tw.freebsd.org/pub/FreeBSD" },
+ { "Taiwan #2", "ftp2.tw.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp2.tw.freebsd.org/pub/FreeBSD" },
+ { "Taiwan #3", "ftp3.tw.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp3.tw.freebsd.org/pub/FreeBSD/" },
+ { "Thailand", "ftp.nectec.or.th", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp.nectec.or.th/pub/mirrors/FreeBSD/" },
+ { "UK", "ftp.uk.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp.uk.freebsd.org/pub/BSD/FreeBSD/" },
+ { "UK #2", "ftp2.uk.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp2.uk.freebsd.org/pub/BSD/FreeBSD/" },
+ { "UK #3", "ftp3.uk.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp3.uk.freebsd.org/pub/BSD/FreeBSD/" },
+ { "USA", "ftp.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp.freebsd.org/pub/FreeBSD/" },
+ { "USA #2", "ftp2.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp2.freebsd.org/pub/FreeBSD/" },
+ { "USA #3", "ftp3.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp3.freebsd.org/pub/FreeBSD/" },
+ { "USA #4", "ftp4.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp4.freebsd.org/pub/FreeBSD/" },
+ { "USA #5", "ftp5.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp5.freebsd.org/pub/FreeBSD/" },
+ { "USA #6", "ftp6.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp6.freebsd.org/pub/FreeBSD/" },
+ { "USA #7", "ftp7.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp7.freebsd.org/pub/FreeBSD/" },
{ NULL } }
};
DMenu MenuMediaTape = {
-DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
-"Choose a tape drive type",
-"FreeBSD can be installed from tape drive, though this installation\n\
+ DMENU_NORMAL_TYPE,
+ "Choose a tape drive type",
+ "FreeBSD can be installed from tape drive, though this installation\n\
method requires a certain amount of temporary storage in addition\n\
to the space required by the distribution itself (tape drives make\n\
poor random-access devices, so we extract _everything_ on the tape\n\
in one pass). If you have sufficient space for this, then you should\n\
select one of the following tape devices detected on your system.",
-"Press F1 to read the installation guide",
-"install",
-{ { NULL } },
+ "Press F1 to read the installation guide",
+ "install",
+ { { NULL } },
};
DMenu MenuNetworkDevice = {
-DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
-"Network interface information required",
-"If you are using PPP over a serial device (cuaa0 or cuaa1) as opposed\n\
+ DMENU_NORMAL_TYPE,
+ "Network interface information required",
+ "If you are using PPP over a serial device (cuaa0 or cuaa1) as opposed\n\
to a direct ethernet connection, then you may first need to dial your\n\
service provider using the ppp utility we provide for that purpose.\n\
You can also install over a parallel port using a special \"laplink\"\n\
@@ -326,92 +301,75 @@ a fairly recent (2.0R or later) release to talk to.\n\n\
To use PPP, select one of the serial devices, otherwise select lp0 for\n\
the parallel port or one of the ethernet controllers (if you have one)\n\
for an ethernet installation.",
-"Press F1 to read network configuration manual",
-"network_device",
-{ { NULL } },
+ "Press F1 to read network configuration manual",
+ "network_device",
+ { { NULL } },
};
/* The media selection menu */
DMenu MenuMedia = {
-DMENU_NORMAL_TYPE,
-"Choose Installation Media",
-"FreeBSD can be installed from a variety of different installation\n\
+ DMENU_NORMAL_TYPE,
+ "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\
installing FreeBSD from a supported CDROM drive then this is generally\n\
the best media to use if you have no overriding reason for using other\n\
media.",
-"Press F1 for more information on the various media types",
-"media",
-{ { "CDROM", "Install from a FreeBSD CDROM",
- DMENU_CALL, mediaSetCDROM, 0, 0 },
- { "DOS", "Install from a DOS partition",
- DMENU_CALL, mediaSetDOS, 0, 0 },
- { "File System", "Install from an existing filesystem",
- DMENU_CALL, mediaSetUFS, 0, 0 },
- { "Floppy", "Install from a floppy disk set",
- DMENU_CALL, mediaSetFloppy, 0, 0 },
- { "FTP", "Install from an FTP server",
- DMENU_CALL, mediaSetFTPActive, 0, 0 },
- { "FTP Passive", "Install from an FTP server through a firewall",
- DMENU_CALL, mediaSetFTPPassive, 0, 0 },
- { "NFS", "Install over NFS",
- DMENU_CALL, mediaSetNFS, 0, 0 },
- { "Tape", "Install from SCSI or QIC tape",
- DMENU_CALL, mediaSetTape, 0, 0 },
+ "Press F1 for more information on the various media types",
+ "media",
+{ { "CDROM", "Install from a FreeBSD CDROM", NULL, mediaSetCDROM },
+ { "DOS", "Install from a DOS partition", NULL, mediaSetDOS },
+ { "File System", "Install from an existing filesystem", NULL, mediaSetUFS },
+ { "Floppy", "Install from a floppy disk set", NULL, mediaSetFloppy },
+ { "FTP", "Install from an FTP server", NULL, mediaSetFTPActive },
+ { "FTP Passive", "Install from an FTP server through a firewall", NULL, mediaSetFTPPassive },
+ { "NFS", "Install over NFS", NULL, mediaSetNFS },
+ { "Tape", "Install from SCSI or QIC tape", NULL, mediaSetTape },
{ NULL } },
};
/* The distributions menu */
DMenu MenuDistributions = {
-DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
-"Choose Distributions",
-"As a convenience, we provide several \"canned\" distribution sets.\n\
+ DMENU_NORMAL_TYPE,
+ "Choose Distributions",
+ "As a convenience, we provide several \"canned\" distribution sets.\n\
These select what we consider to be the most reasonable defaults for the\n\
type of system in question. If you would prefer to pick and choose\n\
the list of distributions yourself, simply select \"Custom\".",
-"Press F1 for more information on these options.",
-"distributions",
-{ { "Developer", "Full sources, binaries and doc but no games [180MB]",
- DMENU_CALL, distSetDeveloper, 0, 0 },
- { "X-Developer", "Same as above, but includes XFree86 [201MB]",
- DMENU_CALL, distSetXDeveloper, 0, 0 },
- { "Kern-Developer", "Full binaries and doc, kernel sources only [70MB]",
- DMENU_CALL, distSetKernDeveloper, 0, 0 },
- { "User", "Average user - binaries and doc but no sources [52MB]",
- DMENU_CALL, distSetUser, 0, 0 },
- { "X-User", "Same as above, but includes XFree86 [52MB]",
- DMENU_CALL, distSetXUser, 0, 0 },
- { "Minimal", "The smallest configuration possible [44MB]",
- DMENU_CALL, distSetMinimum, 0, 0 },
- { "Everything", "All sources, binaries and XFree86 binaries [700MB]",
- DMENU_CALL, distSetEverything, 0, 0 },
- { "Custom", "Specify your own distribution set [?]",
- DMENU_SUBMENU, &MenuSubDistributions, 0, 0 },
- { "Clear", "Reset selected distribution list to None",
- DMENU_CALL, distReset, 0, 0 },
+ "Press F1 for more information on these options.",
+ "distributions",
+{ { "Developer", "Full sources, binaries and doc but no games [180MB]", NULL, distSetDeveloper },
+ { "X-Developer", "Same as above, but includes XFree86 [201MB]", NULL, distSetXDeveloper },
+ { "Kern-Developer", "Full binaries and doc, kernel sources only [70MB]", NULL, distSetKernDeveloper },
+ { "User", "Average user - binaries and doc but no sources [52MB]", NULL, distSetUser },
+ { "X-User", "Same as above, but includes XFree86 [52MB]", NULL, distSetXUser },
+ { "Minimal", "The smallest configuration possible [44MB]", NULL, distSetMinimum },
+ { "Everything", "All sources, binaries and XFree86 binaries [700MB]", NULL, distSetEverything },
+ { "Custom", "Specify your own distribution set [?]", NULL, dmenuSubmenu, NULL, &MenuSubDistributions },
+ { "Clear", "Reset selected distribution list to None", NULL, distReset },
{ NULL } },
};
-static char *
-DESFlagCheck(DMenuItem *item)
+static int
+DESFlagCheck(dialogMenuItem *item)
{
- return (Dists & DIST_DES) ? "ON" : "OFF";
+ return Dists & DIST_DES;
}
-static char *
-srcFlagCheck(DMenuItem *item)
+static int
+srcFlagCheck(dialogMenuItem *item)
{
- return (Dists & DIST_SRC) ? "ON" : "OFF";
+ return Dists & DIST_SRC;
}
-static char *
-x11FlagCheck(DMenuItem *item)
+static int
+x11FlagCheck(dialogMenuItem *item)
{
- return (Dists & DIST_XF86) ? "ON" : "OFF";
+ return Dists & DIST_XF86;
}
DMenu MenuSubDistributions = {
- DMENU_MULTIPLE_TYPE | DMENU_SELECTION_RETURNS,
+ DMENU_CHECKLIST_TYPE,
"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\
@@ -419,101 +377,103 @@ DES distribution out of the U.S.! It is for U.S. customers only.",
NULL,
NULL,
{ { "bin", "Binary base distribution (required) [36MB]",
- DMENU_SET_FLAG, &Dists, DIST_BIN, 0, dmenuFlagCheck },
- { "commercial", "Commercial demos and shareware [10MB]",
- DMENU_SET_FLAG, &Dists, DIST_COMMERCIAL, 0, dmenuFlagCheck },
- { "compat1x", "FreeBSD 1.x binary compatibility package [2MB]",
- DMENU_SET_FLAG, &Dists, DIST_COMPAT1X, 0, dmenuFlagCheck },
- { "compat20", "FreeBSD 2.0 binary compatibility package [2MB]",
- DMENU_SET_FLAG, &Dists, DIST_COMPAT20, 0, dmenuFlagCheck },
+ dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_BIN },
+ { "commercial", "Commercial and shareware demos [10MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_COMMERCIAL },
+ { "compat1x", "FreeBSD 1.x binary compatibility [2MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_COMPAT1X },
+ { "compat20", "FreeBSD 2.0 binary compatibility [2MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_COMPAT20 },
+ { "compat21", "FreeBSD 2.1 binary compatibility [2MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_COMPAT21 },
{ "DES", "DES encryption code - NOT FOR EXPORT! [.3MB]",
- DMENU_CALL, distSetDES, 0, 0, DESFlagCheck },
+ DESFlagCheck, distSetDES },
{ "dict", "Spelling checker dictionary files [4.2MB]",
- DMENU_SET_FLAG, &Dists, DIST_DICT, 0, dmenuFlagCheck },
+ dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_DICT },
{ "doc", "FreeBSD Handbook and other online docs [10MB]",
- DMENU_SET_FLAG, &Dists, DIST_DOC, 0, dmenuFlagCheck },
- { "games", "Games (non-commercial) [6.4MB]",
- DMENU_SET_FLAG, &Dists, DIST_GAMES, 0, dmenuFlagCheck },
+ dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_DOC },
+ { "games", "Games (non-commercial) [6.4MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_GAMES },
{ "info", "GNU info files [4.1MB]",
- DMENU_SET_FLAG, &Dists, DIST_INFO, 0, dmenuFlagCheck },
+ dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_INFO },
{ "man", "System manual pages - recommended [3.3MB]",
- DMENU_SET_FLAG, &Dists, DIST_MANPAGES, 0, dmenuFlagCheck },
- { "proflibs", "Profiled versions of the libraries [3.3MB]",
- DMENU_SET_FLAG, &Dists, DIST_PROFLIBS, 0, dmenuFlagCheck },
+ dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_MANPAGES },
+ { "proflibs", "Profiled versions of the libraries [3.3MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_PROFLIBS },
{ "src", "Sources for everything but DES [120MB]",
- DMENU_CALL, distSetSrc, 0, 0, srcFlagCheck },
- { "XFree86", "The XFree86 3.1.2-S distribution",
- DMENU_CALL, distSetXF86, 0, 0, x11FlagCheck },
+ srcFlagCheck, distSetSrc },
+ { "XFree86", "The XFree86 3.1.2-S distribution",
+ x11FlagCheck, distSetXF86 },
{ "Experimental", "Work in progress!",
- DMENU_SET_FLAG, &Dists, DIST_EXPERIMENTAL, 0, dmenuFlagCheck },
+ dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_EXPERIMENTAL },
{ NULL } },
};
DMenu MenuDESDistributions = {
-DMENU_MULTIPLE_TYPE | DMENU_SELECTION_RETURNS,
-"Select the encryption facilities you wish to install.",
-"Please check off any special DES-based encryption distributions\n\
+ DMENU_CHECKLIST_TYPE,
+ "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\
EXPORT from the United States, nor are they available on CDROM (for the\n\
same reason). For information on non-U.S. FTP distributions of this\n\
software, please consult the release notes.",
-NULL,
-NULL,
-{ { "des", "Basic DES services (rlogin, init, etc) [1MB]",
- DMENU_SET_FLAG, &DESDists, DIST_DES_DES, 0, dmenuFlagCheck },
- { "krb", "Kerberos encryption services [2MB]",
- DMENU_SET_FLAG, &DESDists, DIST_DES_KERBEROS, 0, dmenuFlagCheck },
+ NULL,
+ NULL,
+{ { "des", "Basic DES encryption services [1MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &DESDists, '[', 'X', ']', DIST_DES_DES, },
+ { "krb", "Kerberos encryption services [2MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &DESDists, '[', 'X', ']', DIST_DES_KERBEROS },
{ "sebones", "Sources for eBones (Kerberos) [1MB]",
- DMENU_SET_FLAG, &DESDists, DIST_DES_SEBONES, 0, dmenuFlagCheck },
- { "ssecure", "Sources for DES libs and utilities [1MB]",
- DMENU_SET_FLAG, &DESDists, DIST_DES_SSECURE, 0, dmenuFlagCheck },
+ dmenuFlagCheck, dmenuSetFlag, NULL, &DESDists, '[', 'X', ']', DIST_DES_SEBONES },
+ { "ssecure", "Sources for DES [1MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &DESDists, '[', 'X', ']', DIST_DES_SSECURE },
{ NULL } },
};
DMenu MenuSrcDistributions = {
-DMENU_MULTIPLE_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\
+ DMENU_CHECKLIST_TYPE,
+ "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.",
-NULL,
-NULL,
-{ { "base", "top-level files in /usr/src [300K]",
- DMENU_SET_FLAG, &SrcDists, DIST_SRC_BASE, 0, dmenuFlagCheck },
- { "gnu", "/usr/src/gnu (software from the GNU Project) [42MB]",
- DMENU_SET_FLAG, &SrcDists, DIST_SRC_GNU, 0, dmenuFlagCheck },
- { "etc", "/usr/src/etc (miscellaneous system files) [460K]",
- DMENU_SET_FLAG, &SrcDists, DIST_SRC_ETC, 0, dmenuFlagCheck },
- { "games", "/usr/src/games (diversions) [7.8MB]",
- DMENU_SET_FLAG, &SrcDists, DIST_SRC_GAMES, 0, dmenuFlagCheck },
+ NULL,
+ NULL,
+{ { "base", "top-level files in /usr/src [300K]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_BASE },
+ { "gnu", "/usr/src/gnu (software from the GNU Project) [42MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_GNU },
+ { "etc", "/usr/src/etc (miscellaneous system files) [460K]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_ETC },
+ { "games", "/usr/src/games (the obvious!) [7.8MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_GAMES },
{ "include", "/usr/src/include (header files) [467K]",
- DMENU_SET_FLAG, &SrcDists, DIST_SRC_INCLUDE, 0, dmenuFlagCheck },
- { "lib", "/usr/src/lib (system libraries) [9.2MB]",
- DMENU_SET_FLAG, &SrcDists, DIST_SRC_LIB, 0, dmenuFlagCheck },
+ dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_INCLUDE },
+ { "lib", "/usr/src/lib (system libraries) [9.2MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_LIB },
{ "libexec", "/usr/src/libexec (system programs) [1.2MB]",
- DMENU_SET_FLAG, &SrcDists, DIST_SRC_LIBEXEC, 0, dmenuFlagCheck },
- { "lkm", "/usr/src/lkm (Loadable Kernel Modules) [193K]",
- DMENU_SET_FLAG, &SrcDists, DIST_SRC_LKM, 0, dmenuFlagCheck },
+ dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_LIBEXEC },
+ { "lkm", "/usr/src/lkm (Loadable Kernel Modules) [193K]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_LKM },
{ "release", "/usr/src/release (release-generation tools) [533K]",
- DMENU_SET_FLAG, &SrcDists, DIST_SRC_RELEASE, 0, dmenuFlagCheck },
- { "bin", "/usr/src/bin (system binaries) [2.5MB]",
- DMENU_SET_FLAG, &SrcDists, DIST_SRC_BIN, 0, dmenuFlagCheck },
- { "sbin", "/usr/src/sbin (system binaries) [1.3MB]",
- DMENU_SET_FLAG, &SrcDists, DIST_SRC_SBIN, 0, dmenuFlagCheck },
+ dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_RELEASE },
+ { "bin", "/usr/src/bin (system binaries) [2.5MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_BIN },
+ { "sbin", "/usr/src/sbin (system binaries) [1.3MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_SBIN },
{ "share", "/usr/src/share (documents and shared files) [10MB]",
- DMENU_SET_FLAG, &SrcDists, DIST_SRC_SHARE, 0, dmenuFlagCheck },
- { "sys", "/usr/src/sys (FreeBSD kernel) [13MB]",
- DMENU_SET_FLAG, &SrcDists, DIST_SRC_SYS, 0, dmenuFlagCheck },
- { "ubin", "/usr/src/usr.bin (user binaries) [13MB]",
- DMENU_SET_FLAG, &SrcDists, DIST_SRC_UBIN, 0, dmenuFlagCheck },
+ dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_SHARE },
+ { "sys", "/usr/src/sys (FreeBSD kernel) [13MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_SYS },
+ { "ubin", "/usr/src/usr.bin (user binaries) [13MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_UBIN },
{ "usbin", "/usr/src/usr.sbin (aux system binaries) [14MB]",
- DMENU_SET_FLAG, &SrcDists, DIST_SRC_USBIN, 0, dmenuFlagCheck },
+ dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_USBIN },
{ "smailcf", "/usr/src/usr.sbin (sendmail config macros) [341K]",
- DMENU_SET_FLAG, &SrcDists, DIST_SRC_SMAILCF, 0, dmenuFlagCheck },
+ dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_SMAILCF },
{ NULL } },
};
static int
-clearx11(char *str)
+clearx11(dialogMenuItem *self)
{
XF86Dists = 0;
XF86ServerDists = 0;
@@ -530,81 +490,76 @@ distribution. We recommend that you select what you need from the basic\n\
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)",
- DMENU_SUBMENU, &MenuXF86SelectCore, 0, 0 },
- { "Server", "X server menu",
- DMENU_SUBMENU, &MenuXF86SelectServer, 0, 0 },
- { "Fonts", "Font set menu",
- DMENU_SUBMENU, &MenuXF86SelectFonts, 0, 0 },
- { "Exit", "Exit this menu (returning to previous)",
- DMENU_CANCEL, NULL, 0, 0 },
- { "Clear", "Reset XFree86 distribution list",
- DMENU_CALL, clearx11, 0, 0, 0 },
+{ { "Basic", "Basic component menu (required)", NULL, dmenuSubmenu, NULL, &MenuXF86SelectCore },
+ { "Server", "X server menu", NULL, dmenuSubmenu, NULL, &MenuXF86SelectServer },
+ { "Fonts", "Font set menu", NULL, dmenuSubmenu, NULL, &MenuXF86SelectFonts },
+ { "Exit", "Exit this menu (returning to previous)", NULL, dmenuCancel },
+ { "Clear", "Reset XFree86 distribution list", NULL, clearx11 },
{ NULL } },
};
DMenu MenuXF86SelectCore = {
- DMENU_MULTIPLE_TYPE | DMENU_SELECTION_RETURNS,
-"XFree86 3.1.2-S base distribution types",
-"Please check off the basic XFree86 components you wish to install.\n\
+ DMENU_CHECKLIST_TYPE,
+ "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.",
-"Press F1 to read the XFree86 release notes for FreeBSD",
-"XF86",
-{ { "bin", "Client applications and shared libs [4.1MB].",
- DMENU_SET_FLAG, &XF86Dists, DIST_XF86_BIN, 0, dmenuFlagCheck },
- { "lib", "Data files needed at runtime [750K]",
- DMENU_SET_FLAG, &XF86Dists, DIST_XF86_LIB, 0, dmenuFlagCheck },
- { "xicf", "Customizable xinit runtime configuration file [10K]",
- DMENU_SET_FLAG, &XF86Dists, DIST_XF86_XINIT, 0, dmenuFlagCheck },
- { "xdcf", "Customizable xdm runtime configuration file [20K]",
- DMENU_SET_FLAG, &XF86Dists, DIST_XF86_XDMCF, 0, dmenuFlagCheck },
- { "etc", "Clock setting and diagnostic source codes [70K]",
- DMENU_SET_FLAG, &XF86Dists, DIST_XF86_ETC, 0, dmenuFlagCheck },
- { "doc", "READMEs and release notes [600K]",
- DMENU_SET_FLAG, &XF86Dists, DIST_XF86_DOC, 0, dmenuFlagCheck },
- { "man", "Man pages [1.7MB]",
- DMENU_SET_FLAG, &XF86Dists, DIST_XF86_MAN, 0, dmenuFlagCheck },
- { "ctrb", "Various contributed binaries (ico, xman, etc) [550K]",
- DMENU_SET_FLAG, &XF86Dists, DIST_XF86_CTRB, 0, dmenuFlagCheck },
- { "prog", "Programmer's header and library files [4.1MB]",
- DMENU_SET_FLAG, &XF86Dists, DIST_XF86_PROG, 0, dmenuFlagCheck },
- { "link", "Kit to reconfigure/rebuild X Servers [8.8MB]",
- DMENU_SET_FLAG, &XF86Dists, DIST_XF86_LINK, 0, dmenuFlagCheck },
- { "ubin", "rstart daemon [2K]",
- DMENU_SET_FLAG, &XF86Dists, DIST_XF86_UBIN, 0, dmenuFlagCheck },
- { "pex", "PEX fonts and libs needed by PEX apps [290K]",
- DMENU_SET_FLAG, &XF86Dists, DIST_XF86_PEX, 0, dmenuFlagCheck },
+ "Press F1 to read the XFree86 release notes for FreeBSD",
+ "XF86",
+{ { "bin", "Client applications and shared libs [4.1MB].",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_BIN },
+ { "lib", "Data files needed at runtime [750K]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_LIB },
+ { "xicf", "Customizable xinit runtime configuration file [10K]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_XINIT },
+ { "xdcf", "Customizable xdm runtime configuration file [20K]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_XDMCF },
+ { "etc", "Clock setting and diagnostic source codes [70K]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_ETC },
+ { "doc", "READMEs and release notes [600K]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_DOC },
+ { "man", "Manual pages [1.7MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_MAN },
+ { "ctrb", "Various contributed binaries (ico, xman, etc) [550K]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_CTRB },
+ { "prog", "Programmer's header and library files [4.1MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_PROG },
+ { "link", "Kit to reconfigure/rebuild X Servers [8.8MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_LINK },
+ { "ubin", "rstart daemon [2K]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_UBIN },
+ { "pex", "PEX fonts and libs needed by PEX apps [290K]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_PEX },
{ "sources", "XFree86 3.1.2-S standard + contrib sources [200MB]",
- DMENU_SET_FLAG, &XF86Dists, DIST_XF86_SRC, 0, dmenuFlagCheck },
+ dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_SRC },
{ NULL } },
};
DMenu MenuXF86SelectFonts = {
-DMENU_MULTIPLE_TYPE | DMENU_SELECTION_RETURNS,
-"Font distribution selection.",
-"Please check off the individual font distributions you wish to\n\
+ DMENU_CHECKLIST_TYPE,
+ "Font distribution selection.",
+ "Please check off the individual font distributions you wish to\n\
install. At the minimum, you should install the standard\n\
75 DPI and misc fonts if you're also installing a server\n\
(these are selected by default).",
"Press F1 to read the XFree86 release notes for FreeBSD",
"XF86",
- { { "fnts", "Standard 75 DPI and miscellaneous fonts [3.6MB]",
- DMENU_SET_FLAG, &XF86FontDists, DIST_XF86_FONTS_MISC, 0, dmenuFlagCheck },
- { "f100", "100 DPI fonts [1.8MB]",
- DMENU_SET_FLAG, &XF86FontDists, DIST_XF86_FONTS_100, 0, dmenuFlagCheck },
- { "fcyr", "Cyrillic Fonts [1.8MB]",
- DMENU_SET_FLAG, &XF86FontDists, DIST_XF86_FONTS_CYR, 0, dmenuFlagCheck },
- { "fscl", "Speedo and Type scalable fonts [1.6MB]",
- DMENU_SET_FLAG, &XF86FontDists, DIST_XF86_FONTS_SCALE, 0, dmenuFlagCheck },
- { "non", "Japanese, Chinese and other non-english fonts [3.3MB]",
- DMENU_SET_FLAG, &XF86FontDists, DIST_XF86_FONTS_NON, 0, dmenuFlagCheck },
- { "server", "Font server [0.3MB]",
- DMENU_SET_FLAG, &XF86FontDists, DIST_XF86_FONTS_SERVER, 0, dmenuFlagCheck },
- { NULL } },
+{ { "fnts", "Standard 75 DPI and miscellaneous fonts [3.6MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &XF86FontDists, '[', 'X', ']', DIST_XF86_FONTS_MISC },
+ { "f100", "100 DPI fonts [1.8MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &XF86FontDists, '[', 'X', ']', DIST_XF86_FONTS_100 },
+ { "fcyr", "Cyrillic Fonts [1.8MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &XF86FontDists, '[', 'X', ']', DIST_XF86_FONTS_CYR },
+ { "fscl", "Speedo and Type scalable fonts [1.6MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &XF86FontDists, '[', 'X', ']', DIST_XF86_FONTS_SCALE },
+ { "non", "Japanese, Chinese and other non-english fonts [3.3MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &XF86FontDists, '[', 'X', ']', DIST_XF86_FONTS_NON },
+ { "server", "Font server [0.3MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &XF86FontDists, '[', 'X', ']', DIST_XF86_FONTS_SERVER },
+ { NULL } },
};
DMenu MenuXF86SelectServer = {
- DMENU_MULTIPLE_TYPE | DMENU_SELECTION_RETURNS,
+ DMENU_CHECKLIST_TYPE,
"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\
@@ -612,35 +567,35 @@ it is recommended that try the SVGA or VGA16 servers (the VGA16 and\n\
Mono servers are particularly well-suited to most LCD displays).",
"Press F1 to read the XFree86 release notes for FreeBSD",
"XF86",
- { { "SVGA", "Standard VGA or Super VGA display [2.8MB]",
- DMENU_SET_FLAG, &XF86ServerDists, DIST_XF86_SERVER_SVGA, 0, dmenuFlagCheck },
- { "VGA16", "Standard 16 color VGA display [1.3MB]",
- DMENU_SET_FLAG, &XF86ServerDists, DIST_XF86_SERVER_VGA16, 0, dmenuFlagCheck },
- { "Mono", "Standard Monochrome display [1.3MB]",
- DMENU_SET_FLAG, &XF86ServerDists, DIST_XF86_SERVER_MONO, 0, dmenuFlagCheck },
- { "8514", "8-bit (256 color) IBM 8514 or compatible card [2.2MB]",
- DMENU_SET_FLAG, &XF86ServerDists, DIST_XF86_SERVER_8514, 0, dmenuFlagCheck },
- { "AGX", "8-bit AGX card [2.4MB]",
- DMENU_SET_FLAG, &XF86ServerDists, DIST_XF86_SERVER_AGX, 0, dmenuFlagCheck },
- { "Ma8", "8-bit ATI Mach8 card [2.3MB]",
- DMENU_SET_FLAG, &XF86ServerDists, DIST_XF86_SERVER_MACH8, 0, dmenuFlagCheck },
- { "Ma32", "8 and 16-bit (65K color) for ATI Mach32 card [2.4MB]",
- DMENU_SET_FLAG, &XF86ServerDists, DIST_XF86_SERVER_MACH32, 0, dmenuFlagCheck },
- { "Ma64", "8 and 16-bit (65K color) for ATI Mach64 card [2.5MB]",
- DMENU_SET_FLAG, &XF86ServerDists, DIST_XF86_SERVER_MACH64, 0, dmenuFlagCheck },
- { "P9K", "8, 16, and 24-bit color for Weitek P9000 based boards [2.5MB]",
- DMENU_SET_FLAG, &XF86ServerDists, DIST_XF86_SERVER_P9000, 0, dmenuFlagCheck },
- { "S3", "8, 16 and 24-bit color for S3 based boards [2.7MB]",
- DMENU_SET_FLAG, &XF86ServerDists, DIST_XF86_SERVER_S3, 0, dmenuFlagCheck },
- { "W32", "8-bit Color for ET4000/W32, /W32i and /W32p cards [2.3MB]",
- DMENU_SET_FLAG, &XF86ServerDists, DIST_XF86_SERVER_W32, 0, dmenuFlagCheck },
- { "nest", "A nested server for testing purposes [1.8MB]",
- DMENU_SET_FLAG, &XF86ServerDists, DIST_XF86_SERVER_NEST, 0, dmenuFlagCheck },
- { NULL } },
+{ { "SVGA", "Standard VGA or Super VGA display [2.8MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_SVGA },
+ { "VGA16", "Standard 16 color VGA display [1.3MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_VGA16 },
+ { "Mono", "Standard Monochrome display [1.3MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_MONO },
+ { "8514", "8-bit (256 color) IBM 8514 or compatible card [2.2MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_8514 },
+ { "AGX", "8-bit AGX card [2.4MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_AGX },
+ { "Ma8", "8-bit ATI Mach8 card [2.3MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_MACH8 },
+ { "Ma32", "8 and 16-bit (65K color) for ATI Mach32 card [2.4MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_MACH32 },
+ { "Ma64", "8 and 16-bit (65K color) for ATI Mach64 card [2.5MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_MACH64 },
+ { "P9K", "8, 16, and 24-bit color for Weitek P9000 based boards [2.5MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_P9000 },
+ { "S3", "8, 16 and 24-bit color for S3 based boards [2.7MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_S3 },
+ { "W32", "8-bit Color for ET4000/W32, /W32i and /W32p cards [2.3MB]",
+ 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 },
+ { NULL } },
};
DMenu MenuDiskDevices = {
- DMENU_MULTIPLE_TYPE | DMENU_SELECTION_RETURNS,
+ DMENU_CHECKLIST_TYPE,
"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\
@@ -654,22 +609,18 @@ and press [SPACE].",
};
DMenu MenuHTMLDoc = {
- DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
+ DMENU_NORMAL_TYPE,
"Select HTML Documentation pointer",
"Please select the body of documentation you're interested in, the main\n\
ones right now being the FAQ and the Handbook. You can also chose \"other\"\n\
to enter an arbitrary URL for browsing.",
"Press F1 for more help on what you see here.",
"html",
- { { "Handbook", "The FreeBSD Handbook.",
- DMENU_CALL, docShowDocument, 0, 0 },
- { "FAQ", "The Frequently Asked Questions guide.",
- DMENU_CALL, docShowDocument, 0, 0 },
- { "Home", "The Home Pages for the FreeBSD Project (requires net)",
- DMENU_CALL, docShowDocument, 0, 0 },
- { "Other", "Enter a URL.",
- DMENU_CALL, docShowDocument, 0, 0 },
- { NULL } },
+{ { "Handbook", "The FreeBSD Handbook.", NULL, docShowDocument },
+ { "FAQ", "The Frequently Asked Questions guide.", NULL, docShowDocument },
+ { "Home", "The Home Pages for the FreeBSD Project (requires net)", NULL, docShowDocument },
+ { "Other", "Enter a URL.", NULL, docShowDocument },
+ { NULL } },
};
/* The main installation menu */
@@ -681,31 +632,23 @@ details on the type of distribution you wish to have, where you wish\n\
to install it from and how you wish to allocate disk storage to FreeBSD.",
"Press F1 to read the installation guide",
"install",
- { { "Options", "Go to Options editor",
- DMENU_CALL, optionsEditor, 0, 0 },
- { "Partition", "Allocate disk space for FreeBSD",
- DMENU_CALL, diskPartitionEditor, 0, 0 },
- { "Label", "Label allocated disk partitions",
- DMENU_CALL, diskLabelEditor, 0, 0 },
- { "Distributions", "Select distribution(s) to extract",
- DMENU_SUBMENU, &MenuDistributions, 0, 0 },
- { "Media", "Choose the installation media type",
- DMENU_SUBMENU, &MenuMedia, 0, 0 },
- { "Commit", "Perform any pending Partition/Label/Extract actions",
- DMENU_CALL, installCommit, 0, 0 },
- { "Extract", "Just do distribution extract step",
- DMENU_CALL, distExtractAll, 0, 0 },
- { "Exit", "Exit this menu (returning to previous)",
- DMENU_CANCEL, NULL, 0, 0 },
- { NULL } },
+{ { "Options", "Go to Options editor", NULL, optionsEditor },
+ { "Partition", "Allocate disk space for FreeBSD", NULL, diskPartitionEditor },
+ { "Label", "Label allocated disk partitions", NULL, diskLabelEditor },
+ { "Distributions", "Select distribution(s) to extract", NULL, dmenuSubmenu, NULL, &MenuDistributions },
+ { "Media", "Choose the installation media type", NULL, dmenuSubmenu, NULL, &MenuMedia },
+ { "Commit", "Perform any pending Partition/Label/Extract actions", NULL, installCommit },
+ { "Extract", "Just do distribution extract step", NULL, distExtractAll },
+ { "Exit", "Exit this menu (returning to previous)", NULL, dmenuCancel },
+ { NULL } },
};
/* MBR type menu */
DMenu MenuMBRType = {
- DMENU_RADIO_TYPE | DMENU_SELECTION_RETURNS,
+ DMENU_RADIO_TYPE,
"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"
+ "select between FreeBSD and any other operating systems on your machine\n"
"at boot time. If you have more than one drive and want to boot\n"
"from the second one, the boot selector will also make it possible\n"
"to do so (limitations in the PC BIOS usually prevent this otherwise).\n"
@@ -715,221 +658,199 @@ DMenu MenuMBRType = {
"will almost certainly NOT want to select one!",
"Press F1 to read the installation guide",
"install",
- { { "BootMgr", "Install the FreeBSD Boot Manager (\"Booteasy\")",
- DMENU_SET_VALUE, &BootMgr, 0, 0, dmenuRadioCheck },
- { "Standard", "Install a standard MBR (no boot manager)",
- DMENU_SET_VALUE, &BootMgr, 1, 0, dmenuRadioCheck },
- { "None", "Leave the Master Boot Record untouched",
- DMENU_SET_VALUE, &BootMgr, 2, 0, dmenuRadioCheck },
- { NULL } },
+{ { "BootMgr", "Install the FreeBSD Boot Manager (\"Booteasy\")",
+ dmenuRadioCheck, dmenuSetValue, NULL, &BootMgr },
+ { "Standard", "Install a standard MBR (no boot manager)",
+ dmenuRadioCheck, dmenuSetValue, NULL, &BootMgr, '[', '*', ']', 1 },
+ { "None", "Leave the Master Boot Record untouched",
+ dmenuRadioCheck, dmenuSetValue, NULL, &BootMgr, '[', '*', ']', 2 },
+ { NULL } },
};
/* Final configuration menu */
DMenu MenuConfigure = {
DMENU_NORMAL_TYPE,
"FreeBSD Configuration Menu", /* title */
-"If you've already installed FreeBSD, you may use this menu to customize\n\
+ "If you've already installed FreeBSD, you may use this menu to customize\n\
it somewhat to suit your particular configuration. Most importantly,\n\
you can use the Packages utility to load extra \"3rd party\"\n\
software not provided in the base distributions.",
"Press F1 for more information on these options",
"configure",
- { { "Add User", "Add users to the system",
- DMENU_SYSTEM_COMMAND, "adduser -config_create ; adduser -s", 0, 0 },
- { "Console", "Customize system console behavior",
- DMENU_SUBMENU, &MenuSyscons, 0, 0 },
- { "Time Zone", "Set which time zone you're in",
- DMENU_SYSTEM_COMMAND, "rm -f /etc/wall_cmos_clock /etc/localtime; tzsetup", 0, 0 },
- { "Media", "Change the installation media type",
- DMENU_SUBMENU, &MenuMedia, 0, 0 },
- { "Mouse", "Select the type of mouse you have",
- DMENU_SUBMENU, &MenuMouse, 0, 0 },
- { "Networking", "Configure additional network services",
- DMENU_SUBMENU, &MenuNetworking, 0, 0 },
- { "Options", "Go to options editor.",
- DMENU_CALL, optionsEditor, 0, 0 },
- { "Packages", "Install pre-packaged software for FreeBSD",
- DMENU_CALL, configPackages, 0, 0 },
- { "Ports", "Link to FreeBSD Ports Collection on CD/NFS",
- DMENU_CALL, configPorts, 0, 1 },
- { "Root Password", "Set the system manager's password",
- DMENU_SYSTEM_COMMAND, "passwd root", 0, 0 },
- { "HTML Docs", "Go to the HTML documentation menu (post-install).",
- DMENU_CALL, docBrowser, 0, 0 },
- { "XFree86", "Configure XFree86 (if installed)",
- DMENU_SYSTEM_COMMAND, "/usr/X11R6/bin/xf86config", 0, 0 },
- { "Exit", "Exit this menu (returning to previous)",
- DMENU_CANCEL, NULL, 0, 0 },
- { NULL } },
+{ { "Add User", "Add users to the system",
+ NULL, dmenuSystemCommand, NULL, "adduser -config_create ; adduser -s" },
+ { "Console", "Customize system console behavior",
+ NULL, dmenuSubmenu, NULL, &MenuSyscons },
+ { "Time Zone", "Set which time zone you're in",
+ NULL, dmenuSystemCommand, NULL, "rm -f /etc/wall_cmos_clock /etc/localtime; tzsetup" },
+ { "Media", "Change the installation media type",
+ NULL, dmenuSubmenu, NULL, &MenuMedia },
+ { "Mouse", "Select the type of mouse you have",
+ NULL, dmenuSubmenu, NULL, &MenuMouse, NULL },
+ { "Networking", "Configure additional network services",
+ NULL, dmenuSubmenu, NULL, &MenuNetworking },
+ { "Options", "Go to options editor",
+ NULL, optionsEditor },
+ { "Packages", "Install pre-packaged software for FreeBSD",
+ NULL, configPackages },
+ { "Ports", "Link to FreeBSD Ports Collection on CD/NFS",
+ NULL, configPorts },
+ { "Root Password", "Set the system manager's password",
+ NULL, dmenuSystemCommand, NULL, "passwd root" },
+ { "HTML Docs", "Go to the HTML documentation menu (post-install)",
+ NULL, docBrowser },
+ { "XFree86", "Configure XFree86",
+ NULL, configXFree86 },
+ { "Exit", "Exit this menu (returning to previous)",
+ NULL, dmenuCancel },
+ { NULL } },
};
DMenu MenuNetworking = {
- DMENU_NORMAL_TYPE,
+ DMENU_CHECKLIST_TYPE,
"Network Services Menu",
-"You may have already configured one network device (and the other\n\
+ "You may have already configured one network device (and the other\n\
various hostname/gateway/name server parameters) in the process\n\
of installing FreeBSD. This menu allows you to configure other\n\
aspects of your system's network configuration.",
NULL,
NULL,
-{ { "Interfaces", "Configure additional network interfaces",
- DMENU_CALL, tcpMenuSelect, 0, 0 },
- { "NFS client", "This machine will be an NFS client",
- DMENU_SET_VARIABLE, "nfs_client=YES", 0, 0, 0 },
- { "NFS server", "This machine will be an NFS server",
- DMENU_CALL, configNFSServer, 0, 0, 0 },
- { "Gateway", "This machine will route packets between interfaces",
- DMENU_SET_VARIABLE, "gateway=YES", 0, 0, 0 },
- { "Gated", "This machine wants to run gated",
- DMENU_CALL, configGated, 0, 0, 0 },
- { "Ntpdate", "Select a clock-syncronization server",
- DMENU_SUBMENU, &MenuNTP, (int)"ntpdate", 0, dmenuVarCheck },
- { "Routed", "Set flags for routed (default: -q)",
- DMENU_CALL, configRoutedFlags, (int)"routed", 0, dmenuVarCheck },
- { "Rwhod", "This machine wants to run the rwho daemon",
- DMENU_SET_VARIABLE, "rwhod=YES", 0, 0, dmenuVarCheck },
- { "Anon FTP", "This machine wishes to allow anonymous FTP.",
- DMENU_CALL, configAnonFTP, 0, 0, 0 },
- { "WEB Server", "This machine wishes to be a WWW server.",
- DMENU_CALL, configApache, 0, 0, 0 },
- { "Samba", "Install Samba for LanManager (NETBUI) access.",
- DMENU_CALL, configSamba, 0, 0, 0 },
- { "PCNFSD", "Run authentication server for clients with PC-NFS.",
- DMENU_CALL, configPCNFSD, 0, 0, 0 },
+{ { "Interfaces", "Configure additional network interfaces",
+ NULL, tcpMenuSelect },
+ { "NFS client", "This machine will be an NFS client",
+ dmenuVarCheck, dmenuSetVariable, NULL, "nfs_client=YES" },
+ { "NFS server", "This machine will be an NFS server",
+ NULL, configNFSServer },
+ { "Gateway", "This machine will route packets between interfaces",
+ dmenuVarCheck, dmenuSetVariable, NULL, "gateway=YES" },
+ { "Gated", "This machine wants to run gated instead of routed",
+ NULL, configGated },
+ { "Ntpdate", "Select a clock-syncronization server",
+ dmenuVarCheck, dmenuSubmenu, NULL, &MenuNTP, '[', 'X', ']', (int)"ntpdate" },
+ { "Routed", "Set flags for routed (default: -q)",
+ dmenuVarCheck, configRoutedFlags, NULL, "routed" },
+ { "Rwhod", "This machine wants to run the rwho daemon",
+ dmenuVarCheck, dmenuSetVariable, NULL, "rwhod=YES" },
+ { "Anon FTP", "This machine wishes to allow anonymous FTP.",
+ NULL, configAnonFTP },
+ { "WEB Server", "This machine wishes to be a WWW server.",
+ NULL, configApache },
+ { "Samba", "Install Samba for LanManager (NETBUI) access.",
+ NULL, configSamba },
+ { "PCNFSD", "Run authentication server for clients with PC-NFS.",
+ NULL, configPCNFSD },
{ NULL } },
};
DMenu MenuNTP = {
-DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
-"NTPDATE Server Selection",
-"There are a number of time syncronization servers available\n\
+ DMENU_RADIO_TYPE,
+ "NTPDATE Server Selection",
+ "There are a number of time syncronization servers available\n\
for public use around the Internet. Please select one reasonably\n\
close to you to have your system time syncronized accordingly.",
-"These are the primary open-access NTP servers",
-NULL,
-{ { "Other", "Select a site not on this list",
- DMENU_CALL, configNTP, 0, 0 },
+ "These are the primary open-access NTP servers",
+ NULL,
+{ { "Other", "Select a site not on this list",
+ NULL, configNTP },
{ "Australia", "ntp.syd.dms.csiro.au (HP 5061 Cesium Beam)",
- DMENU_SET_VARIABLE, "ntpdate=ntp.syd.dms.csiro.au", 0, 0 },
- { "Canada", "tick.usask.ca (GOES clock)",
- DMENU_SET_VARIABLE, "ntpdate=tick.usask.ca", 0, 0 },
- { "France", "canon.inria.fr (TDF clock)",
- DMENU_SET_VARIABLE, "ntpdate=canon.inria.fr", 0, 0 },
- { "Germany", "ntps1-{0,1,2}.uni-erlangen.de (GPS)",
- DMENU_SET_VARIABLE, "ntpdate=ntps1-0.uni-erlangen.de", 0, 0 },
+ dmenuVarCheck, dmenuSetVariable, NULL, "ntpdate=ntp.syd.dms.csiro.au" },
+ { "Canada", "tick.usask.ca (GOES clock)",
+ dmenuVarCheck, dmenuSetVariable, NULL, "ntpdate=tick.usask.ca" },
+ { "France", "canon.inria.fr (TDF clock)",
+ dmenuVarCheck, dmenuSetVariable, NULL, "ntpdate=canon.inria.fr" },
+ { "Germany", "ntps1-{0,1,2}.uni-erlangen.de (GPS)",
+ dmenuVarCheck, dmenuSetVariable, NULL, "ntpdate=ntps1-0.uni-erlangen.de" },
{ "Germany #2", "ntps1-0.cs.tu-berlin.de (GPS)",
- DMENU_SET_VARIABLE, "ntpdate=ntps1-0.cs.tu-berlin.de", 0, 0 },
- { "Japan", "clock.nc.fukuoka-u.ac.jp (GPS clock)",
- DMENU_SET_VARIABLE, "ntpdate=clock.nc.fukuoka-u.ac.jp", 0, 0},
- { "Japan #2", "clock.tl.fukuoka-u.ac.jp (GPS clock)",
- DMENU_SET_VARIABLE, "ntpdate=clock.tl.fukuoka-u.ac.jp", 0, 0},
+ dmenuVarCheck, dmenuSetVariable, NULL, "ntpdate=ntps1-0.cs.tu-berlin.de" },
+ { "Japan", "clock.nc.fukuoka-u.ac.jp (GPS clock)",
+ dmenuVarCheck, dmenuSetVariable, NULL, "ntpdate=clock.nc.fukuoka-u.ac.jp" },
+ { "Japan #2", "clock.tl.fukuoka-u.ac.jp (GPS clock)",
+ dmenuVarCheck, dmenuSetVariable, NULL, "ntpdate=clock.tl.fukuoka-u.ac.jp" },
{ "Netherlands", "ntp0.nl.net (GPS clock)",
- DMENU_SET_VARIABLE, "ntpdate=ntp0.nl.net", 0, 0 },
- { "Norway", "timer.unik.no (NTP clock)",
- DMENU_SET_VARIABLE, "ntpdate=timer.unik.no", 0, 0 },
- { "Sweden", "Time1.Stupi.SE (Cesium/GPS)",
- DMENU_SET_VARIABLE, "ntpdate=Time1.Stupi.SE", 0, 0 },
+ dmenuVarCheck, dmenuSetVariable, NULL, "ntpdate=ntp0.nl.net" },
+ { "Norway", "timer.unik.no (NTP clock)",
+ dmenuVarCheck, dmenuSetVariable, NULL, "ntpdate=timer.unik.no" },
+ { "Sweden", "Time1.Stupi.SE (Cesium/GPS)",
+ dmenuVarCheck, dmenuSetVariable, NULL, "ntpdate=Time1.Stupi.SE" },
{ "Switzerland", "swisstime.ethz.ch (DCF77 clock)",
- DMENU_SET_VARIABLE, "ntpdate=swisstime.ethz.ch", 0, 0 },
- { "U.S. East Coast", "bitsy.mit.edu (WWV clock)",
- DMENU_SET_VARIABLE, "ntpdate=bitsy.mit.edu", 0, 0 },
+ dmenuVarCheck, dmenuSetVariable, NULL, "ntpdate=swisstime.ethz.ch" },
+ { "U.S. East Coast", "bitsy.mit.edu (WWV clock)",
+ dmenuVarCheck, dmenuSetVariable, NULL, "ntpdate=bitsy.mit.edu" },
{ "U.S. East Coast #2", "otc1.psu.edu (WWV clock)",
- DMENU_SET_VARIABLE, "ntpdate=otc1.psu.edu", 0, 0 },
- { "U.S. West Coast", "apple.com (WWV clock)",
- DMENU_SET_VARIABLE, "ntpdate=apple.com", 0, 0 },
+ dmenuVarCheck, dmenuSetVariable, NULL, "ntpdate=otc1.psu.edu" },
+ { "U.S. West Coast", "apple.com (WWV clock)",
+ dmenuVarCheck, dmenuSetVariable, NULL, "ntpdate=apple.com" },
{ "U.S. West Coast #2", "clepsydra.dec.com (GOES clock)",
- DMENU_SET_VARIABLE, "ntpdate=clepsydra.dec.com", 0, 0 },
+ dmenuVarCheck, dmenuSetVariable, NULL, "ntpdate=clepsydra.dec.com" },
{ "U.S. West Coast #3", "clock.llnl.gov (WWVB clock)",
- DMENU_SET_VARIABLE, "ntpdate=clock.llnl.gov", 0, 0 },
+ dmenuVarCheck, dmenuSetVariable, NULL, "ntpdate=clock.llnl.gov" },
{ "U.S. Midwest", "ncar.ucar.edu (WWVB clock)",
- DMENU_SET_VARIABLE, "ntpdate=ncar.ucar.edu", 0, 0 },
+ dmenuVarCheck, dmenuSetVariable, NULL, "ntpdate=ncar.ucar.edu" },
{ "U.S. Pacific", "chantry.hawaii.net (WWV/H clock)",
- DMENU_SET_VARIABLE, "ntpdate=chantry.hawaii.net", 0, 0 },
- { "U.S. Southwest", "shorty.chpc.utexas.edu (WWV clock)",
- DMENU_SET_VARIABLE, "ntpdate=shorty.chpc.utexas.edu", 0, 0 },
+ dmenuVarCheck, dmenuSetVariable, NULL, "ntpdate=chantry.hawaii.net" },
+ { "U.S. Southwest", "shorty.chpc.utexas.edu (WWV clock)",
+ dmenuVarCheck, dmenuSetVariable, NULL, "ntpdate=shorty.chpc.utexas.edu" },
{ NULL } },
};
DMenu MenuSyscons = {
-DMENU_NORMAL_TYPE,
-"System Console Configuration",
-"The default system console driver for FreeBSD (syscons) has a\n\
+ DMENU_NORMAL_TYPE,
+ "System Console Configuration",
+ "The default system console driver for FreeBSD (syscons) has a\n\
number of configuration options which may be set according to\n\
your preference.\n\n\
When you are done setting configuration options, select Cancel.",
-"Configure your system console settings",
-NULL,
-{ { "Keymap", "Choose an alternate keyboard map",
- DMENU_SUBMENU, &MenuSysconsKeymap, 0, 0 },
- { "Repeat", "Set the rate at which keys repeat",
- DMENU_SUBMENU, &MenuSysconsKeyrate, 0, 0 },
- { "Saver", "Configure the screen saver",
- DMENU_SUBMENU, &MenuSysconsSaver, 0, 0 },
- { "Exit", "Exit this menu (returning to previous)",
- DMENU_CANCEL, NULL, 0, 0 },
+ "Configure your system console settings",
+ NULL,
+{ { "Keymap", "Choose an alternate keyboard map", NULL, dmenuSubmenu, NULL, &MenuSysconsKeymap },
+ { "Repeat", "Set the rate at which keys repeat", NULL, dmenuSubmenu, NULL, &MenuSysconsKeyrate },
+ { "Saver", "Configure the screen saver", NULL, dmenuSubmenu, NULL, &MenuSysconsSaver },
+ { "Exit", "Exit this menu (returning to previous)", NULL, dmenuCancel },
{ NULL } },
};
DMenu MenuSysconsKeymap = {
-DMENU_RADIO_TYPE | DMENU_SELECTION_RETURNS,
-"System Console Keymap",
-"The default system console driver for FreeBSD (syscons) defaults\n\
+ DMENU_RADIO_TYPE,
+ "System Console Keymap",
+ "The default system console driver for FreeBSD (syscons) defaults\n\
to a standard \"American\" keyboard map. Users in other countries\n\
(or with different keyboard preferences) may wish to choose one of\n\
the other keymaps below.",
"Choose a keyboard map",
NULL,
- { { "Danish CP865", "Danish Code Page 865 keymap",
- DMENU_SET_VARIABLE, "keymap=danish.cp865", 0, 0, dmenuVarCheck },
- { "Danish ISO", "Danish ISO keymap",
- DMENU_SET_VARIABLE, "keymap=danish.iso", 0, 0, dmenuVarCheck },
- { "French ISO", "French ISO keymap",
- DMENU_SET_VARIABLE, "keymap=fr.iso", 0, 0, dmenuVarCheck },
- { "German CP850", "German Code Page 850 keymap",
- DMENU_SET_VARIABLE, "keymap=german.cp850", 0, 0, dmenuVarCheck },
- { "German ISO", "German ISO keymap",
- DMENU_SET_VARIABLE, "keymap=german.iso", 0, 0, dmenuVarCheck },
- { "Japanese 106", "Japanese 106 keymap",
- DMENU_SET_VARIABLE, "keymap=jp.106", 0, 0, dmenuVarCheck },
- { "Russian CP866", "Russian Code Page 866 keymap",
- DMENU_SET_VARIABLE, "keymap=ru.cp866", 0, 0, dmenuVarCheck },
- { "Russian KOI8", "Russian koi8 keymap",
- DMENU_SET_VARIABLE, "keymap=ru.koi8-r", 0, 0, dmenuVarCheck },
- { "Russian s-KOI8", "Russian shifted koi8 keymap",
- DMENU_SET_VARIABLE, "keymap=ru.koi8-r.shift", 0, 0, dmenuVarCheck },
- { "Swedish CP850", "Swedish Code Page 850 keymap",
- DMENU_SET_VARIABLE, "keymap=swedish.cp850", 0, 0, dmenuVarCheck },
- { "Swedish ISO", "Swedish ISO keymap",
- DMENU_SET_VARIABLE, "keymap=swedish.iso", 0, 0, dmenuVarCheck },
- { "U.K. CP850", "United Kingdom Code Page 850 keymap",
- DMENU_SET_VARIABLE, "keymap=uk.cp850", 0, 0, dmenuVarCheck },
- { "U.K. ISO", "United Kingdom ISO keymap",
- DMENU_SET_VARIABLE, "keymap=uk.iso", 0, 0, dmenuVarCheck },
- { "U.S. ISO", "United States ISO keymap",
- DMENU_SET_VARIABLE, "keymap=us.iso", 0, 0, dmenuVarCheck },
- { NULL } },
+{ { "Danish CP865", "Danish Code Page 865 keymap", dmenuVarCheck, dmenuSetVariable, NULL, "keymap=danish.cp865" },
+ { "Danish ISO", "Danish ISO keymap", dmenuVarCheck, dmenuSetVariable, NULL, "keymap=danish.iso" },
+ { "French ISO", "French ISO keymap", dmenuVarCheck, dmenuSetVariable, NULL, "keymap=fr.iso" },
+ { "German CP850", "German Code Page 850 keymap", dmenuVarCheck, dmenuSetVariable, NULL, "keymap=german.cp850" },
+ { "German ISO", "German ISO keymap", dmenuVarCheck, dmenuSetVariable, NULL, "keymap=german.iso" },
+ { "Japanese 106", "Japanese 106 keymap", dmenuVarCheck, dmenuSetVariable, NULL, "keymap=jp.106" },
+ { "Russian CP866", "Russian Code Page 866 keymap", dmenuVarCheck, dmenuSetVariable, NULL, "keymap=ru.cp866" },
+ { "Russian KOI8", "Russian koi8 keymap", dmenuVarCheck, dmenuSetVariable, NULL, "keymap=ru.koi8-r" },
+ { "Russian s-KOI8", "Russian shifted koi8 keymap", dmenuVarCheck, dmenuSetVariable, NULL, "keymap=ru.koi8-r.shift" },
+ { "Swedish CP850", "Swedish Code Page 850 keymap", dmenuVarCheck, dmenuSetVariable, NULL, "keymap=swedish.cp850" },
+ { "Swedish ISO", "Swedish ISO keymap", dmenuVarCheck, dmenuSetVariable, NULL, "keymap=swedish.iso" },
+ { "U.K. CP850", "United Kingdom Code Page 850 keymap", dmenuVarCheck, dmenuSetVariable, NULL, "keymap=uk.cp850" },
+ { "U.K. ISO", "United Kingdom ISO keymap", dmenuVarCheck, dmenuSetVariable, NULL, "keymap=uk.iso" },
+ { "U.S. ISO", "United States ISO keymap", dmenuVarCheck, dmenuSetVariable, NULL, "keymap=us.iso" },
+ { NULL } },
};
DMenu MenuSysconsKeyrate = {
- DMENU_RADIO_TYPE | DMENU_SELECTION_RETURNS,
+ DMENU_RADIO_TYPE,
"System Console Keyboard Repeat Rate",
"This menu allows you to set the speed at which keys repeat\n\
when held down.",
"Choose a keyboard repeat rate",
NULL,
- { { "Slow", "Slow keyboard repeat rate",
- DMENU_SET_VARIABLE, "keyrate=slow", 0, 0, dmenuVarCheck },
- { "Normal", "\"Normal\" keyboard repeat rate",
- DMENU_SET_VARIABLE, "keyrate=normal", 0, 0, dmenuVarCheck },
- { "Fast", "Fast keyboard repeat rate",
- DMENU_SET_VARIABLE, "keyrate=fast", 0, 0, dmenuVarCheck },
- { "Default", "Use default keyboard repeat rate",
- DMENU_SET_VARIABLE, "keyrate=NO", 0, 0, dmenuVarCheck },
- { NULL } },
+{ { "Slow", "Slow keyboard repeat rate", dmenuVarCheck, dmenuSetVariable, NULL, "keyrate=slow" },
+ { "Normal", "\"Normal\" keyboard repeat rate", dmenuVarCheck, dmenuSetVariable, NULL, "keyrate=normal" },
+ { "Fast", "Fast keyboard repeat rate", dmenuVarCheck, dmenuSetVariable, NULL, "keyrate=fast" },
+ { "Default", "Use default keyboard repeat rate", dmenuVarCheck, dmenuSetVariable, NULL, "keyrate=NO" },
+ { NULL } },
};
DMenu MenuSysconsSaver = {
- DMENU_MULTIPLE_TYPE | DMENU_SELECTION_RETURNS,
+ DMENU_RADIO_TYPE,
"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\
@@ -937,15 +858,15 @@ monitor switched on and idle for long periods of time then you should\n\
probably enable one of these screen savers to prevent phosphor burn-in.",
"Choose a nifty-looking screen saver",
NULL,
-{ { "blank", "Simply blank the screen",
- DMENU_SET_VARIABLE, "saver=blank", 0, 0, dmenuVarCheck },
- { "Green", "\"Green\" power saving mode (if supported by monitor)",
- DMENU_SET_VARIABLE, "saver=green", 0, 0, dmenuVarCheck },
- { "Snake", "Draw a FreeBSD \"snake\" on your screen",
- DMENU_SET_VARIABLE, "saver=snake", 0, 0, dmenuVarCheck },
- { "Star", "A \"twinkling stars\" effect",
- DMENU_SET_VARIABLE, "saver=star", 0, 0, dmenuVarCheck },
- { "Timeout", "Set the screen saver timeout interval",
- DMENU_CALL, configSaverTimeout, (int)"blanktime", 0, dmenuVarCheck },
+{ { "blank", "Simply blank the screen",
+ dmenuVarCheck, dmenuSetVariable, NULL, "saver=blank" },
+ { "Green", "\"Green\" power saving mode (if supported by monitor)",
+ dmenuVarCheck, dmenuSetVariable, NULL, "saver=green" },
+ { "Snake", "Draw a FreeBSD \"snake\" on your screen",
+ dmenuVarCheck, dmenuSetVariable, NULL, "saver=snake" },
+ { "Star", "A \"twinkling stars\" effect",
+ dmenuVarCheck, dmenuSetVariable, NULL, "saver=star" },
+ { "Timeout", "Set the screen saver timeout interval",
+ dmenuVarCheck, configSaverTimeout, NULL, "blanktime", ' ', ' ', ' ' },
{ NULL } },
};
diff --git a/release/sysinstall/options.c b/release/sysinstall/options.c
index 219e3d7..9bc4daa 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.30 1996/03/23 07:21:30 jkh Exp $
+ * $Id: options.c,v 1.31 1996/03/24 12:06:13 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -197,7 +197,7 @@ fire(Option opt)
}
int
-optionsEditor(char *str)
+optionsEditor(dialogMenuItem *self)
{
int i, optcol, optrow, key;
static int currOpt = 0;
diff --git a/release/sysinstall/sysinstall.h b/release/sysinstall/sysinstall.h
index 9a91d87..c420f40 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.47 1996/03/21 09:30:15 jkh Exp $
+ * $Id: sysinstall.h,v 1.48 1996/03/23 07:21:31 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -57,14 +57,6 @@
/*** Defines ***/
-/* Bitfields for menu options */
-#define DMENU_NORMAL_TYPE 0x1 /* Normal dialog menu */
-#define DMENU_RADIO_TYPE 0x2 /* Radio dialog menu */
-#define DMENU_MULTIPLE_TYPE 0x4 /* Multiple choice menu */
-
-/* XXX This goes away soon XXX */
-#define DMENU_SELECTION_RETURNS 0x8 /* Immediate return on item selection */
-
/* variable limits */
#define VAR_NAME_MAX 128
#define VAR_VALUE_MAX 1024
@@ -153,36 +145,15 @@ typedef unsigned int Boolean;
typedef struct disk Disk;
typedef struct chunk Chunk;
-typedef enum {
- DMENU_DISPLAY_FILE, /* Display a file's contents */
- DMENU_SUBMENU, /* Recurse into another menu */
- DMENU_SYSTEM_COMMAND, /* Run shell commmand */
- DMENU_SYSTEM_COMMAND_BOX, /* Same as above, but in prgbox */
- DMENU_SET_VARIABLE, /* Set an environment/system var */
- DMENU_SET_FLAG, /* Set flag in an unsigned int */
- DMENU_SET_VALUE, /* Set unsigned int to value */
- DMENU_CALL, /* Call back a C function */
- DMENU_CANCEL, /* Cancel out of this menu */
- DMENU_NOP, /* Do nothing special for item */
-} DMenuItemType;
-
-typedef struct _dmenuItem {
- char *title; /* Our title */
- char *prompt; /* Our prompt */
- DMenuItemType type; /* What type of item we are */
- void *ptr; /* Generic data ptr */
- int parm; /* Parameter for above */
- Boolean disabled; /* Are we temporarily disabled? */
- char * (*check)(struct _dmenuItem *); /* Our state */
-} DMenuItem;
+typedef enum { DMENU_NORMAL_TYPE, DMENU_RADIO_TYPE, DMENU_CHECKLIST_TYPE } dmenuType;
typedef struct _dmenu {
- unsigned int options; /* What sort of menu we are */
+ dmenuType type; /* What sort of menu we are */
char *title; /* Our title */
char *prompt; /* Our prompt */
char *helpline; /* Line of help at bottom */
char *helpfile; /* Help file for "F1" */
- DMenuItem items[0]; /* Array of menu items */
+ dialogMenuItem items[0]; /* Array of menu items */
} DMenu;
/* A sysconfig variable */
@@ -358,10 +329,10 @@ extern DMenu MenuHTMLDoc; /* HTML Documentation menu */
/*** Prototypes ***/
/* apache.c */
-extern int configApache(char *str);
+extern int configApache(dialogMenuItem *self);
/* anonFTP.c */
-extern int configAnonFTP(char *unused);
+extern int configAnonFTP(dialogMenuItem *self);
/* attrs.c */
extern char *attr_match(Attribs *attr, char *name);
@@ -384,20 +355,16 @@ extern void command_func_add(char *key, commandFunc func, void *data);
extern int configFstab(void);
extern void configSysconfig(void);
extern void configResolv(void);
-extern int configPorts(char *str);
-extern int configPackages(char *str);
-extern int configSaverTimeout(char *str);
-extern int configNTP(char *str);
-extern int configRoutedFlags(char *str);
+extern int configPorts(dialogMenuItem *self);
+extern int configPackages(dialogMenuItem *self);
+extern int configSaverTimeout(dialogMenuItem *self);
+extern int configNTP(dialogMenuItem *self);
+extern int configXFree86(dialogMenuItem *self);
+extern int configRoutedFlags(dialogMenuItem *self);
/* crc.c */
extern int crc(int, unsigned long *, unsigned long *);
-/* decode.c */
-extern DMenuItem *decode(DMenu *menu, char *name);
-extern int dispatch(DMenuItem *tmp, char *name);
-extern int decode_and_dispatch_multiple(DMenu *menu, char *names);
-
/* devices.c */
extern DMenu *deviceCreateMenu(DMenu *menu, DeviceType type, int (*hook)());
extern void deviceGetAll(void);
@@ -414,34 +381,42 @@ extern Boolean dummyClose(Device *dev, int fd);
extern void dummyShutdown(Device *dev);
/* disks.c */
-extern int diskPartitionEditor(char *unused);
-extern int diskPartitionWrite(char *unused);
+extern int diskPartitionEditor(dialogMenuItem *self);
+extern int diskPartitionWrite(dialogMenuItem *self);
/* dist.c */
-extern int distReset(char *str);
extern int distSetCustom(char *str);
-extern int distSetDeveloper(char *str);
-extern int distSetXDeveloper(char *str);
-extern int distSetKernDeveloper(char *str);
-extern int distSetUser(char *str);
-extern int distSetXUser(char *str);
-extern int distSetMinimum(char *str);
-extern int distSetEverything(char *str);
-extern int distSetDES(char *str);
-extern int distSetSrc(char *str);
-extern int distSetXF86(char *str);
-extern int distExtractAll(char *str);
+extern int distReset(dialogMenuItem *self);
+extern int distSetDeveloper(dialogMenuItem *self);
+extern int distSetXDeveloper(dialogMenuItem *self);
+extern int distSetKernDeveloper(dialogMenuItem *self);
+extern int distSetUser(dialogMenuItem *self);
+extern int distSetXUser(dialogMenuItem *self);
+extern int distSetMinimum(dialogMenuItem *self);
+extern int distSetEverything(dialogMenuItem *self);
+extern int distSetDES(dialogMenuItem *self);
+extern int distSetSrc(dialogMenuItem *self);
+extern int distSetXF86(dialogMenuItem *self);
+extern int distExtractAll(dialogMenuItem *self);
/* dmenu.c */
+extern int dmenuDisplayFile(dialogMenuItem *tmp);
+extern int dmenuSubmenu(dialogMenuItem *tmp);
+extern int dmenuSystemCommand(dialogMenuItem *tmp);
+extern int dmenuSystemCommandBox(dialogMenuItem *tmp);
+extern int dmenuCancel(dialogMenuItem *tmp);
+extern int dmenuSetVariable(dialogMenuItem *tmp);
+extern int dmenuSetFlag(dialogMenuItem *tmp);
+extern int dmenuSetValue(dialogMenuItem *tmp);
extern Boolean dmenuOpen(DMenu *menu, int *choice, int *scroll, int *curr, int *max);
extern Boolean dmenuOpenSimple(DMenu *menu);
-extern char *dmenuVarCheck(DMenuItem *item);
-extern char *dmenuFlagCheck(DMenuItem *item);
-extern char *dmenuRadioCheck(DMenuItem *item);
+extern int dmenuVarCheck(dialogMenuItem *item);
+extern int dmenuFlagCheck(dialogMenuItem *item);
+extern int dmenuRadioCheck(dialogMenuItem *item);
/* doc.c */
-extern int docBrowser(char *junk);
-extern int docShowDocument(char *str);
+extern int docBrowser(dialogMenuItem *self);
+extern int docShowDocument(dialogMenuItem *self);
/* dos.c */
extern Boolean mediaInitDOS(Device *dev);
@@ -474,27 +449,26 @@ void index_print(PkgNodePtr top, int level);
int index_extract(Device *dev, PkgNodePtr top, PkgNodePtr plist);
/* install.c */
-extern int installCommit(char *str);
-extern int installExpress(char *str);
-extern int installNovice(char *str);
-extern int installFixit(char *str);
-extern int installFixup(char *str);
-extern int installUpgrade(char *str);
-extern int installPreconfig(char *str);
-extern int installFilesystems(char *str);
-extern int installVarDefaults(char *str);
+extern int installCommit(dialogMenuItem *self);
+extern int installExpress(dialogMenuItem *self);
+extern int installNovice(dialogMenuItem *self);
+extern int installFixit(dialogMenuItem *self);
+extern int installFixup(dialogMenuItem *self);
+extern int installUpgrade(dialogMenuItem *self);
+extern int installFilesystems(dialogMenuItem *self);
+extern int installVarDefaults(dialogMenuItem *self);
extern Boolean copySelf(void);
extern Boolean rootExtract(void);
/* installFinal.c */
-extern int configGated(char *unused);
-extern int configSamba(char *unused);
-extern int configPCNFSD(char *unused);
-extern int configNFSServer(char *unused);
+extern int configGated(dialogMenuItem *self);
+extern int configSamba(dialogMenuItem *self);
+extern int configPCNFSD(dialogMenuItem *self);
+extern int configNFSServer(dialogMenuItem *self);
/* label.c */
-extern int diskLabelEditor(char *str);
-extern int diskLabelCommit(char *str);
+extern int diskLabelEditor(dialogMenuItem *self);
+extern int diskLabelCommit(dialogMenuItem *self);
/* lndir.c */
extern int lndir(char *from, char *to);
@@ -515,19 +489,19 @@ extern u_char default_scrnmap[];
/* media.c */
extern char *cpioVerbosity(void);
-extern int mediaSetCDROM(char *str);
-extern int mediaSetFloppy(char *str);
-extern int mediaSetDOS(char *str);
-extern int mediaSetTape(char *str);
-extern int mediaSetFTP(char *str);
-extern int mediaSetFTPActive(char *str);
-extern int mediaSetFTPPassive(char *str);
-extern int mediaSetUFS(char *str);
-extern int mediaSetNFS(char *str);
-extern int mediaSetFtpOnError(char *str);
-extern int mediaSetFtpUserPass(char *str);
-extern int mediaSetCPIOVerbosity(char *str);
-extern int mediaGetType(char *str);
+extern int mediaSetCDROM(dialogMenuItem *self);
+extern int mediaSetFloppy(dialogMenuItem *self);
+extern int mediaSetDOS(dialogMenuItem *self);
+extern int mediaSetTape(dialogMenuItem *self);
+extern int mediaSetFTP(dialogMenuItem *self);
+extern int mediaSetFTPActive(dialogMenuItem *self);
+extern int mediaSetFTPPassive(dialogMenuItem *self);
+extern int mediaSetUFS(dialogMenuItem *self);
+extern int mediaSetNFS(dialogMenuItem *self);
+extern int mediaSetFtpOnError(dialogMenuItem *self);
+extern int mediaSetFtpUserPass(dialogMenuItem *self);
+extern int mediaSetCPIOVerbosity(dialogMenuItem *self);
+extern int mediaGetType(dialogMenuItem *self);
extern Boolean mediaExtractDist(char *dir, int fd);
extern Boolean mediaExtractDistBegin(char *dir, int *fd, int *zpid, int *cpic);
extern Boolean mediaExtractDistEnd(int zpid, int cpid);
@@ -579,7 +553,7 @@ extern int mediaGetNFS(Device *dev, char *file, Boolean probe);
extern void mediaShutdownNFS(Device *dev);
/* options.c */
-extern int optionsEditor(char *str);
+extern int optionsEditor(dialogMenuItem *self);
/* package.c */
extern int package_add(char *name);
@@ -598,8 +572,6 @@ extern void systemChangeTerminal(char *color, const u_char c_termcap[], char *mo
extern void systemChangeScreenmap(const u_char newmap[]);
extern void systemCreateHoloshell(void);
extern int vsystem(char *fmt, ...);
-extern int docBrowser(char *junk);
-extern int docShowDocument(char *str);
/* tape.c */
extern char *mediaTapeBlocksize(void);
@@ -609,7 +581,7 @@ extern void mediaShutdownTape(Device *dev);
/* tcpip.c */
extern int tcpOpenDialog(Device *dev);
-extern int tcpMenuSelect(char *str);
+extern int tcpMenuSelect(dialogMenuItem *self);
extern int tcpInstallDevice(char *str);
extern Boolean tcpDeviceSelect(void);
diff --git a/release/sysinstall/tcpip.c b/release/sysinstall/tcpip.c
index c7d46ea..00ed675 100644
--- a/release/sysinstall/tcpip.c
+++ b/release/sysinstall/tcpip.c
@@ -1,5 +1,5 @@
/*
- * $Id: tcpip.c,v 1.32 1995/12/07 10:34:19 peter Exp $
+ * $Id: tcpip.c,v 1.33 1996/03/02 07:31:58 jkh Exp $
*
* Copyright (c) 1995
* Gary J Palmer. All rights reserved.
@@ -569,7 +569,7 @@ tcpDeviceSelect(void)
/* Do it from a menu that doesn't care about status */
int
-tcpMenuSelect(char *str)
+tcpMenuSelect(dialogMenuItem *self)
{
(void)tcpDeviceSelect();
configResolv();
diff --git a/usr.sbin/sade/Makefile b/usr.sbin/sade/Makefile
index eb87590..afeb135 100644
--- a/usr.sbin/sade/Makefile
+++ b/usr.sbin/sade/Makefile
@@ -4,11 +4,11 @@ CLEANFILES= makedevs.c rtermcap
.PATH: ${.CURDIR}/../disklabel ${.CURDIR}/../../usr.bin/cksum
-SRCS= anonFTP.c apache.c attr.c cdrom.c command.c config.c decode.c \
+SRCS= anonFTP.c apache.c attr.c cdrom.c command.c config.c \
devices.c disks.c dist.c dmenu.c doc.c dos.c floppy.c ftp.c \
ftp_strat.c globals.c index.c install.c installFinal.c \
- installPreconfig.c installUpgrade.c label.c lndir.c main.c \
- makedevs.c media.c menus.c misc.c msg.c network.c nfs.c options.c \
+ installUpgrade.c label.c lndir.c main.c makedevs.c media.c \
+ menus.c misc.c msg.c network.c nfs.c options.c \
package.c system.c tape.c tcpip.c termcap.c ufs.c variable.c wizard.c
CFLAGS+= -Wall -I${.CURDIR}/../../gnu/lib/libdialog
diff --git a/usr.sbin/sade/config.c b/usr.sbin/sade/config.c
index 40622be..5609ad0 100644
--- a/usr.sbin/sade/config.c
+++ b/usr.sbin/sade/config.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: config.c,v 1.21 1996/03/21 09:30:08 jkh Exp $
+ * $Id: config.c,v 1.22 1996/03/24 18:57:34 joerg Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -326,18 +326,32 @@ configSysconfig(void)
}
int
-configSaverTimeout(char *str)
+configSaverTimeout(dialogMenuItem *self)
{
- return variable_get_value(VAR_BLANKTIME, "Enter time-out period in seconds for screen saver")
- ? RET_SUCCESS : RET_FAIL;
+ return variable_get_value(VAR_BLANKTIME, "Enter time-out period in seconds for screen saver") ?
+ RET_SUCCESS : RET_FAIL;
}
int
-configNTP(char *str)
+configNTP(dialogMenuItem *self)
{
return variable_get_value(VAR_NTPDATE, "Enter the name of an NTP server") ? RET_SUCCESS : RET_FAIL;
}
+int
+configXFree86(dialogMenuItem *self)
+{
+ if (file_executable("/usr/X11R6/bin/xf86config")) {
+ systemExecute("/usr/X11R6/bin/xf86config");
+ return RET_SUCCESS;
+ }
+ else {
+ msgConfirm("XFree86 does not appear to be installed! Please install\n"
+ "The XFree86 distribution before attempting to configure it.");
+ return RET_FAIL;
+ }
+}
+
void
configResolv(void)
{
@@ -398,7 +412,7 @@ skip:
}
int
-configRoutedFlags(char *str)
+configRoutedFlags(dialogMenuItem *self)
{
return variable_get_value(VAR_ROUTEDFLAGS,
"Specify the flags for routed; -q is the default, -s is\n"
@@ -406,7 +420,7 @@ configRoutedFlags(char *str)
}
int
-configPackages(char *str)
+configPackages(dialogMenuItem *self)
{
static PkgNode top, plist;
static Boolean index_initted = FALSE;
@@ -483,7 +497,7 @@ configPackages(char *str)
}
int
-configPorts(char *str)
+configPorts(dialogMenuItem *self)
{
char *cp, *dist = NULL; /* Shut up compiler */
diff --git a/usr.sbin/sade/devices.c b/usr.sbin/sade/devices.c
index 06e537f..49b4c08 100644
--- a/usr.sbin/sade/devices.c
+++ b/usr.sbin/sade/devices.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: devices.c,v 1.41 1996/03/18 15:27:46 jkh Exp $
+ * $Id: devices.c,v 1.42 1996/03/24 09:36:41 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -368,24 +368,21 @@ deviceCreateMenu(DMenu *menu, DeviceType type, int (*hook)())
return NULL;
for (numdevs = 0; devs[numdevs]; numdevs++);
- tmp = (DMenu *)safe_malloc(sizeof(DMenu) + (sizeof(DMenuItem) * (numdevs + 1)));
+ tmp = (DMenu *)safe_malloc(sizeof(DMenu) + (sizeof(dialogMenuItem) * (numdevs + 1)));
bcopy(menu, tmp, sizeof(DMenu));
for (i = 0; devs[i]; i++) {
- tmp->items[i].title = devs[i]->name;
+ tmp->items[i].prompt = devs[i]->name;
for (j = 0; device_names[j].name; j++) {
if (!strncmp(devs[i]->name, device_names[j].name, strlen(device_names[j].name))) {
- tmp->items[i].prompt = device_names[j].description;
+ tmp->items[i].title = device_names[j].description;
break;
}
}
if (!device_names[j].name)
- tmp->items[i].prompt = "<unknown device type>";
- tmp->items[i].type = DMENU_CALL;
- tmp->items[i].ptr = hook;
- tmp->items[i].disabled = FALSE;
- tmp->items[i].check = NULL;
+ tmp->items[i].title = "<unknown device type>";
+ tmp->items[i].fire = hook;
+ tmp->items[i].checked = NULL;
}
- tmp->items[i].type = DMENU_NOP;
tmp->items[i].title = NULL;
return tmp;
}
diff --git a/usr.sbin/sade/disks.c b/usr.sbin/sade/disks.c
index c07afb0..6f8f3de 100644
--- a/usr.sbin/sade/disks.c
+++ b/usr.sbin/sade/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.37 1996/03/20 14:11:21 jkh Exp $
+ * $Id: disks.c,v 1.38 1996/03/24 18:57:35 joerg Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -135,92 +135,6 @@ print_command_summary()
move(0, 0);
}
-/* Partition a disk based wholly on which variables are set */
-static void
-scriptPartition(Device *dev, Disk *d)
-{
- char *cp;
- int i, sz;
-
- record_chunks(d);
- cp = variable_get(VAR_GEOMETRY);
- if (cp) {
- msgDebug("Setting geometry from script to: %s\n", cp);
- d->bios_cyl = strtol(cp, &cp, 0);
- d->bios_hd = strtol(cp + 1, &cp, 0);
- d->bios_sect = strtol(cp + 1, 0, 0);
- }
-
- cp = variable_get(VAR_DISKSPACE);
- if (cp) {
- if (!strcmp(cp, "free")) {
- /* Do free disk space case */
- for (i = 0; chunk_info[i]; i++) {
- /* If a chunk is at least 10MB in size, use it. */
- if (chunk_info[i]->type == unused && chunk_info[i]->size > (10 * ONE_MEG)) {
- Create_Chunk(d, chunk_info[i]->offset, chunk_info[i]->size, freebsd, 3,
- (chunk_info[i]->flags & CHUNK_ALIGN));
- variable_set2(DISK_PARTITIONED, "yes");
- break;
- }
- }
- if (!chunk_info[i]) {
- dialog_clear();
- msgConfirm("Unable to find any free space on this disk!");
- return;
- }
- }
- else if (!strcmp(cp, "all")) {
- /* Do all disk space case */
- msgDebug("Warning: Devoting all of disk %s to FreeBSD.\n", d->name);
-
- All_FreeBSD(d, FALSE);
- }
- else if (!strcmp(cp, "exclusive")) {
- /* Do really-all-the-disk-space case */
- msgDebug("Warning: Devoting all of disk %s to FreeBSD.\n", d->name);
-
- All_FreeBSD(d, TRUE);
- }
- else if ((sz = strtol(cp, &cp, 0))) {
- /* Look for sz bytes free */
- if (*cp && toupper(*cp) == 'M')
- sz *= ONE_MEG;
- for (i = 0; chunk_info[i]; i++) {
- /* If a chunk is at least sz MB, use it. */
- if (chunk_info[i]->type == unused && chunk_info[i]->size >= sz) {
- Create_Chunk(d, chunk_info[i]->offset, sz, freebsd, 3, (chunk_info[i]->flags & CHUNK_ALIGN));
- variable_set2(DISK_PARTITIONED, "yes");
- break;
- }
- }
- if (!chunk_info[i]) {
- dialog_clear();
- msgConfirm("Unable to find %d free blocks on this disk!", sz);
- return;
- }
- }
- else if (!strcmp(cp, "existing")) {
- /* Do existing FreeBSD case */
- for (i = 0; chunk_info[i]; i++) {
- if (chunk_info[i]->type == freebsd)
- break;
- }
- if (!chunk_info[i]) {
- dialog_clear();
- msgConfirm("Unable to find any existing FreeBSD partitions on this disk!");
- return;
- }
- }
- else {
- dialog_clear();
- msgConfirm("`%s' is an invalid value for %s - is config file valid?", cp, VAR_DISKSPACE);
- return;
- }
- variable_set2(DISK_PARTITIONED, "yes");
- }
-}
-
static u_char *
getBootMgr(char *dname)
{
@@ -533,14 +447,15 @@ partitionHook(char *str)
}
int
-diskPartitionEditor(char *str)
+diskPartitionEditor(dialogMenuItem *self)
{
DMenu *menu;
Device **devs;
int i, cnt;
- char *cp;
+ char *cp, *str;
cp = variable_get(VAR_DISK);
+ str= variable_get(SYSTEM_STATE);
devs = deviceFind(cp, DEVICE_TYPE_DISK);
cnt = deviceCount(devs);
if (!cnt) {
@@ -552,10 +467,7 @@ diskPartitionEditor(char *str)
}
else if (cnt == 1) {
devs[0]->enabled = TRUE;
- if (str && !strcmp(str, "script"))
- scriptPartition(devs[0], (Disk *)devs[0]->private);
- else
- diskPartition(devs[0], (Disk *)devs[0]->private);
+ diskPartition(devs[0], (Disk *)devs[0]->private);
i = RET_SUCCESS;
variable_set2(DISK_SELECTED, "yes");
}
@@ -584,7 +496,7 @@ diskPartitionEditor(char *str)
}
int
-diskPartitionWrite(char *str)
+diskPartitionWrite(dialogMenuItem *self)
{
Device **devs;
char *cp;
diff --git a/usr.sbin/sade/dmenu.c b/usr.sbin/sade/dmenu.c
index 64f457d..0633e3a 100644
--- a/usr.sbin/sade/dmenu.c
+++ b/usr.sbin/sade/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.13 1995/12/07 10:33:44 peter Exp $
+ * $Id: dmenu.c,v 1.14 1996/03/02 07:31:51 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -46,6 +46,71 @@
#define MAX_MENU 15
+static Boolean cancelled;
+
+int
+dmenuDisplayFile(dialogMenuItem *tmp)
+{
+ systemDisplayHelp((char *)tmp->data);
+ return RET_SUCCESS;
+}
+
+int
+dmenuSubmenu(dialogMenuItem *tmp)
+{
+ dialog_clear();
+ return dmenuOpenSimple((DMenu *)tmp->data);
+}
+
+int
+dmenuSystemCommand(dialogMenuItem *tmp)
+{
+ int i;
+
+ i = systemExecute((char *)tmp->data) ? RET_FAIL : RET_SUCCESS;
+ dialog_clear();
+ return i;
+}
+
+int
+dmenuSystemCommandBox(dialogMenuItem *tmp)
+{
+ use_helpfile(NULL);
+ use_helpline("Select OK to dismiss this dialog");
+ dialog_prgbox(tmp->title, (char *)tmp->data, 22, 76, 1, 1);
+ dialog_clear();
+ return RET_SUCCESS;
+}
+
+int
+dmenuCancel(dialogMenuItem *tmp)
+{
+ cancelled = TRUE;
+ return RET_SUCCESS;
+}
+
+int
+dmenuSetVariable(dialogMenuItem *tmp)
+{
+ variable_set((char *)tmp->data);
+ msgInfo("Set %s", tmp->data);
+ return RET_SUCCESS;
+}
+
+int
+dmenuSetFlag(dialogMenuItem *tmp)
+{
+ *((unsigned int *)tmp->data) |= tmp->aux;
+ return RET_SUCCESS;
+}
+
+int
+dmenuSetValue(dialogMenuItem *tmp)
+{
+ *((unsigned int *)tmp->data) = tmp->aux;
+ return RET_SUCCESS;
+}
+
/* Traverse menu but give user no control over positioning */
Boolean
dmenuOpenSimple(DMenu *menu)
@@ -53,56 +118,44 @@ dmenuOpenSimple(DMenu *menu)
int choice, scroll, curr, max;
choice = scroll = curr = max = 0;
+ dialog_clear();
return dmenuOpen(menu, &choice, &scroll, &curr, &max);
}
/* Work functions for the state hook */
-char *
-dmenuFlagCheck(DMenuItem *item)
+int
+dmenuFlagCheck(dialogMenuItem *item)
{
- if (*((unsigned int *)item->ptr) & item->parm)
- return "ON";
- return "OFF";
+ return (*((unsigned int *)item->data) & item->aux);
}
-char *
-dmenuVarCheck(DMenuItem *item)
+int
+dmenuVarCheck(dialogMenuItem *item)
{
char *w, *cp, *cp2, tmp[256];
- w = (char *)item->parm;
+ w = (char *)item->aux;
if (!w)
- w = (char *)item->ptr;
+ w = (char *)item->data;
if (!w)
- return "OFF";
+ return FALSE;
strncpy(tmp, w, 256);
if ((cp = index(tmp, '=')) != NULL) {
*(cp++) = '\0';
cp2 = getenv(tmp);
if (cp2)
- return !strcmp(cp, cp2) ? "ON" : "OFF";
+ return !strcmp(cp, cp2);
else
- return "OFF";
+ return FALSE;
}
else
- return getenv(tmp) ? "ON" : "OFF";
+ return (int)getenv(tmp);
}
-char *
-dmenuRadioCheck(DMenuItem *item)
+int
+dmenuRadioCheck(dialogMenuItem *item)
{
- if (*((unsigned int *)item->ptr) == item->parm)
- return "ON";
- return "OFF";
-}
-
-static char *
-checkHookVal(DMenuItem *item)
-{
-
- if (!item->check)
- return "OFF";
- return (*item->check)(item);
+ return (*((unsigned int *)item->data) == item->aux);
}
static int
@@ -122,21 +175,10 @@ menu_height(DMenu *menu, int n)
Boolean
dmenuOpen(DMenu *menu, int *choice, int *scroll, int *curr, int *max)
{
- char result[FILENAME_MAX];
- char **nitems = NULL;
- DMenuItem *tmp;
- int rval = 0, n = 0;
-
- /* First, construct the menu */
- for (tmp = menu->items; tmp->title; tmp++) {
- if (!tmp->disabled) {
- nitems = item_add_pair(nitems, tmp->title, tmp->prompt, curr, max);
- if (menu->options & (DMENU_RADIO_TYPE | DMENU_MULTIPLE_TYPE))
- nitems = item_add(nitems, checkHookVal(tmp), curr, max);
- ++n;
- }
- }
- nitems = item_add(nitems, NULL, curr, max); /* Terminate it */
+ int n, rval = 0;
+
+ /* Count up all the items */
+ for (n = 0; menu->items[n].title; n++);
while (1) {
char buf[FILENAME_MAX];
@@ -146,40 +188,25 @@ dmenuOpen(DMenu *menu, int *choice, int *scroll, int *curr, int *max)
use_helpfile(systemHelpFile(menu->helpfile, buf));
/* Pop up that dialog! */
- if (menu->options & DMENU_NORMAL_TYPE)
+ if (menu->type == DMENU_NORMAL_TYPE)
rval = dialog_menu((u_char *)menu->title, (u_char *)menu->prompt, -1, -1,
- menu_height(menu, n), n, (u_char **)nitems, (u_char *)result, choice, scroll);
+ menu_height(menu, n), -n, menu->items, NULL, choice, scroll);
- else if (menu->options & DMENU_RADIO_TYPE)
+ else if (menu->type == DMENU_RADIO_TYPE)
rval = dialog_radiolist((u_char *)menu->title, (u_char *)menu->prompt, -1, -1,
- menu_height(menu, n), n, (u_char **)nitems, (u_char *)result);
+ menu_height(menu, n), -n, menu->items, NULL);
- else if (menu->options & DMENU_MULTIPLE_TYPE)
+ else if (menu->type == DMENU_CHECKLIST_TYPE)
rval = dialog_checklist((u_char *)menu->title, (u_char *)menu->prompt, -1, -1,
- menu_height(menu, n), n, (u_char **)nitems, (u_char *)result);
+ menu_height(menu, n), -n, menu->items, NULL);
/* This seems to be the only technique that works for getting the display to look right */
dialog_clear();
-
- if (!rval) {
- if (menu->options & DMENU_MULTIPLE_TYPE) {
- if (decode_and_dispatch_multiple(menu, result) || menu->options & DMENU_SELECTION_RETURNS) {
- items_free(nitems, curr, max);
- return TRUE;
- }
- }
- else {
- if ((tmp = decode(menu, result)) == NULL)
- return FALSE;
- }
- if (dispatch(tmp, result) == RET_DONE || (menu->options & DMENU_SELECTION_RETURNS)) {
- items_free(nitems, curr, max);
- return TRUE;
- }
- }
- else {
- items_free(nitems, curr, max);
+ if (rval)
return FALSE;
+ else if (cancelled) {
+ cancelled = FALSE;
+ return TRUE;
}
}
}
diff --git a/usr.sbin/sade/install.c b/usr.sbin/sade/install.c
index 30475b3..f789fd7 100644
--- a/usr.sbin/sade/install.c
+++ b/usr.sbin/sade/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.80 1996/03/24 09:43:53 jkh Exp $
+ * $Id: install.c,v 1.81 1996/03/24 18:57:36 joerg Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -219,12 +219,13 @@ installInitial(void)
}
int
-installFixit(char *str)
+installFixit(dialogMenuItem *self)
{
struct ufs_args args;
pid_t child;
int waitstatus;
+ variable_set2(SYSTEM_STATE, "fixit");
memset(&args, 0, sizeof(args));
args.fspec = "/dev/fd0";
Mkdir("/mnt2", NULL);
@@ -297,12 +298,13 @@ installFixit(char *str)
}
int
-installExpress(char *str)
+installExpress(dialogMenuItem *self)
{
- if (diskPartitionEditor("express") == RET_FAIL)
+ variable_set2(SYSTEM_STATE, "express");
+ if (diskPartitionEditor(self) == RET_FAIL)
return RET_FAIL;
- if (diskLabelEditor("express") == RET_FAIL)
+ if (diskLabelEditor(self) == RET_FAIL)
return RET_FAIL;
if (!Dists) {
@@ -315,7 +317,7 @@ installExpress(char *str)
return RET_FAIL;
}
- if (installCommit("express") == RET_FAIL)
+ if (installCommit(self) == RET_FAIL)
return RET_FAIL;
return RET_DONE;
@@ -323,8 +325,9 @@ installExpress(char *str)
/* Novice mode installation */
int
-installNovice(char *str)
+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"
@@ -333,7 +336,7 @@ installNovice(char *str)
"by a (Q)uit. If you wish to allocate only free space to FreeBSD, move to a\n"
"partition marked \"unused\" and use the (C)reate command.");
- if (diskPartitionEditor("novice") == RET_FAIL)
+ if (diskPartitionEditor(self) == RET_FAIL)
return RET_FAIL;
dialog_clear();
@@ -344,7 +347,7 @@ installNovice(char *str)
"care for the layout chosen by (A)uto, press F1 for more information on\n"
"manual layout.");
- if (diskLabelEditor("novice") == RET_FAIL)
+ if (diskLabelEditor(self) == RET_FAIL)
return RET_FAIL;
dialog_clear();
@@ -367,7 +370,7 @@ installNovice(char *str)
return RET_FAIL;
}
- if (installCommit("novice") == RET_FAIL)
+ if (installCommit(self) == RET_FAIL)
return RET_FAIL;
return RET_DONE;
@@ -382,14 +385,16 @@ installNovice(char *str)
* DES dist.
*/
int
-installCommit(char *str)
+installCommit(dialogMenuItem *self)
{
int i;
extern int cdromMounted;
+ char *str;
if (!mediaVerify())
return RET_FAIL;
+ str = variable_get(SYSTEM_STATE);
i = RET_DONE;
if (RunningAsInit) {
if (installInitial() == RET_FAIL)
@@ -404,15 +409,12 @@ installCommit(char *str)
}
}
- if (distExtractAll(NULL) == RET_FAIL)
+ if (distExtractAll(self) == RET_FAIL)
i = RET_FAIL;
- if (installFixup(NULL) == RET_FAIL)
+ if (installFixup(self) == RET_FAIL)
i = RET_FAIL;
- if (i != RET_FAIL)
- variable_set2(SYSTEM_STATE, "base-install");
-
if (i != RET_FAIL && !strcmp(str, "novice")) {
dialog_clear();
msgConfirm("Since you're running the novice installation, a few post-configuration\n"
@@ -434,7 +436,7 @@ installCommit(char *str)
if (!msgYesNo("Would you like to configure Samba for connecting NETBUI clients to this\n"
"machine? Windows 95, Windows NT and Windows for Workgroups\n"
"machines can use NETBUI transport for disk and printer sharing."))
- configSamba(NULL);
+ configSamba(self);
dialog_clear();
if (!msgYesNo("Will this machine be an IP gateway (e.g. will it forward packets\n"
@@ -443,11 +445,11 @@ installCommit(char *str)
dialog_clear();
if (!msgYesNo("Do you want to allow anonymous FTP connections to this machine?"))
- configAnonFTP(NULL);
+ configAnonFTP(self);
dialog_clear();
if (!msgYesNo("Do you want to configure this machine as an NFS server?"))
- configNFSServer(NULL);
+ configNFSServer(self);
dialog_clear();
if (!msgYesNo("Do you want to configure this machine as an NFS client?"))
@@ -455,7 +457,7 @@ installCommit(char *str)
dialog_clear();
if (!msgYesNo("Do you want to configure this machine as a WEB server?"))
- configApache(NULL);
+ configApache(self);
dialog_clear();
if (!msgYesNo("Would you like to customize your system console settings?"))
@@ -482,14 +484,14 @@ installCommit(char *str)
"drive to use the ports collection, but at a substantial savings\n"
"in disk space (NOTE: This may take as long as 15 or 20 minutes\n"
"depending on the speed of your CDROM drive)."))
- configPorts(NULL);
+ configPorts(self);
}
dialog_clear();
if (!msgYesNo("The FreeBSD package collection is a collection of over 300 ready-to-run\n"
"applications, from text editors to games to WEB servers. Would you like\n"
"to browse the collection now?"))
- configPackages(NULL);
+ configPackages(self);
/* XXX Put whatever other nice configuration questions you'd like to ask the user here XXX */
@@ -505,8 +507,6 @@ installCommit(char *str)
configResolv();
configSysconfig();
- variable_set2(SYSTEM_STATE, i == RET_FAIL ? "error-install" : "full-install");
-
/* Don't print this if we're express or novice installing */
if (strcmp(str, "express") && strcmp(str, "novice")) {
if (Dists || i == RET_FAIL) {
@@ -541,11 +541,13 @@ installCommit(char *str)
"may do so by typing: /stand/sysinstall.");
}
}
+ variable_set2(SYSTEM_STATE, i == RET_FAIL ? "error-install" : "full-install");
+
return i;
}
int
-installFixup(char *str)
+installFixup(dialogMenuItem *self)
{
Device **devs;
int i;
@@ -625,18 +627,20 @@ installFixup(char *str)
/* Go newfs and/or mount all the filesystems we've been asked to */
int
-installFilesystems(char *str)
+installFilesystems(dialogMenuItem *self)
{
int i;
Disk *disk;
Chunk *c1, *c2, *rootdev, *swapdev, *usrdev;
Device **devs;
PartInfo *root;
- char dname[80];
+ char dname[80], *str;
extern int MakeDevChunk(Chunk *c, char *n);
Boolean upgrade = FALSE;
- if (!(str && !strcmp(str, "script")) && !checkLabels(&rootdev, &swapdev, &usrdev))
+ str = variable_get(SYSTEM_STATE);
+
+ if (!checkLabels(&rootdev, &swapdev, &usrdev))
return RET_FAIL;
root = (PartInfo *)rootdev->private_data;
@@ -779,7 +783,7 @@ installFilesystems(char *str)
}
int
-installVarDefaults(char *unused)
+installVarDefaults(dialogMenuItem *self)
{
/* Set default startup options */
variable_set2(VAR_ROUTEDFLAGS, "-q");
diff --git a/usr.sbin/sade/label.c b/usr.sbin/sade/label.c
index 96e9dbf..774a329 100644
--- a/usr.sbin/sade/label.c
+++ b/usr.sbin/sade/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.39 1996/03/20 14:11:22 jkh Exp $
+ * $Id: label.c,v 1.40 1996/03/24 18:57:37 joerg Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -81,7 +81,6 @@ static struct {
static int here;
static int diskLabel(char *str);
-static int scriptLabel(char *str);
static int
labelHook(char *str)
@@ -115,14 +114,15 @@ labelHook(char *str)
}
int
-diskLabelEditor(char *str)
+diskLabelEditor(dialogMenuItem *self)
{
Device **devs;
DMenu *menu;
int i, cnt;
- char *cp;
+ char *cp, *str;
cp = variable_get(VAR_DISK);
+ str = variable_get(SYSTEM_STATE);
devs = deviceFind(cp, DEVICE_TYPE_DISK);
cnt = deviceCount(devs);
if (!cnt) {
@@ -135,10 +135,7 @@ diskLabelEditor(char *str)
else if (cnt == 1 || variable_get(DISK_SELECTED)) {
if (cnt == 1)
devs[0]->enabled = TRUE;
- if (str && !strcmp(str, "script"))
- i = scriptLabel(str);
- else
- i = diskLabel(str);
+ i = diskLabel(str);
}
else {
menu = deviceCreateMenu(&MenuDiskDevices, DEVICE_TYPE_DISK, labelHook);
@@ -163,7 +160,7 @@ diskLabelEditor(char *str)
}
int
-diskLabelCommit(char *str)
+diskLabelCommit(dialogMenuItem *self)
{
char *cp;
int i;
@@ -179,9 +176,9 @@ diskLabelCommit(char *str)
i = RET_FAIL;
}
/* The routine will guard against redundant writes, just as this one does */
- else if (diskPartitionWrite(str) != RET_SUCCESS)
+ else if (diskPartitionWrite(self) != RET_SUCCESS)
i = RET_FAIL;
- else if (installFilesystems(str) != RET_SUCCESS)
+ else if (installFilesystems(self) != RET_SUCCESS)
i = RET_FAIL;
else {
msgInfo("All filesystem information written successfully.");
@@ -399,119 +396,6 @@ getNewfsCmd(PartInfo *p)
strncpy(p->newfs_cmd, val, NEWFS_CMD_MAX);
}
-static int
-scriptLabel(char *str)
-{
- char *cp;
- PartType type;
- PartInfo *p;
- u_long flags = 0;
- int i, status;
- Device **devs;
- Disk *d;
-
- status = RET_SUCCESS;
- cp = variable_get(VAR_DISK);
- if (!cp) {
- dialog_clear();
- msgConfirm("scriptLabel: No disk selected - can't label automatically.");
- return RET_FAIL;
- }
-
- devs = deviceFind(cp, DEVICE_TYPE_DISK);
- if (!devs) {
- dialog_clear();
- msgConfirm("scriptLabel: No disk device %s found!", cp);
- return RET_FAIL;
- }
- d = devs[0]->private;
-
- record_label_chunks(devs);
- for (i = 0; label_chunk_info[i].c; i++) {
- Chunk *c1 = label_chunk_info[i].c;
-
- if (label_chunk_info[i].type == PART_SLICE) {
- if ((cp = variable_get(c1->name)) != NULL) {
- int sz;
- char typ[10], mpoint[50];
-
- if (sscanf(cp, "%s %d %s", typ, &sz, mpoint) != 3) {
- dialog_clear();
- msgConfirm("For slice entry %s, got an invalid detail entry of: %s", c1->name, cp);
- status = RET_FAIL;
- continue;
- }
- else {
- Chunk *tmp;
-
- if (!strcmp(typ, "swap")) {
- type = PART_SWAP;
- strcpy(mpoint, "<swap>");
- }
- else {
- type = PART_FILESYSTEM;
- if (!strcmp(mpoint, "/"))
- flags |= CHUNK_IS_ROOT;
- }
- if (!sz)
- sz = space_free(c1);
- if (sz > space_free(c1)) {
- dialog_clear();
- msgConfirm("Not enough free space to create partition: %s", mpoint);
- status = RET_FAIL;
- continue;
- }
- if (!(tmp = Create_Chunk_DWIM(d, c1, sz, part,
- (type == PART_SWAP) ? FS_SWAP : FS_BSDFFS, flags))) {
- dialog_clear();
- msgConfirm("Unable to create from partition spec: %s. Too big?", cp);
- status = RET_FAIL;
- break;
- }
- else {
- tmp->private_data = new_part(mpoint, TRUE, sz);
- tmp->private_free = safe_free;
- status = RET_SUCCESS;
- }
- }
- }
- }
- else {
- /* Must be something we can set a mountpoint */
- cp = variable_get(c1->name);
- if (cp) {
- char mpoint[50], nwfs[8];
- Boolean newfs = FALSE;
-
- nwfs[0] = '\0';
- if (sscanf(cp, "%s %s", mpoint, nwfs) != 2) {
- dialog_clear();
- msgConfirm("For slice entry %s, got an invalid detail entry of: %s", c1->name, cp);
- status = RET_FAIL;
- continue;
- }
- newfs = toupper(nwfs[0]) == 'Y' ? TRUE : FALSE;
- if (c1->private_data) {
- p = c1->private_data;
- p->newfs = newfs;
- strcpy(p->mountpoint, mpoint);
- }
- else {
- c1->private_data = new_part(mpoint, newfs, 0);
- c1->private_free = safe_free;
- }
- if (!strcmp(mpoint, "/"))
- c1->flags |= CHUNK_IS_ROOT;
- else
- c1->flags &= ~CHUNK_IS_ROOT;
- }
- }
- }
- if (status == RET_SUCCESS)
- variable_set2(DISK_LABELLED, "yes");
- return status;
-}
-
#define MAX_MOUNT_NAME 12
#define PART_PART_COL 0
diff --git a/usr.sbin/sade/main.c b/usr.sbin/sade/main.c
index a94f133..9810b48 100644
--- a/usr.sbin/sade/main.c
+++ b/usr.sbin/sade/main.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: main.c,v 1.14 1995/09/18 16:52:29 peter Exp $
+ * $Id: main.c,v 1.15 1995/12/07 10:33:55 peter Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -57,14 +57,18 @@ main(int argc, char **argv)
{
int choice, scroll, curr, max;
+ /* Catch fatal signals and complain about them if running as init */
if (getpid() == 1) {
signal(SIGBUS, screech);
signal(SIGSEGV, screech);
}
+
+ /* We don't work too well when running as non-root anymore */
if (geteuid() != 0) {
- fprintf(stderr, "Warning: This utility should be run as root.\n");
- sleep(1);
+ fprintf(stderr, "Error: This utility should only be run as root.\n");
+ return 1;
}
+
/* Set up whatever things need setting up */
systemInitialize(argc, argv);
diff --git a/usr.sbin/sade/menus.c b/usr.sbin/sade/menus.c
index 6f98217..14edc86 100644
--- a/usr.sbin/sade/menus.c
+++ b/usr.sbin/sade/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.47 1996/03/30 16:19:40 jkh Exp $
+ * $Id: menus.c,v 1.48 1996/04/03 06:55:09 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -53,119 +53,94 @@
/* The initial installation menu */
DMenu MenuInitial = {
DMENU_NORMAL_TYPE,
- "Welcome to FreeBSD!", /* title */
+ "Welcome to FreeBSD!", /* title */
"This is the main menu of the FreeBSD installation system. Please\n\
select one of the options below by using the arrow keys or typing the\n\
first character of the option name you're interested in. Invoke an\n\
-option by pressing [ENTER].", /* prompt */
+option by pressing [ENTER].", /* prompt */
"Press F1 for usage instructions", /* help line */
"usage", /* help file */
-{ { "Usage", "Quick start - How to use this menu system", /* U */
- DMENU_DISPLAY_FILE, "usage", 0, 0 },
- { "Doc", "More detailed documentation on FreeBSD", /* D */
- DMENU_SUBMENU, &MenuDocumentation, 0, 0 },
- { "Options", "Go to options editor", /* O */
- DMENU_CALL, optionsEditor, 0, 0 },
- { "Novice", "Begin a novice installation (for beginners)", /* N */
- DMENU_CALL, installNovice, 0, 0 },
- { "Express", "Begin a quick installation (for the impatient)", /* E */
- DMENU_CALL, installExpress, 0, 0 },
- { "Custom", "Begin a custom installation (for experts)", /* C */
- DMENU_SUBMENU, &MenuInstallCustom, 0, 0 },
- { "Fixit", "Mount fixit floppy and go into repair mode", /* F */
- DMENU_CALL, installFixit, 0, 0 },
- { "Upgrade", "Upgrade an existing 2.0.5 system", /* U */
- DMENU_CALL, installUpgrade, 0, 0 },
- { "Configure", "Do post-install configuration of FreeBSD", /* C (dup) */
- DMENU_SUBMENU, &MenuConfigure, 0, 0 },
- { "Quit", "Exit this menu (and the installation)", /* Q */
- DMENU_CANCEL, NULL, 0, 0 },
- { "Load", "Load a pre-configuration file from floppy",
- DMENU_CALL, installPreconfig, 0, },
+{ { "Usage", "Quick start - How to use this menu system", NULL, dmenuDisplayFile, NULL, "usage" },
+ { "Doc", "More detailed documentation on FreeBSD", NULL, dmenuSubmenu, NULL, &MenuDocumentation },
+ { "Options", "Go to options editor", NULL, optionsEditor },
+ { "Novice", "Begin a novice installation (for beginners)", NULL, installNovice },
+ { "Express", "Begin a quick installation (for the impatient)", NULL, installExpress },
+ { "Custom", "Begin a custom installation (for experts)", NULL, dmenuSubmenu, NULL, &MenuInstallCustom },
+ { "Fixit", "Mount fixit floppy and go into repair mode", NULL, installFixit },
+ { "Upgrade", "Upgrade an existing 2.0.5 system", NULL, installUpgrade },
+ { "Configure","Do post-install configuration of FreeBSD", NULL, dmenuSubmenu, NULL, &MenuConfigure },
+ { "Quit", "Exit this menu (and the installation)", NULL },
{ NULL } },
};
/* The main documentation menu */
DMenu MenuDocumentation = {
-DMENU_NORMAL_TYPE,
-"Documentation for FreeBSD " RELEASE_NAME, /* Title */
-"If you are at all unsure about the configuration of your hardware\n\
+ DMENU_NORMAL_TYPE,
+ "Documentation for FreeBSD " RELEASE_NAME,
+ "If you are at all unsure about the configuration of your hardware\n\
or are looking to build a system specifically for FreeBSD, read the\n\
Hardware guide! New users should also read the Install document for\n\
a step-by-step tutorial on installing FreeBSD. For general information,\n\
consult the README file.",
-"Confused? Press F1 for help.",
-"usage",
-{ { "README", "Read this for a general description of FreeBSD",
- DMENU_DISPLAY_FILE, "readme", 0, 0 },
- { "Hardware", "The FreeBSD survival guide for PC hardware.",
- DMENU_DISPLAY_FILE, "hardware", 0, 0 },
- { "Install", "A step-by-step guide to installing FreeBSD.",
- DMENU_DISPLAY_FILE, "install", 0, 0 },
- { "Copyright", "The FreeBSD Copyright notices.",
- DMENU_DISPLAY_FILE, "COPYRIGHT", 0, 0 },
- { "Release", "The release notes for this version of FreeBSD.",
- DMENU_DISPLAY_FILE, "relnotes", 0, 0 },
- { "HTML Docs", "Go to the HTML documentation menu (post-install).",
- DMENU_CALL, docBrowser, 0, 0 },
- { "Exit", "Exit this menu (returning to previous)",
- DMENU_CANCEL, NULL, 0, 0 },
+ "Confused? Press F1 for help.",
+ "usage",
+{ { "README", "A general description of FreeBSD. Read this!", NULL, dmenuDisplayFile, NULL, "readme" },
+ { "Hardware", "The FreeBSD survival guide for PC hardware.", NULL, dmenuDisplayFile, NULL, "hardware" },
+ { "Install", "A step-by-step guide to installing FreeBSD.", NULL, dmenuDisplayFile, NULL, "install" },
+ { "Copyright","The FreeBSD Copyright notices.", NULL, dmenuDisplayFile, NULL, "COPYRIGHT" },
+ { "Release", "The release notes for this version of FreeBSD.", NULL, dmenuDisplayFile, NULL, "relnotes" },
+ { "HTML Docs","Go to the HTML documentation menu (post-install).", NULL, docBrowser },
+ { "Exit", "Exit this menu (returning to previous)", NULL, dmenuCancel },
{ NULL } },
};
DMenu MenuMouse = {
-DMENU_NORMAL_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\
+ DMENU_NORMAL_TYPE,
+ "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\
somewhat. Once you've selected one of the below, you can specify\n\
/dev/mouse as your mouse device when running the XFree86 configuration\n\
utility (see Configuration menu). Please note that for PS/2 mice,\n\
a kernel recompile is also required! See the handbook for more details\n\
on building a kernel.",
-"For more information, visit the Documentation menu",
-NULL,
-{ { "COM1", "Serial mouse on COM1",
- DMENU_SYSTEM_COMMAND, "ln -fs /dev/cuaa0 /dev/mouse", 0, 0 },
- { "COM2", "Serial mouse on COM2",
- DMENU_SYSTEM_COMMAND, "ln -fs /dev/cuaa1 /dev/mouse", 0, 0 },
- { "COM3", "Serial mouse on COM3",
- DMENU_SYSTEM_COMMAND, "ln -fs /dev/cuaa2 /dev/mouse", 0, 0 },
- { "COM4", "Serial mouse on COM4",
- DMENU_SYSTEM_COMMAND, "ln -fs /dev/cuaa3 /dev/mouse", 0, 0 },
- { "BusMouse", "Logitech or ATI bus mouse",
- DMENU_SYSTEM_COMMAND, "ln -fs /dev/mse0 /dev/mouse", 0, 0 },
- { "PS/2", "PS/2 style mouse (requires new kernel)",
- DMENU_SYSTEM_COMMAND, "ln -fs /dev/psm0 /dev/mouse", 0, 0 },
+ "For more information, visit the Documentation menu",
+ NULL,
+{ { "COM1", "Serial mouse on COM1", NULL, dmenuSystemCommand, NULL, "ln -fs /dev/cuaa0 /dev/mouse" },
+ { "COM2", "Serial mouse on COM2", NULL, dmenuSystemCommand, NULL, "ln -fs /dev/cuaa1 /dev/mouse" },
+ { "COM3", "Serial mouse on COM3", NULL, dmenuSystemCommand, NULL, "ln -fs /dev/cuaa2 /dev/mouse" },
+ { "COM4", "Serial mouse on COM4", NULL, dmenuSystemCommand, NULL, "ln -fs /dev/cuaa3 /dev/mouse" },
+ { "BusMouse", "Logitech or ATI bus mouse", NULL, dmenuSystemCommand, NULL, "ln -fs /dev/mse0 /dev/mouse" },
+ { "PS/2", "PS/2 style mouse (requires kernel rebuild)", NULL, dmenuSystemCommand, NULL, "ln -fs /dev/psm0 /dev/mouse" },
{ NULL } },
};
DMenu MenuMediaCDROM = {
-DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
-"Choose a CDROM type",
-"FreeBSD can be installed directly from a CDROM containing a valid\n\
+ DMENU_NORMAL_TYPE,
+ "Choose a CDROM type",
+ "FreeBSD can be installed directly from a CDROM containing a valid\n\
FreeBSD distribution. If you are seeing this menu it is because\n\
more than one CDROM drive was found on your system. Please select one\n\
of the following CDROM drives as your installation drive.",
-"Press F1 to read the installation guide",
-"install",
-{ { NULL } },
+ "Press F1 to read the installation guide",
+ "install",
+ { { NULL } },
};
DMenu MenuMediaFloppy = {
-DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
-"Choose a Floppy drive",
-"You have more than one floppy drive. Please chose the drive\n\
+ DMENU_NORMAL_TYPE,
+ "Choose a Floppy drive",
+ "You have more than one floppy drive. Please chose the drive\n\
you would like to use for this operation",
-NULL,
-NULL,
-{ { NULL } },
+ NULL,
+ NULL,
+ { { NULL } },
};
DMenu MenuMediaDOS = {
-DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
-"Choose a DOS partition",
-"FreeBSD can be installed directly from a DOS partition\n\
+ DMENU_NORMAL_TYPE,
+ "Choose a DOS partition",
+ "FreeBSD can be installed directly from a DOS partition\n\
assuming, of course, that you have copied the relevant\n\
distributions into your DOS partition before starting this\n\
installation. If this is not the case then you should reboot\n\
@@ -173,151 +148,151 @@ DOS at this time and copy the distributions you wish to install\n\
into a \"FREEBSD\" subdirectory on one of your DOS partitions.\n\
Otherwise, please select the DOS partition containing the FreeBSD\n\
distribution files.",
-"Press F1 to read the installation guide",
-"install",
-{ { NULL } },
+ "Press F1 to read the installation guide",
+ "install",
+ { { NULL } },
};
DMenu MenuMediaFTP = {
-DMENU_NORMAL_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\
+ DMENU_NORMAL_TYPE,
+ "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\
carries more than the base distribution kits. Only the Primary site is\n\
guaranteed to carry the full range of possible distributions.",
-"Select a site that's close!",
-"install",
-{ { "Primary Site", "ftp.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "Other", "Specify some other ftp site by URL",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=other", 0, 0 },
- { "Australia", "ftp.au.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp.au.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "Australia #2", "ftp2.au.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp2.au.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "Australia #3", "ftp3.au.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp3.au.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "Australia #4", "ftp4.au.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp4.au.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "Brazil", "ftp.br.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp.br.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "Brazil #2", "ftp2.br.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp2.br.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "Brazil #3", "ftp3.br.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp3.br.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "Brazil #4", "ftp4.br.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp4.br.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "Brazil #5", "ftp5.br.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp5.br.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "Canada", "ftp.ca.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp.ca.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "Czech Republic", "sunsite.mff.cuni.cz",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://sunsite.mff.cuni.cz/OS/FreeBSD/", 0, 0 },
- { "Finland", "nic.funet.fi",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://nic.funet.fi/pub/unix/FreeBSD/", 0, 0 },
- { "France", "ftp.ibp.fr",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp.ibp.fr/pub/FreeBSD/", 0, 0 },
- { "Germany", "ftp.de.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp.de.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "Germany #2", "ftp2.de.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp2.de.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "Germany #3", "ftp3.de.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp3.de.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "Germany #4", "ftp4.de.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp4.de.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "Germany #5", "ftp5.de.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp5.de.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "Germany #6", "ftp6.de.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp6.de.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "Germany #7", "ftp7.de.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp7.de.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "Hong Kong", "ftp.hk.super.net",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp.hk.super.net/pub/FreeBSD/", 0, 0 },
- { "Ireland", "ftp.ie.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp.ie.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "Israel", "orgchem.weizmann.ac.il",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://orgchem.weizmann.ac.il/pub/FreeBSD/", 0, 0 },
- { "Israel #2", "xray4.weizmann.ac.il",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://xray4.weizmann.ac.il/pub/FreeBSD/", 0, 0 },
- { "Japan", "ftp.jp.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp.jp.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "Japan #2", "ftp2.jp.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp2.jp.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "Japan #3", "ftp3.jp.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp3.jp.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "Japan #4", "ftp4.jp.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp4.jp.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "Japan #5", "ftp5.jp.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp5.jp.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "Japan #6", "ftp6.jp.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp6.jp.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "Korea", "ftp.kr.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp.kr.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "Korea #2", "ftp2.kr.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp2.kr.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "Netherlands", "ftp.nl.net",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp.nl.net/pub/os/FreeBSD/", 0, 0 },
- { "Poland", "SunSITE.icm.edu.pl",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://SunSITE.icm.edu.pl/pub/FreeBSD/", 0, 0 },
- { "Portugal", "ftp.ua.pt",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp.ua.pt/pub/misc/FreeBSD/", 0, 0 },
- { "Russia", "ftp.kiae.su",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp.kiae.su/FreeBSD/", 0, 0 },
- { "South Africa", "ftp.za.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp.za.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "South Africa #2", "ftp2.za.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp2.za.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "Sweden", "ftp.luth.se",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp.luth.se/pub/FreeBSD/", 0, 0 },
- { "Taiwan", "ftp.tw.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp.tw.freebsd.org/pub/FreeBSD", 0, 0 },
- { "Taiwan #2", "ftp2.tw.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp2.tw.freebsd.org/pub/FreeBSD", 0, 0 },
- { "Taiwan #3", "ftp3.tw.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp3.tw.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "Thailand", "ftp.nectec.or.th",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp.nectec.or.th/pub/mirrors/FreeBSD/", 0, 0 },
- { "UK", "ftp.uk.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp.uk.freebsd.org/pub/BSD/FreeBSD/", 0, 0 },
- { "UK #2", "ftp2.uk.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp2.uk.freebsd.org/pub/BSD/FreeBSD/", 0, 0 },
- { "UK #3", "ftp3.uk.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp3.uk.freebsd.org/pub/BSD/FreeBSD/", 0, 0 },
- { "USA", "ftp.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "USA #2", "ftp2.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp2.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "USA #3", "ftp3.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp3.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "USA #4", "ftp4.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp4.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "USA #5", "ftp5.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp5.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "USA #6", "ftp6.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp6.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "USA #7", "ftp7.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp7.freebsd.org/pub/FreeBSD/", 0, 0 },
+ "Select a site that's close!",
+ "install",
+{ { "Primary Site", "ftp.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp.freebsd.org/pub/FreeBSD/" },
+ { "Other", "Specify some other ftp site by URL", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=other" },
+ { "Australia", "ftp.au.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp.au.freebsd.org/pub/FreeBSD/" },
+ { "Australia #2", "ftp2.au.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp2.au.freebsd.org/pub/FreeBSD/" },
+ { "Australia #3", "ftp3.au.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp3.au.freebsd.org/pub/FreeBSD/" },
+ { "Australia #4", "ftp4.au.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp4.au.freebsd.org/pub/FreeBSD/" },
+ { "Brazil", "ftp.br.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp.br.freebsd.org/pub/FreeBSD/" },
+ { "Brazil #2", "ftp2.br.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp2.br.freebsd.org/pub/FreeBSD/" },
+ { "Brazil #3", "ftp3.br.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp3.br.freebsd.org/pub/FreeBSD/" },
+ { "Brazil #4", "ftp4.br.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp4.br.freebsd.org/pub/FreeBSD/" },
+ { "Brazil #5", "ftp5.br.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp5.br.freebsd.org/pub/FreeBSD/" },
+ { "Canada", "ftp.ca.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp.ca.freebsd.org/pub/FreeBSD/" },
+ { "Czech Republic", "sunsite.mff.cuni.cz", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://sunsite.mff.cuni.cz/OS/FreeBSD/" },
+ { "Finland", "nic.funet.fi", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://nic.funet.fi/pub/unix/FreeBSD/" },
+ { "France", "ftp.ibp.fr", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp.ibp.fr/pub/FreeBSD/" },
+ { "Germany", "ftp.de.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp.de.freebsd.org/pub/FreeBSD/" },
+ { "Germany #2", "ftp2.de.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp2.de.freebsd.org/pub/FreeBSD/" },
+ { "Germany #3", "ftp3.de.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp3.de.freebsd.org/pub/FreeBSD/" },
+ { "Germany #4", "ftp4.de.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp4.de.freebsd.org/pub/FreeBSD/" },
+ { "Germany #5", "ftp5.de.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp5.de.freebsd.org/pub/FreeBSD/" },
+ { "Germany #6", "ftp6.de.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp6.de.freebsd.org/pub/FreeBSD/" },
+ { "Germany #7", "ftp7.de.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp7.de.freebsd.org/pub/FreeBSD/" },
+ { "Hong Kong", "ftp.hk.super.net", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp.hk.super.net/pub/FreeBSD/" },
+ { "Ireland", "ftp.ie.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp.ie.freebsd.org/pub/FreeBSD/" },
+ { "Israel", "orgchem.weizmann.ac.il", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://orgchem.weizmann.ac.il/pub/FreeBSD/" },
+ { "Israel #2", "xray4.weizmann.ac.il", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://xray4.weizmann.ac.il/pub/FreeBSD/" },
+ { "Japan", "ftp.jp.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp.jp.freebsd.org/pub/FreeBSD/" },
+ { "Japan #2", "ftp2.jp.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp2.jp.freebsd.org/pub/FreeBSD/" },
+ { "Japan #3", "ftp3.jp.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp3.jp.freebsd.org/pub/FreeBSD/" },
+ { "Japan #4", "ftp4.jp.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp4.jp.freebsd.org/pub/FreeBSD/" },
+ { "Japan #5", "ftp5.jp.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp5.jp.freebsd.org/pub/FreeBSD/" },
+ { "Japan #6", "ftp6.jp.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp6.jp.freebsd.org/pub/FreeBSD/" },
+ { "Korea", "ftp.kr.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp.kr.freebsd.org/pub/FreeBSD/" },
+ { "Korea #2", "ftp2.kr.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp2.kr.freebsd.org/pub/FreeBSD/" },
+ { "Netherlands", "ftp.nl.net", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp.nl.net/pub/os/FreeBSD/" },
+ { "Poland", "SunSITE.icm.edu.pl", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://SunSITE.icm.edu.pl/pub/FreeBSD/" },
+ { "Portugal", "ftp.ua.pt", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp.ua.pt/pub/misc/FreeBSD/" },
+ { "Russia", "ftp.kiae.su", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp.kiae.su/FreeBSD/" },
+ { "South Africa", "ftp.za.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp.za.freebsd.org/pub/FreeBSD/" },
+ { "South Africa #2", "ftp2.za.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp2.za.freebsd.org/pub/FreeBSD/" },
+ { "Sweden", "ftp.luth.se", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp.luth.se/pub/FreeBSD/" },
+ { "Taiwan", "ftp.tw.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp.tw.freebsd.org/pub/FreeBSD" },
+ { "Taiwan #2", "ftp2.tw.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp2.tw.freebsd.org/pub/FreeBSD" },
+ { "Taiwan #3", "ftp3.tw.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp3.tw.freebsd.org/pub/FreeBSD/" },
+ { "Thailand", "ftp.nectec.or.th", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp.nectec.or.th/pub/mirrors/FreeBSD/" },
+ { "UK", "ftp.uk.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp.uk.freebsd.org/pub/BSD/FreeBSD/" },
+ { "UK #2", "ftp2.uk.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp2.uk.freebsd.org/pub/BSD/FreeBSD/" },
+ { "UK #3", "ftp3.uk.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp3.uk.freebsd.org/pub/BSD/FreeBSD/" },
+ { "USA", "ftp.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp.freebsd.org/pub/FreeBSD/" },
+ { "USA #2", "ftp2.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp2.freebsd.org/pub/FreeBSD/" },
+ { "USA #3", "ftp3.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp3.freebsd.org/pub/FreeBSD/" },
+ { "USA #4", "ftp4.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp4.freebsd.org/pub/FreeBSD/" },
+ { "USA #5", "ftp5.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp5.freebsd.org/pub/FreeBSD/" },
+ { "USA #6", "ftp6.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp6.freebsd.org/pub/FreeBSD/" },
+ { "USA #7", "ftp7.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp7.freebsd.org/pub/FreeBSD/" },
{ NULL } }
};
DMenu MenuMediaTape = {
-DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
-"Choose a tape drive type",
-"FreeBSD can be installed from tape drive, though this installation\n\
+ DMENU_NORMAL_TYPE,
+ "Choose a tape drive type",
+ "FreeBSD can be installed from tape drive, though this installation\n\
method requires a certain amount of temporary storage in addition\n\
to the space required by the distribution itself (tape drives make\n\
poor random-access devices, so we extract _everything_ on the tape\n\
in one pass). If you have sufficient space for this, then you should\n\
select one of the following tape devices detected on your system.",
-"Press F1 to read the installation guide",
-"install",
-{ { NULL } },
+ "Press F1 to read the installation guide",
+ "install",
+ { { NULL } },
};
DMenu MenuNetworkDevice = {
-DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
-"Network interface information required",
-"If you are using PPP over a serial device (cuaa0 or cuaa1) as opposed\n\
+ DMENU_NORMAL_TYPE,
+ "Network interface information required",
+ "If you are using PPP over a serial device (cuaa0 or cuaa1) as opposed\n\
to a direct ethernet connection, then you may first need to dial your\n\
service provider using the ppp utility we provide for that purpose.\n\
You can also install over a parallel port using a special \"laplink\"\n\
@@ -326,92 +301,75 @@ a fairly recent (2.0R or later) release to talk to.\n\n\
To use PPP, select one of the serial devices, otherwise select lp0 for\n\
the parallel port or one of the ethernet controllers (if you have one)\n\
for an ethernet installation.",
-"Press F1 to read network configuration manual",
-"network_device",
-{ { NULL } },
+ "Press F1 to read network configuration manual",
+ "network_device",
+ { { NULL } },
};
/* The media selection menu */
DMenu MenuMedia = {
-DMENU_NORMAL_TYPE,
-"Choose Installation Media",
-"FreeBSD can be installed from a variety of different installation\n\
+ DMENU_NORMAL_TYPE,
+ "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\
installing FreeBSD from a supported CDROM drive then this is generally\n\
the best media to use if you have no overriding reason for using other\n\
media.",
-"Press F1 for more information on the various media types",
-"media",
-{ { "CDROM", "Install from a FreeBSD CDROM",
- DMENU_CALL, mediaSetCDROM, 0, 0 },
- { "DOS", "Install from a DOS partition",
- DMENU_CALL, mediaSetDOS, 0, 0 },
- { "File System", "Install from an existing filesystem",
- DMENU_CALL, mediaSetUFS, 0, 0 },
- { "Floppy", "Install from a floppy disk set",
- DMENU_CALL, mediaSetFloppy, 0, 0 },
- { "FTP", "Install from an FTP server",
- DMENU_CALL, mediaSetFTPActive, 0, 0 },
- { "FTP Passive", "Install from an FTP server through a firewall",
- DMENU_CALL, mediaSetFTPPassive, 0, 0 },
- { "NFS", "Install over NFS",
- DMENU_CALL, mediaSetNFS, 0, 0 },
- { "Tape", "Install from SCSI or QIC tape",
- DMENU_CALL, mediaSetTape, 0, 0 },
+ "Press F1 for more information on the various media types",
+ "media",
+{ { "CDROM", "Install from a FreeBSD CDROM", NULL, mediaSetCDROM },
+ { "DOS", "Install from a DOS partition", NULL, mediaSetDOS },
+ { "File System", "Install from an existing filesystem", NULL, mediaSetUFS },
+ { "Floppy", "Install from a floppy disk set", NULL, mediaSetFloppy },
+ { "FTP", "Install from an FTP server", NULL, mediaSetFTPActive },
+ { "FTP Passive", "Install from an FTP server through a firewall", NULL, mediaSetFTPPassive },
+ { "NFS", "Install over NFS", NULL, mediaSetNFS },
+ { "Tape", "Install from SCSI or QIC tape", NULL, mediaSetTape },
{ NULL } },
};
/* The distributions menu */
DMenu MenuDistributions = {
-DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
-"Choose Distributions",
-"As a convenience, we provide several \"canned\" distribution sets.\n\
+ DMENU_NORMAL_TYPE,
+ "Choose Distributions",
+ "As a convenience, we provide several \"canned\" distribution sets.\n\
These select what we consider to be the most reasonable defaults for the\n\
type of system in question. If you would prefer to pick and choose\n\
the list of distributions yourself, simply select \"Custom\".",
-"Press F1 for more information on these options.",
-"distributions",
-{ { "Developer", "Full sources, binaries and doc but no games [180MB]",
- DMENU_CALL, distSetDeveloper, 0, 0 },
- { "X-Developer", "Same as above, but includes XFree86 [201MB]",
- DMENU_CALL, distSetXDeveloper, 0, 0 },
- { "Kern-Developer", "Full binaries and doc, kernel sources only [70MB]",
- DMENU_CALL, distSetKernDeveloper, 0, 0 },
- { "User", "Average user - binaries and doc but no sources [52MB]",
- DMENU_CALL, distSetUser, 0, 0 },
- { "X-User", "Same as above, but includes XFree86 [52MB]",
- DMENU_CALL, distSetXUser, 0, 0 },
- { "Minimal", "The smallest configuration possible [44MB]",
- DMENU_CALL, distSetMinimum, 0, 0 },
- { "Everything", "All sources, binaries and XFree86 binaries [700MB]",
- DMENU_CALL, distSetEverything, 0, 0 },
- { "Custom", "Specify your own distribution set [?]",
- DMENU_SUBMENU, &MenuSubDistributions, 0, 0 },
- { "Clear", "Reset selected distribution list to None",
- DMENU_CALL, distReset, 0, 0 },
+ "Press F1 for more information on these options.",
+ "distributions",
+{ { "Developer", "Full sources, binaries and doc but no games [180MB]", NULL, distSetDeveloper },
+ { "X-Developer", "Same as above, but includes XFree86 [201MB]", NULL, distSetXDeveloper },
+ { "Kern-Developer", "Full binaries and doc, kernel sources only [70MB]", NULL, distSetKernDeveloper },
+ { "User", "Average user - binaries and doc but no sources [52MB]", NULL, distSetUser },
+ { "X-User", "Same as above, but includes XFree86 [52MB]", NULL, distSetXUser },
+ { "Minimal", "The smallest configuration possible [44MB]", NULL, distSetMinimum },
+ { "Everything", "All sources, binaries and XFree86 binaries [700MB]", NULL, distSetEverything },
+ { "Custom", "Specify your own distribution set [?]", NULL, dmenuSubmenu, NULL, &MenuSubDistributions },
+ { "Clear", "Reset selected distribution list to None", NULL, distReset },
{ NULL } },
};
-static char *
-DESFlagCheck(DMenuItem *item)
+static int
+DESFlagCheck(dialogMenuItem *item)
{
- return (Dists & DIST_DES) ? "ON" : "OFF";
+ return Dists & DIST_DES;
}
-static char *
-srcFlagCheck(DMenuItem *item)
+static int
+srcFlagCheck(dialogMenuItem *item)
{
- return (Dists & DIST_SRC) ? "ON" : "OFF";
+ return Dists & DIST_SRC;
}
-static char *
-x11FlagCheck(DMenuItem *item)
+static int
+x11FlagCheck(dialogMenuItem *item)
{
- return (Dists & DIST_XF86) ? "ON" : "OFF";
+ return Dists & DIST_XF86;
}
DMenu MenuSubDistributions = {
- DMENU_MULTIPLE_TYPE | DMENU_SELECTION_RETURNS,
+ DMENU_CHECKLIST_TYPE,
"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\
@@ -419,101 +377,103 @@ DES distribution out of the U.S.! It is for U.S. customers only.",
NULL,
NULL,
{ { "bin", "Binary base distribution (required) [36MB]",
- DMENU_SET_FLAG, &Dists, DIST_BIN, 0, dmenuFlagCheck },
- { "commercial", "Commercial demos and shareware [10MB]",
- DMENU_SET_FLAG, &Dists, DIST_COMMERCIAL, 0, dmenuFlagCheck },
- { "compat1x", "FreeBSD 1.x binary compatibility package [2MB]",
- DMENU_SET_FLAG, &Dists, DIST_COMPAT1X, 0, dmenuFlagCheck },
- { "compat20", "FreeBSD 2.0 binary compatibility package [2MB]",
- DMENU_SET_FLAG, &Dists, DIST_COMPAT20, 0, dmenuFlagCheck },
+ dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_BIN },
+ { "commercial", "Commercial and shareware demos [10MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_COMMERCIAL },
+ { "compat1x", "FreeBSD 1.x binary compatibility [2MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_COMPAT1X },
+ { "compat20", "FreeBSD 2.0 binary compatibility [2MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_COMPAT20 },
+ { "compat21", "FreeBSD 2.1 binary compatibility [2MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_COMPAT21 },
{ "DES", "DES encryption code - NOT FOR EXPORT! [.3MB]",
- DMENU_CALL, distSetDES, 0, 0, DESFlagCheck },
+ DESFlagCheck, distSetDES },
{ "dict", "Spelling checker dictionary files [4.2MB]",
- DMENU_SET_FLAG, &Dists, DIST_DICT, 0, dmenuFlagCheck },
+ dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_DICT },
{ "doc", "FreeBSD Handbook and other online docs [10MB]",
- DMENU_SET_FLAG, &Dists, DIST_DOC, 0, dmenuFlagCheck },
- { "games", "Games (non-commercial) [6.4MB]",
- DMENU_SET_FLAG, &Dists, DIST_GAMES, 0, dmenuFlagCheck },
+ dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_DOC },
+ { "games", "Games (non-commercial) [6.4MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_GAMES },
{ "info", "GNU info files [4.1MB]",
- DMENU_SET_FLAG, &Dists, DIST_INFO, 0, dmenuFlagCheck },
+ dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_INFO },
{ "man", "System manual pages - recommended [3.3MB]",
- DMENU_SET_FLAG, &Dists, DIST_MANPAGES, 0, dmenuFlagCheck },
- { "proflibs", "Profiled versions of the libraries [3.3MB]",
- DMENU_SET_FLAG, &Dists, DIST_PROFLIBS, 0, dmenuFlagCheck },
+ dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_MANPAGES },
+ { "proflibs", "Profiled versions of the libraries [3.3MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_PROFLIBS },
{ "src", "Sources for everything but DES [120MB]",
- DMENU_CALL, distSetSrc, 0, 0, srcFlagCheck },
- { "XFree86", "The XFree86 3.1.2-S distribution",
- DMENU_CALL, distSetXF86, 0, 0, x11FlagCheck },
+ srcFlagCheck, distSetSrc },
+ { "XFree86", "The XFree86 3.1.2-S distribution",
+ x11FlagCheck, distSetXF86 },
{ "Experimental", "Work in progress!",
- DMENU_SET_FLAG, &Dists, DIST_EXPERIMENTAL, 0, dmenuFlagCheck },
+ dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_EXPERIMENTAL },
{ NULL } },
};
DMenu MenuDESDistributions = {
-DMENU_MULTIPLE_TYPE | DMENU_SELECTION_RETURNS,
-"Select the encryption facilities you wish to install.",
-"Please check off any special DES-based encryption distributions\n\
+ DMENU_CHECKLIST_TYPE,
+ "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\
EXPORT from the United States, nor are they available on CDROM (for the\n\
same reason). For information on non-U.S. FTP distributions of this\n\
software, please consult the release notes.",
-NULL,
-NULL,
-{ { "des", "Basic DES services (rlogin, init, etc) [1MB]",
- DMENU_SET_FLAG, &DESDists, DIST_DES_DES, 0, dmenuFlagCheck },
- { "krb", "Kerberos encryption services [2MB]",
- DMENU_SET_FLAG, &DESDists, DIST_DES_KERBEROS, 0, dmenuFlagCheck },
+ NULL,
+ NULL,
+{ { "des", "Basic DES encryption services [1MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &DESDists, '[', 'X', ']', DIST_DES_DES, },
+ { "krb", "Kerberos encryption services [2MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &DESDists, '[', 'X', ']', DIST_DES_KERBEROS },
{ "sebones", "Sources for eBones (Kerberos) [1MB]",
- DMENU_SET_FLAG, &DESDists, DIST_DES_SEBONES, 0, dmenuFlagCheck },
- { "ssecure", "Sources for DES libs and utilities [1MB]",
- DMENU_SET_FLAG, &DESDists, DIST_DES_SSECURE, 0, dmenuFlagCheck },
+ dmenuFlagCheck, dmenuSetFlag, NULL, &DESDists, '[', 'X', ']', DIST_DES_SEBONES },
+ { "ssecure", "Sources for DES [1MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &DESDists, '[', 'X', ']', DIST_DES_SSECURE },
{ NULL } },
};
DMenu MenuSrcDistributions = {
-DMENU_MULTIPLE_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\
+ DMENU_CHECKLIST_TYPE,
+ "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.",
-NULL,
-NULL,
-{ { "base", "top-level files in /usr/src [300K]",
- DMENU_SET_FLAG, &SrcDists, DIST_SRC_BASE, 0, dmenuFlagCheck },
- { "gnu", "/usr/src/gnu (software from the GNU Project) [42MB]",
- DMENU_SET_FLAG, &SrcDists, DIST_SRC_GNU, 0, dmenuFlagCheck },
- { "etc", "/usr/src/etc (miscellaneous system files) [460K]",
- DMENU_SET_FLAG, &SrcDists, DIST_SRC_ETC, 0, dmenuFlagCheck },
- { "games", "/usr/src/games (diversions) [7.8MB]",
- DMENU_SET_FLAG, &SrcDists, DIST_SRC_GAMES, 0, dmenuFlagCheck },
+ NULL,
+ NULL,
+{ { "base", "top-level files in /usr/src [300K]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_BASE },
+ { "gnu", "/usr/src/gnu (software from the GNU Project) [42MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_GNU },
+ { "etc", "/usr/src/etc (miscellaneous system files) [460K]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_ETC },
+ { "games", "/usr/src/games (the obvious!) [7.8MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_GAMES },
{ "include", "/usr/src/include (header files) [467K]",
- DMENU_SET_FLAG, &SrcDists, DIST_SRC_INCLUDE, 0, dmenuFlagCheck },
- { "lib", "/usr/src/lib (system libraries) [9.2MB]",
- DMENU_SET_FLAG, &SrcDists, DIST_SRC_LIB, 0, dmenuFlagCheck },
+ dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_INCLUDE },
+ { "lib", "/usr/src/lib (system libraries) [9.2MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_LIB },
{ "libexec", "/usr/src/libexec (system programs) [1.2MB]",
- DMENU_SET_FLAG, &SrcDists, DIST_SRC_LIBEXEC, 0, dmenuFlagCheck },
- { "lkm", "/usr/src/lkm (Loadable Kernel Modules) [193K]",
- DMENU_SET_FLAG, &SrcDists, DIST_SRC_LKM, 0, dmenuFlagCheck },
+ dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_LIBEXEC },
+ { "lkm", "/usr/src/lkm (Loadable Kernel Modules) [193K]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_LKM },
{ "release", "/usr/src/release (release-generation tools) [533K]",
- DMENU_SET_FLAG, &SrcDists, DIST_SRC_RELEASE, 0, dmenuFlagCheck },
- { "bin", "/usr/src/bin (system binaries) [2.5MB]",
- DMENU_SET_FLAG, &SrcDists, DIST_SRC_BIN, 0, dmenuFlagCheck },
- { "sbin", "/usr/src/sbin (system binaries) [1.3MB]",
- DMENU_SET_FLAG, &SrcDists, DIST_SRC_SBIN, 0, dmenuFlagCheck },
+ dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_RELEASE },
+ { "bin", "/usr/src/bin (system binaries) [2.5MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_BIN },
+ { "sbin", "/usr/src/sbin (system binaries) [1.3MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_SBIN },
{ "share", "/usr/src/share (documents and shared files) [10MB]",
- DMENU_SET_FLAG, &SrcDists, DIST_SRC_SHARE, 0, dmenuFlagCheck },
- { "sys", "/usr/src/sys (FreeBSD kernel) [13MB]",
- DMENU_SET_FLAG, &SrcDists, DIST_SRC_SYS, 0, dmenuFlagCheck },
- { "ubin", "/usr/src/usr.bin (user binaries) [13MB]",
- DMENU_SET_FLAG, &SrcDists, DIST_SRC_UBIN, 0, dmenuFlagCheck },
+ dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_SHARE },
+ { "sys", "/usr/src/sys (FreeBSD kernel) [13MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_SYS },
+ { "ubin", "/usr/src/usr.bin (user binaries) [13MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_UBIN },
{ "usbin", "/usr/src/usr.sbin (aux system binaries) [14MB]",
- DMENU_SET_FLAG, &SrcDists, DIST_SRC_USBIN, 0, dmenuFlagCheck },
+ dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_USBIN },
{ "smailcf", "/usr/src/usr.sbin (sendmail config macros) [341K]",
- DMENU_SET_FLAG, &SrcDists, DIST_SRC_SMAILCF, 0, dmenuFlagCheck },
+ dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_SMAILCF },
{ NULL } },
};
static int
-clearx11(char *str)
+clearx11(dialogMenuItem *self)
{
XF86Dists = 0;
XF86ServerDists = 0;
@@ -530,81 +490,76 @@ distribution. We recommend that you select what you need from the basic\n\
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)",
- DMENU_SUBMENU, &MenuXF86SelectCore, 0, 0 },
- { "Server", "X server menu",
- DMENU_SUBMENU, &MenuXF86SelectServer, 0, 0 },
- { "Fonts", "Font set menu",
- DMENU_SUBMENU, &MenuXF86SelectFonts, 0, 0 },
- { "Exit", "Exit this menu (returning to previous)",
- DMENU_CANCEL, NULL, 0, 0 },
- { "Clear", "Reset XFree86 distribution list",
- DMENU_CALL, clearx11, 0, 0, 0 },
+{ { "Basic", "Basic component menu (required)", NULL, dmenuSubmenu, NULL, &MenuXF86SelectCore },
+ { "Server", "X server menu", NULL, dmenuSubmenu, NULL, &MenuXF86SelectServer },
+ { "Fonts", "Font set menu", NULL, dmenuSubmenu, NULL, &MenuXF86SelectFonts },
+ { "Exit", "Exit this menu (returning to previous)", NULL, dmenuCancel },
+ { "Clear", "Reset XFree86 distribution list", NULL, clearx11 },
{ NULL } },
};
DMenu MenuXF86SelectCore = {
- DMENU_MULTIPLE_TYPE | DMENU_SELECTION_RETURNS,
-"XFree86 3.1.2-S base distribution types",
-"Please check off the basic XFree86 components you wish to install.\n\
+ DMENU_CHECKLIST_TYPE,
+ "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.",
-"Press F1 to read the XFree86 release notes for FreeBSD",
-"XF86",
-{ { "bin", "Client applications and shared libs [4.1MB].",
- DMENU_SET_FLAG, &XF86Dists, DIST_XF86_BIN, 0, dmenuFlagCheck },
- { "lib", "Data files needed at runtime [750K]",
- DMENU_SET_FLAG, &XF86Dists, DIST_XF86_LIB, 0, dmenuFlagCheck },
- { "xicf", "Customizable xinit runtime configuration file [10K]",
- DMENU_SET_FLAG, &XF86Dists, DIST_XF86_XINIT, 0, dmenuFlagCheck },
- { "xdcf", "Customizable xdm runtime configuration file [20K]",
- DMENU_SET_FLAG, &XF86Dists, DIST_XF86_XDMCF, 0, dmenuFlagCheck },
- { "etc", "Clock setting and diagnostic source codes [70K]",
- DMENU_SET_FLAG, &XF86Dists, DIST_XF86_ETC, 0, dmenuFlagCheck },
- { "doc", "READMEs and release notes [600K]",
- DMENU_SET_FLAG, &XF86Dists, DIST_XF86_DOC, 0, dmenuFlagCheck },
- { "man", "Man pages [1.7MB]",
- DMENU_SET_FLAG, &XF86Dists, DIST_XF86_MAN, 0, dmenuFlagCheck },
- { "ctrb", "Various contributed binaries (ico, xman, etc) [550K]",
- DMENU_SET_FLAG, &XF86Dists, DIST_XF86_CTRB, 0, dmenuFlagCheck },
- { "prog", "Programmer's header and library files [4.1MB]",
- DMENU_SET_FLAG, &XF86Dists, DIST_XF86_PROG, 0, dmenuFlagCheck },
- { "link", "Kit to reconfigure/rebuild X Servers [8.8MB]",
- DMENU_SET_FLAG, &XF86Dists, DIST_XF86_LINK, 0, dmenuFlagCheck },
- { "ubin", "rstart daemon [2K]",
- DMENU_SET_FLAG, &XF86Dists, DIST_XF86_UBIN, 0, dmenuFlagCheck },
- { "pex", "PEX fonts and libs needed by PEX apps [290K]",
- DMENU_SET_FLAG, &XF86Dists, DIST_XF86_PEX, 0, dmenuFlagCheck },
+ "Press F1 to read the XFree86 release notes for FreeBSD",
+ "XF86",
+{ { "bin", "Client applications and shared libs [4.1MB].",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_BIN },
+ { "lib", "Data files needed at runtime [750K]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_LIB },
+ { "xicf", "Customizable xinit runtime configuration file [10K]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_XINIT },
+ { "xdcf", "Customizable xdm runtime configuration file [20K]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_XDMCF },
+ { "etc", "Clock setting and diagnostic source codes [70K]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_ETC },
+ { "doc", "READMEs and release notes [600K]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_DOC },
+ { "man", "Manual pages [1.7MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_MAN },
+ { "ctrb", "Various contributed binaries (ico, xman, etc) [550K]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_CTRB },
+ { "prog", "Programmer's header and library files [4.1MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_PROG },
+ { "link", "Kit to reconfigure/rebuild X Servers [8.8MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_LINK },
+ { "ubin", "rstart daemon [2K]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_UBIN },
+ { "pex", "PEX fonts and libs needed by PEX apps [290K]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_PEX },
{ "sources", "XFree86 3.1.2-S standard + contrib sources [200MB]",
- DMENU_SET_FLAG, &XF86Dists, DIST_XF86_SRC, 0, dmenuFlagCheck },
+ dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_SRC },
{ NULL } },
};
DMenu MenuXF86SelectFonts = {
-DMENU_MULTIPLE_TYPE | DMENU_SELECTION_RETURNS,
-"Font distribution selection.",
-"Please check off the individual font distributions you wish to\n\
+ DMENU_CHECKLIST_TYPE,
+ "Font distribution selection.",
+ "Please check off the individual font distributions you wish to\n\
install. At the minimum, you should install the standard\n\
75 DPI and misc fonts if you're also installing a server\n\
(these are selected by default).",
"Press F1 to read the XFree86 release notes for FreeBSD",
"XF86",
- { { "fnts", "Standard 75 DPI and miscellaneous fonts [3.6MB]",
- DMENU_SET_FLAG, &XF86FontDists, DIST_XF86_FONTS_MISC, 0, dmenuFlagCheck },
- { "f100", "100 DPI fonts [1.8MB]",
- DMENU_SET_FLAG, &XF86FontDists, DIST_XF86_FONTS_100, 0, dmenuFlagCheck },
- { "fcyr", "Cyrillic Fonts [1.8MB]",
- DMENU_SET_FLAG, &XF86FontDists, DIST_XF86_FONTS_CYR, 0, dmenuFlagCheck },
- { "fscl", "Speedo and Type scalable fonts [1.6MB]",
- DMENU_SET_FLAG, &XF86FontDists, DIST_XF86_FONTS_SCALE, 0, dmenuFlagCheck },
- { "non", "Japanese, Chinese and other non-english fonts [3.3MB]",
- DMENU_SET_FLAG, &XF86FontDists, DIST_XF86_FONTS_NON, 0, dmenuFlagCheck },
- { "server", "Font server [0.3MB]",
- DMENU_SET_FLAG, &XF86FontDists, DIST_XF86_FONTS_SERVER, 0, dmenuFlagCheck },
- { NULL } },
+{ { "fnts", "Standard 75 DPI and miscellaneous fonts [3.6MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &XF86FontDists, '[', 'X', ']', DIST_XF86_FONTS_MISC },
+ { "f100", "100 DPI fonts [1.8MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &XF86FontDists, '[', 'X', ']', DIST_XF86_FONTS_100 },
+ { "fcyr", "Cyrillic Fonts [1.8MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &XF86FontDists, '[', 'X', ']', DIST_XF86_FONTS_CYR },
+ { "fscl", "Speedo and Type scalable fonts [1.6MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &XF86FontDists, '[', 'X', ']', DIST_XF86_FONTS_SCALE },
+ { "non", "Japanese, Chinese and other non-english fonts [3.3MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &XF86FontDists, '[', 'X', ']', DIST_XF86_FONTS_NON },
+ { "server", "Font server [0.3MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &XF86FontDists, '[', 'X', ']', DIST_XF86_FONTS_SERVER },
+ { NULL } },
};
DMenu MenuXF86SelectServer = {
- DMENU_MULTIPLE_TYPE | DMENU_SELECTION_RETURNS,
+ DMENU_CHECKLIST_TYPE,
"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\
@@ -612,35 +567,35 @@ it is recommended that try the SVGA or VGA16 servers (the VGA16 and\n\
Mono servers are particularly well-suited to most LCD displays).",
"Press F1 to read the XFree86 release notes for FreeBSD",
"XF86",
- { { "SVGA", "Standard VGA or Super VGA display [2.8MB]",
- DMENU_SET_FLAG, &XF86ServerDists, DIST_XF86_SERVER_SVGA, 0, dmenuFlagCheck },
- { "VGA16", "Standard 16 color VGA display [1.3MB]",
- DMENU_SET_FLAG, &XF86ServerDists, DIST_XF86_SERVER_VGA16, 0, dmenuFlagCheck },
- { "Mono", "Standard Monochrome display [1.3MB]",
- DMENU_SET_FLAG, &XF86ServerDists, DIST_XF86_SERVER_MONO, 0, dmenuFlagCheck },
- { "8514", "8-bit (256 color) IBM 8514 or compatible card [2.2MB]",
- DMENU_SET_FLAG, &XF86ServerDists, DIST_XF86_SERVER_8514, 0, dmenuFlagCheck },
- { "AGX", "8-bit AGX card [2.4MB]",
- DMENU_SET_FLAG, &XF86ServerDists, DIST_XF86_SERVER_AGX, 0, dmenuFlagCheck },
- { "Ma8", "8-bit ATI Mach8 card [2.3MB]",
- DMENU_SET_FLAG, &XF86ServerDists, DIST_XF86_SERVER_MACH8, 0, dmenuFlagCheck },
- { "Ma32", "8 and 16-bit (65K color) for ATI Mach32 card [2.4MB]",
- DMENU_SET_FLAG, &XF86ServerDists, DIST_XF86_SERVER_MACH32, 0, dmenuFlagCheck },
- { "Ma64", "8 and 16-bit (65K color) for ATI Mach64 card [2.5MB]",
- DMENU_SET_FLAG, &XF86ServerDists, DIST_XF86_SERVER_MACH64, 0, dmenuFlagCheck },
- { "P9K", "8, 16, and 24-bit color for Weitek P9000 based boards [2.5MB]",
- DMENU_SET_FLAG, &XF86ServerDists, DIST_XF86_SERVER_P9000, 0, dmenuFlagCheck },
- { "S3", "8, 16 and 24-bit color for S3 based boards [2.7MB]",
- DMENU_SET_FLAG, &XF86ServerDists, DIST_XF86_SERVER_S3, 0, dmenuFlagCheck },
- { "W32", "8-bit Color for ET4000/W32, /W32i and /W32p cards [2.3MB]",
- DMENU_SET_FLAG, &XF86ServerDists, DIST_XF86_SERVER_W32, 0, dmenuFlagCheck },
- { "nest", "A nested server for testing purposes [1.8MB]",
- DMENU_SET_FLAG, &XF86ServerDists, DIST_XF86_SERVER_NEST, 0, dmenuFlagCheck },
- { NULL } },
+{ { "SVGA", "Standard VGA or Super VGA display [2.8MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_SVGA },
+ { "VGA16", "Standard 16 color VGA display [1.3MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_VGA16 },
+ { "Mono", "Standard Monochrome display [1.3MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_MONO },
+ { "8514", "8-bit (256 color) IBM 8514 or compatible card [2.2MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_8514 },
+ { "AGX", "8-bit AGX card [2.4MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_AGX },
+ { "Ma8", "8-bit ATI Mach8 card [2.3MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_MACH8 },
+ { "Ma32", "8 and 16-bit (65K color) for ATI Mach32 card [2.4MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_MACH32 },
+ { "Ma64", "8 and 16-bit (65K color) for ATI Mach64 card [2.5MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_MACH64 },
+ { "P9K", "8, 16, and 24-bit color for Weitek P9000 based boards [2.5MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_P9000 },
+ { "S3", "8, 16 and 24-bit color for S3 based boards [2.7MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_S3 },
+ { "W32", "8-bit Color for ET4000/W32, /W32i and /W32p cards [2.3MB]",
+ 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 },
+ { NULL } },
};
DMenu MenuDiskDevices = {
- DMENU_MULTIPLE_TYPE | DMENU_SELECTION_RETURNS,
+ DMENU_CHECKLIST_TYPE,
"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\
@@ -654,22 +609,18 @@ and press [SPACE].",
};
DMenu MenuHTMLDoc = {
- DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
+ DMENU_NORMAL_TYPE,
"Select HTML Documentation pointer",
"Please select the body of documentation you're interested in, the main\n\
ones right now being the FAQ and the Handbook. You can also chose \"other\"\n\
to enter an arbitrary URL for browsing.",
"Press F1 for more help on what you see here.",
"html",
- { { "Handbook", "The FreeBSD Handbook.",
- DMENU_CALL, docShowDocument, 0, 0 },
- { "FAQ", "The Frequently Asked Questions guide.",
- DMENU_CALL, docShowDocument, 0, 0 },
- { "Home", "The Home Pages for the FreeBSD Project (requires net)",
- DMENU_CALL, docShowDocument, 0, 0 },
- { "Other", "Enter a URL.",
- DMENU_CALL, docShowDocument, 0, 0 },
- { NULL } },
+{ { "Handbook", "The FreeBSD Handbook.", NULL, docShowDocument },
+ { "FAQ", "The Frequently Asked Questions guide.", NULL, docShowDocument },
+ { "Home", "The Home Pages for the FreeBSD Project (requires net)", NULL, docShowDocument },
+ { "Other", "Enter a URL.", NULL, docShowDocument },
+ { NULL } },
};
/* The main installation menu */
@@ -681,31 +632,23 @@ details on the type of distribution you wish to have, where you wish\n\
to install it from and how you wish to allocate disk storage to FreeBSD.",
"Press F1 to read the installation guide",
"install",
- { { "Options", "Go to Options editor",
- DMENU_CALL, optionsEditor, 0, 0 },
- { "Partition", "Allocate disk space for FreeBSD",
- DMENU_CALL, diskPartitionEditor, 0, 0 },
- { "Label", "Label allocated disk partitions",
- DMENU_CALL, diskLabelEditor, 0, 0 },
- { "Distributions", "Select distribution(s) to extract",
- DMENU_SUBMENU, &MenuDistributions, 0, 0 },
- { "Media", "Choose the installation media type",
- DMENU_SUBMENU, &MenuMedia, 0, 0 },
- { "Commit", "Perform any pending Partition/Label/Extract actions",
- DMENU_CALL, installCommit, 0, 0 },
- { "Extract", "Just do distribution extract step",
- DMENU_CALL, distExtractAll, 0, 0 },
- { "Exit", "Exit this menu (returning to previous)",
- DMENU_CANCEL, NULL, 0, 0 },
- { NULL } },
+{ { "Options", "Go to Options editor", NULL, optionsEditor },
+ { "Partition", "Allocate disk space for FreeBSD", NULL, diskPartitionEditor },
+ { "Label", "Label allocated disk partitions", NULL, diskLabelEditor },
+ { "Distributions", "Select distribution(s) to extract", NULL, dmenuSubmenu, NULL, &MenuDistributions },
+ { "Media", "Choose the installation media type", NULL, dmenuSubmenu, NULL, &MenuMedia },
+ { "Commit", "Perform any pending Partition/Label/Extract actions", NULL, installCommit },
+ { "Extract", "Just do distribution extract step", NULL, distExtractAll },
+ { "Exit", "Exit this menu (returning to previous)", NULL, dmenuCancel },
+ { NULL } },
};
/* MBR type menu */
DMenu MenuMBRType = {
- DMENU_RADIO_TYPE | DMENU_SELECTION_RETURNS,
+ DMENU_RADIO_TYPE,
"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"
+ "select between FreeBSD and any other operating systems on your machine\n"
"at boot time. If you have more than one drive and want to boot\n"
"from the second one, the boot selector will also make it possible\n"
"to do so (limitations in the PC BIOS usually prevent this otherwise).\n"
@@ -715,221 +658,199 @@ DMenu MenuMBRType = {
"will almost certainly NOT want to select one!",
"Press F1 to read the installation guide",
"install",
- { { "BootMgr", "Install the FreeBSD Boot Manager (\"Booteasy\")",
- DMENU_SET_VALUE, &BootMgr, 0, 0, dmenuRadioCheck },
- { "Standard", "Install a standard MBR (no boot manager)",
- DMENU_SET_VALUE, &BootMgr, 1, 0, dmenuRadioCheck },
- { "None", "Leave the Master Boot Record untouched",
- DMENU_SET_VALUE, &BootMgr, 2, 0, dmenuRadioCheck },
- { NULL } },
+{ { "BootMgr", "Install the FreeBSD Boot Manager (\"Booteasy\")",
+ dmenuRadioCheck, dmenuSetValue, NULL, &BootMgr },
+ { "Standard", "Install a standard MBR (no boot manager)",
+ dmenuRadioCheck, dmenuSetValue, NULL, &BootMgr, '[', '*', ']', 1 },
+ { "None", "Leave the Master Boot Record untouched",
+ dmenuRadioCheck, dmenuSetValue, NULL, &BootMgr, '[', '*', ']', 2 },
+ { NULL } },
};
/* Final configuration menu */
DMenu MenuConfigure = {
DMENU_NORMAL_TYPE,
"FreeBSD Configuration Menu", /* title */
-"If you've already installed FreeBSD, you may use this menu to customize\n\
+ "If you've already installed FreeBSD, you may use this menu to customize\n\
it somewhat to suit your particular configuration. Most importantly,\n\
you can use the Packages utility to load extra \"3rd party\"\n\
software not provided in the base distributions.",
"Press F1 for more information on these options",
"configure",
- { { "Add User", "Add users to the system",
- DMENU_SYSTEM_COMMAND, "adduser -config_create ; adduser -s", 0, 0 },
- { "Console", "Customize system console behavior",
- DMENU_SUBMENU, &MenuSyscons, 0, 0 },
- { "Time Zone", "Set which time zone you're in",
- DMENU_SYSTEM_COMMAND, "rm -f /etc/wall_cmos_clock /etc/localtime; tzsetup", 0, 0 },
- { "Media", "Change the installation media type",
- DMENU_SUBMENU, &MenuMedia, 0, 0 },
- { "Mouse", "Select the type of mouse you have",
- DMENU_SUBMENU, &MenuMouse, 0, 0 },
- { "Networking", "Configure additional network services",
- DMENU_SUBMENU, &MenuNetworking, 0, 0 },
- { "Options", "Go to options editor.",
- DMENU_CALL, optionsEditor, 0, 0 },
- { "Packages", "Install pre-packaged software for FreeBSD",
- DMENU_CALL, configPackages, 0, 0 },
- { "Ports", "Link to FreeBSD Ports Collection on CD/NFS",
- DMENU_CALL, configPorts, 0, 1 },
- { "Root Password", "Set the system manager's password",
- DMENU_SYSTEM_COMMAND, "passwd root", 0, 0 },
- { "HTML Docs", "Go to the HTML documentation menu (post-install).",
- DMENU_CALL, docBrowser, 0, 0 },
- { "XFree86", "Configure XFree86 (if installed)",
- DMENU_SYSTEM_COMMAND, "/usr/X11R6/bin/xf86config", 0, 0 },
- { "Exit", "Exit this menu (returning to previous)",
- DMENU_CANCEL, NULL, 0, 0 },
- { NULL } },
+{ { "Add User", "Add users to the system",
+ NULL, dmenuSystemCommand, NULL, "adduser -config_create ; adduser -s" },
+ { "Console", "Customize system console behavior",
+ NULL, dmenuSubmenu, NULL, &MenuSyscons },
+ { "Time Zone", "Set which time zone you're in",
+ NULL, dmenuSystemCommand, NULL, "rm -f /etc/wall_cmos_clock /etc/localtime; tzsetup" },
+ { "Media", "Change the installation media type",
+ NULL, dmenuSubmenu, NULL, &MenuMedia },
+ { "Mouse", "Select the type of mouse you have",
+ NULL, dmenuSubmenu, NULL, &MenuMouse, NULL },
+ { "Networking", "Configure additional network services",
+ NULL, dmenuSubmenu, NULL, &MenuNetworking },
+ { "Options", "Go to options editor",
+ NULL, optionsEditor },
+ { "Packages", "Install pre-packaged software for FreeBSD",
+ NULL, configPackages },
+ { "Ports", "Link to FreeBSD Ports Collection on CD/NFS",
+ NULL, configPorts },
+ { "Root Password", "Set the system manager's password",
+ NULL, dmenuSystemCommand, NULL, "passwd root" },
+ { "HTML Docs", "Go to the HTML documentation menu (post-install)",
+ NULL, docBrowser },
+ { "XFree86", "Configure XFree86",
+ NULL, configXFree86 },
+ { "Exit", "Exit this menu (returning to previous)",
+ NULL, dmenuCancel },
+ { NULL } },
};
DMenu MenuNetworking = {
- DMENU_NORMAL_TYPE,
+ DMENU_CHECKLIST_TYPE,
"Network Services Menu",
-"You may have already configured one network device (and the other\n\
+ "You may have already configured one network device (and the other\n\
various hostname/gateway/name server parameters) in the process\n\
of installing FreeBSD. This menu allows you to configure other\n\
aspects of your system's network configuration.",
NULL,
NULL,
-{ { "Interfaces", "Configure additional network interfaces",
- DMENU_CALL, tcpMenuSelect, 0, 0 },
- { "NFS client", "This machine will be an NFS client",
- DMENU_SET_VARIABLE, "nfs_client=YES", 0, 0, 0 },
- { "NFS server", "This machine will be an NFS server",
- DMENU_CALL, configNFSServer, 0, 0, 0 },
- { "Gateway", "This machine will route packets between interfaces",
- DMENU_SET_VARIABLE, "gateway=YES", 0, 0, 0 },
- { "Gated", "This machine wants to run gated",
- DMENU_CALL, configGated, 0, 0, 0 },
- { "Ntpdate", "Select a clock-syncronization server",
- DMENU_SUBMENU, &MenuNTP, (int)"ntpdate", 0, dmenuVarCheck },
- { "Routed", "Set flags for routed (default: -q)",
- DMENU_CALL, configRoutedFlags, (int)"routed", 0, dmenuVarCheck },
- { "Rwhod", "This machine wants to run the rwho daemon",
- DMENU_SET_VARIABLE, "rwhod=YES", 0, 0, dmenuVarCheck },
- { "Anon FTP", "This machine wishes to allow anonymous FTP.",
- DMENU_CALL, configAnonFTP, 0, 0, 0 },
- { "WEB Server", "This machine wishes to be a WWW server.",
- DMENU_CALL, configApache, 0, 0, 0 },
- { "Samba", "Install Samba for LanManager (NETBUI) access.",
- DMENU_CALL, configSamba, 0, 0, 0 },
- { "PCNFSD", "Run authentication server for clients with PC-NFS.",
- DMENU_CALL, configPCNFSD, 0, 0, 0 },
+{ { "Interfaces", "Configure additional network interfaces",
+ NULL, tcpMenuSelect },
+ { "NFS client", "This machine will be an NFS client",
+ dmenuVarCheck, dmenuSetVariable, NULL, "nfs_client=YES" },
+ { "NFS server", "This machine will be an NFS server",
+ NULL, configNFSServer },
+ { "Gateway", "This machine will route packets between interfaces",
+ dmenuVarCheck, dmenuSetVariable, NULL, "gateway=YES" },
+ { "Gated", "This machine wants to run gated instead of routed",
+ NULL, configGated },
+ { "Ntpdate", "Select a clock-syncronization server",
+ dmenuVarCheck, dmenuSubmenu, NULL, &MenuNTP, '[', 'X', ']', (int)"ntpdate" },
+ { "Routed", "Set flags for routed (default: -q)",
+ dmenuVarCheck, configRoutedFlags, NULL, "routed" },
+ { "Rwhod", "This machine wants to run the rwho daemon",
+ dmenuVarCheck, dmenuSetVariable, NULL, "rwhod=YES" },
+ { "Anon FTP", "This machine wishes to allow anonymous FTP.",
+ NULL, configAnonFTP },
+ { "WEB Server", "This machine wishes to be a WWW server.",
+ NULL, configApache },
+ { "Samba", "Install Samba for LanManager (NETBUI) access.",
+ NULL, configSamba },
+ { "PCNFSD", "Run authentication server for clients with PC-NFS.",
+ NULL, configPCNFSD },
{ NULL } },
};
DMenu MenuNTP = {
-DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
-"NTPDATE Server Selection",
-"There are a number of time syncronization servers available\n\
+ DMENU_RADIO_TYPE,
+ "NTPDATE Server Selection",
+ "There are a number of time syncronization servers available\n\
for public use around the Internet. Please select one reasonably\n\
close to you to have your system time syncronized accordingly.",
-"These are the primary open-access NTP servers",
-NULL,
-{ { "Other", "Select a site not on this list",
- DMENU_CALL, configNTP, 0, 0 },
+ "These are the primary open-access NTP servers",
+ NULL,
+{ { "Other", "Select a site not on this list",
+ NULL, configNTP },
{ "Australia", "ntp.syd.dms.csiro.au (HP 5061 Cesium Beam)",
- DMENU_SET_VARIABLE, "ntpdate=ntp.syd.dms.csiro.au", 0, 0 },
- { "Canada", "tick.usask.ca (GOES clock)",
- DMENU_SET_VARIABLE, "ntpdate=tick.usask.ca", 0, 0 },
- { "France", "canon.inria.fr (TDF clock)",
- DMENU_SET_VARIABLE, "ntpdate=canon.inria.fr", 0, 0 },
- { "Germany", "ntps1-{0,1,2}.uni-erlangen.de (GPS)",
- DMENU_SET_VARIABLE, "ntpdate=ntps1-0.uni-erlangen.de", 0, 0 },
+ dmenuVarCheck, dmenuSetVariable, NULL, "ntpdate=ntp.syd.dms.csiro.au" },
+ { "Canada", "tick.usask.ca (GOES clock)",
+ dmenuVarCheck, dmenuSetVariable, NULL, "ntpdate=tick.usask.ca" },
+ { "France", "canon.inria.fr (TDF clock)",
+ dmenuVarCheck, dmenuSetVariable, NULL, "ntpdate=canon.inria.fr" },
+ { "Germany", "ntps1-{0,1,2}.uni-erlangen.de (GPS)",
+ dmenuVarCheck, dmenuSetVariable, NULL, "ntpdate=ntps1-0.uni-erlangen.de" },
{ "Germany #2", "ntps1-0.cs.tu-berlin.de (GPS)",
- DMENU_SET_VARIABLE, "ntpdate=ntps1-0.cs.tu-berlin.de", 0, 0 },
- { "Japan", "clock.nc.fukuoka-u.ac.jp (GPS clock)",
- DMENU_SET_VARIABLE, "ntpdate=clock.nc.fukuoka-u.ac.jp", 0, 0},
- { "Japan #2", "clock.tl.fukuoka-u.ac.jp (GPS clock)",
- DMENU_SET_VARIABLE, "ntpdate=clock.tl.fukuoka-u.ac.jp", 0, 0},
+ dmenuVarCheck, dmenuSetVariable, NULL, "ntpdate=ntps1-0.cs.tu-berlin.de" },
+ { "Japan", "clock.nc.fukuoka-u.ac.jp (GPS clock)",
+ dmenuVarCheck, dmenuSetVariable, NULL, "ntpdate=clock.nc.fukuoka-u.ac.jp" },
+ { "Japan #2", "clock.tl.fukuoka-u.ac.jp (GPS clock)",
+ dmenuVarCheck, dmenuSetVariable, NULL, "ntpdate=clock.tl.fukuoka-u.ac.jp" },
{ "Netherlands", "ntp0.nl.net (GPS clock)",
- DMENU_SET_VARIABLE, "ntpdate=ntp0.nl.net", 0, 0 },
- { "Norway", "timer.unik.no (NTP clock)",
- DMENU_SET_VARIABLE, "ntpdate=timer.unik.no", 0, 0 },
- { "Sweden", "Time1.Stupi.SE (Cesium/GPS)",
- DMENU_SET_VARIABLE, "ntpdate=Time1.Stupi.SE", 0, 0 },
+ dmenuVarCheck, dmenuSetVariable, NULL, "ntpdate=ntp0.nl.net" },
+ { "Norway", "timer.unik.no (NTP clock)",
+ dmenuVarCheck, dmenuSetVariable, NULL, "ntpdate=timer.unik.no" },
+ { "Sweden", "Time1.Stupi.SE (Cesium/GPS)",
+ dmenuVarCheck, dmenuSetVariable, NULL, "ntpdate=Time1.Stupi.SE" },
{ "Switzerland", "swisstime.ethz.ch (DCF77 clock)",
- DMENU_SET_VARIABLE, "ntpdate=swisstime.ethz.ch", 0, 0 },
- { "U.S. East Coast", "bitsy.mit.edu (WWV clock)",
- DMENU_SET_VARIABLE, "ntpdate=bitsy.mit.edu", 0, 0 },
+ dmenuVarCheck, dmenuSetVariable, NULL, "ntpdate=swisstime.ethz.ch" },
+ { "U.S. East Coast", "bitsy.mit.edu (WWV clock)",
+ dmenuVarCheck, dmenuSetVariable, NULL, "ntpdate=bitsy.mit.edu" },
{ "U.S. East Coast #2", "otc1.psu.edu (WWV clock)",
- DMENU_SET_VARIABLE, "ntpdate=otc1.psu.edu", 0, 0 },
- { "U.S. West Coast", "apple.com (WWV clock)",
- DMENU_SET_VARIABLE, "ntpdate=apple.com", 0, 0 },
+ dmenuVarCheck, dmenuSetVariable, NULL, "ntpdate=otc1.psu.edu" },
+ { "U.S. West Coast", "apple.com (WWV clock)",
+ dmenuVarCheck, dmenuSetVariable, NULL, "ntpdate=apple.com" },
{ "U.S. West Coast #2", "clepsydra.dec.com (GOES clock)",
- DMENU_SET_VARIABLE, "ntpdate=clepsydra.dec.com", 0, 0 },
+ dmenuVarCheck, dmenuSetVariable, NULL, "ntpdate=clepsydra.dec.com" },
{ "U.S. West Coast #3", "clock.llnl.gov (WWVB clock)",
- DMENU_SET_VARIABLE, "ntpdate=clock.llnl.gov", 0, 0 },
+ dmenuVarCheck, dmenuSetVariable, NULL, "ntpdate=clock.llnl.gov" },
{ "U.S. Midwest", "ncar.ucar.edu (WWVB clock)",
- DMENU_SET_VARIABLE, "ntpdate=ncar.ucar.edu", 0, 0 },
+ dmenuVarCheck, dmenuSetVariable, NULL, "ntpdate=ncar.ucar.edu" },
{ "U.S. Pacific", "chantry.hawaii.net (WWV/H clock)",
- DMENU_SET_VARIABLE, "ntpdate=chantry.hawaii.net", 0, 0 },
- { "U.S. Southwest", "shorty.chpc.utexas.edu (WWV clock)",
- DMENU_SET_VARIABLE, "ntpdate=shorty.chpc.utexas.edu", 0, 0 },
+ dmenuVarCheck, dmenuSetVariable, NULL, "ntpdate=chantry.hawaii.net" },
+ { "U.S. Southwest", "shorty.chpc.utexas.edu (WWV clock)",
+ dmenuVarCheck, dmenuSetVariable, NULL, "ntpdate=shorty.chpc.utexas.edu" },
{ NULL } },
};
DMenu MenuSyscons = {
-DMENU_NORMAL_TYPE,
-"System Console Configuration",
-"The default system console driver for FreeBSD (syscons) has a\n\
+ DMENU_NORMAL_TYPE,
+ "System Console Configuration",
+ "The default system console driver for FreeBSD (syscons) has a\n\
number of configuration options which may be set according to\n\
your preference.\n\n\
When you are done setting configuration options, select Cancel.",
-"Configure your system console settings",
-NULL,
-{ { "Keymap", "Choose an alternate keyboard map",
- DMENU_SUBMENU, &MenuSysconsKeymap, 0, 0 },
- { "Repeat", "Set the rate at which keys repeat",
- DMENU_SUBMENU, &MenuSysconsKeyrate, 0, 0 },
- { "Saver", "Configure the screen saver",
- DMENU_SUBMENU, &MenuSysconsSaver, 0, 0 },
- { "Exit", "Exit this menu (returning to previous)",
- DMENU_CANCEL, NULL, 0, 0 },
+ "Configure your system console settings",
+ NULL,
+{ { "Keymap", "Choose an alternate keyboard map", NULL, dmenuSubmenu, NULL, &MenuSysconsKeymap },
+ { "Repeat", "Set the rate at which keys repeat", NULL, dmenuSubmenu, NULL, &MenuSysconsKeyrate },
+ { "Saver", "Configure the screen saver", NULL, dmenuSubmenu, NULL, &MenuSysconsSaver },
+ { "Exit", "Exit this menu (returning to previous)", NULL, dmenuCancel },
{ NULL } },
};
DMenu MenuSysconsKeymap = {
-DMENU_RADIO_TYPE | DMENU_SELECTION_RETURNS,
-"System Console Keymap",
-"The default system console driver for FreeBSD (syscons) defaults\n\
+ DMENU_RADIO_TYPE,
+ "System Console Keymap",
+ "The default system console driver for FreeBSD (syscons) defaults\n\
to a standard \"American\" keyboard map. Users in other countries\n\
(or with different keyboard preferences) may wish to choose one of\n\
the other keymaps below.",
"Choose a keyboard map",
NULL,
- { { "Danish CP865", "Danish Code Page 865 keymap",
- DMENU_SET_VARIABLE, "keymap=danish.cp865", 0, 0, dmenuVarCheck },
- { "Danish ISO", "Danish ISO keymap",
- DMENU_SET_VARIABLE, "keymap=danish.iso", 0, 0, dmenuVarCheck },
- { "French ISO", "French ISO keymap",
- DMENU_SET_VARIABLE, "keymap=fr.iso", 0, 0, dmenuVarCheck },
- { "German CP850", "German Code Page 850 keymap",
- DMENU_SET_VARIABLE, "keymap=german.cp850", 0, 0, dmenuVarCheck },
- { "German ISO", "German ISO keymap",
- DMENU_SET_VARIABLE, "keymap=german.iso", 0, 0, dmenuVarCheck },
- { "Japanese 106", "Japanese 106 keymap",
- DMENU_SET_VARIABLE, "keymap=jp.106", 0, 0, dmenuVarCheck },
- { "Russian CP866", "Russian Code Page 866 keymap",
- DMENU_SET_VARIABLE, "keymap=ru.cp866", 0, 0, dmenuVarCheck },
- { "Russian KOI8", "Russian koi8 keymap",
- DMENU_SET_VARIABLE, "keymap=ru.koi8-r", 0, 0, dmenuVarCheck },
- { "Russian s-KOI8", "Russian shifted koi8 keymap",
- DMENU_SET_VARIABLE, "keymap=ru.koi8-r.shift", 0, 0, dmenuVarCheck },
- { "Swedish CP850", "Swedish Code Page 850 keymap",
- DMENU_SET_VARIABLE, "keymap=swedish.cp850", 0, 0, dmenuVarCheck },
- { "Swedish ISO", "Swedish ISO keymap",
- DMENU_SET_VARIABLE, "keymap=swedish.iso", 0, 0, dmenuVarCheck },
- { "U.K. CP850", "United Kingdom Code Page 850 keymap",
- DMENU_SET_VARIABLE, "keymap=uk.cp850", 0, 0, dmenuVarCheck },
- { "U.K. ISO", "United Kingdom ISO keymap",
- DMENU_SET_VARIABLE, "keymap=uk.iso", 0, 0, dmenuVarCheck },
- { "U.S. ISO", "United States ISO keymap",
- DMENU_SET_VARIABLE, "keymap=us.iso", 0, 0, dmenuVarCheck },
- { NULL } },
+{ { "Danish CP865", "Danish Code Page 865 keymap", dmenuVarCheck, dmenuSetVariable, NULL, "keymap=danish.cp865" },
+ { "Danish ISO", "Danish ISO keymap", dmenuVarCheck, dmenuSetVariable, NULL, "keymap=danish.iso" },
+ { "French ISO", "French ISO keymap", dmenuVarCheck, dmenuSetVariable, NULL, "keymap=fr.iso" },
+ { "German CP850", "German Code Page 850 keymap", dmenuVarCheck, dmenuSetVariable, NULL, "keymap=german.cp850" },
+ { "German ISO", "German ISO keymap", dmenuVarCheck, dmenuSetVariable, NULL, "keymap=german.iso" },
+ { "Japanese 106", "Japanese 106 keymap", dmenuVarCheck, dmenuSetVariable, NULL, "keymap=jp.106" },
+ { "Russian CP866", "Russian Code Page 866 keymap", dmenuVarCheck, dmenuSetVariable, NULL, "keymap=ru.cp866" },
+ { "Russian KOI8", "Russian koi8 keymap", dmenuVarCheck, dmenuSetVariable, NULL, "keymap=ru.koi8-r" },
+ { "Russian s-KOI8", "Russian shifted koi8 keymap", dmenuVarCheck, dmenuSetVariable, NULL, "keymap=ru.koi8-r.shift" },
+ { "Swedish CP850", "Swedish Code Page 850 keymap", dmenuVarCheck, dmenuSetVariable, NULL, "keymap=swedish.cp850" },
+ { "Swedish ISO", "Swedish ISO keymap", dmenuVarCheck, dmenuSetVariable, NULL, "keymap=swedish.iso" },
+ { "U.K. CP850", "United Kingdom Code Page 850 keymap", dmenuVarCheck, dmenuSetVariable, NULL, "keymap=uk.cp850" },
+ { "U.K. ISO", "United Kingdom ISO keymap", dmenuVarCheck, dmenuSetVariable, NULL, "keymap=uk.iso" },
+ { "U.S. ISO", "United States ISO keymap", dmenuVarCheck, dmenuSetVariable, NULL, "keymap=us.iso" },
+ { NULL } },
};
DMenu MenuSysconsKeyrate = {
- DMENU_RADIO_TYPE | DMENU_SELECTION_RETURNS,
+ DMENU_RADIO_TYPE,
"System Console Keyboard Repeat Rate",
"This menu allows you to set the speed at which keys repeat\n\
when held down.",
"Choose a keyboard repeat rate",
NULL,
- { { "Slow", "Slow keyboard repeat rate",
- DMENU_SET_VARIABLE, "keyrate=slow", 0, 0, dmenuVarCheck },
- { "Normal", "\"Normal\" keyboard repeat rate",
- DMENU_SET_VARIABLE, "keyrate=normal", 0, 0, dmenuVarCheck },
- { "Fast", "Fast keyboard repeat rate",
- DMENU_SET_VARIABLE, "keyrate=fast", 0, 0, dmenuVarCheck },
- { "Default", "Use default keyboard repeat rate",
- DMENU_SET_VARIABLE, "keyrate=NO", 0, 0, dmenuVarCheck },
- { NULL } },
+{ { "Slow", "Slow keyboard repeat rate", dmenuVarCheck, dmenuSetVariable, NULL, "keyrate=slow" },
+ { "Normal", "\"Normal\" keyboard repeat rate", dmenuVarCheck, dmenuSetVariable, NULL, "keyrate=normal" },
+ { "Fast", "Fast keyboard repeat rate", dmenuVarCheck, dmenuSetVariable, NULL, "keyrate=fast" },
+ { "Default", "Use default keyboard repeat rate", dmenuVarCheck, dmenuSetVariable, NULL, "keyrate=NO" },
+ { NULL } },
};
DMenu MenuSysconsSaver = {
- DMENU_MULTIPLE_TYPE | DMENU_SELECTION_RETURNS,
+ DMENU_RADIO_TYPE,
"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\
@@ -937,15 +858,15 @@ monitor switched on and idle for long periods of time then you should\n\
probably enable one of these screen savers to prevent phosphor burn-in.",
"Choose a nifty-looking screen saver",
NULL,
-{ { "blank", "Simply blank the screen",
- DMENU_SET_VARIABLE, "saver=blank", 0, 0, dmenuVarCheck },
- { "Green", "\"Green\" power saving mode (if supported by monitor)",
- DMENU_SET_VARIABLE, "saver=green", 0, 0, dmenuVarCheck },
- { "Snake", "Draw a FreeBSD \"snake\" on your screen",
- DMENU_SET_VARIABLE, "saver=snake", 0, 0, dmenuVarCheck },
- { "Star", "A \"twinkling stars\" effect",
- DMENU_SET_VARIABLE, "saver=star", 0, 0, dmenuVarCheck },
- { "Timeout", "Set the screen saver timeout interval",
- DMENU_CALL, configSaverTimeout, (int)"blanktime", 0, dmenuVarCheck },
+{ { "blank", "Simply blank the screen",
+ dmenuVarCheck, dmenuSetVariable, NULL, "saver=blank" },
+ { "Green", "\"Green\" power saving mode (if supported by monitor)",
+ dmenuVarCheck, dmenuSetVariable, NULL, "saver=green" },
+ { "Snake", "Draw a FreeBSD \"snake\" on your screen",
+ dmenuVarCheck, dmenuSetVariable, NULL, "saver=snake" },
+ { "Star", "A \"twinkling stars\" effect",
+ dmenuVarCheck, dmenuSetVariable, NULL, "saver=star" },
+ { "Timeout", "Set the screen saver timeout interval",
+ dmenuVarCheck, configSaverTimeout, NULL, "blanktime", ' ', ' ', ' ' },
{ NULL } },
};
diff --git a/usr.sbin/sade/sade.h b/usr.sbin/sade/sade.h
index 9a91d87..c420f40 100644
--- a/usr.sbin/sade/sade.h
+++ b/usr.sbin/sade/sade.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.47 1996/03/21 09:30:15 jkh Exp $
+ * $Id: sysinstall.h,v 1.48 1996/03/23 07:21:31 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -57,14 +57,6 @@
/*** Defines ***/
-/* Bitfields for menu options */
-#define DMENU_NORMAL_TYPE 0x1 /* Normal dialog menu */
-#define DMENU_RADIO_TYPE 0x2 /* Radio dialog menu */
-#define DMENU_MULTIPLE_TYPE 0x4 /* Multiple choice menu */
-
-/* XXX This goes away soon XXX */
-#define DMENU_SELECTION_RETURNS 0x8 /* Immediate return on item selection */
-
/* variable limits */
#define VAR_NAME_MAX 128
#define VAR_VALUE_MAX 1024
@@ -153,36 +145,15 @@ typedef unsigned int Boolean;
typedef struct disk Disk;
typedef struct chunk Chunk;
-typedef enum {
- DMENU_DISPLAY_FILE, /* Display a file's contents */
- DMENU_SUBMENU, /* Recurse into another menu */
- DMENU_SYSTEM_COMMAND, /* Run shell commmand */
- DMENU_SYSTEM_COMMAND_BOX, /* Same as above, but in prgbox */
- DMENU_SET_VARIABLE, /* Set an environment/system var */
- DMENU_SET_FLAG, /* Set flag in an unsigned int */
- DMENU_SET_VALUE, /* Set unsigned int to value */
- DMENU_CALL, /* Call back a C function */
- DMENU_CANCEL, /* Cancel out of this menu */
- DMENU_NOP, /* Do nothing special for item */
-} DMenuItemType;
-
-typedef struct _dmenuItem {
- char *title; /* Our title */
- char *prompt; /* Our prompt */
- DMenuItemType type; /* What type of item we are */
- void *ptr; /* Generic data ptr */
- int parm; /* Parameter for above */
- Boolean disabled; /* Are we temporarily disabled? */
- char * (*check)(struct _dmenuItem *); /* Our state */
-} DMenuItem;
+typedef enum { DMENU_NORMAL_TYPE, DMENU_RADIO_TYPE, DMENU_CHECKLIST_TYPE } dmenuType;
typedef struct _dmenu {
- unsigned int options; /* What sort of menu we are */
+ dmenuType type; /* What sort of menu we are */
char *title; /* Our title */
char *prompt; /* Our prompt */
char *helpline; /* Line of help at bottom */
char *helpfile; /* Help file for "F1" */
- DMenuItem items[0]; /* Array of menu items */
+ dialogMenuItem items[0]; /* Array of menu items */
} DMenu;
/* A sysconfig variable */
@@ -358,10 +329,10 @@ extern DMenu MenuHTMLDoc; /* HTML Documentation menu */
/*** Prototypes ***/
/* apache.c */
-extern int configApache(char *str);
+extern int configApache(dialogMenuItem *self);
/* anonFTP.c */
-extern int configAnonFTP(char *unused);
+extern int configAnonFTP(dialogMenuItem *self);
/* attrs.c */
extern char *attr_match(Attribs *attr, char *name);
@@ -384,20 +355,16 @@ extern void command_func_add(char *key, commandFunc func, void *data);
extern int configFstab(void);
extern void configSysconfig(void);
extern void configResolv(void);
-extern int configPorts(char *str);
-extern int configPackages(char *str);
-extern int configSaverTimeout(char *str);
-extern int configNTP(char *str);
-extern int configRoutedFlags(char *str);
+extern int configPorts(dialogMenuItem *self);
+extern int configPackages(dialogMenuItem *self);
+extern int configSaverTimeout(dialogMenuItem *self);
+extern int configNTP(dialogMenuItem *self);
+extern int configXFree86(dialogMenuItem *self);
+extern int configRoutedFlags(dialogMenuItem *self);
/* crc.c */
extern int crc(int, unsigned long *, unsigned long *);
-/* decode.c */
-extern DMenuItem *decode(DMenu *menu, char *name);
-extern int dispatch(DMenuItem *tmp, char *name);
-extern int decode_and_dispatch_multiple(DMenu *menu, char *names);
-
/* devices.c */
extern DMenu *deviceCreateMenu(DMenu *menu, DeviceType type, int (*hook)());
extern void deviceGetAll(void);
@@ -414,34 +381,42 @@ extern Boolean dummyClose(Device *dev, int fd);
extern void dummyShutdown(Device *dev);
/* disks.c */
-extern int diskPartitionEditor(char *unused);
-extern int diskPartitionWrite(char *unused);
+extern int diskPartitionEditor(dialogMenuItem *self);
+extern int diskPartitionWrite(dialogMenuItem *self);
/* dist.c */
-extern int distReset(char *str);
extern int distSetCustom(char *str);
-extern int distSetDeveloper(char *str);
-extern int distSetXDeveloper(char *str);
-extern int distSetKernDeveloper(char *str);
-extern int distSetUser(char *str);
-extern int distSetXUser(char *str);
-extern int distSetMinimum(char *str);
-extern int distSetEverything(char *str);
-extern int distSetDES(char *str);
-extern int distSetSrc(char *str);
-extern int distSetXF86(char *str);
-extern int distExtractAll(char *str);
+extern int distReset(dialogMenuItem *self);
+extern int distSetDeveloper(dialogMenuItem *self);
+extern int distSetXDeveloper(dialogMenuItem *self);
+extern int distSetKernDeveloper(dialogMenuItem *self);
+extern int distSetUser(dialogMenuItem *self);
+extern int distSetXUser(dialogMenuItem *self);
+extern int distSetMinimum(dialogMenuItem *self);
+extern int distSetEverything(dialogMenuItem *self);
+extern int distSetDES(dialogMenuItem *self);
+extern int distSetSrc(dialogMenuItem *self);
+extern int distSetXF86(dialogMenuItem *self);
+extern int distExtractAll(dialogMenuItem *self);
/* dmenu.c */
+extern int dmenuDisplayFile(dialogMenuItem *tmp);
+extern int dmenuSubmenu(dialogMenuItem *tmp);
+extern int dmenuSystemCommand(dialogMenuItem *tmp);
+extern int dmenuSystemCommandBox(dialogMenuItem *tmp);
+extern int dmenuCancel(dialogMenuItem *tmp);
+extern int dmenuSetVariable(dialogMenuItem *tmp);
+extern int dmenuSetFlag(dialogMenuItem *tmp);
+extern int dmenuSetValue(dialogMenuItem *tmp);
extern Boolean dmenuOpen(DMenu *menu, int *choice, int *scroll, int *curr, int *max);
extern Boolean dmenuOpenSimple(DMenu *menu);
-extern char *dmenuVarCheck(DMenuItem *item);
-extern char *dmenuFlagCheck(DMenuItem *item);
-extern char *dmenuRadioCheck(DMenuItem *item);
+extern int dmenuVarCheck(dialogMenuItem *item);
+extern int dmenuFlagCheck(dialogMenuItem *item);
+extern int dmenuRadioCheck(dialogMenuItem *item);
/* doc.c */
-extern int docBrowser(char *junk);
-extern int docShowDocument(char *str);
+extern int docBrowser(dialogMenuItem *self);
+extern int docShowDocument(dialogMenuItem *self);
/* dos.c */
extern Boolean mediaInitDOS(Device *dev);
@@ -474,27 +449,26 @@ void index_print(PkgNodePtr top, int level);
int index_extract(Device *dev, PkgNodePtr top, PkgNodePtr plist);
/* install.c */
-extern int installCommit(char *str);
-extern int installExpress(char *str);
-extern int installNovice(char *str);
-extern int installFixit(char *str);
-extern int installFixup(char *str);
-extern int installUpgrade(char *str);
-extern int installPreconfig(char *str);
-extern int installFilesystems(char *str);
-extern int installVarDefaults(char *str);
+extern int installCommit(dialogMenuItem *self);
+extern int installExpress(dialogMenuItem *self);
+extern int installNovice(dialogMenuItem *self);
+extern int installFixit(dialogMenuItem *self);
+extern int installFixup(dialogMenuItem *self);
+extern int installUpgrade(dialogMenuItem *self);
+extern int installFilesystems(dialogMenuItem *self);
+extern int installVarDefaults(dialogMenuItem *self);
extern Boolean copySelf(void);
extern Boolean rootExtract(void);
/* installFinal.c */
-extern int configGated(char *unused);
-extern int configSamba(char *unused);
-extern int configPCNFSD(char *unused);
-extern int configNFSServer(char *unused);
+extern int configGated(dialogMenuItem *self);
+extern int configSamba(dialogMenuItem *self);
+extern int configPCNFSD(dialogMenuItem *self);
+extern int configNFSServer(dialogMenuItem *self);
/* label.c */
-extern int diskLabelEditor(char *str);
-extern int diskLabelCommit(char *str);
+extern int diskLabelEditor(dialogMenuItem *self);
+extern int diskLabelCommit(dialogMenuItem *self);
/* lndir.c */
extern int lndir(char *from, char *to);
@@ -515,19 +489,19 @@ extern u_char default_scrnmap[];
/* media.c */
extern char *cpioVerbosity(void);
-extern int mediaSetCDROM(char *str);
-extern int mediaSetFloppy(char *str);
-extern int mediaSetDOS(char *str);
-extern int mediaSetTape(char *str);
-extern int mediaSetFTP(char *str);
-extern int mediaSetFTPActive(char *str);
-extern int mediaSetFTPPassive(char *str);
-extern int mediaSetUFS(char *str);
-extern int mediaSetNFS(char *str);
-extern int mediaSetFtpOnError(char *str);
-extern int mediaSetFtpUserPass(char *str);
-extern int mediaSetCPIOVerbosity(char *str);
-extern int mediaGetType(char *str);
+extern int mediaSetCDROM(dialogMenuItem *self);
+extern int mediaSetFloppy(dialogMenuItem *self);
+extern int mediaSetDOS(dialogMenuItem *self);
+extern int mediaSetTape(dialogMenuItem *self);
+extern int mediaSetFTP(dialogMenuItem *self);
+extern int mediaSetFTPActive(dialogMenuItem *self);
+extern int mediaSetFTPPassive(dialogMenuItem *self);
+extern int mediaSetUFS(dialogMenuItem *self);
+extern int mediaSetNFS(dialogMenuItem *self);
+extern int mediaSetFtpOnError(dialogMenuItem *self);
+extern int mediaSetFtpUserPass(dialogMenuItem *self);
+extern int mediaSetCPIOVerbosity(dialogMenuItem *self);
+extern int mediaGetType(dialogMenuItem *self);
extern Boolean mediaExtractDist(char *dir, int fd);
extern Boolean mediaExtractDistBegin(char *dir, int *fd, int *zpid, int *cpic);
extern Boolean mediaExtractDistEnd(int zpid, int cpid);
@@ -579,7 +553,7 @@ extern int mediaGetNFS(Device *dev, char *file, Boolean probe);
extern void mediaShutdownNFS(Device *dev);
/* options.c */
-extern int optionsEditor(char *str);
+extern int optionsEditor(dialogMenuItem *self);
/* package.c */
extern int package_add(char *name);
@@ -598,8 +572,6 @@ extern void systemChangeTerminal(char *color, const u_char c_termcap[], char *mo
extern void systemChangeScreenmap(const u_char newmap[]);
extern void systemCreateHoloshell(void);
extern int vsystem(char *fmt, ...);
-extern int docBrowser(char *junk);
-extern int docShowDocument(char *str);
/* tape.c */
extern char *mediaTapeBlocksize(void);
@@ -609,7 +581,7 @@ extern void mediaShutdownTape(Device *dev);
/* tcpip.c */
extern int tcpOpenDialog(Device *dev);
-extern int tcpMenuSelect(char *str);
+extern int tcpMenuSelect(dialogMenuItem *self);
extern int tcpInstallDevice(char *str);
extern Boolean tcpDeviceSelect(void);
diff --git a/usr.sbin/sysinstall/Makefile b/usr.sbin/sysinstall/Makefile
index eb87590..afeb135 100644
--- a/usr.sbin/sysinstall/Makefile
+++ b/usr.sbin/sysinstall/Makefile
@@ -4,11 +4,11 @@ CLEANFILES= makedevs.c rtermcap
.PATH: ${.CURDIR}/../disklabel ${.CURDIR}/../../usr.bin/cksum
-SRCS= anonFTP.c apache.c attr.c cdrom.c command.c config.c decode.c \
+SRCS= anonFTP.c apache.c attr.c cdrom.c command.c config.c \
devices.c disks.c dist.c dmenu.c doc.c dos.c floppy.c ftp.c \
ftp_strat.c globals.c index.c install.c installFinal.c \
- installPreconfig.c installUpgrade.c label.c lndir.c main.c \
- makedevs.c media.c menus.c misc.c msg.c network.c nfs.c options.c \
+ installUpgrade.c label.c lndir.c main.c makedevs.c media.c \
+ menus.c misc.c msg.c network.c nfs.c options.c \
package.c system.c tape.c tcpip.c termcap.c ufs.c variable.c wizard.c
CFLAGS+= -Wall -I${.CURDIR}/../../gnu/lib/libdialog
diff --git a/usr.sbin/sysinstall/anonFTP.c b/usr.sbin/sysinstall/anonFTP.c
index 0af53be..3e02157 100644
--- a/usr.sbin/sysinstall/anonFTP.c
+++ b/usr.sbin/sysinstall/anonFTP.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: anonFTP.c,v 1.8 1996/03/18 15:27:39 jkh Exp $
+ * $Id: anonFTP.c,v 1.9 1996/03/23 07:21:28 jkh Exp $
*
* Copyright (c) 1995
* Coranth Gryphon. All rights reserved.
@@ -402,7 +402,7 @@ anonftpOpenDialog(void)
}
int
-configAnonFTP(char *unused)
+configAnonFTP(dialogMenuItem *self)
{
int i;
diff --git a/usr.sbin/sysinstall/config.c b/usr.sbin/sysinstall/config.c
index 40622be..5609ad0 100644
--- a/usr.sbin/sysinstall/config.c
+++ b/usr.sbin/sysinstall/config.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: config.c,v 1.21 1996/03/21 09:30:08 jkh Exp $
+ * $Id: config.c,v 1.22 1996/03/24 18:57:34 joerg Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -326,18 +326,32 @@ configSysconfig(void)
}
int
-configSaverTimeout(char *str)
+configSaverTimeout(dialogMenuItem *self)
{
- return variable_get_value(VAR_BLANKTIME, "Enter time-out period in seconds for screen saver")
- ? RET_SUCCESS : RET_FAIL;
+ return variable_get_value(VAR_BLANKTIME, "Enter time-out period in seconds for screen saver") ?
+ RET_SUCCESS : RET_FAIL;
}
int
-configNTP(char *str)
+configNTP(dialogMenuItem *self)
{
return variable_get_value(VAR_NTPDATE, "Enter the name of an NTP server") ? RET_SUCCESS : RET_FAIL;
}
+int
+configXFree86(dialogMenuItem *self)
+{
+ if (file_executable("/usr/X11R6/bin/xf86config")) {
+ systemExecute("/usr/X11R6/bin/xf86config");
+ return RET_SUCCESS;
+ }
+ else {
+ msgConfirm("XFree86 does not appear to be installed! Please install\n"
+ "The XFree86 distribution before attempting to configure it.");
+ return RET_FAIL;
+ }
+}
+
void
configResolv(void)
{
@@ -398,7 +412,7 @@ skip:
}
int
-configRoutedFlags(char *str)
+configRoutedFlags(dialogMenuItem *self)
{
return variable_get_value(VAR_ROUTEDFLAGS,
"Specify the flags for routed; -q is the default, -s is\n"
@@ -406,7 +420,7 @@ configRoutedFlags(char *str)
}
int
-configPackages(char *str)
+configPackages(dialogMenuItem *self)
{
static PkgNode top, plist;
static Boolean index_initted = FALSE;
@@ -483,7 +497,7 @@ configPackages(char *str)
}
int
-configPorts(char *str)
+configPorts(dialogMenuItem *self)
{
char *cp, *dist = NULL; /* Shut up compiler */
diff --git a/usr.sbin/sysinstall/devices.c b/usr.sbin/sysinstall/devices.c
index 06e537f..49b4c08 100644
--- a/usr.sbin/sysinstall/devices.c
+++ b/usr.sbin/sysinstall/devices.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: devices.c,v 1.41 1996/03/18 15:27:46 jkh Exp $
+ * $Id: devices.c,v 1.42 1996/03/24 09:36:41 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -368,24 +368,21 @@ deviceCreateMenu(DMenu *menu, DeviceType type, int (*hook)())
return NULL;
for (numdevs = 0; devs[numdevs]; numdevs++);
- tmp = (DMenu *)safe_malloc(sizeof(DMenu) + (sizeof(DMenuItem) * (numdevs + 1)));
+ tmp = (DMenu *)safe_malloc(sizeof(DMenu) + (sizeof(dialogMenuItem) * (numdevs + 1)));
bcopy(menu, tmp, sizeof(DMenu));
for (i = 0; devs[i]; i++) {
- tmp->items[i].title = devs[i]->name;
+ tmp->items[i].prompt = devs[i]->name;
for (j = 0; device_names[j].name; j++) {
if (!strncmp(devs[i]->name, device_names[j].name, strlen(device_names[j].name))) {
- tmp->items[i].prompt = device_names[j].description;
+ tmp->items[i].title = device_names[j].description;
break;
}
}
if (!device_names[j].name)
- tmp->items[i].prompt = "<unknown device type>";
- tmp->items[i].type = DMENU_CALL;
- tmp->items[i].ptr = hook;
- tmp->items[i].disabled = FALSE;
- tmp->items[i].check = NULL;
+ tmp->items[i].title = "<unknown device type>";
+ tmp->items[i].fire = hook;
+ tmp->items[i].checked = NULL;
}
- tmp->items[i].type = DMENU_NOP;
tmp->items[i].title = NULL;
return tmp;
}
diff --git a/usr.sbin/sysinstall/disks.c b/usr.sbin/sysinstall/disks.c
index c07afb0..6f8f3de 100644
--- a/usr.sbin/sysinstall/disks.c
+++ b/usr.sbin/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.37 1996/03/20 14:11:21 jkh Exp $
+ * $Id: disks.c,v 1.38 1996/03/24 18:57:35 joerg Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -135,92 +135,6 @@ print_command_summary()
move(0, 0);
}
-/* Partition a disk based wholly on which variables are set */
-static void
-scriptPartition(Device *dev, Disk *d)
-{
- char *cp;
- int i, sz;
-
- record_chunks(d);
- cp = variable_get(VAR_GEOMETRY);
- if (cp) {
- msgDebug("Setting geometry from script to: %s\n", cp);
- d->bios_cyl = strtol(cp, &cp, 0);
- d->bios_hd = strtol(cp + 1, &cp, 0);
- d->bios_sect = strtol(cp + 1, 0, 0);
- }
-
- cp = variable_get(VAR_DISKSPACE);
- if (cp) {
- if (!strcmp(cp, "free")) {
- /* Do free disk space case */
- for (i = 0; chunk_info[i]; i++) {
- /* If a chunk is at least 10MB in size, use it. */
- if (chunk_info[i]->type == unused && chunk_info[i]->size > (10 * ONE_MEG)) {
- Create_Chunk(d, chunk_info[i]->offset, chunk_info[i]->size, freebsd, 3,
- (chunk_info[i]->flags & CHUNK_ALIGN));
- variable_set2(DISK_PARTITIONED, "yes");
- break;
- }
- }
- if (!chunk_info[i]) {
- dialog_clear();
- msgConfirm("Unable to find any free space on this disk!");
- return;
- }
- }
- else if (!strcmp(cp, "all")) {
- /* Do all disk space case */
- msgDebug("Warning: Devoting all of disk %s to FreeBSD.\n", d->name);
-
- All_FreeBSD(d, FALSE);
- }
- else if (!strcmp(cp, "exclusive")) {
- /* Do really-all-the-disk-space case */
- msgDebug("Warning: Devoting all of disk %s to FreeBSD.\n", d->name);
-
- All_FreeBSD(d, TRUE);
- }
- else if ((sz = strtol(cp, &cp, 0))) {
- /* Look for sz bytes free */
- if (*cp && toupper(*cp) == 'M')
- sz *= ONE_MEG;
- for (i = 0; chunk_info[i]; i++) {
- /* If a chunk is at least sz MB, use it. */
- if (chunk_info[i]->type == unused && chunk_info[i]->size >= sz) {
- Create_Chunk(d, chunk_info[i]->offset, sz, freebsd, 3, (chunk_info[i]->flags & CHUNK_ALIGN));
- variable_set2(DISK_PARTITIONED, "yes");
- break;
- }
- }
- if (!chunk_info[i]) {
- dialog_clear();
- msgConfirm("Unable to find %d free blocks on this disk!", sz);
- return;
- }
- }
- else if (!strcmp(cp, "existing")) {
- /* Do existing FreeBSD case */
- for (i = 0; chunk_info[i]; i++) {
- if (chunk_info[i]->type == freebsd)
- break;
- }
- if (!chunk_info[i]) {
- dialog_clear();
- msgConfirm("Unable to find any existing FreeBSD partitions on this disk!");
- return;
- }
- }
- else {
- dialog_clear();
- msgConfirm("`%s' is an invalid value for %s - is config file valid?", cp, VAR_DISKSPACE);
- return;
- }
- variable_set2(DISK_PARTITIONED, "yes");
- }
-}
-
static u_char *
getBootMgr(char *dname)
{
@@ -533,14 +447,15 @@ partitionHook(char *str)
}
int
-diskPartitionEditor(char *str)
+diskPartitionEditor(dialogMenuItem *self)
{
DMenu *menu;
Device **devs;
int i, cnt;
- char *cp;
+ char *cp, *str;
cp = variable_get(VAR_DISK);
+ str= variable_get(SYSTEM_STATE);
devs = deviceFind(cp, DEVICE_TYPE_DISK);
cnt = deviceCount(devs);
if (!cnt) {
@@ -552,10 +467,7 @@ diskPartitionEditor(char *str)
}
else if (cnt == 1) {
devs[0]->enabled = TRUE;
- if (str && !strcmp(str, "script"))
- scriptPartition(devs[0], (Disk *)devs[0]->private);
- else
- diskPartition(devs[0], (Disk *)devs[0]->private);
+ diskPartition(devs[0], (Disk *)devs[0]->private);
i = RET_SUCCESS;
variable_set2(DISK_SELECTED, "yes");
}
@@ -584,7 +496,7 @@ diskPartitionEditor(char *str)
}
int
-diskPartitionWrite(char *str)
+diskPartitionWrite(dialogMenuItem *self)
{
Device **devs;
char *cp;
diff --git a/usr.sbin/sysinstall/dist.c b/usr.sbin/sysinstall/dist.c
index 0966458..117b53e 100644
--- a/usr.sbin/sysinstall/dist.c
+++ b/usr.sbin/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.38 1995/12/07 10:33:41 peter Exp $
+ * $Id: dist.c,v 1.39 1996/02/02 06:43:59 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -165,7 +165,7 @@ static Distribution XF86FontDistTable[] = {
};
int
-distReset(char *str)
+distReset(dialogMenuItem *self)
{
Dists = 0;
SrcDists = 0;
@@ -176,7 +176,7 @@ distReset(char *str)
}
int
-distSetDeveloper(char *str)
+distSetDeveloper(dialogMenuItem *self)
{
distReset(NULL);
Dists = _DIST_DEVELOPER;
@@ -185,7 +185,7 @@ distSetDeveloper(char *str)
}
int
-distSetXDeveloper(char *str)
+distSetXDeveloper(dialogMenuItem *self)
{
distReset(NULL);
Dists = _DIST_DEVELOPER | DIST_XF86;
@@ -198,7 +198,7 @@ distSetXDeveloper(char *str)
}
int
-distSetKernDeveloper(char *str)
+distSetKernDeveloper(dialogMenuItem *self)
{
distReset(NULL);
Dists = _DIST_DEVELOPER;
@@ -207,7 +207,7 @@ distSetKernDeveloper(char *str)
}
int
-distSetUser(char *str)
+distSetUser(dialogMenuItem *self)
{
distReset(NULL);
Dists = _DIST_USER;
@@ -215,7 +215,7 @@ distSetUser(char *str)
}
int
-distSetXUser(char *str)
+distSetXUser(dialogMenuItem *self)
{
distReset(NULL);
Dists = _DIST_USER;
@@ -227,7 +227,7 @@ distSetXUser(char *str)
}
int
-distSetMinimum(char *str)
+distSetMinimum(dialogMenuItem *self)
{
distReset(NULL);
Dists = DIST_BIN;
@@ -235,7 +235,7 @@ distSetMinimum(char *str)
}
int
-distSetEverything(char *str)
+distSetEverything(dialogMenuItem *self)
{
Dists = DIST_ALL;
SrcDists = DIST_SRC_ALL;
@@ -246,54 +246,47 @@ distSetEverything(char *str)
}
int
-distSetCustom(char *str)
+distSetDES(dialogMenuItem *self)
{
- /* These *ALL* have to be set at once. It's for power users only! :) */
- if (sscanf(str, "%d %d %d %d %d %d",
- &Dists, &DESDists, &SrcDists, &XF86Dists, &XF86ServerDists, &XF86FontDists) != 6) {
- dialog_clear();
- msgConfirm("Warning: A `%s' set was configured which did not set all\n"
- "distributions explicitly. Some distributions will default to\n"
- "unselected as a result.", str);
+ if (dmenuOpenSimple(&MenuDESDistributions)) {
+ if (DESDists) {
+ if (DESDists & DIST_DES_KERBEROS)
+ DESDists |= DIST_DES_DES;
+ Dists |= DIST_DES;
+ }
+ return RET_SUCCESS;
}
- return RET_SUCCESS;
+ else
+ return RET_FAIL;
}
int
-distSetDES(char *str)
+distSetSrc(dialogMenuItem *self)
{
- dmenuOpenSimple(&MenuDESDistributions);
- if (DESDists) {
- if (DESDists & DIST_DES_KERBEROS)
- DESDists |= DIST_DES_DES;
- Dists |= DIST_DES;
+ if (dmenuOpenSimple(&MenuSrcDistributions)) {
+ if (SrcDists)
+ Dists |= DIST_SRC;
+ return RET_SUCCESS;
}
- return RET_SUCCESS;
-}
-
-int
-distSetSrc(char *str)
-{
- dmenuOpenSimple(&MenuSrcDistributions);
- if (SrcDists)
- Dists |= DIST_SRC;
- return RET_SUCCESS;
+ return RET_FAIL;
}
int
-distSetXF86(char *str)
+distSetXF86(dialogMenuItem *self)
{
- dmenuOpenSimple(&MenuXF86Select);
- if (XF86ServerDists)
- XF86Dists |= DIST_XF86_SERVER;
- if (XF86FontDists)
- 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);
- return RET_SUCCESS;
+ if (dmenuOpenSimple(&MenuXF86Select)) {
+ if (XF86ServerDists)
+ XF86Dists |= DIST_XF86_SERVER;
+ if (XF86FontDists)
+ 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);
+ return RET_SUCCESS;
+ }
+ return RET_FAIL;
}
static Boolean
@@ -477,7 +470,7 @@ printSelected(char *buf, int selected, Distribution *me)
}
int
-distExtractAll(char *ptr)
+distExtractAll(dialogMenuItem *self)
{
int retries = 0;
char buf[512];
@@ -485,7 +478,7 @@ distExtractAll(char *ptr)
/* First try to initialize the state of things */
if (!mediaDevice->init(mediaDevice))
return RET_FAIL;
- if (!Dists && ptr) {
+ if (!Dists) {
msgConfirm("You haven't selected any distributions to extract.");
return RET_FAIL;
}
diff --git a/usr.sbin/sysinstall/dist.h b/usr.sbin/sysinstall/dist.h
index 06fa723..685e8b4 100644
--- a/usr.sbin/sysinstall/dist.h
+++ b/usr.sbin/sysinstall/dist.h
@@ -12,11 +12,12 @@
#define DIST_INFO 0x0080
#define DIST_COMPAT1X 0x0100
#define DIST_COMPAT20 0x0200
-#define DIST_XF86 0x0400
-#define DIST_COMMERCIAL 0x0800
-#define DIST_DES 0x1000
-#define DIST_EXPERIMENTAL 0x2000
-#define DIST_ALL 0x0FFF
+#define DIST_COMPAT21 0x0400
+#define DIST_XF86 0x0800
+#define DIST_COMMERCIAL 0x1000
+#define DIST_DES 0x2000
+#define DIST_EXPERIMENTAL 0x4000
+#define DIST_ALL 0x0FFF /* Don't include commerce, DES or experimental in "all" */
/* Canned distribution sets */
#define _DIST_DEVELOPER \
diff --git a/usr.sbin/sysinstall/dmenu.c b/usr.sbin/sysinstall/dmenu.c
index 64f457d..0633e3a 100644
--- a/usr.sbin/sysinstall/dmenu.c
+++ b/usr.sbin/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.13 1995/12/07 10:33:44 peter Exp $
+ * $Id: dmenu.c,v 1.14 1996/03/02 07:31:51 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -46,6 +46,71 @@
#define MAX_MENU 15
+static Boolean cancelled;
+
+int
+dmenuDisplayFile(dialogMenuItem *tmp)
+{
+ systemDisplayHelp((char *)tmp->data);
+ return RET_SUCCESS;
+}
+
+int
+dmenuSubmenu(dialogMenuItem *tmp)
+{
+ dialog_clear();
+ return dmenuOpenSimple((DMenu *)tmp->data);
+}
+
+int
+dmenuSystemCommand(dialogMenuItem *tmp)
+{
+ int i;
+
+ i = systemExecute((char *)tmp->data) ? RET_FAIL : RET_SUCCESS;
+ dialog_clear();
+ return i;
+}
+
+int
+dmenuSystemCommandBox(dialogMenuItem *tmp)
+{
+ use_helpfile(NULL);
+ use_helpline("Select OK to dismiss this dialog");
+ dialog_prgbox(tmp->title, (char *)tmp->data, 22, 76, 1, 1);
+ dialog_clear();
+ return RET_SUCCESS;
+}
+
+int
+dmenuCancel(dialogMenuItem *tmp)
+{
+ cancelled = TRUE;
+ return RET_SUCCESS;
+}
+
+int
+dmenuSetVariable(dialogMenuItem *tmp)
+{
+ variable_set((char *)tmp->data);
+ msgInfo("Set %s", tmp->data);
+ return RET_SUCCESS;
+}
+
+int
+dmenuSetFlag(dialogMenuItem *tmp)
+{
+ *((unsigned int *)tmp->data) |= tmp->aux;
+ return RET_SUCCESS;
+}
+
+int
+dmenuSetValue(dialogMenuItem *tmp)
+{
+ *((unsigned int *)tmp->data) = tmp->aux;
+ return RET_SUCCESS;
+}
+
/* Traverse menu but give user no control over positioning */
Boolean
dmenuOpenSimple(DMenu *menu)
@@ -53,56 +118,44 @@ dmenuOpenSimple(DMenu *menu)
int choice, scroll, curr, max;
choice = scroll = curr = max = 0;
+ dialog_clear();
return dmenuOpen(menu, &choice, &scroll, &curr, &max);
}
/* Work functions for the state hook */
-char *
-dmenuFlagCheck(DMenuItem *item)
+int
+dmenuFlagCheck(dialogMenuItem *item)
{
- if (*((unsigned int *)item->ptr) & item->parm)
- return "ON";
- return "OFF";
+ return (*((unsigned int *)item->data) & item->aux);
}
-char *
-dmenuVarCheck(DMenuItem *item)
+int
+dmenuVarCheck(dialogMenuItem *item)
{
char *w, *cp, *cp2, tmp[256];
- w = (char *)item->parm;
+ w = (char *)item->aux;
if (!w)
- w = (char *)item->ptr;
+ w = (char *)item->data;
if (!w)
- return "OFF";
+ return FALSE;
strncpy(tmp, w, 256);
if ((cp = index(tmp, '=')) != NULL) {
*(cp++) = '\0';
cp2 = getenv(tmp);
if (cp2)
- return !strcmp(cp, cp2) ? "ON" : "OFF";
+ return !strcmp(cp, cp2);
else
- return "OFF";
+ return FALSE;
}
else
- return getenv(tmp) ? "ON" : "OFF";
+ return (int)getenv(tmp);
}
-char *
-dmenuRadioCheck(DMenuItem *item)
+int
+dmenuRadioCheck(dialogMenuItem *item)
{
- if (*((unsigned int *)item->ptr) == item->parm)
- return "ON";
- return "OFF";
-}
-
-static char *
-checkHookVal(DMenuItem *item)
-{
-
- if (!item->check)
- return "OFF";
- return (*item->check)(item);
+ return (*((unsigned int *)item->data) == item->aux);
}
static int
@@ -122,21 +175,10 @@ menu_height(DMenu *menu, int n)
Boolean
dmenuOpen(DMenu *menu, int *choice, int *scroll, int *curr, int *max)
{
- char result[FILENAME_MAX];
- char **nitems = NULL;
- DMenuItem *tmp;
- int rval = 0, n = 0;
-
- /* First, construct the menu */
- for (tmp = menu->items; tmp->title; tmp++) {
- if (!tmp->disabled) {
- nitems = item_add_pair(nitems, tmp->title, tmp->prompt, curr, max);
- if (menu->options & (DMENU_RADIO_TYPE | DMENU_MULTIPLE_TYPE))
- nitems = item_add(nitems, checkHookVal(tmp), curr, max);
- ++n;
- }
- }
- nitems = item_add(nitems, NULL, curr, max); /* Terminate it */
+ int n, rval = 0;
+
+ /* Count up all the items */
+ for (n = 0; menu->items[n].title; n++);
while (1) {
char buf[FILENAME_MAX];
@@ -146,40 +188,25 @@ dmenuOpen(DMenu *menu, int *choice, int *scroll, int *curr, int *max)
use_helpfile(systemHelpFile(menu->helpfile, buf));
/* Pop up that dialog! */
- if (menu->options & DMENU_NORMAL_TYPE)
+ if (menu->type == DMENU_NORMAL_TYPE)
rval = dialog_menu((u_char *)menu->title, (u_char *)menu->prompt, -1, -1,
- menu_height(menu, n), n, (u_char **)nitems, (u_char *)result, choice, scroll);
+ menu_height(menu, n), -n, menu->items, NULL, choice, scroll);
- else if (menu->options & DMENU_RADIO_TYPE)
+ else if (menu->type == DMENU_RADIO_TYPE)
rval = dialog_radiolist((u_char *)menu->title, (u_char *)menu->prompt, -1, -1,
- menu_height(menu, n), n, (u_char **)nitems, (u_char *)result);
+ menu_height(menu, n), -n, menu->items, NULL);
- else if (menu->options & DMENU_MULTIPLE_TYPE)
+ else if (menu->type == DMENU_CHECKLIST_TYPE)
rval = dialog_checklist((u_char *)menu->title, (u_char *)menu->prompt, -1, -1,
- menu_height(menu, n), n, (u_char **)nitems, (u_char *)result);
+ menu_height(menu, n), -n, menu->items, NULL);
/* This seems to be the only technique that works for getting the display to look right */
dialog_clear();
-
- if (!rval) {
- if (menu->options & DMENU_MULTIPLE_TYPE) {
- if (decode_and_dispatch_multiple(menu, result) || menu->options & DMENU_SELECTION_RETURNS) {
- items_free(nitems, curr, max);
- return TRUE;
- }
- }
- else {
- if ((tmp = decode(menu, result)) == NULL)
- return FALSE;
- }
- if (dispatch(tmp, result) == RET_DONE || (menu->options & DMENU_SELECTION_RETURNS)) {
- items_free(nitems, curr, max);
- return TRUE;
- }
- }
- else {
- items_free(nitems, curr, max);
+ if (rval)
return FALSE;
+ else if (cancelled) {
+ cancelled = FALSE;
+ return TRUE;
}
}
}
diff --git a/usr.sbin/sysinstall/doc.c b/usr.sbin/sysinstall/doc.c
index 187362d..013dd93 100644
--- a/usr.sbin/sysinstall/doc.c
+++ b/usr.sbin/sysinstall/doc.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: doc.c,v 1.9 1995/11/04 08:47:22 jkh Exp $
+ * $Id: doc.c,v 1.10 1995/11/06 12:49:23 jkh Exp $
*
* Jordan Hubbard
*
@@ -19,7 +19,7 @@
* and fire it up on the first copy of the handbook we can find.
*/
int
-docBrowser(char *junk)
+docBrowser(dialogMenuItem *self)
{
char *browser = variable_get(VAR_BROWSER_PACKAGE);
@@ -53,17 +53,20 @@ docBrowser(char *junk)
}
/* Run browser on the appropriate doc */
- dmenuOpenSimple(&MenuHTMLDoc);
- return RET_SUCCESS;
+ if (dmenuOpenSimple(&MenuHTMLDoc))
+ return RET_SUCCESS;
+ else
+ return RET_FAIL;
}
/* Try to show one of the documents requested from the HTML doc menu */
int
-docShowDocument(char *str)
+docShowDocument(dialogMenuItem *self)
{
char tmp[512], target[512];
char *where = NULL;
char *browser = variable_get(VAR_BROWSER_BINARY);
+ char *str = self->prompt;
if (!file_executable(browser)) {
dialog_clear();
diff --git a/usr.sbin/sysinstall/install.c b/usr.sbin/sysinstall/install.c
index 30475b3..f789fd7 100644
--- a/usr.sbin/sysinstall/install.c
+++ b/usr.sbin/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.80 1996/03/24 09:43:53 jkh Exp $
+ * $Id: install.c,v 1.81 1996/03/24 18:57:36 joerg Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -219,12 +219,13 @@ installInitial(void)
}
int
-installFixit(char *str)
+installFixit(dialogMenuItem *self)
{
struct ufs_args args;
pid_t child;
int waitstatus;
+ variable_set2(SYSTEM_STATE, "fixit");
memset(&args, 0, sizeof(args));
args.fspec = "/dev/fd0";
Mkdir("/mnt2", NULL);
@@ -297,12 +298,13 @@ installFixit(char *str)
}
int
-installExpress(char *str)
+installExpress(dialogMenuItem *self)
{
- if (diskPartitionEditor("express") == RET_FAIL)
+ variable_set2(SYSTEM_STATE, "express");
+ if (diskPartitionEditor(self) == RET_FAIL)
return RET_FAIL;
- if (diskLabelEditor("express") == RET_FAIL)
+ if (diskLabelEditor(self) == RET_FAIL)
return RET_FAIL;
if (!Dists) {
@@ -315,7 +317,7 @@ installExpress(char *str)
return RET_FAIL;
}
- if (installCommit("express") == RET_FAIL)
+ if (installCommit(self) == RET_FAIL)
return RET_FAIL;
return RET_DONE;
@@ -323,8 +325,9 @@ installExpress(char *str)
/* Novice mode installation */
int
-installNovice(char *str)
+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"
@@ -333,7 +336,7 @@ installNovice(char *str)
"by a (Q)uit. If you wish to allocate only free space to FreeBSD, move to a\n"
"partition marked \"unused\" and use the (C)reate command.");
- if (diskPartitionEditor("novice") == RET_FAIL)
+ if (diskPartitionEditor(self) == RET_FAIL)
return RET_FAIL;
dialog_clear();
@@ -344,7 +347,7 @@ installNovice(char *str)
"care for the layout chosen by (A)uto, press F1 for more information on\n"
"manual layout.");
- if (diskLabelEditor("novice") == RET_FAIL)
+ if (diskLabelEditor(self) == RET_FAIL)
return RET_FAIL;
dialog_clear();
@@ -367,7 +370,7 @@ installNovice(char *str)
return RET_FAIL;
}
- if (installCommit("novice") == RET_FAIL)
+ if (installCommit(self) == RET_FAIL)
return RET_FAIL;
return RET_DONE;
@@ -382,14 +385,16 @@ installNovice(char *str)
* DES dist.
*/
int
-installCommit(char *str)
+installCommit(dialogMenuItem *self)
{
int i;
extern int cdromMounted;
+ char *str;
if (!mediaVerify())
return RET_FAIL;
+ str = variable_get(SYSTEM_STATE);
i = RET_DONE;
if (RunningAsInit) {
if (installInitial() == RET_FAIL)
@@ -404,15 +409,12 @@ installCommit(char *str)
}
}
- if (distExtractAll(NULL) == RET_FAIL)
+ if (distExtractAll(self) == RET_FAIL)
i = RET_FAIL;
- if (installFixup(NULL) == RET_FAIL)
+ if (installFixup(self) == RET_FAIL)
i = RET_FAIL;
- if (i != RET_FAIL)
- variable_set2(SYSTEM_STATE, "base-install");
-
if (i != RET_FAIL && !strcmp(str, "novice")) {
dialog_clear();
msgConfirm("Since you're running the novice installation, a few post-configuration\n"
@@ -434,7 +436,7 @@ installCommit(char *str)
if (!msgYesNo("Would you like to configure Samba for connecting NETBUI clients to this\n"
"machine? Windows 95, Windows NT and Windows for Workgroups\n"
"machines can use NETBUI transport for disk and printer sharing."))
- configSamba(NULL);
+ configSamba(self);
dialog_clear();
if (!msgYesNo("Will this machine be an IP gateway (e.g. will it forward packets\n"
@@ -443,11 +445,11 @@ installCommit(char *str)
dialog_clear();
if (!msgYesNo("Do you want to allow anonymous FTP connections to this machine?"))
- configAnonFTP(NULL);
+ configAnonFTP(self);
dialog_clear();
if (!msgYesNo("Do you want to configure this machine as an NFS server?"))
- configNFSServer(NULL);
+ configNFSServer(self);
dialog_clear();
if (!msgYesNo("Do you want to configure this machine as an NFS client?"))
@@ -455,7 +457,7 @@ installCommit(char *str)
dialog_clear();
if (!msgYesNo("Do you want to configure this machine as a WEB server?"))
- configApache(NULL);
+ configApache(self);
dialog_clear();
if (!msgYesNo("Would you like to customize your system console settings?"))
@@ -482,14 +484,14 @@ installCommit(char *str)
"drive to use the ports collection, but at a substantial savings\n"
"in disk space (NOTE: This may take as long as 15 or 20 minutes\n"
"depending on the speed of your CDROM drive)."))
- configPorts(NULL);
+ configPorts(self);
}
dialog_clear();
if (!msgYesNo("The FreeBSD package collection is a collection of over 300 ready-to-run\n"
"applications, from text editors to games to WEB servers. Would you like\n"
"to browse the collection now?"))
- configPackages(NULL);
+ configPackages(self);
/* XXX Put whatever other nice configuration questions you'd like to ask the user here XXX */
@@ -505,8 +507,6 @@ installCommit(char *str)
configResolv();
configSysconfig();
- variable_set2(SYSTEM_STATE, i == RET_FAIL ? "error-install" : "full-install");
-
/* Don't print this if we're express or novice installing */
if (strcmp(str, "express") && strcmp(str, "novice")) {
if (Dists || i == RET_FAIL) {
@@ -541,11 +541,13 @@ installCommit(char *str)
"may do so by typing: /stand/sysinstall.");
}
}
+ variable_set2(SYSTEM_STATE, i == RET_FAIL ? "error-install" : "full-install");
+
return i;
}
int
-installFixup(char *str)
+installFixup(dialogMenuItem *self)
{
Device **devs;
int i;
@@ -625,18 +627,20 @@ installFixup(char *str)
/* Go newfs and/or mount all the filesystems we've been asked to */
int
-installFilesystems(char *str)
+installFilesystems(dialogMenuItem *self)
{
int i;
Disk *disk;
Chunk *c1, *c2, *rootdev, *swapdev, *usrdev;
Device **devs;
PartInfo *root;
- char dname[80];
+ char dname[80], *str;
extern int MakeDevChunk(Chunk *c, char *n);
Boolean upgrade = FALSE;
- if (!(str && !strcmp(str, "script")) && !checkLabels(&rootdev, &swapdev, &usrdev))
+ str = variable_get(SYSTEM_STATE);
+
+ if (!checkLabels(&rootdev, &swapdev, &usrdev))
return RET_FAIL;
root = (PartInfo *)rootdev->private_data;
@@ -779,7 +783,7 @@ installFilesystems(char *str)
}
int
-installVarDefaults(char *unused)
+installVarDefaults(dialogMenuItem *self)
{
/* Set default startup options */
variable_set2(VAR_ROUTEDFLAGS, "-q");
diff --git a/usr.sbin/sysinstall/installUpgrade.c b/usr.sbin/sysinstall/installUpgrade.c
index 2a2d19b..23acb9a 100644
--- a/usr.sbin/sysinstall/installUpgrade.c
+++ b/usr.sbin/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.17 1995/11/08 07:09:27 jkh Exp $
+ * $Id: installUpgrade.c,v 1.18 1995/11/17 14:17:12 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -185,7 +185,7 @@ traverseHitlist(HitList *h)
}
int
-installUpgrade(char *str)
+installUpgrade(dialogMenuItem *self)
{
char *saved_etc = NULL;
Boolean extractingBin = TRUE;
@@ -198,6 +198,7 @@ installUpgrade(char *str)
return RET_FAIL;
}
+ variable_set2(SYSTEM_STATE, "upgrade");
systemDisplayHelp("upgrade");
if (msgYesNo("Given all that scary stuff you just read, are you sure you want to\n"
@@ -247,7 +248,7 @@ installUpgrade(char *str)
"Once you're done in the label editor, press Q to return here for the next\n"
"step.");
- if (diskLabelEditor(NULL) == RET_FAIL) {
+ if (diskLabelEditor(self) == RET_FAIL) {
dialog_clear();
msgConfirm("The disk label editor failed to work properly! Upgrade operation\n"
"aborted.");
@@ -256,7 +257,7 @@ installUpgrade(char *str)
/* Don't write out MBR info */
variable_set2(DISK_PARTITIONED, "written");
- if (diskLabelCommit("upgrade") == RET_FAIL) {
+ if (diskLabelCommit(self) == RET_FAIL) {
dialog_clear();
msgConfirm("Not all file systems were properly mounted. Upgrade operation\n"
"aborted.");
@@ -321,7 +322,7 @@ installUpgrade(char *str)
}
msgNotify("Beginning extraction of distributions..");
- if (distExtractAll("upgrade") == RET_FAIL) {
+ if (distExtractAll(self) == RET_FAIL) {
if (extractingBin && (Dists & DIST_BIN)) {
dialog_clear();
msgConfirm("Hmmmm. We couldn't even extract the bin distribution. This upgrade\n"
@@ -340,7 +341,7 @@ installUpgrade(char *str)
"/dev entries and such that a 2.1 system expects to see. I'll also perform a\n"
"few \"fixup\" operations to repair the effects of splatting a bin distribution\n"
"on top of an existing system..");
- if (installFixup("upgrade") == RET_FAIL) {
+ if (installFixup(self) == RET_FAIL) {
dialog_clear();
msgConfirm("Hmmmmm. The fixups don't seem to have been very happy.\n"
"You may wish to examine the system a little more closely when\n"
diff --git a/usr.sbin/sysinstall/label.c b/usr.sbin/sysinstall/label.c
index 96e9dbf..774a329 100644
--- a/usr.sbin/sysinstall/label.c
+++ b/usr.sbin/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.39 1996/03/20 14:11:22 jkh Exp $
+ * $Id: label.c,v 1.40 1996/03/24 18:57:37 joerg Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -81,7 +81,6 @@ static struct {
static int here;
static int diskLabel(char *str);
-static int scriptLabel(char *str);
static int
labelHook(char *str)
@@ -115,14 +114,15 @@ labelHook(char *str)
}
int
-diskLabelEditor(char *str)
+diskLabelEditor(dialogMenuItem *self)
{
Device **devs;
DMenu *menu;
int i, cnt;
- char *cp;
+ char *cp, *str;
cp = variable_get(VAR_DISK);
+ str = variable_get(SYSTEM_STATE);
devs = deviceFind(cp, DEVICE_TYPE_DISK);
cnt = deviceCount(devs);
if (!cnt) {
@@ -135,10 +135,7 @@ diskLabelEditor(char *str)
else if (cnt == 1 || variable_get(DISK_SELECTED)) {
if (cnt == 1)
devs[0]->enabled = TRUE;
- if (str && !strcmp(str, "script"))
- i = scriptLabel(str);
- else
- i = diskLabel(str);
+ i = diskLabel(str);
}
else {
menu = deviceCreateMenu(&MenuDiskDevices, DEVICE_TYPE_DISK, labelHook);
@@ -163,7 +160,7 @@ diskLabelEditor(char *str)
}
int
-diskLabelCommit(char *str)
+diskLabelCommit(dialogMenuItem *self)
{
char *cp;
int i;
@@ -179,9 +176,9 @@ diskLabelCommit(char *str)
i = RET_FAIL;
}
/* The routine will guard against redundant writes, just as this one does */
- else if (diskPartitionWrite(str) != RET_SUCCESS)
+ else if (diskPartitionWrite(self) != RET_SUCCESS)
i = RET_FAIL;
- else if (installFilesystems(str) != RET_SUCCESS)
+ else if (installFilesystems(self) != RET_SUCCESS)
i = RET_FAIL;
else {
msgInfo("All filesystem information written successfully.");
@@ -399,119 +396,6 @@ getNewfsCmd(PartInfo *p)
strncpy(p->newfs_cmd, val, NEWFS_CMD_MAX);
}
-static int
-scriptLabel(char *str)
-{
- char *cp;
- PartType type;
- PartInfo *p;
- u_long flags = 0;
- int i, status;
- Device **devs;
- Disk *d;
-
- status = RET_SUCCESS;
- cp = variable_get(VAR_DISK);
- if (!cp) {
- dialog_clear();
- msgConfirm("scriptLabel: No disk selected - can't label automatically.");
- return RET_FAIL;
- }
-
- devs = deviceFind(cp, DEVICE_TYPE_DISK);
- if (!devs) {
- dialog_clear();
- msgConfirm("scriptLabel: No disk device %s found!", cp);
- return RET_FAIL;
- }
- d = devs[0]->private;
-
- record_label_chunks(devs);
- for (i = 0; label_chunk_info[i].c; i++) {
- Chunk *c1 = label_chunk_info[i].c;
-
- if (label_chunk_info[i].type == PART_SLICE) {
- if ((cp = variable_get(c1->name)) != NULL) {
- int sz;
- char typ[10], mpoint[50];
-
- if (sscanf(cp, "%s %d %s", typ, &sz, mpoint) != 3) {
- dialog_clear();
- msgConfirm("For slice entry %s, got an invalid detail entry of: %s", c1->name, cp);
- status = RET_FAIL;
- continue;
- }
- else {
- Chunk *tmp;
-
- if (!strcmp(typ, "swap")) {
- type = PART_SWAP;
- strcpy(mpoint, "<swap>");
- }
- else {
- type = PART_FILESYSTEM;
- if (!strcmp(mpoint, "/"))
- flags |= CHUNK_IS_ROOT;
- }
- if (!sz)
- sz = space_free(c1);
- if (sz > space_free(c1)) {
- dialog_clear();
- msgConfirm("Not enough free space to create partition: %s", mpoint);
- status = RET_FAIL;
- continue;
- }
- if (!(tmp = Create_Chunk_DWIM(d, c1, sz, part,
- (type == PART_SWAP) ? FS_SWAP : FS_BSDFFS, flags))) {
- dialog_clear();
- msgConfirm("Unable to create from partition spec: %s. Too big?", cp);
- status = RET_FAIL;
- break;
- }
- else {
- tmp->private_data = new_part(mpoint, TRUE, sz);
- tmp->private_free = safe_free;
- status = RET_SUCCESS;
- }
- }
- }
- }
- else {
- /* Must be something we can set a mountpoint */
- cp = variable_get(c1->name);
- if (cp) {
- char mpoint[50], nwfs[8];
- Boolean newfs = FALSE;
-
- nwfs[0] = '\0';
- if (sscanf(cp, "%s %s", mpoint, nwfs) != 2) {
- dialog_clear();
- msgConfirm("For slice entry %s, got an invalid detail entry of: %s", c1->name, cp);
- status = RET_FAIL;
- continue;
- }
- newfs = toupper(nwfs[0]) == 'Y' ? TRUE : FALSE;
- if (c1->private_data) {
- p = c1->private_data;
- p->newfs = newfs;
- strcpy(p->mountpoint, mpoint);
- }
- else {
- c1->private_data = new_part(mpoint, newfs, 0);
- c1->private_free = safe_free;
- }
- if (!strcmp(mpoint, "/"))
- c1->flags |= CHUNK_IS_ROOT;
- else
- c1->flags &= ~CHUNK_IS_ROOT;
- }
- }
- }
- if (status == RET_SUCCESS)
- variable_set2(DISK_LABELLED, "yes");
- return status;
-}
-
#define MAX_MOUNT_NAME 12
#define PART_PART_COL 0
diff --git a/usr.sbin/sysinstall/main.c b/usr.sbin/sysinstall/main.c
index a94f133..9810b48 100644
--- a/usr.sbin/sysinstall/main.c
+++ b/usr.sbin/sysinstall/main.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: main.c,v 1.14 1995/09/18 16:52:29 peter Exp $
+ * $Id: main.c,v 1.15 1995/12/07 10:33:55 peter Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -57,14 +57,18 @@ main(int argc, char **argv)
{
int choice, scroll, curr, max;
+ /* Catch fatal signals and complain about them if running as init */
if (getpid() == 1) {
signal(SIGBUS, screech);
signal(SIGSEGV, screech);
}
+
+ /* We don't work too well when running as non-root anymore */
if (geteuid() != 0) {
- fprintf(stderr, "Warning: This utility should be run as root.\n");
- sleep(1);
+ fprintf(stderr, "Error: This utility should only be run as root.\n");
+ return 1;
}
+
/* Set up whatever things need setting up */
systemInitialize(argc, argv);
diff --git a/usr.sbin/sysinstall/media.c b/usr.sbin/sysinstall/media.c
index 9543c12..89bea6e 100644
--- a/usr.sbin/sysinstall/media.c
+++ b/usr.sbin/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.29 1996/03/19 12:02:20 jkh Exp $
+ * $Id: media.c,v 1.30 1996/03/21 17:20:31 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -87,7 +87,7 @@ cpioVerbosity()
* be a CD.
*/
int
-mediaSetCDROM(char *str)
+mediaSetCDROM(dialogMenuItem *self)
{
Device **devs;
int cnt;
@@ -130,7 +130,7 @@ floppyHook(char *str)
* be a floppy
*/
int
-mediaSetFloppy(char *str)
+mediaSetFloppy(dialogMenuItem *self)
{
Device **devs;
int cnt;
@@ -172,7 +172,7 @@ DOSHook(char *str)
* be a DOS partition.
*/
int
-mediaSetDOS(char *str)
+mediaSetDOS(dialogMenuItem *self)
{
Device **devs;
int cnt;
@@ -212,7 +212,7 @@ tapeHook(char *str)
* be a tape drive.
*/
int
-mediaSetTape(char *str)
+mediaSetTape(dialogMenuItem *self)
{
Device **devs;
int cnt;
@@ -261,12 +261,12 @@ mediaSetTape(char *str)
* be an ftp server
*/
int
-mediaSetFTP(char *str)
+mediaSetFTP(dialogMenuItem *self)
{
static Device ftpDevice;
char *cp;
- if (!(str && !strcmp(str, "script") && (cp = variable_get(VAR_FTP_PATH)))) {
+ if (!(cp = variable_get(VAR_FTP_PATH))) {
if (!dmenuOpenSimple(&MenuMediaFTP))
return RET_FAIL;
else
@@ -296,8 +296,7 @@ mediaSetFTP(char *str)
}
strcpy(ftpDevice.name, cp);
- /* If str == NULL || "script", we were called just to change FTP sites, not network devices */
- if (str && strcmp(str, "script") && !tcpDeviceSelect())
+ if (!tcpDeviceSelect())
return RET_FAIL;
ftpDevice.type = DEVICE_TYPE_FTP;
@@ -311,26 +310,26 @@ mediaSetFTP(char *str)
}
int
-mediaSetFTPActive(char *str)
+mediaSetFTPActive(dialogMenuItem *self)
{
variable_set2(VAR_FTP_STATE, "active");
- return mediaSetFTP(str);
+ return mediaSetFTP(self);
}
int
-mediaSetFTPPassive(char *str)
+mediaSetFTPPassive(dialogMenuItem *self)
{
variable_set2(VAR_FTP_STATE, "passive");
- return mediaSetFTP(str);
+ return mediaSetFTP(self);
}
int
-mediaSetUFS(char *str)
+mediaSetUFS(dialogMenuItem *self)
{
static Device ufsDevice;
char *val;
- if (!(str && !strcmp(str, "script") && (val = variable_get(VAR_UFS_PATH)))) {
+ if (!(val = variable_get(VAR_UFS_PATH))) {
val = variable_get_value(VAR_UFS_PATH, "Enter a fully qualified pathname for the directory\n"
"containing the FreeBSD distribution files:");
if (!val)
@@ -348,21 +347,19 @@ mediaSetUFS(char *str)
}
int
-mediaSetNFS(char *str)
+mediaSetNFS(dialogMenuItem *self)
{
static Device nfsDevice;
char *cp;
- if (!(str && !strcmp(str, "script") && (cp = variable_get(VAR_NFS_PATH)))) {
- cp = variable_get_value(VAR_NFS_PATH, "Please enter the full NFS file specification for the remote\n"
- "host and directory containing the FreeBSD distribution files.\n"
- "This should be in the format: hostname:/some/freebsd/dir");
- if (!cp)
- return RET_FAIL;
- }
+ cp = variable_get_value(VAR_NFS_PATH, "Please enter the full NFS file specification for the remote\n"
+ "host and directory containing the FreeBSD distribution files.\n"
+ "This should be in the format: hostname:/some/freebsd/dir");
+ if (!cp)
+ return RET_FAIL;
strncpy(nfsDevice.name, cp, DEV_NAME_MAX);
/* str == NULL means we were just called to change NFS paths, not network interfaces */
- if (str && strcmp(str, "script") && !tcpDeviceSelect())
+ if (!tcpDeviceSelect())
return RET_FAIL;
nfsDevice.type = DEVICE_TYPE_NFS;
nfsDevice.init = mediaInitNFS;
@@ -519,7 +516,7 @@ mediaExtractDist(char *dir, int fd)
}
int
-mediaGetType(char *unused)
+mediaGetType(dialogMenuItem *self)
{
if (!dmenuOpenSimple(&MenuMedia))
return RET_FAIL;
@@ -541,7 +538,7 @@ mediaVerify(void)
/* Set FTP error behavior */
int
-mediaSetFtpOnError(char *str)
+mediaSetFtpOnError(dialogMenuItem *self)
{
char *cp = variable_get(VAR_FTP_ONERROR);
@@ -563,7 +560,7 @@ mediaSetFtpOnError(char *str)
/* Set the FTP username and password fields */
int
-mediaSetFtpUserPass(char *str)
+mediaSetFtpUserPass(dialogMenuItem *self)
{
char *pass;
@@ -578,7 +575,7 @@ mediaSetFtpUserPass(char *str)
/* Set CPIO verbosity level */
int
-mediaSetCPIOVerbosity(char *str)
+mediaSetCPIOVerbosity(dialogMenuItem *self)
{
char *cp = variable_get(VAR_CPIO_VERBOSITY);
diff --git a/usr.sbin/sysinstall/menus.c b/usr.sbin/sysinstall/menus.c
index 6f98217..14edc86 100644
--- a/usr.sbin/sysinstall/menus.c
+++ b/usr.sbin/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.47 1996/03/30 16:19:40 jkh Exp $
+ * $Id: menus.c,v 1.48 1996/04/03 06:55:09 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -53,119 +53,94 @@
/* The initial installation menu */
DMenu MenuInitial = {
DMENU_NORMAL_TYPE,
- "Welcome to FreeBSD!", /* title */
+ "Welcome to FreeBSD!", /* title */
"This is the main menu of the FreeBSD installation system. Please\n\
select one of the options below by using the arrow keys or typing the\n\
first character of the option name you're interested in. Invoke an\n\
-option by pressing [ENTER].", /* prompt */
+option by pressing [ENTER].", /* prompt */
"Press F1 for usage instructions", /* help line */
"usage", /* help file */
-{ { "Usage", "Quick start - How to use this menu system", /* U */
- DMENU_DISPLAY_FILE, "usage", 0, 0 },
- { "Doc", "More detailed documentation on FreeBSD", /* D */
- DMENU_SUBMENU, &MenuDocumentation, 0, 0 },
- { "Options", "Go to options editor", /* O */
- DMENU_CALL, optionsEditor, 0, 0 },
- { "Novice", "Begin a novice installation (for beginners)", /* N */
- DMENU_CALL, installNovice, 0, 0 },
- { "Express", "Begin a quick installation (for the impatient)", /* E */
- DMENU_CALL, installExpress, 0, 0 },
- { "Custom", "Begin a custom installation (for experts)", /* C */
- DMENU_SUBMENU, &MenuInstallCustom, 0, 0 },
- { "Fixit", "Mount fixit floppy and go into repair mode", /* F */
- DMENU_CALL, installFixit, 0, 0 },
- { "Upgrade", "Upgrade an existing 2.0.5 system", /* U */
- DMENU_CALL, installUpgrade, 0, 0 },
- { "Configure", "Do post-install configuration of FreeBSD", /* C (dup) */
- DMENU_SUBMENU, &MenuConfigure, 0, 0 },
- { "Quit", "Exit this menu (and the installation)", /* Q */
- DMENU_CANCEL, NULL, 0, 0 },
- { "Load", "Load a pre-configuration file from floppy",
- DMENU_CALL, installPreconfig, 0, },
+{ { "Usage", "Quick start - How to use this menu system", NULL, dmenuDisplayFile, NULL, "usage" },
+ { "Doc", "More detailed documentation on FreeBSD", NULL, dmenuSubmenu, NULL, &MenuDocumentation },
+ { "Options", "Go to options editor", NULL, optionsEditor },
+ { "Novice", "Begin a novice installation (for beginners)", NULL, installNovice },
+ { "Express", "Begin a quick installation (for the impatient)", NULL, installExpress },
+ { "Custom", "Begin a custom installation (for experts)", NULL, dmenuSubmenu, NULL, &MenuInstallCustom },
+ { "Fixit", "Mount fixit floppy and go into repair mode", NULL, installFixit },
+ { "Upgrade", "Upgrade an existing 2.0.5 system", NULL, installUpgrade },
+ { "Configure","Do post-install configuration of FreeBSD", NULL, dmenuSubmenu, NULL, &MenuConfigure },
+ { "Quit", "Exit this menu (and the installation)", NULL },
{ NULL } },
};
/* The main documentation menu */
DMenu MenuDocumentation = {
-DMENU_NORMAL_TYPE,
-"Documentation for FreeBSD " RELEASE_NAME, /* Title */
-"If you are at all unsure about the configuration of your hardware\n\
+ DMENU_NORMAL_TYPE,
+ "Documentation for FreeBSD " RELEASE_NAME,
+ "If you are at all unsure about the configuration of your hardware\n\
or are looking to build a system specifically for FreeBSD, read the\n\
Hardware guide! New users should also read the Install document for\n\
a step-by-step tutorial on installing FreeBSD. For general information,\n\
consult the README file.",
-"Confused? Press F1 for help.",
-"usage",
-{ { "README", "Read this for a general description of FreeBSD",
- DMENU_DISPLAY_FILE, "readme", 0, 0 },
- { "Hardware", "The FreeBSD survival guide for PC hardware.",
- DMENU_DISPLAY_FILE, "hardware", 0, 0 },
- { "Install", "A step-by-step guide to installing FreeBSD.",
- DMENU_DISPLAY_FILE, "install", 0, 0 },
- { "Copyright", "The FreeBSD Copyright notices.",
- DMENU_DISPLAY_FILE, "COPYRIGHT", 0, 0 },
- { "Release", "The release notes for this version of FreeBSD.",
- DMENU_DISPLAY_FILE, "relnotes", 0, 0 },
- { "HTML Docs", "Go to the HTML documentation menu (post-install).",
- DMENU_CALL, docBrowser, 0, 0 },
- { "Exit", "Exit this menu (returning to previous)",
- DMENU_CANCEL, NULL, 0, 0 },
+ "Confused? Press F1 for help.",
+ "usage",
+{ { "README", "A general description of FreeBSD. Read this!", NULL, dmenuDisplayFile, NULL, "readme" },
+ { "Hardware", "The FreeBSD survival guide for PC hardware.", NULL, dmenuDisplayFile, NULL, "hardware" },
+ { "Install", "A step-by-step guide to installing FreeBSD.", NULL, dmenuDisplayFile, NULL, "install" },
+ { "Copyright","The FreeBSD Copyright notices.", NULL, dmenuDisplayFile, NULL, "COPYRIGHT" },
+ { "Release", "The release notes for this version of FreeBSD.", NULL, dmenuDisplayFile, NULL, "relnotes" },
+ { "HTML Docs","Go to the HTML documentation menu (post-install).", NULL, docBrowser },
+ { "Exit", "Exit this menu (returning to previous)", NULL, dmenuCancel },
{ NULL } },
};
DMenu MenuMouse = {
-DMENU_NORMAL_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\
+ DMENU_NORMAL_TYPE,
+ "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\
somewhat. Once you've selected one of the below, you can specify\n\
/dev/mouse as your mouse device when running the XFree86 configuration\n\
utility (see Configuration menu). Please note that for PS/2 mice,\n\
a kernel recompile is also required! See the handbook for more details\n\
on building a kernel.",
-"For more information, visit the Documentation menu",
-NULL,
-{ { "COM1", "Serial mouse on COM1",
- DMENU_SYSTEM_COMMAND, "ln -fs /dev/cuaa0 /dev/mouse", 0, 0 },
- { "COM2", "Serial mouse on COM2",
- DMENU_SYSTEM_COMMAND, "ln -fs /dev/cuaa1 /dev/mouse", 0, 0 },
- { "COM3", "Serial mouse on COM3",
- DMENU_SYSTEM_COMMAND, "ln -fs /dev/cuaa2 /dev/mouse", 0, 0 },
- { "COM4", "Serial mouse on COM4",
- DMENU_SYSTEM_COMMAND, "ln -fs /dev/cuaa3 /dev/mouse", 0, 0 },
- { "BusMouse", "Logitech or ATI bus mouse",
- DMENU_SYSTEM_COMMAND, "ln -fs /dev/mse0 /dev/mouse", 0, 0 },
- { "PS/2", "PS/2 style mouse (requires new kernel)",
- DMENU_SYSTEM_COMMAND, "ln -fs /dev/psm0 /dev/mouse", 0, 0 },
+ "For more information, visit the Documentation menu",
+ NULL,
+{ { "COM1", "Serial mouse on COM1", NULL, dmenuSystemCommand, NULL, "ln -fs /dev/cuaa0 /dev/mouse" },
+ { "COM2", "Serial mouse on COM2", NULL, dmenuSystemCommand, NULL, "ln -fs /dev/cuaa1 /dev/mouse" },
+ { "COM3", "Serial mouse on COM3", NULL, dmenuSystemCommand, NULL, "ln -fs /dev/cuaa2 /dev/mouse" },
+ { "COM4", "Serial mouse on COM4", NULL, dmenuSystemCommand, NULL, "ln -fs /dev/cuaa3 /dev/mouse" },
+ { "BusMouse", "Logitech or ATI bus mouse", NULL, dmenuSystemCommand, NULL, "ln -fs /dev/mse0 /dev/mouse" },
+ { "PS/2", "PS/2 style mouse (requires kernel rebuild)", NULL, dmenuSystemCommand, NULL, "ln -fs /dev/psm0 /dev/mouse" },
{ NULL } },
};
DMenu MenuMediaCDROM = {
-DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
-"Choose a CDROM type",
-"FreeBSD can be installed directly from a CDROM containing a valid\n\
+ DMENU_NORMAL_TYPE,
+ "Choose a CDROM type",
+ "FreeBSD can be installed directly from a CDROM containing a valid\n\
FreeBSD distribution. If you are seeing this menu it is because\n\
more than one CDROM drive was found on your system. Please select one\n\
of the following CDROM drives as your installation drive.",
-"Press F1 to read the installation guide",
-"install",
-{ { NULL } },
+ "Press F1 to read the installation guide",
+ "install",
+ { { NULL } },
};
DMenu MenuMediaFloppy = {
-DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
-"Choose a Floppy drive",
-"You have more than one floppy drive. Please chose the drive\n\
+ DMENU_NORMAL_TYPE,
+ "Choose a Floppy drive",
+ "You have more than one floppy drive. Please chose the drive\n\
you would like to use for this operation",
-NULL,
-NULL,
-{ { NULL } },
+ NULL,
+ NULL,
+ { { NULL } },
};
DMenu MenuMediaDOS = {
-DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
-"Choose a DOS partition",
-"FreeBSD can be installed directly from a DOS partition\n\
+ DMENU_NORMAL_TYPE,
+ "Choose a DOS partition",
+ "FreeBSD can be installed directly from a DOS partition\n\
assuming, of course, that you have copied the relevant\n\
distributions into your DOS partition before starting this\n\
installation. If this is not the case then you should reboot\n\
@@ -173,151 +148,151 @@ DOS at this time and copy the distributions you wish to install\n\
into a \"FREEBSD\" subdirectory on one of your DOS partitions.\n\
Otherwise, please select the DOS partition containing the FreeBSD\n\
distribution files.",
-"Press F1 to read the installation guide",
-"install",
-{ { NULL } },
+ "Press F1 to read the installation guide",
+ "install",
+ { { NULL } },
};
DMenu MenuMediaFTP = {
-DMENU_NORMAL_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\
+ DMENU_NORMAL_TYPE,
+ "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\
carries more than the base distribution kits. Only the Primary site is\n\
guaranteed to carry the full range of possible distributions.",
-"Select a site that's close!",
-"install",
-{ { "Primary Site", "ftp.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "Other", "Specify some other ftp site by URL",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=other", 0, 0 },
- { "Australia", "ftp.au.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp.au.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "Australia #2", "ftp2.au.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp2.au.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "Australia #3", "ftp3.au.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp3.au.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "Australia #4", "ftp4.au.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp4.au.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "Brazil", "ftp.br.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp.br.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "Brazil #2", "ftp2.br.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp2.br.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "Brazil #3", "ftp3.br.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp3.br.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "Brazil #4", "ftp4.br.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp4.br.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "Brazil #5", "ftp5.br.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp5.br.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "Canada", "ftp.ca.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp.ca.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "Czech Republic", "sunsite.mff.cuni.cz",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://sunsite.mff.cuni.cz/OS/FreeBSD/", 0, 0 },
- { "Finland", "nic.funet.fi",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://nic.funet.fi/pub/unix/FreeBSD/", 0, 0 },
- { "France", "ftp.ibp.fr",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp.ibp.fr/pub/FreeBSD/", 0, 0 },
- { "Germany", "ftp.de.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp.de.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "Germany #2", "ftp2.de.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp2.de.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "Germany #3", "ftp3.de.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp3.de.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "Germany #4", "ftp4.de.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp4.de.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "Germany #5", "ftp5.de.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp5.de.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "Germany #6", "ftp6.de.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp6.de.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "Germany #7", "ftp7.de.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp7.de.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "Hong Kong", "ftp.hk.super.net",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp.hk.super.net/pub/FreeBSD/", 0, 0 },
- { "Ireland", "ftp.ie.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp.ie.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "Israel", "orgchem.weizmann.ac.il",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://orgchem.weizmann.ac.il/pub/FreeBSD/", 0, 0 },
- { "Israel #2", "xray4.weizmann.ac.il",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://xray4.weizmann.ac.il/pub/FreeBSD/", 0, 0 },
- { "Japan", "ftp.jp.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp.jp.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "Japan #2", "ftp2.jp.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp2.jp.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "Japan #3", "ftp3.jp.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp3.jp.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "Japan #4", "ftp4.jp.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp4.jp.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "Japan #5", "ftp5.jp.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp5.jp.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "Japan #6", "ftp6.jp.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp6.jp.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "Korea", "ftp.kr.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp.kr.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "Korea #2", "ftp2.kr.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp2.kr.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "Netherlands", "ftp.nl.net",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp.nl.net/pub/os/FreeBSD/", 0, 0 },
- { "Poland", "SunSITE.icm.edu.pl",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://SunSITE.icm.edu.pl/pub/FreeBSD/", 0, 0 },
- { "Portugal", "ftp.ua.pt",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp.ua.pt/pub/misc/FreeBSD/", 0, 0 },
- { "Russia", "ftp.kiae.su",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp.kiae.su/FreeBSD/", 0, 0 },
- { "South Africa", "ftp.za.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp.za.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "South Africa #2", "ftp2.za.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp2.za.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "Sweden", "ftp.luth.se",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp.luth.se/pub/FreeBSD/", 0, 0 },
- { "Taiwan", "ftp.tw.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp.tw.freebsd.org/pub/FreeBSD", 0, 0 },
- { "Taiwan #2", "ftp2.tw.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp2.tw.freebsd.org/pub/FreeBSD", 0, 0 },
- { "Taiwan #3", "ftp3.tw.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp3.tw.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "Thailand", "ftp.nectec.or.th",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp.nectec.or.th/pub/mirrors/FreeBSD/", 0, 0 },
- { "UK", "ftp.uk.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp.uk.freebsd.org/pub/BSD/FreeBSD/", 0, 0 },
- { "UK #2", "ftp2.uk.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp2.uk.freebsd.org/pub/BSD/FreeBSD/", 0, 0 },
- { "UK #3", "ftp3.uk.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp3.uk.freebsd.org/pub/BSD/FreeBSD/", 0, 0 },
- { "USA", "ftp.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "USA #2", "ftp2.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp2.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "USA #3", "ftp3.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp3.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "USA #4", "ftp4.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp4.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "USA #5", "ftp5.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp5.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "USA #6", "ftp6.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp6.freebsd.org/pub/FreeBSD/", 0, 0 },
- { "USA #7", "ftp7.freebsd.org",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp7.freebsd.org/pub/FreeBSD/", 0, 0 },
+ "Select a site that's close!",
+ "install",
+{ { "Primary Site", "ftp.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp.freebsd.org/pub/FreeBSD/" },
+ { "Other", "Specify some other ftp site by URL", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=other" },
+ { "Australia", "ftp.au.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp.au.freebsd.org/pub/FreeBSD/" },
+ { "Australia #2", "ftp2.au.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp2.au.freebsd.org/pub/FreeBSD/" },
+ { "Australia #3", "ftp3.au.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp3.au.freebsd.org/pub/FreeBSD/" },
+ { "Australia #4", "ftp4.au.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp4.au.freebsd.org/pub/FreeBSD/" },
+ { "Brazil", "ftp.br.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp.br.freebsd.org/pub/FreeBSD/" },
+ { "Brazil #2", "ftp2.br.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp2.br.freebsd.org/pub/FreeBSD/" },
+ { "Brazil #3", "ftp3.br.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp3.br.freebsd.org/pub/FreeBSD/" },
+ { "Brazil #4", "ftp4.br.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp4.br.freebsd.org/pub/FreeBSD/" },
+ { "Brazil #5", "ftp5.br.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp5.br.freebsd.org/pub/FreeBSD/" },
+ { "Canada", "ftp.ca.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp.ca.freebsd.org/pub/FreeBSD/" },
+ { "Czech Republic", "sunsite.mff.cuni.cz", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://sunsite.mff.cuni.cz/OS/FreeBSD/" },
+ { "Finland", "nic.funet.fi", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://nic.funet.fi/pub/unix/FreeBSD/" },
+ { "France", "ftp.ibp.fr", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp.ibp.fr/pub/FreeBSD/" },
+ { "Germany", "ftp.de.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp.de.freebsd.org/pub/FreeBSD/" },
+ { "Germany #2", "ftp2.de.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp2.de.freebsd.org/pub/FreeBSD/" },
+ { "Germany #3", "ftp3.de.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp3.de.freebsd.org/pub/FreeBSD/" },
+ { "Germany #4", "ftp4.de.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp4.de.freebsd.org/pub/FreeBSD/" },
+ { "Germany #5", "ftp5.de.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp5.de.freebsd.org/pub/FreeBSD/" },
+ { "Germany #6", "ftp6.de.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp6.de.freebsd.org/pub/FreeBSD/" },
+ { "Germany #7", "ftp7.de.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp7.de.freebsd.org/pub/FreeBSD/" },
+ { "Hong Kong", "ftp.hk.super.net", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp.hk.super.net/pub/FreeBSD/" },
+ { "Ireland", "ftp.ie.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp.ie.freebsd.org/pub/FreeBSD/" },
+ { "Israel", "orgchem.weizmann.ac.il", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://orgchem.weizmann.ac.il/pub/FreeBSD/" },
+ { "Israel #2", "xray4.weizmann.ac.il", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://xray4.weizmann.ac.il/pub/FreeBSD/" },
+ { "Japan", "ftp.jp.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp.jp.freebsd.org/pub/FreeBSD/" },
+ { "Japan #2", "ftp2.jp.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp2.jp.freebsd.org/pub/FreeBSD/" },
+ { "Japan #3", "ftp3.jp.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp3.jp.freebsd.org/pub/FreeBSD/" },
+ { "Japan #4", "ftp4.jp.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp4.jp.freebsd.org/pub/FreeBSD/" },
+ { "Japan #5", "ftp5.jp.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp5.jp.freebsd.org/pub/FreeBSD/" },
+ { "Japan #6", "ftp6.jp.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp6.jp.freebsd.org/pub/FreeBSD/" },
+ { "Korea", "ftp.kr.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp.kr.freebsd.org/pub/FreeBSD/" },
+ { "Korea #2", "ftp2.kr.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp2.kr.freebsd.org/pub/FreeBSD/" },
+ { "Netherlands", "ftp.nl.net", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp.nl.net/pub/os/FreeBSD/" },
+ { "Poland", "SunSITE.icm.edu.pl", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://SunSITE.icm.edu.pl/pub/FreeBSD/" },
+ { "Portugal", "ftp.ua.pt", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp.ua.pt/pub/misc/FreeBSD/" },
+ { "Russia", "ftp.kiae.su", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp.kiae.su/FreeBSD/" },
+ { "South Africa", "ftp.za.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp.za.freebsd.org/pub/FreeBSD/" },
+ { "South Africa #2", "ftp2.za.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp2.za.freebsd.org/pub/FreeBSD/" },
+ { "Sweden", "ftp.luth.se", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp.luth.se/pub/FreeBSD/" },
+ { "Taiwan", "ftp.tw.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp.tw.freebsd.org/pub/FreeBSD" },
+ { "Taiwan #2", "ftp2.tw.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp2.tw.freebsd.org/pub/FreeBSD" },
+ { "Taiwan #3", "ftp3.tw.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp3.tw.freebsd.org/pub/FreeBSD/" },
+ { "Thailand", "ftp.nectec.or.th", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp.nectec.or.th/pub/mirrors/FreeBSD/" },
+ { "UK", "ftp.uk.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp.uk.freebsd.org/pub/BSD/FreeBSD/" },
+ { "UK #2", "ftp2.uk.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp2.uk.freebsd.org/pub/BSD/FreeBSD/" },
+ { "UK #3", "ftp3.uk.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp3.uk.freebsd.org/pub/BSD/FreeBSD/" },
+ { "USA", "ftp.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp.freebsd.org/pub/FreeBSD/" },
+ { "USA #2", "ftp2.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp2.freebsd.org/pub/FreeBSD/" },
+ { "USA #3", "ftp3.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp3.freebsd.org/pub/FreeBSD/" },
+ { "USA #4", "ftp4.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp4.freebsd.org/pub/FreeBSD/" },
+ { "USA #5", "ftp5.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp5.freebsd.org/pub/FreeBSD/" },
+ { "USA #6", "ftp6.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp6.freebsd.org/pub/FreeBSD/" },
+ { "USA #7", "ftp7.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp7.freebsd.org/pub/FreeBSD/" },
{ NULL } }
};
DMenu MenuMediaTape = {
-DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
-"Choose a tape drive type",
-"FreeBSD can be installed from tape drive, though this installation\n\
+ DMENU_NORMAL_TYPE,
+ "Choose a tape drive type",
+ "FreeBSD can be installed from tape drive, though this installation\n\
method requires a certain amount of temporary storage in addition\n\
to the space required by the distribution itself (tape drives make\n\
poor random-access devices, so we extract _everything_ on the tape\n\
in one pass). If you have sufficient space for this, then you should\n\
select one of the following tape devices detected on your system.",
-"Press F1 to read the installation guide",
-"install",
-{ { NULL } },
+ "Press F1 to read the installation guide",
+ "install",
+ { { NULL } },
};
DMenu MenuNetworkDevice = {
-DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
-"Network interface information required",
-"If you are using PPP over a serial device (cuaa0 or cuaa1) as opposed\n\
+ DMENU_NORMAL_TYPE,
+ "Network interface information required",
+ "If you are using PPP over a serial device (cuaa0 or cuaa1) as opposed\n\
to a direct ethernet connection, then you may first need to dial your\n\
service provider using the ppp utility we provide for that purpose.\n\
You can also install over a parallel port using a special \"laplink\"\n\
@@ -326,92 +301,75 @@ a fairly recent (2.0R or later) release to talk to.\n\n\
To use PPP, select one of the serial devices, otherwise select lp0 for\n\
the parallel port or one of the ethernet controllers (if you have one)\n\
for an ethernet installation.",
-"Press F1 to read network configuration manual",
-"network_device",
-{ { NULL } },
+ "Press F1 to read network configuration manual",
+ "network_device",
+ { { NULL } },
};
/* The media selection menu */
DMenu MenuMedia = {
-DMENU_NORMAL_TYPE,
-"Choose Installation Media",
-"FreeBSD can be installed from a variety of different installation\n\
+ DMENU_NORMAL_TYPE,
+ "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\
installing FreeBSD from a supported CDROM drive then this is generally\n\
the best media to use if you have no overriding reason for using other\n\
media.",
-"Press F1 for more information on the various media types",
-"media",
-{ { "CDROM", "Install from a FreeBSD CDROM",
- DMENU_CALL, mediaSetCDROM, 0, 0 },
- { "DOS", "Install from a DOS partition",
- DMENU_CALL, mediaSetDOS, 0, 0 },
- { "File System", "Install from an existing filesystem",
- DMENU_CALL, mediaSetUFS, 0, 0 },
- { "Floppy", "Install from a floppy disk set",
- DMENU_CALL, mediaSetFloppy, 0, 0 },
- { "FTP", "Install from an FTP server",
- DMENU_CALL, mediaSetFTPActive, 0, 0 },
- { "FTP Passive", "Install from an FTP server through a firewall",
- DMENU_CALL, mediaSetFTPPassive, 0, 0 },
- { "NFS", "Install over NFS",
- DMENU_CALL, mediaSetNFS, 0, 0 },
- { "Tape", "Install from SCSI or QIC tape",
- DMENU_CALL, mediaSetTape, 0, 0 },
+ "Press F1 for more information on the various media types",
+ "media",
+{ { "CDROM", "Install from a FreeBSD CDROM", NULL, mediaSetCDROM },
+ { "DOS", "Install from a DOS partition", NULL, mediaSetDOS },
+ { "File System", "Install from an existing filesystem", NULL, mediaSetUFS },
+ { "Floppy", "Install from a floppy disk set", NULL, mediaSetFloppy },
+ { "FTP", "Install from an FTP server", NULL, mediaSetFTPActive },
+ { "FTP Passive", "Install from an FTP server through a firewall", NULL, mediaSetFTPPassive },
+ { "NFS", "Install over NFS", NULL, mediaSetNFS },
+ { "Tape", "Install from SCSI or QIC tape", NULL, mediaSetTape },
{ NULL } },
};
/* The distributions menu */
DMenu MenuDistributions = {
-DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
-"Choose Distributions",
-"As a convenience, we provide several \"canned\" distribution sets.\n\
+ DMENU_NORMAL_TYPE,
+ "Choose Distributions",
+ "As a convenience, we provide several \"canned\" distribution sets.\n\
These select what we consider to be the most reasonable defaults for the\n\
type of system in question. If you would prefer to pick and choose\n\
the list of distributions yourself, simply select \"Custom\".",
-"Press F1 for more information on these options.",
-"distributions",
-{ { "Developer", "Full sources, binaries and doc but no games [180MB]",
- DMENU_CALL, distSetDeveloper, 0, 0 },
- { "X-Developer", "Same as above, but includes XFree86 [201MB]",
- DMENU_CALL, distSetXDeveloper, 0, 0 },
- { "Kern-Developer", "Full binaries and doc, kernel sources only [70MB]",
- DMENU_CALL, distSetKernDeveloper, 0, 0 },
- { "User", "Average user - binaries and doc but no sources [52MB]",
- DMENU_CALL, distSetUser, 0, 0 },
- { "X-User", "Same as above, but includes XFree86 [52MB]",
- DMENU_CALL, distSetXUser, 0, 0 },
- { "Minimal", "The smallest configuration possible [44MB]",
- DMENU_CALL, distSetMinimum, 0, 0 },
- { "Everything", "All sources, binaries and XFree86 binaries [700MB]",
- DMENU_CALL, distSetEverything, 0, 0 },
- { "Custom", "Specify your own distribution set [?]",
- DMENU_SUBMENU, &MenuSubDistributions, 0, 0 },
- { "Clear", "Reset selected distribution list to None",
- DMENU_CALL, distReset, 0, 0 },
+ "Press F1 for more information on these options.",
+ "distributions",
+{ { "Developer", "Full sources, binaries and doc but no games [180MB]", NULL, distSetDeveloper },
+ { "X-Developer", "Same as above, but includes XFree86 [201MB]", NULL, distSetXDeveloper },
+ { "Kern-Developer", "Full binaries and doc, kernel sources only [70MB]", NULL, distSetKernDeveloper },
+ { "User", "Average user - binaries and doc but no sources [52MB]", NULL, distSetUser },
+ { "X-User", "Same as above, but includes XFree86 [52MB]", NULL, distSetXUser },
+ { "Minimal", "The smallest configuration possible [44MB]", NULL, distSetMinimum },
+ { "Everything", "All sources, binaries and XFree86 binaries [700MB]", NULL, distSetEverything },
+ { "Custom", "Specify your own distribution set [?]", NULL, dmenuSubmenu, NULL, &MenuSubDistributions },
+ { "Clear", "Reset selected distribution list to None", NULL, distReset },
{ NULL } },
};
-static char *
-DESFlagCheck(DMenuItem *item)
+static int
+DESFlagCheck(dialogMenuItem *item)
{
- return (Dists & DIST_DES) ? "ON" : "OFF";
+ return Dists & DIST_DES;
}
-static char *
-srcFlagCheck(DMenuItem *item)
+static int
+srcFlagCheck(dialogMenuItem *item)
{
- return (Dists & DIST_SRC) ? "ON" : "OFF";
+ return Dists & DIST_SRC;
}
-static char *
-x11FlagCheck(DMenuItem *item)
+static int
+x11FlagCheck(dialogMenuItem *item)
{
- return (Dists & DIST_XF86) ? "ON" : "OFF";
+ return Dists & DIST_XF86;
}
DMenu MenuSubDistributions = {
- DMENU_MULTIPLE_TYPE | DMENU_SELECTION_RETURNS,
+ DMENU_CHECKLIST_TYPE,
"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\
@@ -419,101 +377,103 @@ DES distribution out of the U.S.! It is for U.S. customers only.",
NULL,
NULL,
{ { "bin", "Binary base distribution (required) [36MB]",
- DMENU_SET_FLAG, &Dists, DIST_BIN, 0, dmenuFlagCheck },
- { "commercial", "Commercial demos and shareware [10MB]",
- DMENU_SET_FLAG, &Dists, DIST_COMMERCIAL, 0, dmenuFlagCheck },
- { "compat1x", "FreeBSD 1.x binary compatibility package [2MB]",
- DMENU_SET_FLAG, &Dists, DIST_COMPAT1X, 0, dmenuFlagCheck },
- { "compat20", "FreeBSD 2.0 binary compatibility package [2MB]",
- DMENU_SET_FLAG, &Dists, DIST_COMPAT20, 0, dmenuFlagCheck },
+ dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_BIN },
+ { "commercial", "Commercial and shareware demos [10MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_COMMERCIAL },
+ { "compat1x", "FreeBSD 1.x binary compatibility [2MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_COMPAT1X },
+ { "compat20", "FreeBSD 2.0 binary compatibility [2MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_COMPAT20 },
+ { "compat21", "FreeBSD 2.1 binary compatibility [2MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_COMPAT21 },
{ "DES", "DES encryption code - NOT FOR EXPORT! [.3MB]",
- DMENU_CALL, distSetDES, 0, 0, DESFlagCheck },
+ DESFlagCheck, distSetDES },
{ "dict", "Spelling checker dictionary files [4.2MB]",
- DMENU_SET_FLAG, &Dists, DIST_DICT, 0, dmenuFlagCheck },
+ dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_DICT },
{ "doc", "FreeBSD Handbook and other online docs [10MB]",
- DMENU_SET_FLAG, &Dists, DIST_DOC, 0, dmenuFlagCheck },
- { "games", "Games (non-commercial) [6.4MB]",
- DMENU_SET_FLAG, &Dists, DIST_GAMES, 0, dmenuFlagCheck },
+ dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_DOC },
+ { "games", "Games (non-commercial) [6.4MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_GAMES },
{ "info", "GNU info files [4.1MB]",
- DMENU_SET_FLAG, &Dists, DIST_INFO, 0, dmenuFlagCheck },
+ dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_INFO },
{ "man", "System manual pages - recommended [3.3MB]",
- DMENU_SET_FLAG, &Dists, DIST_MANPAGES, 0, dmenuFlagCheck },
- { "proflibs", "Profiled versions of the libraries [3.3MB]",
- DMENU_SET_FLAG, &Dists, DIST_PROFLIBS, 0, dmenuFlagCheck },
+ dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_MANPAGES },
+ { "proflibs", "Profiled versions of the libraries [3.3MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_PROFLIBS },
{ "src", "Sources for everything but DES [120MB]",
- DMENU_CALL, distSetSrc, 0, 0, srcFlagCheck },
- { "XFree86", "The XFree86 3.1.2-S distribution",
- DMENU_CALL, distSetXF86, 0, 0, x11FlagCheck },
+ srcFlagCheck, distSetSrc },
+ { "XFree86", "The XFree86 3.1.2-S distribution",
+ x11FlagCheck, distSetXF86 },
{ "Experimental", "Work in progress!",
- DMENU_SET_FLAG, &Dists, DIST_EXPERIMENTAL, 0, dmenuFlagCheck },
+ dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_EXPERIMENTAL },
{ NULL } },
};
DMenu MenuDESDistributions = {
-DMENU_MULTIPLE_TYPE | DMENU_SELECTION_RETURNS,
-"Select the encryption facilities you wish to install.",
-"Please check off any special DES-based encryption distributions\n\
+ DMENU_CHECKLIST_TYPE,
+ "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\
EXPORT from the United States, nor are they available on CDROM (for the\n\
same reason). For information on non-U.S. FTP distributions of this\n\
software, please consult the release notes.",
-NULL,
-NULL,
-{ { "des", "Basic DES services (rlogin, init, etc) [1MB]",
- DMENU_SET_FLAG, &DESDists, DIST_DES_DES, 0, dmenuFlagCheck },
- { "krb", "Kerberos encryption services [2MB]",
- DMENU_SET_FLAG, &DESDists, DIST_DES_KERBEROS, 0, dmenuFlagCheck },
+ NULL,
+ NULL,
+{ { "des", "Basic DES encryption services [1MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &DESDists, '[', 'X', ']', DIST_DES_DES, },
+ { "krb", "Kerberos encryption services [2MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &DESDists, '[', 'X', ']', DIST_DES_KERBEROS },
{ "sebones", "Sources for eBones (Kerberos) [1MB]",
- DMENU_SET_FLAG, &DESDists, DIST_DES_SEBONES, 0, dmenuFlagCheck },
- { "ssecure", "Sources for DES libs and utilities [1MB]",
- DMENU_SET_FLAG, &DESDists, DIST_DES_SSECURE, 0, dmenuFlagCheck },
+ dmenuFlagCheck, dmenuSetFlag, NULL, &DESDists, '[', 'X', ']', DIST_DES_SEBONES },
+ { "ssecure", "Sources for DES [1MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &DESDists, '[', 'X', ']', DIST_DES_SSECURE },
{ NULL } },
};
DMenu MenuSrcDistributions = {
-DMENU_MULTIPLE_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\
+ DMENU_CHECKLIST_TYPE,
+ "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.",
-NULL,
-NULL,
-{ { "base", "top-level files in /usr/src [300K]",
- DMENU_SET_FLAG, &SrcDists, DIST_SRC_BASE, 0, dmenuFlagCheck },
- { "gnu", "/usr/src/gnu (software from the GNU Project) [42MB]",
- DMENU_SET_FLAG, &SrcDists, DIST_SRC_GNU, 0, dmenuFlagCheck },
- { "etc", "/usr/src/etc (miscellaneous system files) [460K]",
- DMENU_SET_FLAG, &SrcDists, DIST_SRC_ETC, 0, dmenuFlagCheck },
- { "games", "/usr/src/games (diversions) [7.8MB]",
- DMENU_SET_FLAG, &SrcDists, DIST_SRC_GAMES, 0, dmenuFlagCheck },
+ NULL,
+ NULL,
+{ { "base", "top-level files in /usr/src [300K]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_BASE },
+ { "gnu", "/usr/src/gnu (software from the GNU Project) [42MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_GNU },
+ { "etc", "/usr/src/etc (miscellaneous system files) [460K]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_ETC },
+ { "games", "/usr/src/games (the obvious!) [7.8MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_GAMES },
{ "include", "/usr/src/include (header files) [467K]",
- DMENU_SET_FLAG, &SrcDists, DIST_SRC_INCLUDE, 0, dmenuFlagCheck },
- { "lib", "/usr/src/lib (system libraries) [9.2MB]",
- DMENU_SET_FLAG, &SrcDists, DIST_SRC_LIB, 0, dmenuFlagCheck },
+ dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_INCLUDE },
+ { "lib", "/usr/src/lib (system libraries) [9.2MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_LIB },
{ "libexec", "/usr/src/libexec (system programs) [1.2MB]",
- DMENU_SET_FLAG, &SrcDists, DIST_SRC_LIBEXEC, 0, dmenuFlagCheck },
- { "lkm", "/usr/src/lkm (Loadable Kernel Modules) [193K]",
- DMENU_SET_FLAG, &SrcDists, DIST_SRC_LKM, 0, dmenuFlagCheck },
+ dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_LIBEXEC },
+ { "lkm", "/usr/src/lkm (Loadable Kernel Modules) [193K]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_LKM },
{ "release", "/usr/src/release (release-generation tools) [533K]",
- DMENU_SET_FLAG, &SrcDists, DIST_SRC_RELEASE, 0, dmenuFlagCheck },
- { "bin", "/usr/src/bin (system binaries) [2.5MB]",
- DMENU_SET_FLAG, &SrcDists, DIST_SRC_BIN, 0, dmenuFlagCheck },
- { "sbin", "/usr/src/sbin (system binaries) [1.3MB]",
- DMENU_SET_FLAG, &SrcDists, DIST_SRC_SBIN, 0, dmenuFlagCheck },
+ dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_RELEASE },
+ { "bin", "/usr/src/bin (system binaries) [2.5MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_BIN },
+ { "sbin", "/usr/src/sbin (system binaries) [1.3MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_SBIN },
{ "share", "/usr/src/share (documents and shared files) [10MB]",
- DMENU_SET_FLAG, &SrcDists, DIST_SRC_SHARE, 0, dmenuFlagCheck },
- { "sys", "/usr/src/sys (FreeBSD kernel) [13MB]",
- DMENU_SET_FLAG, &SrcDists, DIST_SRC_SYS, 0, dmenuFlagCheck },
- { "ubin", "/usr/src/usr.bin (user binaries) [13MB]",
- DMENU_SET_FLAG, &SrcDists, DIST_SRC_UBIN, 0, dmenuFlagCheck },
+ dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_SHARE },
+ { "sys", "/usr/src/sys (FreeBSD kernel) [13MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_SYS },
+ { "ubin", "/usr/src/usr.bin (user binaries) [13MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_UBIN },
{ "usbin", "/usr/src/usr.sbin (aux system binaries) [14MB]",
- DMENU_SET_FLAG, &SrcDists, DIST_SRC_USBIN, 0, dmenuFlagCheck },
+ dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_USBIN },
{ "smailcf", "/usr/src/usr.sbin (sendmail config macros) [341K]",
- DMENU_SET_FLAG, &SrcDists, DIST_SRC_SMAILCF, 0, dmenuFlagCheck },
+ dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_SMAILCF },
{ NULL } },
};
static int
-clearx11(char *str)
+clearx11(dialogMenuItem *self)
{
XF86Dists = 0;
XF86ServerDists = 0;
@@ -530,81 +490,76 @@ distribution. We recommend that you select what you need from the basic\n\
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)",
- DMENU_SUBMENU, &MenuXF86SelectCore, 0, 0 },
- { "Server", "X server menu",
- DMENU_SUBMENU, &MenuXF86SelectServer, 0, 0 },
- { "Fonts", "Font set menu",
- DMENU_SUBMENU, &MenuXF86SelectFonts, 0, 0 },
- { "Exit", "Exit this menu (returning to previous)",
- DMENU_CANCEL, NULL, 0, 0 },
- { "Clear", "Reset XFree86 distribution list",
- DMENU_CALL, clearx11, 0, 0, 0 },
+{ { "Basic", "Basic component menu (required)", NULL, dmenuSubmenu, NULL, &MenuXF86SelectCore },
+ { "Server", "X server menu", NULL, dmenuSubmenu, NULL, &MenuXF86SelectServer },
+ { "Fonts", "Font set menu", NULL, dmenuSubmenu, NULL, &MenuXF86SelectFonts },
+ { "Exit", "Exit this menu (returning to previous)", NULL, dmenuCancel },
+ { "Clear", "Reset XFree86 distribution list", NULL, clearx11 },
{ NULL } },
};
DMenu MenuXF86SelectCore = {
- DMENU_MULTIPLE_TYPE | DMENU_SELECTION_RETURNS,
-"XFree86 3.1.2-S base distribution types",
-"Please check off the basic XFree86 components you wish to install.\n\
+ DMENU_CHECKLIST_TYPE,
+ "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.",
-"Press F1 to read the XFree86 release notes for FreeBSD",
-"XF86",
-{ { "bin", "Client applications and shared libs [4.1MB].",
- DMENU_SET_FLAG, &XF86Dists, DIST_XF86_BIN, 0, dmenuFlagCheck },
- { "lib", "Data files needed at runtime [750K]",
- DMENU_SET_FLAG, &XF86Dists, DIST_XF86_LIB, 0, dmenuFlagCheck },
- { "xicf", "Customizable xinit runtime configuration file [10K]",
- DMENU_SET_FLAG, &XF86Dists, DIST_XF86_XINIT, 0, dmenuFlagCheck },
- { "xdcf", "Customizable xdm runtime configuration file [20K]",
- DMENU_SET_FLAG, &XF86Dists, DIST_XF86_XDMCF, 0, dmenuFlagCheck },
- { "etc", "Clock setting and diagnostic source codes [70K]",
- DMENU_SET_FLAG, &XF86Dists, DIST_XF86_ETC, 0, dmenuFlagCheck },
- { "doc", "READMEs and release notes [600K]",
- DMENU_SET_FLAG, &XF86Dists, DIST_XF86_DOC, 0, dmenuFlagCheck },
- { "man", "Man pages [1.7MB]",
- DMENU_SET_FLAG, &XF86Dists, DIST_XF86_MAN, 0, dmenuFlagCheck },
- { "ctrb", "Various contributed binaries (ico, xman, etc) [550K]",
- DMENU_SET_FLAG, &XF86Dists, DIST_XF86_CTRB, 0, dmenuFlagCheck },
- { "prog", "Programmer's header and library files [4.1MB]",
- DMENU_SET_FLAG, &XF86Dists, DIST_XF86_PROG, 0, dmenuFlagCheck },
- { "link", "Kit to reconfigure/rebuild X Servers [8.8MB]",
- DMENU_SET_FLAG, &XF86Dists, DIST_XF86_LINK, 0, dmenuFlagCheck },
- { "ubin", "rstart daemon [2K]",
- DMENU_SET_FLAG, &XF86Dists, DIST_XF86_UBIN, 0, dmenuFlagCheck },
- { "pex", "PEX fonts and libs needed by PEX apps [290K]",
- DMENU_SET_FLAG, &XF86Dists, DIST_XF86_PEX, 0, dmenuFlagCheck },
+ "Press F1 to read the XFree86 release notes for FreeBSD",
+ "XF86",
+{ { "bin", "Client applications and shared libs [4.1MB].",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_BIN },
+ { "lib", "Data files needed at runtime [750K]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_LIB },
+ { "xicf", "Customizable xinit runtime configuration file [10K]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_XINIT },
+ { "xdcf", "Customizable xdm runtime configuration file [20K]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_XDMCF },
+ { "etc", "Clock setting and diagnostic source codes [70K]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_ETC },
+ { "doc", "READMEs and release notes [600K]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_DOC },
+ { "man", "Manual pages [1.7MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_MAN },
+ { "ctrb", "Various contributed binaries (ico, xman, etc) [550K]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_CTRB },
+ { "prog", "Programmer's header and library files [4.1MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_PROG },
+ { "link", "Kit to reconfigure/rebuild X Servers [8.8MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_LINK },
+ { "ubin", "rstart daemon [2K]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_UBIN },
+ { "pex", "PEX fonts and libs needed by PEX apps [290K]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_PEX },
{ "sources", "XFree86 3.1.2-S standard + contrib sources [200MB]",
- DMENU_SET_FLAG, &XF86Dists, DIST_XF86_SRC, 0, dmenuFlagCheck },
+ dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_SRC },
{ NULL } },
};
DMenu MenuXF86SelectFonts = {
-DMENU_MULTIPLE_TYPE | DMENU_SELECTION_RETURNS,
-"Font distribution selection.",
-"Please check off the individual font distributions you wish to\n\
+ DMENU_CHECKLIST_TYPE,
+ "Font distribution selection.",
+ "Please check off the individual font distributions you wish to\n\
install. At the minimum, you should install the standard\n\
75 DPI and misc fonts if you're also installing a server\n\
(these are selected by default).",
"Press F1 to read the XFree86 release notes for FreeBSD",
"XF86",
- { { "fnts", "Standard 75 DPI and miscellaneous fonts [3.6MB]",
- DMENU_SET_FLAG, &XF86FontDists, DIST_XF86_FONTS_MISC, 0, dmenuFlagCheck },
- { "f100", "100 DPI fonts [1.8MB]",
- DMENU_SET_FLAG, &XF86FontDists, DIST_XF86_FONTS_100, 0, dmenuFlagCheck },
- { "fcyr", "Cyrillic Fonts [1.8MB]",
- DMENU_SET_FLAG, &XF86FontDists, DIST_XF86_FONTS_CYR, 0, dmenuFlagCheck },
- { "fscl", "Speedo and Type scalable fonts [1.6MB]",
- DMENU_SET_FLAG, &XF86FontDists, DIST_XF86_FONTS_SCALE, 0, dmenuFlagCheck },
- { "non", "Japanese, Chinese and other non-english fonts [3.3MB]",
- DMENU_SET_FLAG, &XF86FontDists, DIST_XF86_FONTS_NON, 0, dmenuFlagCheck },
- { "server", "Font server [0.3MB]",
- DMENU_SET_FLAG, &XF86FontDists, DIST_XF86_FONTS_SERVER, 0, dmenuFlagCheck },
- { NULL } },
+{ { "fnts", "Standard 75 DPI and miscellaneous fonts [3.6MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &XF86FontDists, '[', 'X', ']', DIST_XF86_FONTS_MISC },
+ { "f100", "100 DPI fonts [1.8MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &XF86FontDists, '[', 'X', ']', DIST_XF86_FONTS_100 },
+ { "fcyr", "Cyrillic Fonts [1.8MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &XF86FontDists, '[', 'X', ']', DIST_XF86_FONTS_CYR },
+ { "fscl", "Speedo and Type scalable fonts [1.6MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &XF86FontDists, '[', 'X', ']', DIST_XF86_FONTS_SCALE },
+ { "non", "Japanese, Chinese and other non-english fonts [3.3MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &XF86FontDists, '[', 'X', ']', DIST_XF86_FONTS_NON },
+ { "server", "Font server [0.3MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &XF86FontDists, '[', 'X', ']', DIST_XF86_FONTS_SERVER },
+ { NULL } },
};
DMenu MenuXF86SelectServer = {
- DMENU_MULTIPLE_TYPE | DMENU_SELECTION_RETURNS,
+ DMENU_CHECKLIST_TYPE,
"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\
@@ -612,35 +567,35 @@ it is recommended that try the SVGA or VGA16 servers (the VGA16 and\n\
Mono servers are particularly well-suited to most LCD displays).",
"Press F1 to read the XFree86 release notes for FreeBSD",
"XF86",
- { { "SVGA", "Standard VGA or Super VGA display [2.8MB]",
- DMENU_SET_FLAG, &XF86ServerDists, DIST_XF86_SERVER_SVGA, 0, dmenuFlagCheck },
- { "VGA16", "Standard 16 color VGA display [1.3MB]",
- DMENU_SET_FLAG, &XF86ServerDists, DIST_XF86_SERVER_VGA16, 0, dmenuFlagCheck },
- { "Mono", "Standard Monochrome display [1.3MB]",
- DMENU_SET_FLAG, &XF86ServerDists, DIST_XF86_SERVER_MONO, 0, dmenuFlagCheck },
- { "8514", "8-bit (256 color) IBM 8514 or compatible card [2.2MB]",
- DMENU_SET_FLAG, &XF86ServerDists, DIST_XF86_SERVER_8514, 0, dmenuFlagCheck },
- { "AGX", "8-bit AGX card [2.4MB]",
- DMENU_SET_FLAG, &XF86ServerDists, DIST_XF86_SERVER_AGX, 0, dmenuFlagCheck },
- { "Ma8", "8-bit ATI Mach8 card [2.3MB]",
- DMENU_SET_FLAG, &XF86ServerDists, DIST_XF86_SERVER_MACH8, 0, dmenuFlagCheck },
- { "Ma32", "8 and 16-bit (65K color) for ATI Mach32 card [2.4MB]",
- DMENU_SET_FLAG, &XF86ServerDists, DIST_XF86_SERVER_MACH32, 0, dmenuFlagCheck },
- { "Ma64", "8 and 16-bit (65K color) for ATI Mach64 card [2.5MB]",
- DMENU_SET_FLAG, &XF86ServerDists, DIST_XF86_SERVER_MACH64, 0, dmenuFlagCheck },
- { "P9K", "8, 16, and 24-bit color for Weitek P9000 based boards [2.5MB]",
- DMENU_SET_FLAG, &XF86ServerDists, DIST_XF86_SERVER_P9000, 0, dmenuFlagCheck },
- { "S3", "8, 16 and 24-bit color for S3 based boards [2.7MB]",
- DMENU_SET_FLAG, &XF86ServerDists, DIST_XF86_SERVER_S3, 0, dmenuFlagCheck },
- { "W32", "8-bit Color for ET4000/W32, /W32i and /W32p cards [2.3MB]",
- DMENU_SET_FLAG, &XF86ServerDists, DIST_XF86_SERVER_W32, 0, dmenuFlagCheck },
- { "nest", "A nested server for testing purposes [1.8MB]",
- DMENU_SET_FLAG, &XF86ServerDists, DIST_XF86_SERVER_NEST, 0, dmenuFlagCheck },
- { NULL } },
+{ { "SVGA", "Standard VGA or Super VGA display [2.8MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_SVGA },
+ { "VGA16", "Standard 16 color VGA display [1.3MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_VGA16 },
+ { "Mono", "Standard Monochrome display [1.3MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_MONO },
+ { "8514", "8-bit (256 color) IBM 8514 or compatible card [2.2MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_8514 },
+ { "AGX", "8-bit AGX card [2.4MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_AGX },
+ { "Ma8", "8-bit ATI Mach8 card [2.3MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_MACH8 },
+ { "Ma32", "8 and 16-bit (65K color) for ATI Mach32 card [2.4MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_MACH32 },
+ { "Ma64", "8 and 16-bit (65K color) for ATI Mach64 card [2.5MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_MACH64 },
+ { "P9K", "8, 16, and 24-bit color for Weitek P9000 based boards [2.5MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_P9000 },
+ { "S3", "8, 16 and 24-bit color for S3 based boards [2.7MB]",
+ dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_S3 },
+ { "W32", "8-bit Color for ET4000/W32, /W32i and /W32p cards [2.3MB]",
+ 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 },
+ { NULL } },
};
DMenu MenuDiskDevices = {
- DMENU_MULTIPLE_TYPE | DMENU_SELECTION_RETURNS,
+ DMENU_CHECKLIST_TYPE,
"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\
@@ -654,22 +609,18 @@ and press [SPACE].",
};
DMenu MenuHTMLDoc = {
- DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
+ DMENU_NORMAL_TYPE,
"Select HTML Documentation pointer",
"Please select the body of documentation you're interested in, the main\n\
ones right now being the FAQ and the Handbook. You can also chose \"other\"\n\
to enter an arbitrary URL for browsing.",
"Press F1 for more help on what you see here.",
"html",
- { { "Handbook", "The FreeBSD Handbook.",
- DMENU_CALL, docShowDocument, 0, 0 },
- { "FAQ", "The Frequently Asked Questions guide.",
- DMENU_CALL, docShowDocument, 0, 0 },
- { "Home", "The Home Pages for the FreeBSD Project (requires net)",
- DMENU_CALL, docShowDocument, 0, 0 },
- { "Other", "Enter a URL.",
- DMENU_CALL, docShowDocument, 0, 0 },
- { NULL } },
+{ { "Handbook", "The FreeBSD Handbook.", NULL, docShowDocument },
+ { "FAQ", "The Frequently Asked Questions guide.", NULL, docShowDocument },
+ { "Home", "The Home Pages for the FreeBSD Project (requires net)", NULL, docShowDocument },
+ { "Other", "Enter a URL.", NULL, docShowDocument },
+ { NULL } },
};
/* The main installation menu */
@@ -681,31 +632,23 @@ details on the type of distribution you wish to have, where you wish\n\
to install it from and how you wish to allocate disk storage to FreeBSD.",
"Press F1 to read the installation guide",
"install",
- { { "Options", "Go to Options editor",
- DMENU_CALL, optionsEditor, 0, 0 },
- { "Partition", "Allocate disk space for FreeBSD",
- DMENU_CALL, diskPartitionEditor, 0, 0 },
- { "Label", "Label allocated disk partitions",
- DMENU_CALL, diskLabelEditor, 0, 0 },
- { "Distributions", "Select distribution(s) to extract",
- DMENU_SUBMENU, &MenuDistributions, 0, 0 },
- { "Media", "Choose the installation media type",
- DMENU_SUBMENU, &MenuMedia, 0, 0 },
- { "Commit", "Perform any pending Partition/Label/Extract actions",
- DMENU_CALL, installCommit, 0, 0 },
- { "Extract", "Just do distribution extract step",
- DMENU_CALL, distExtractAll, 0, 0 },
- { "Exit", "Exit this menu (returning to previous)",
- DMENU_CANCEL, NULL, 0, 0 },
- { NULL } },
+{ { "Options", "Go to Options editor", NULL, optionsEditor },
+ { "Partition", "Allocate disk space for FreeBSD", NULL, diskPartitionEditor },
+ { "Label", "Label allocated disk partitions", NULL, diskLabelEditor },
+ { "Distributions", "Select distribution(s) to extract", NULL, dmenuSubmenu, NULL, &MenuDistributions },
+ { "Media", "Choose the installation media type", NULL, dmenuSubmenu, NULL, &MenuMedia },
+ { "Commit", "Perform any pending Partition/Label/Extract actions", NULL, installCommit },
+ { "Extract", "Just do distribution extract step", NULL, distExtractAll },
+ { "Exit", "Exit this menu (returning to previous)", NULL, dmenuCancel },
+ { NULL } },
};
/* MBR type menu */
DMenu MenuMBRType = {
- DMENU_RADIO_TYPE | DMENU_SELECTION_RETURNS,
+ DMENU_RADIO_TYPE,
"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"
+ "select between FreeBSD and any other operating systems on your machine\n"
"at boot time. If you have more than one drive and want to boot\n"
"from the second one, the boot selector will also make it possible\n"
"to do so (limitations in the PC BIOS usually prevent this otherwise).\n"
@@ -715,221 +658,199 @@ DMenu MenuMBRType = {
"will almost certainly NOT want to select one!",
"Press F1 to read the installation guide",
"install",
- { { "BootMgr", "Install the FreeBSD Boot Manager (\"Booteasy\")",
- DMENU_SET_VALUE, &BootMgr, 0, 0, dmenuRadioCheck },
- { "Standard", "Install a standard MBR (no boot manager)",
- DMENU_SET_VALUE, &BootMgr, 1, 0, dmenuRadioCheck },
- { "None", "Leave the Master Boot Record untouched",
- DMENU_SET_VALUE, &BootMgr, 2, 0, dmenuRadioCheck },
- { NULL } },
+{ { "BootMgr", "Install the FreeBSD Boot Manager (\"Booteasy\")",
+ dmenuRadioCheck, dmenuSetValue, NULL, &BootMgr },
+ { "Standard", "Install a standard MBR (no boot manager)",
+ dmenuRadioCheck, dmenuSetValue, NULL, &BootMgr, '[', '*', ']', 1 },
+ { "None", "Leave the Master Boot Record untouched",
+ dmenuRadioCheck, dmenuSetValue, NULL, &BootMgr, '[', '*', ']', 2 },
+ { NULL } },
};
/* Final configuration menu */
DMenu MenuConfigure = {
DMENU_NORMAL_TYPE,
"FreeBSD Configuration Menu", /* title */
-"If you've already installed FreeBSD, you may use this menu to customize\n\
+ "If you've already installed FreeBSD, you may use this menu to customize\n\
it somewhat to suit your particular configuration. Most importantly,\n\
you can use the Packages utility to load extra \"3rd party\"\n\
software not provided in the base distributions.",
"Press F1 for more information on these options",
"configure",
- { { "Add User", "Add users to the system",
- DMENU_SYSTEM_COMMAND, "adduser -config_create ; adduser -s", 0, 0 },
- { "Console", "Customize system console behavior",
- DMENU_SUBMENU, &MenuSyscons, 0, 0 },
- { "Time Zone", "Set which time zone you're in",
- DMENU_SYSTEM_COMMAND, "rm -f /etc/wall_cmos_clock /etc/localtime; tzsetup", 0, 0 },
- { "Media", "Change the installation media type",
- DMENU_SUBMENU, &MenuMedia, 0, 0 },
- { "Mouse", "Select the type of mouse you have",
- DMENU_SUBMENU, &MenuMouse, 0, 0 },
- { "Networking", "Configure additional network services",
- DMENU_SUBMENU, &MenuNetworking, 0, 0 },
- { "Options", "Go to options editor.",
- DMENU_CALL, optionsEditor, 0, 0 },
- { "Packages", "Install pre-packaged software for FreeBSD",
- DMENU_CALL, configPackages, 0, 0 },
- { "Ports", "Link to FreeBSD Ports Collection on CD/NFS",
- DMENU_CALL, configPorts, 0, 1 },
- { "Root Password", "Set the system manager's password",
- DMENU_SYSTEM_COMMAND, "passwd root", 0, 0 },
- { "HTML Docs", "Go to the HTML documentation menu (post-install).",
- DMENU_CALL, docBrowser, 0, 0 },
- { "XFree86", "Configure XFree86 (if installed)",
- DMENU_SYSTEM_COMMAND, "/usr/X11R6/bin/xf86config", 0, 0 },
- { "Exit", "Exit this menu (returning to previous)",
- DMENU_CANCEL, NULL, 0, 0 },
- { NULL } },
+{ { "Add User", "Add users to the system",
+ NULL, dmenuSystemCommand, NULL, "adduser -config_create ; adduser -s" },
+ { "Console", "Customize system console behavior",
+ NULL, dmenuSubmenu, NULL, &MenuSyscons },
+ { "Time Zone", "Set which time zone you're in",
+ NULL, dmenuSystemCommand, NULL, "rm -f /etc/wall_cmos_clock /etc/localtime; tzsetup" },
+ { "Media", "Change the installation media type",
+ NULL, dmenuSubmenu, NULL, &MenuMedia },
+ { "Mouse", "Select the type of mouse you have",
+ NULL, dmenuSubmenu, NULL, &MenuMouse, NULL },
+ { "Networking", "Configure additional network services",
+ NULL, dmenuSubmenu, NULL, &MenuNetworking },
+ { "Options", "Go to options editor",
+ NULL, optionsEditor },
+ { "Packages", "Install pre-packaged software for FreeBSD",
+ NULL, configPackages },
+ { "Ports", "Link to FreeBSD Ports Collection on CD/NFS",
+ NULL, configPorts },
+ { "Root Password", "Set the system manager's password",
+ NULL, dmenuSystemCommand, NULL, "passwd root" },
+ { "HTML Docs", "Go to the HTML documentation menu (post-install)",
+ NULL, docBrowser },
+ { "XFree86", "Configure XFree86",
+ NULL, configXFree86 },
+ { "Exit", "Exit this menu (returning to previous)",
+ NULL, dmenuCancel },
+ { NULL } },
};
DMenu MenuNetworking = {
- DMENU_NORMAL_TYPE,
+ DMENU_CHECKLIST_TYPE,
"Network Services Menu",
-"You may have already configured one network device (and the other\n\
+ "You may have already configured one network device (and the other\n\
various hostname/gateway/name server parameters) in the process\n\
of installing FreeBSD. This menu allows you to configure other\n\
aspects of your system's network configuration.",
NULL,
NULL,
-{ { "Interfaces", "Configure additional network interfaces",
- DMENU_CALL, tcpMenuSelect, 0, 0 },
- { "NFS client", "This machine will be an NFS client",
- DMENU_SET_VARIABLE, "nfs_client=YES", 0, 0, 0 },
- { "NFS server", "This machine will be an NFS server",
- DMENU_CALL, configNFSServer, 0, 0, 0 },
- { "Gateway", "This machine will route packets between interfaces",
- DMENU_SET_VARIABLE, "gateway=YES", 0, 0, 0 },
- { "Gated", "This machine wants to run gated",
- DMENU_CALL, configGated, 0, 0, 0 },
- { "Ntpdate", "Select a clock-syncronization server",
- DMENU_SUBMENU, &MenuNTP, (int)"ntpdate", 0, dmenuVarCheck },
- { "Routed", "Set flags for routed (default: -q)",
- DMENU_CALL, configRoutedFlags, (int)"routed", 0, dmenuVarCheck },
- { "Rwhod", "This machine wants to run the rwho daemon",
- DMENU_SET_VARIABLE, "rwhod=YES", 0, 0, dmenuVarCheck },
- { "Anon FTP", "This machine wishes to allow anonymous FTP.",
- DMENU_CALL, configAnonFTP, 0, 0, 0 },
- { "WEB Server", "This machine wishes to be a WWW server.",
- DMENU_CALL, configApache, 0, 0, 0 },
- { "Samba", "Install Samba for LanManager (NETBUI) access.",
- DMENU_CALL, configSamba, 0, 0, 0 },
- { "PCNFSD", "Run authentication server for clients with PC-NFS.",
- DMENU_CALL, configPCNFSD, 0, 0, 0 },
+{ { "Interfaces", "Configure additional network interfaces",
+ NULL, tcpMenuSelect },
+ { "NFS client", "This machine will be an NFS client",
+ dmenuVarCheck, dmenuSetVariable, NULL, "nfs_client=YES" },
+ { "NFS server", "This machine will be an NFS server",
+ NULL, configNFSServer },
+ { "Gateway", "This machine will route packets between interfaces",
+ dmenuVarCheck, dmenuSetVariable, NULL, "gateway=YES" },
+ { "Gated", "This machine wants to run gated instead of routed",
+ NULL, configGated },
+ { "Ntpdate", "Select a clock-syncronization server",
+ dmenuVarCheck, dmenuSubmenu, NULL, &MenuNTP, '[', 'X', ']', (int)"ntpdate" },
+ { "Routed", "Set flags for routed (default: -q)",
+ dmenuVarCheck, configRoutedFlags, NULL, "routed" },
+ { "Rwhod", "This machine wants to run the rwho daemon",
+ dmenuVarCheck, dmenuSetVariable, NULL, "rwhod=YES" },
+ { "Anon FTP", "This machine wishes to allow anonymous FTP.",
+ NULL, configAnonFTP },
+ { "WEB Server", "This machine wishes to be a WWW server.",
+ NULL, configApache },
+ { "Samba", "Install Samba for LanManager (NETBUI) access.",
+ NULL, configSamba },
+ { "PCNFSD", "Run authentication server for clients with PC-NFS.",
+ NULL, configPCNFSD },
{ NULL } },
};
DMenu MenuNTP = {
-DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
-"NTPDATE Server Selection",
-"There are a number of time syncronization servers available\n\
+ DMENU_RADIO_TYPE,
+ "NTPDATE Server Selection",
+ "There are a number of time syncronization servers available\n\
for public use around the Internet. Please select one reasonably\n\
close to you to have your system time syncronized accordingly.",
-"These are the primary open-access NTP servers",
-NULL,
-{ { "Other", "Select a site not on this list",
- DMENU_CALL, configNTP, 0, 0 },
+ "These are the primary open-access NTP servers",
+ NULL,
+{ { "Other", "Select a site not on this list",
+ NULL, configNTP },
{ "Australia", "ntp.syd.dms.csiro.au (HP 5061 Cesium Beam)",
- DMENU_SET_VARIABLE, "ntpdate=ntp.syd.dms.csiro.au", 0, 0 },
- { "Canada", "tick.usask.ca (GOES clock)",
- DMENU_SET_VARIABLE, "ntpdate=tick.usask.ca", 0, 0 },
- { "France", "canon.inria.fr (TDF clock)",
- DMENU_SET_VARIABLE, "ntpdate=canon.inria.fr", 0, 0 },
- { "Germany", "ntps1-{0,1,2}.uni-erlangen.de (GPS)",
- DMENU_SET_VARIABLE, "ntpdate=ntps1-0.uni-erlangen.de", 0, 0 },
+ dmenuVarCheck, dmenuSetVariable, NULL, "ntpdate=ntp.syd.dms.csiro.au" },
+ { "Canada", "tick.usask.ca (GOES clock)",
+ dmenuVarCheck, dmenuSetVariable, NULL, "ntpdate=tick.usask.ca" },
+ { "France", "canon.inria.fr (TDF clock)",
+ dmenuVarCheck, dmenuSetVariable, NULL, "ntpdate=canon.inria.fr" },
+ { "Germany", "ntps1-{0,1,2}.uni-erlangen.de (GPS)",
+ dmenuVarCheck, dmenuSetVariable, NULL, "ntpdate=ntps1-0.uni-erlangen.de" },
{ "Germany #2", "ntps1-0.cs.tu-berlin.de (GPS)",
- DMENU_SET_VARIABLE, "ntpdate=ntps1-0.cs.tu-berlin.de", 0, 0 },
- { "Japan", "clock.nc.fukuoka-u.ac.jp (GPS clock)",
- DMENU_SET_VARIABLE, "ntpdate=clock.nc.fukuoka-u.ac.jp", 0, 0},
- { "Japan #2", "clock.tl.fukuoka-u.ac.jp (GPS clock)",
- DMENU_SET_VARIABLE, "ntpdate=clock.tl.fukuoka-u.ac.jp", 0, 0},
+ dmenuVarCheck, dmenuSetVariable, NULL, "ntpdate=ntps1-0.cs.tu-berlin.de" },
+ { "Japan", "clock.nc.fukuoka-u.ac.jp (GPS clock)",
+ dmenuVarCheck, dmenuSetVariable, NULL, "ntpdate=clock.nc.fukuoka-u.ac.jp" },
+ { "Japan #2", "clock.tl.fukuoka-u.ac.jp (GPS clock)",
+ dmenuVarCheck, dmenuSetVariable, NULL, "ntpdate=clock.tl.fukuoka-u.ac.jp" },
{ "Netherlands", "ntp0.nl.net (GPS clock)",
- DMENU_SET_VARIABLE, "ntpdate=ntp0.nl.net", 0, 0 },
- { "Norway", "timer.unik.no (NTP clock)",
- DMENU_SET_VARIABLE, "ntpdate=timer.unik.no", 0, 0 },
- { "Sweden", "Time1.Stupi.SE (Cesium/GPS)",
- DMENU_SET_VARIABLE, "ntpdate=Time1.Stupi.SE", 0, 0 },
+ dmenuVarCheck, dmenuSetVariable, NULL, "ntpdate=ntp0.nl.net" },
+ { "Norway", "timer.unik.no (NTP clock)",
+ dmenuVarCheck, dmenuSetVariable, NULL, "ntpdate=timer.unik.no" },
+ { "Sweden", "Time1.Stupi.SE (Cesium/GPS)",
+ dmenuVarCheck, dmenuSetVariable, NULL, "ntpdate=Time1.Stupi.SE" },
{ "Switzerland", "swisstime.ethz.ch (DCF77 clock)",
- DMENU_SET_VARIABLE, "ntpdate=swisstime.ethz.ch", 0, 0 },
- { "U.S. East Coast", "bitsy.mit.edu (WWV clock)",
- DMENU_SET_VARIABLE, "ntpdate=bitsy.mit.edu", 0, 0 },
+ dmenuVarCheck, dmenuSetVariable, NULL, "ntpdate=swisstime.ethz.ch" },
+ { "U.S. East Coast", "bitsy.mit.edu (WWV clock)",
+ dmenuVarCheck, dmenuSetVariable, NULL, "ntpdate=bitsy.mit.edu" },
{ "U.S. East Coast #2", "otc1.psu.edu (WWV clock)",
- DMENU_SET_VARIABLE, "ntpdate=otc1.psu.edu", 0, 0 },
- { "U.S. West Coast", "apple.com (WWV clock)",
- DMENU_SET_VARIABLE, "ntpdate=apple.com", 0, 0 },
+ dmenuVarCheck, dmenuSetVariable, NULL, "ntpdate=otc1.psu.edu" },
+ { "U.S. West Coast", "apple.com (WWV clock)",
+ dmenuVarCheck, dmenuSetVariable, NULL, "ntpdate=apple.com" },
{ "U.S. West Coast #2", "clepsydra.dec.com (GOES clock)",
- DMENU_SET_VARIABLE, "ntpdate=clepsydra.dec.com", 0, 0 },
+ dmenuVarCheck, dmenuSetVariable, NULL, "ntpdate=clepsydra.dec.com" },
{ "U.S. West Coast #3", "clock.llnl.gov (WWVB clock)",
- DMENU_SET_VARIABLE, "ntpdate=clock.llnl.gov", 0, 0 },
+ dmenuVarCheck, dmenuSetVariable, NULL, "ntpdate=clock.llnl.gov" },
{ "U.S. Midwest", "ncar.ucar.edu (WWVB clock)",
- DMENU_SET_VARIABLE, "ntpdate=ncar.ucar.edu", 0, 0 },
+ dmenuVarCheck, dmenuSetVariable, NULL, "ntpdate=ncar.ucar.edu" },
{ "U.S. Pacific", "chantry.hawaii.net (WWV/H clock)",
- DMENU_SET_VARIABLE, "ntpdate=chantry.hawaii.net", 0, 0 },
- { "U.S. Southwest", "shorty.chpc.utexas.edu (WWV clock)",
- DMENU_SET_VARIABLE, "ntpdate=shorty.chpc.utexas.edu", 0, 0 },
+ dmenuVarCheck, dmenuSetVariable, NULL, "ntpdate=chantry.hawaii.net" },
+ { "U.S. Southwest", "shorty.chpc.utexas.edu (WWV clock)",
+ dmenuVarCheck, dmenuSetVariable, NULL, "ntpdate=shorty.chpc.utexas.edu" },
{ NULL } },
};
DMenu MenuSyscons = {
-DMENU_NORMAL_TYPE,
-"System Console Configuration",
-"The default system console driver for FreeBSD (syscons) has a\n\
+ DMENU_NORMAL_TYPE,
+ "System Console Configuration",
+ "The default system console driver for FreeBSD (syscons) has a\n\
number of configuration options which may be set according to\n\
your preference.\n\n\
When you are done setting configuration options, select Cancel.",
-"Configure your system console settings",
-NULL,
-{ { "Keymap", "Choose an alternate keyboard map",
- DMENU_SUBMENU, &MenuSysconsKeymap, 0, 0 },
- { "Repeat", "Set the rate at which keys repeat",
- DMENU_SUBMENU, &MenuSysconsKeyrate, 0, 0 },
- { "Saver", "Configure the screen saver",
- DMENU_SUBMENU, &MenuSysconsSaver, 0, 0 },
- { "Exit", "Exit this menu (returning to previous)",
- DMENU_CANCEL, NULL, 0, 0 },
+ "Configure your system console settings",
+ NULL,
+{ { "Keymap", "Choose an alternate keyboard map", NULL, dmenuSubmenu, NULL, &MenuSysconsKeymap },
+ { "Repeat", "Set the rate at which keys repeat", NULL, dmenuSubmenu, NULL, &MenuSysconsKeyrate },
+ { "Saver", "Configure the screen saver", NULL, dmenuSubmenu, NULL, &MenuSysconsSaver },
+ { "Exit", "Exit this menu (returning to previous)", NULL, dmenuCancel },
{ NULL } },
};
DMenu MenuSysconsKeymap = {
-DMENU_RADIO_TYPE | DMENU_SELECTION_RETURNS,
-"System Console Keymap",
-"The default system console driver for FreeBSD (syscons) defaults\n\
+ DMENU_RADIO_TYPE,
+ "System Console Keymap",
+ "The default system console driver for FreeBSD (syscons) defaults\n\
to a standard \"American\" keyboard map. Users in other countries\n\
(or with different keyboard preferences) may wish to choose one of\n\
the other keymaps below.",
"Choose a keyboard map",
NULL,
- { { "Danish CP865", "Danish Code Page 865 keymap",
- DMENU_SET_VARIABLE, "keymap=danish.cp865", 0, 0, dmenuVarCheck },
- { "Danish ISO", "Danish ISO keymap",
- DMENU_SET_VARIABLE, "keymap=danish.iso", 0, 0, dmenuVarCheck },
- { "French ISO", "French ISO keymap",
- DMENU_SET_VARIABLE, "keymap=fr.iso", 0, 0, dmenuVarCheck },
- { "German CP850", "German Code Page 850 keymap",
- DMENU_SET_VARIABLE, "keymap=german.cp850", 0, 0, dmenuVarCheck },
- { "German ISO", "German ISO keymap",
- DMENU_SET_VARIABLE, "keymap=german.iso", 0, 0, dmenuVarCheck },
- { "Japanese 106", "Japanese 106 keymap",
- DMENU_SET_VARIABLE, "keymap=jp.106", 0, 0, dmenuVarCheck },
- { "Russian CP866", "Russian Code Page 866 keymap",
- DMENU_SET_VARIABLE, "keymap=ru.cp866", 0, 0, dmenuVarCheck },
- { "Russian KOI8", "Russian koi8 keymap",
- DMENU_SET_VARIABLE, "keymap=ru.koi8-r", 0, 0, dmenuVarCheck },
- { "Russian s-KOI8", "Russian shifted koi8 keymap",
- DMENU_SET_VARIABLE, "keymap=ru.koi8-r.shift", 0, 0, dmenuVarCheck },
- { "Swedish CP850", "Swedish Code Page 850 keymap",
- DMENU_SET_VARIABLE, "keymap=swedish.cp850", 0, 0, dmenuVarCheck },
- { "Swedish ISO", "Swedish ISO keymap",
- DMENU_SET_VARIABLE, "keymap=swedish.iso", 0, 0, dmenuVarCheck },
- { "U.K. CP850", "United Kingdom Code Page 850 keymap",
- DMENU_SET_VARIABLE, "keymap=uk.cp850", 0, 0, dmenuVarCheck },
- { "U.K. ISO", "United Kingdom ISO keymap",
- DMENU_SET_VARIABLE, "keymap=uk.iso", 0, 0, dmenuVarCheck },
- { "U.S. ISO", "United States ISO keymap",
- DMENU_SET_VARIABLE, "keymap=us.iso", 0, 0, dmenuVarCheck },
- { NULL } },
+{ { "Danish CP865", "Danish Code Page 865 keymap", dmenuVarCheck, dmenuSetVariable, NULL, "keymap=danish.cp865" },
+ { "Danish ISO", "Danish ISO keymap", dmenuVarCheck, dmenuSetVariable, NULL, "keymap=danish.iso" },
+ { "French ISO", "French ISO keymap", dmenuVarCheck, dmenuSetVariable, NULL, "keymap=fr.iso" },
+ { "German CP850", "German Code Page 850 keymap", dmenuVarCheck, dmenuSetVariable, NULL, "keymap=german.cp850" },
+ { "German ISO", "German ISO keymap", dmenuVarCheck, dmenuSetVariable, NULL, "keymap=german.iso" },
+ { "Japanese 106", "Japanese 106 keymap", dmenuVarCheck, dmenuSetVariable, NULL, "keymap=jp.106" },
+ { "Russian CP866", "Russian Code Page 866 keymap", dmenuVarCheck, dmenuSetVariable, NULL, "keymap=ru.cp866" },
+ { "Russian KOI8", "Russian koi8 keymap", dmenuVarCheck, dmenuSetVariable, NULL, "keymap=ru.koi8-r" },
+ { "Russian s-KOI8", "Russian shifted koi8 keymap", dmenuVarCheck, dmenuSetVariable, NULL, "keymap=ru.koi8-r.shift" },
+ { "Swedish CP850", "Swedish Code Page 850 keymap", dmenuVarCheck, dmenuSetVariable, NULL, "keymap=swedish.cp850" },
+ { "Swedish ISO", "Swedish ISO keymap", dmenuVarCheck, dmenuSetVariable, NULL, "keymap=swedish.iso" },
+ { "U.K. CP850", "United Kingdom Code Page 850 keymap", dmenuVarCheck, dmenuSetVariable, NULL, "keymap=uk.cp850" },
+ { "U.K. ISO", "United Kingdom ISO keymap", dmenuVarCheck, dmenuSetVariable, NULL, "keymap=uk.iso" },
+ { "U.S. ISO", "United States ISO keymap", dmenuVarCheck, dmenuSetVariable, NULL, "keymap=us.iso" },
+ { NULL } },
};
DMenu MenuSysconsKeyrate = {
- DMENU_RADIO_TYPE | DMENU_SELECTION_RETURNS,
+ DMENU_RADIO_TYPE,
"System Console Keyboard Repeat Rate",
"This menu allows you to set the speed at which keys repeat\n\
when held down.",
"Choose a keyboard repeat rate",
NULL,
- { { "Slow", "Slow keyboard repeat rate",
- DMENU_SET_VARIABLE, "keyrate=slow", 0, 0, dmenuVarCheck },
- { "Normal", "\"Normal\" keyboard repeat rate",
- DMENU_SET_VARIABLE, "keyrate=normal", 0, 0, dmenuVarCheck },
- { "Fast", "Fast keyboard repeat rate",
- DMENU_SET_VARIABLE, "keyrate=fast", 0, 0, dmenuVarCheck },
- { "Default", "Use default keyboard repeat rate",
- DMENU_SET_VARIABLE, "keyrate=NO", 0, 0, dmenuVarCheck },
- { NULL } },
+{ { "Slow", "Slow keyboard repeat rate", dmenuVarCheck, dmenuSetVariable, NULL, "keyrate=slow" },
+ { "Normal", "\"Normal\" keyboard repeat rate", dmenuVarCheck, dmenuSetVariable, NULL, "keyrate=normal" },
+ { "Fast", "Fast keyboard repeat rate", dmenuVarCheck, dmenuSetVariable, NULL, "keyrate=fast" },
+ { "Default", "Use default keyboard repeat rate", dmenuVarCheck, dmenuSetVariable, NULL, "keyrate=NO" },
+ { NULL } },
};
DMenu MenuSysconsSaver = {
- DMENU_MULTIPLE_TYPE | DMENU_SELECTION_RETURNS,
+ DMENU_RADIO_TYPE,
"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\
@@ -937,15 +858,15 @@ monitor switched on and idle for long periods of time then you should\n\
probably enable one of these screen savers to prevent phosphor burn-in.",
"Choose a nifty-looking screen saver",
NULL,
-{ { "blank", "Simply blank the screen",
- DMENU_SET_VARIABLE, "saver=blank", 0, 0, dmenuVarCheck },
- { "Green", "\"Green\" power saving mode (if supported by monitor)",
- DMENU_SET_VARIABLE, "saver=green", 0, 0, dmenuVarCheck },
- { "Snake", "Draw a FreeBSD \"snake\" on your screen",
- DMENU_SET_VARIABLE, "saver=snake", 0, 0, dmenuVarCheck },
- { "Star", "A \"twinkling stars\" effect",
- DMENU_SET_VARIABLE, "saver=star", 0, 0, dmenuVarCheck },
- { "Timeout", "Set the screen saver timeout interval",
- DMENU_CALL, configSaverTimeout, (int)"blanktime", 0, dmenuVarCheck },
+{ { "blank", "Simply blank the screen",
+ dmenuVarCheck, dmenuSetVariable, NULL, "saver=blank" },
+ { "Green", "\"Green\" power saving mode (if supported by monitor)",
+ dmenuVarCheck, dmenuSetVariable, NULL, "saver=green" },
+ { "Snake", "Draw a FreeBSD \"snake\" on your screen",
+ dmenuVarCheck, dmenuSetVariable, NULL, "saver=snake" },
+ { "Star", "A \"twinkling stars\" effect",
+ dmenuVarCheck, dmenuSetVariable, NULL, "saver=star" },
+ { "Timeout", "Set the screen saver timeout interval",
+ dmenuVarCheck, configSaverTimeout, NULL, "blanktime", ' ', ' ', ' ' },
{ NULL } },
};
diff --git a/usr.sbin/sysinstall/options.c b/usr.sbin/sysinstall/options.c
index 219e3d7..9bc4daa 100644
--- a/usr.sbin/sysinstall/options.c
+++ b/usr.sbin/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.30 1996/03/23 07:21:30 jkh Exp $
+ * $Id: options.c,v 1.31 1996/03/24 12:06:13 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -197,7 +197,7 @@ fire(Option opt)
}
int
-optionsEditor(char *str)
+optionsEditor(dialogMenuItem *self)
{
int i, optcol, optrow, key;
static int currOpt = 0;
diff --git a/usr.sbin/sysinstall/sysinstall.h b/usr.sbin/sysinstall/sysinstall.h
index 9a91d87..c420f40 100644
--- a/usr.sbin/sysinstall/sysinstall.h
+++ b/usr.sbin/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.47 1996/03/21 09:30:15 jkh Exp $
+ * $Id: sysinstall.h,v 1.48 1996/03/23 07:21:31 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -57,14 +57,6 @@
/*** Defines ***/
-/* Bitfields for menu options */
-#define DMENU_NORMAL_TYPE 0x1 /* Normal dialog menu */
-#define DMENU_RADIO_TYPE 0x2 /* Radio dialog menu */
-#define DMENU_MULTIPLE_TYPE 0x4 /* Multiple choice menu */
-
-/* XXX This goes away soon XXX */
-#define DMENU_SELECTION_RETURNS 0x8 /* Immediate return on item selection */
-
/* variable limits */
#define VAR_NAME_MAX 128
#define VAR_VALUE_MAX 1024
@@ -153,36 +145,15 @@ typedef unsigned int Boolean;
typedef struct disk Disk;
typedef struct chunk Chunk;
-typedef enum {
- DMENU_DISPLAY_FILE, /* Display a file's contents */
- DMENU_SUBMENU, /* Recurse into another menu */
- DMENU_SYSTEM_COMMAND, /* Run shell commmand */
- DMENU_SYSTEM_COMMAND_BOX, /* Same as above, but in prgbox */
- DMENU_SET_VARIABLE, /* Set an environment/system var */
- DMENU_SET_FLAG, /* Set flag in an unsigned int */
- DMENU_SET_VALUE, /* Set unsigned int to value */
- DMENU_CALL, /* Call back a C function */
- DMENU_CANCEL, /* Cancel out of this menu */
- DMENU_NOP, /* Do nothing special for item */
-} DMenuItemType;
-
-typedef struct _dmenuItem {
- char *title; /* Our title */
- char *prompt; /* Our prompt */
- DMenuItemType type; /* What type of item we are */
- void *ptr; /* Generic data ptr */
- int parm; /* Parameter for above */
- Boolean disabled; /* Are we temporarily disabled? */
- char * (*check)(struct _dmenuItem *); /* Our state */
-} DMenuItem;
+typedef enum { DMENU_NORMAL_TYPE, DMENU_RADIO_TYPE, DMENU_CHECKLIST_TYPE } dmenuType;
typedef struct _dmenu {
- unsigned int options; /* What sort of menu we are */
+ dmenuType type; /* What sort of menu we are */
char *title; /* Our title */
char *prompt; /* Our prompt */
char *helpline; /* Line of help at bottom */
char *helpfile; /* Help file for "F1" */
- DMenuItem items[0]; /* Array of menu items */
+ dialogMenuItem items[0]; /* Array of menu items */
} DMenu;
/* A sysconfig variable */
@@ -358,10 +329,10 @@ extern DMenu MenuHTMLDoc; /* HTML Documentation menu */
/*** Prototypes ***/
/* apache.c */
-extern int configApache(char *str);
+extern int configApache(dialogMenuItem *self);
/* anonFTP.c */
-extern int configAnonFTP(char *unused);
+extern int configAnonFTP(dialogMenuItem *self);
/* attrs.c */
extern char *attr_match(Attribs *attr, char *name);
@@ -384,20 +355,16 @@ extern void command_func_add(char *key, commandFunc func, void *data);
extern int configFstab(void);
extern void configSysconfig(void);
extern void configResolv(void);
-extern int configPorts(char *str);
-extern int configPackages(char *str);
-extern int configSaverTimeout(char *str);
-extern int configNTP(char *str);
-extern int configRoutedFlags(char *str);
+extern int configPorts(dialogMenuItem *self);
+extern int configPackages(dialogMenuItem *self);
+extern int configSaverTimeout(dialogMenuItem *self);
+extern int configNTP(dialogMenuItem *self);
+extern int configXFree86(dialogMenuItem *self);
+extern int configRoutedFlags(dialogMenuItem *self);
/* crc.c */
extern int crc(int, unsigned long *, unsigned long *);
-/* decode.c */
-extern DMenuItem *decode(DMenu *menu, char *name);
-extern int dispatch(DMenuItem *tmp, char *name);
-extern int decode_and_dispatch_multiple(DMenu *menu, char *names);
-
/* devices.c */
extern DMenu *deviceCreateMenu(DMenu *menu, DeviceType type, int (*hook)());
extern void deviceGetAll(void);
@@ -414,34 +381,42 @@ extern Boolean dummyClose(Device *dev, int fd);
extern void dummyShutdown(Device *dev);
/* disks.c */
-extern int diskPartitionEditor(char *unused);
-extern int diskPartitionWrite(char *unused);
+extern int diskPartitionEditor(dialogMenuItem *self);
+extern int diskPartitionWrite(dialogMenuItem *self);
/* dist.c */
-extern int distReset(char *str);
extern int distSetCustom(char *str);
-extern int distSetDeveloper(char *str);
-extern int distSetXDeveloper(char *str);
-extern int distSetKernDeveloper(char *str);
-extern int distSetUser(char *str);
-extern int distSetXUser(char *str);
-extern int distSetMinimum(char *str);
-extern int distSetEverything(char *str);
-extern int distSetDES(char *str);
-extern int distSetSrc(char *str);
-extern int distSetXF86(char *str);
-extern int distExtractAll(char *str);
+extern int distReset(dialogMenuItem *self);
+extern int distSetDeveloper(dialogMenuItem *self);
+extern int distSetXDeveloper(dialogMenuItem *self);
+extern int distSetKernDeveloper(dialogMenuItem *self);
+extern int distSetUser(dialogMenuItem *self);
+extern int distSetXUser(dialogMenuItem *self);
+extern int distSetMinimum(dialogMenuItem *self);
+extern int distSetEverything(dialogMenuItem *self);
+extern int distSetDES(dialogMenuItem *self);
+extern int distSetSrc(dialogMenuItem *self);
+extern int distSetXF86(dialogMenuItem *self);
+extern int distExtractAll(dialogMenuItem *self);
/* dmenu.c */
+extern int dmenuDisplayFile(dialogMenuItem *tmp);
+extern int dmenuSubmenu(dialogMenuItem *tmp);
+extern int dmenuSystemCommand(dialogMenuItem *tmp);
+extern int dmenuSystemCommandBox(dialogMenuItem *tmp);
+extern int dmenuCancel(dialogMenuItem *tmp);
+extern int dmenuSetVariable(dialogMenuItem *tmp);
+extern int dmenuSetFlag(dialogMenuItem *tmp);
+extern int dmenuSetValue(dialogMenuItem *tmp);
extern Boolean dmenuOpen(DMenu *menu, int *choice, int *scroll, int *curr, int *max);
extern Boolean dmenuOpenSimple(DMenu *menu);
-extern char *dmenuVarCheck(DMenuItem *item);
-extern char *dmenuFlagCheck(DMenuItem *item);
-extern char *dmenuRadioCheck(DMenuItem *item);
+extern int dmenuVarCheck(dialogMenuItem *item);
+extern int dmenuFlagCheck(dialogMenuItem *item);
+extern int dmenuRadioCheck(dialogMenuItem *item);
/* doc.c */
-extern int docBrowser(char *junk);
-extern int docShowDocument(char *str);
+extern int docBrowser(dialogMenuItem *self);
+extern int docShowDocument(dialogMenuItem *self);
/* dos.c */
extern Boolean mediaInitDOS(Device *dev);
@@ -474,27 +449,26 @@ void index_print(PkgNodePtr top, int level);
int index_extract(Device *dev, PkgNodePtr top, PkgNodePtr plist);
/* install.c */
-extern int installCommit(char *str);
-extern int installExpress(char *str);
-extern int installNovice(char *str);
-extern int installFixit(char *str);
-extern int installFixup(char *str);
-extern int installUpgrade(char *str);
-extern int installPreconfig(char *str);
-extern int installFilesystems(char *str);
-extern int installVarDefaults(char *str);
+extern int installCommit(dialogMenuItem *self);
+extern int installExpress(dialogMenuItem *self);
+extern int installNovice(dialogMenuItem *self);
+extern int installFixit(dialogMenuItem *self);
+extern int installFixup(dialogMenuItem *self);
+extern int installUpgrade(dialogMenuItem *self);
+extern int installFilesystems(dialogMenuItem *self);
+extern int installVarDefaults(dialogMenuItem *self);
extern Boolean copySelf(void);
extern Boolean rootExtract(void);
/* installFinal.c */
-extern int configGated(char *unused);
-extern int configSamba(char *unused);
-extern int configPCNFSD(char *unused);
-extern int configNFSServer(char *unused);
+extern int configGated(dialogMenuItem *self);
+extern int configSamba(dialogMenuItem *self);
+extern int configPCNFSD(dialogMenuItem *self);
+extern int configNFSServer(dialogMenuItem *self);
/* label.c */
-extern int diskLabelEditor(char *str);
-extern int diskLabelCommit(char *str);
+extern int diskLabelEditor(dialogMenuItem *self);
+extern int diskLabelCommit(dialogMenuItem *self);
/* lndir.c */
extern int lndir(char *from, char *to);
@@ -515,19 +489,19 @@ extern u_char default_scrnmap[];
/* media.c */
extern char *cpioVerbosity(void);
-extern int mediaSetCDROM(char *str);
-extern int mediaSetFloppy(char *str);
-extern int mediaSetDOS(char *str);
-extern int mediaSetTape(char *str);
-extern int mediaSetFTP(char *str);
-extern int mediaSetFTPActive(char *str);
-extern int mediaSetFTPPassive(char *str);
-extern int mediaSetUFS(char *str);
-extern int mediaSetNFS(char *str);
-extern int mediaSetFtpOnError(char *str);
-extern int mediaSetFtpUserPass(char *str);
-extern int mediaSetCPIOVerbosity(char *str);
-extern int mediaGetType(char *str);
+extern int mediaSetCDROM(dialogMenuItem *self);
+extern int mediaSetFloppy(dialogMenuItem *self);
+extern int mediaSetDOS(dialogMenuItem *self);
+extern int mediaSetTape(dialogMenuItem *self);
+extern int mediaSetFTP(dialogMenuItem *self);
+extern int mediaSetFTPActive(dialogMenuItem *self);
+extern int mediaSetFTPPassive(dialogMenuItem *self);
+extern int mediaSetUFS(dialogMenuItem *self);
+extern int mediaSetNFS(dialogMenuItem *self);
+extern int mediaSetFtpOnError(dialogMenuItem *self);
+extern int mediaSetFtpUserPass(dialogMenuItem *self);
+extern int mediaSetCPIOVerbosity(dialogMenuItem *self);
+extern int mediaGetType(dialogMenuItem *self);
extern Boolean mediaExtractDist(char *dir, int fd);
extern Boolean mediaExtractDistBegin(char *dir, int *fd, int *zpid, int *cpic);
extern Boolean mediaExtractDistEnd(int zpid, int cpid);
@@ -579,7 +553,7 @@ extern int mediaGetNFS(Device *dev, char *file, Boolean probe);
extern void mediaShutdownNFS(Device *dev);
/* options.c */
-extern int optionsEditor(char *str);
+extern int optionsEditor(dialogMenuItem *self);
/* package.c */
extern int package_add(char *name);
@@ -598,8 +572,6 @@ extern void systemChangeTerminal(char *color, const u_char c_termcap[], char *mo
extern void systemChangeScreenmap(const u_char newmap[]);
extern void systemCreateHoloshell(void);
extern int vsystem(char *fmt, ...);
-extern int docBrowser(char *junk);
-extern int docShowDocument(char *str);
/* tape.c */
extern char *mediaTapeBlocksize(void);
@@ -609,7 +581,7 @@ extern void mediaShutdownTape(Device *dev);
/* tcpip.c */
extern int tcpOpenDialog(Device *dev);
-extern int tcpMenuSelect(char *str);
+extern int tcpMenuSelect(dialogMenuItem *self);
extern int tcpInstallDevice(char *str);
extern Boolean tcpDeviceSelect(void);
diff --git a/usr.sbin/sysinstall/tcpip.c b/usr.sbin/sysinstall/tcpip.c
index c7d46ea..00ed675 100644
--- a/usr.sbin/sysinstall/tcpip.c
+++ b/usr.sbin/sysinstall/tcpip.c
@@ -1,5 +1,5 @@
/*
- * $Id: tcpip.c,v 1.32 1995/12/07 10:34:19 peter Exp $
+ * $Id: tcpip.c,v 1.33 1996/03/02 07:31:58 jkh Exp $
*
* Copyright (c) 1995
* Gary J Palmer. All rights reserved.
@@ -569,7 +569,7 @@ tcpDeviceSelect(void)
/* Do it from a menu that doesn't care about status */
int
-tcpMenuSelect(char *str)
+tcpMenuSelect(dialogMenuItem *self)
{
(void)tcpDeviceSelect();
configResolv();
OpenPOWER on IntegriCloud