]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - usr.sbin/sade/menus.c
This commit was generated by cvs2svn to compensate for changes in r77349,
[FreeBSD/FreeBSD.git] / usr.sbin / sade / menus.c
1 /*
2  * The new sysinstall program.
3  *
4  * This is probably the last program in the `sysinstall' line - the next
5  * generation being essentially a complete rewrite.
6  *
7  * $FreeBSD$
8  *
9  * Copyright (c) 1995
10  *      Jordan Hubbard.  All rights reserved.
11  *
12  * Redistribution and use in source and binary forms, with or without
13  * modification, are permitted provided that the following conditions
14  * are met:
15  * 1. Redistributions of source code must retain the above copyright
16  *    notice, this list of conditions and the following disclaimer,
17  *    verbatim and that no modifications are made prior to this
18  *    point in the file.
19  * 2. Redistributions in binary form must reproduce the above copyright
20  *    notice, this list of conditions and the following disclaimer in the
21  *    documentation and/or other materials provided with the distribution.
22  *
23  * THIS SOFTWARE IS PROVIDED BY JORDAN HUBBARD ``AS IS'' AND
24  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26  * ARE DISCLAIMED.  IN NO EVENT SHALL JORDAN HUBBARD OR HIS PETS BE LIABLE
27  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
28  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
29  * OR SERVICES; LOSS OF USE, DATA, LIFE OR PROFITS; OR BUSINESS INTERRUPTION)
30  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33  * SUCH DAMAGE.
34  *
35  */
36
37 #include "sysinstall.h"
38
39 /* Miscellaneous work routines for menus */
40 static int
41 setSrc(dialogMenuItem *self)
42 {
43     Dists |= DIST_SRC;
44     SrcDists = DIST_SRC_ALL;
45     CRYPTODists |= (DIST_CRYPTO_SCRYPTO | DIST_CRYPTO_SSECURE |
46         DIST_CRYPTO_SKERBEROS4 | DIST_CRYPTO_SKERBEROS5);
47     return DITEM_SUCCESS | DITEM_REDRAW;
48 }
49
50 static int
51 clearSrc(dialogMenuItem *self)
52 {
53     Dists &= ~DIST_SRC;
54     SrcDists = 0;
55     CRYPTODists &= ~(DIST_CRYPTO_SCRYPTO | DIST_CRYPTO_SSECURE |
56         DIST_CRYPTO_SKERBEROS4 | DIST_CRYPTO_SKERBEROS5);
57     return DITEM_SUCCESS | DITEM_REDRAW;
58 }
59
60 static int
61 setX11Misc(dialogMenuItem *self)
62 {
63     XF86Dists |= DIST_XF86_MISC_ALL;
64     Dists |= DIST_XF86;
65     return DITEM_SUCCESS | DITEM_REDRAW;
66 }
67
68 static int
69 clearX11Misc(dialogMenuItem *self)
70 {
71     XF86Dists &= ~DIST_XF86_MISC_ALL;
72     if (!XF86ServerDists && !XF86FontDists)
73         Dists &= ~DIST_XF86;
74     return DITEM_SUCCESS | DITEM_REDRAW;
75 }
76
77 static int
78 setX11Servers(dialogMenuItem *self)
79 {
80     XF86Dists |= DIST_XF86_SERVER;
81     XF86ServerDists = DIST_XF86_SERVER_ALL;
82     return DITEM_SUCCESS | DITEM_REDRAW;
83 }
84
85 static int
86 clearX11Servers(dialogMenuItem *self)
87 {
88     XF86Dists &= ~DIST_XF86_SERVER;
89     XF86ServerDists = 0;
90     return DITEM_SUCCESS | DITEM_REDRAW;
91 }
92
93 static int
94 setX11Fonts(dialogMenuItem *self)
95 {
96     XF86Dists |= DIST_XF86_FONTS;
97     XF86FontDists = DIST_XF86_FONTS_ALL;
98     return DITEM_SUCCESS | DITEM_REDRAW;
99 }
100
101 static int
102 clearX11Fonts(dialogMenuItem *self)
103 {
104     XF86Dists &= ~DIST_XF86_FONTS;
105     XF86FontDists = 0;
106     return DITEM_SUCCESS | DITEM_REDRAW;
107 }
108
109 #define _IS_SET(dist, set) (((dist) & (set)) == (set))
110
111 #define IS_DEVELOPER(dist, extra) (_IS_SET(dist, _DIST_DEVELOPER | extra) || \
112         _IS_SET(dist, _DIST_DEVELOPER | extra))
113
114 #define IS_USER(dist, extra) (_IS_SET(dist, _DIST_USER | extra) || \
115         _IS_SET(dist, _DIST_USER | extra))
116
117 static int
118 checkDistDeveloper(dialogMenuItem *self)
119 {
120     return IS_DEVELOPER(Dists, 0) && _IS_SET(SrcDists, DIST_SRC_ALL);
121 }
122
123 static int
124 checkDistXDeveloper(dialogMenuItem *self)
125 {
126     return IS_DEVELOPER(Dists, DIST_XF86) && _IS_SET(SrcDists, DIST_SRC_ALL);
127 }
128
129 static int
130 checkDistKernDeveloper(dialogMenuItem *self)
131 {
132     return IS_DEVELOPER(Dists, 0) && _IS_SET(SrcDists, DIST_SRC_SYS);
133 }
134
135 static int
136 checkDistXKernDeveloper(dialogMenuItem *self)
137 {
138     return IS_DEVELOPER(Dists, DIST_XF86) && _IS_SET(SrcDists, DIST_SRC_SYS);
139 }
140
141 static int
142 checkDistUser(dialogMenuItem *self)
143 {
144     return IS_USER(Dists, 0);
145 }
146
147 static int
148 checkDistXUser(dialogMenuItem *self)
149 {
150     return IS_USER(Dists, DIST_XF86);
151 }
152
153 static int
154 checkDistMinimum(dialogMenuItem *self)
155 {
156     return Dists == (DIST_BIN | DIST_CRYPTO);
157 }
158
159 static int
160 checkDistEverything(dialogMenuItem *self)
161 {
162     return Dists == DIST_ALL && CRYPTODists == DIST_CRYPTO_ALL && \
163         _IS_SET(SrcDists, DIST_SRC_ALL) && \
164         _IS_SET(XF86Dists, DIST_XF86_ALL) && \
165         _IS_SET(XF86ServerDists, DIST_XF86_SERVER_ALL) && \
166         _IS_SET(XF86FontDists, DIST_XF86_FONTS_ALL);
167 }
168
169 static int
170 srcFlagCheck(dialogMenuItem *item)
171 {
172     return SrcDists;
173 }
174
175 static int
176 x11FlagCheck(dialogMenuItem *item)
177 {
178     return Dists & DIST_XF86;
179 }
180
181 static int
182 checkTrue(dialogMenuItem *item)
183 {
184     return TRUE;
185 }
186
187 /* All the system menus go here.
188  *
189  * Hardcoded things like version number strings will disappear from
190  * these menus just as soon as I add the code for doing inline variable
191  * expansion.
192  */
193
194 DMenu MenuIndex = {
195     DMENU_NORMAL_TYPE,
196     "Glossary of functions",
197     "This menu contains an alphabetized index of the top level functions in\n"
198     "this program (sysinstall).  Invoke an option by pressing [ENTER].\n"
199     "Leave the index page by selecting Cancel [TAB-ENTER].",
200     "Use PageUp or PageDown to move through this menu faster!",
201     NULL,
202     { { " Anon FTP",            "Configure anonymous FTP logins.",      dmenuVarCheck, configAnonFTP, NULL, "anon_ftp" },
203       { " Commit",              "Commit any pending actions (dangerous!)", NULL, installCustomCommit },
204       { " Console settings",    "Customize system console behavior.",   NULL, dmenuSubmenu, NULL, &MenuSyscons },
205       { " Configure",           "The system configuration menu.",       NULL, dmenuSubmenu, NULL, &MenuConfigure },
206       { " Defaults, Load",      "Load default settings.",               NULL, dispatch_load_floppy },
207       { " Device, Mouse",       "The mouse configuration menu.",        NULL, dmenuSubmenu, NULL, &MenuMouse },
208       { " Disklabel",           "The disk Label editor",                NULL, diskLabelEditor },
209       { " Dists, All",          "Root of the distribution tree.",       NULL, dmenuSubmenu, NULL, &MenuDistributions },
210       { " Dists, Basic",                "Basic FreeBSD distribution menu.",     NULL, dmenuSubmenu, NULL, &MenuSubDistributions },
211       { " Dists, Developer",    "Select developer's distribution.",     checkDistDeveloper, distSetDeveloper },
212       { " Dists, Src",          "Src distribution menu.",               NULL, dmenuSubmenu, NULL, &MenuSrcDistributions },
213       { " Dists, X Developer",  "Select X developer's distribution.",   checkDistXDeveloper, distSetXDeveloper },
214       { " Dists, Kern Developer", "Select kernel developer's distribution.", checkDistKernDeveloper, distSetKernDeveloper },
215       { " Dists, User",         "Select average user distribution.",    checkDistUser, distSetUser },
216       { " Dists, X User",       "Select average X user distribution.",  checkDistXUser, distSetXUser },
217       { " Distributions, Adding", "Installing additional distribution sets", NULL, distExtractAll },
218       { " Distributions, XFree86","XFree86 distribution menu.",         NULL, distSetXF86 },
219       { " Documentation",       "Installation instructions, README, etc.", NULL, dmenuSubmenu, NULL, &MenuDocumentation },
220       { " Doc, README",         "The distribution README file.",        NULL, dmenuDisplayFile, NULL, "README" },
221       { " Doc, Hardware",       "The distribution hardware guide.",     NULL, dmenuDisplayFile, NULL, "HARDWARE" },
222       { " Doc, Install",                "The distribution installation guide.", NULL, dmenuDisplayFile, NULL, "INSTALL" },
223       { " Doc, Copyright",      "The distribution copyright notices.",  NULL, dmenuDisplayFile, NULL, "COPYRIGHT" },
224       { " Doc, Release",                "The distribution release notes.",      NULL, dmenuDisplayFile, NULL, "RELNOTES" },
225       { " Doc, HTML",           "The HTML documentation menu.",         NULL, docBrowser },
226       { " Dump Vars",           "(debugging) dump out internal variables.", NULL, dump_variables },
227       { " Emergency shell",     "Start an Emergency Holographic shell.",        NULL, installFixitHoloShell },
228 #ifdef __i386__
229       { " Fdisk",               "The disk Partition Editor",            NULL, diskPartitionEditor },
230 #endif
231       { " Fixit",               "Repair mode with CDROM or fixit floppy.",      NULL, dmenuSubmenu, NULL, &MenuFixit },
232       { " FTP sites",           "The FTP mirror site listing.",         NULL, dmenuSubmenu, NULL, &MenuMediaFTP },
233       { " Gateway",             "Set flag to route packets between interfaces.", dmenuVarCheck, dmenuToggleVariable, NULL, "gateway=YES" },
234       { " HTML Docs",           "The HTML documentation menu",          NULL, docBrowser },
235       { " Install, Standard",   "A standard system installation.",      NULL, installStandard },
236       { " Install, Express",    "An express system installation.",      NULL, installExpress },
237       { " Install, Custom",     "The custom installation menu",         NULL, dmenuSubmenu, NULL, &MenuInstallCustom },
238       { " Label",               "The disk Label editor",                NULL, diskLabelEditor },
239       { " Media",               "Top level media selection menu.",      NULL, dmenuSubmenu, NULL, &MenuMedia },
240       { " Media, Tape",         "Select tape installation media.",      NULL, mediaSetTape },
241       { " Media, NFS",          "Select NFS installation media.",       NULL, mediaSetNFS },
242       { " Media, Floppy",       "Select floppy installation media.",    NULL, mediaSetFloppy },
243       { " Media, CDROM",        "Select CDROM installation media.",     NULL, mediaSetCDROM },
244       { " Media, DOS",          "Select DOS installation media.",       NULL, mediaSetDOS },
245       { " Media, UFS",          "Select UFS installation media.",       NULL, mediaSetUFS },
246       { " Media, FTP",          "Select FTP installation media.",       NULL, mediaSetFTP },
247       { " Media, FTP Passive",  "Select passive FTP installation media.", NULL, mediaSetFTPPassive },
248       { " Media, HTTP",         "Select FTP via HTTP proxy installation media.", NULL, mediaSetHTTP },
249       { " Network Interfaces",  "Configure network interfaces",         NULL, tcpMenuSelect },
250       { " Networking Services", "The network services menu.",           NULL, dmenuSubmenu, NULL, &MenuNetworking },
251       { " NFS, client",         "Set NFS client flag.",                 dmenuVarCheck, dmenuToggleVariable, NULL, "nfs_client_enable=YES" },
252       { " NFS, server",         "Set NFS server flag.",                 dmenuVarCheck, configNFSServer, NULL, "nfs_server_enable=YES" },
253       { " NTP Menu",            "The NTP configuration menu.",          NULL, dmenuSubmenu, NULL, &MenuNTP },
254       { " Options",             "The options editor.",                  NULL, optionsEditor },
255       { " Packages",            "The packages collection",              NULL, configPackages },
256       { " Partition",           "The disk Slice (PC-style partition) Editor",   NULL, diskPartitionEditor },
257       { " PCNFSD",              "Run authentication server for PC-NFS.", dmenuVarCheck, configPCNFSD, NULL, "pcnfsd" },
258       { " Root Password",       "Set the system manager's password.",   NULL, dmenuSystemCommand, NULL, "passwd root" },
259       { " Router",              "Select routing daemon (default: routed)", NULL, configRouter, NULL, "router_enable" },
260       { " Security",            "Select a default system security profile.", NULL, dmenuSubmenu, NULL, &MenuSecurityProfile },
261       { " Syscons",             "The system console configuration menu.", NULL, dmenuSubmenu, NULL, &MenuSyscons },
262       { " Syscons, Font",       "The console screen font.",       NULL, dmenuSubmenu, NULL, &MenuSysconsFont },
263       { " Syscons, Keymap",     "The console keymap configuration menu.", NULL, dmenuSubmenu, NULL, &MenuSysconsKeymap },
264       { " Syscons, Keyrate",    "The console key rate configuration menu.", NULL, dmenuSubmenu, NULL, &MenuSysconsKeyrate },
265       { " Syscons, Saver",      "The console screen saver configuration menu.", NULL, dmenuSubmenu, NULL, &MenuSysconsSaver },
266       { " Syscons, Screenmap",  "The console screenmap configuration menu.", NULL, dmenuSubmenu, NULL, &MenuSysconsScrnmap },
267       { " Time Zone",           "Set the system's time zone.",          NULL, dmenuSystemCommand, NULL, "tzsetup" },
268       { " Upgrade",             "Upgrade an existing system.",          NULL, installUpgrade },
269       { " Usage",               "Quick start - How to use this menu system.",   NULL, dmenuDisplayFile, NULL, "usage" },
270       { " User Management",     "Add user and group information.",      NULL, dmenuSubmenu, NULL, &MenuUsermgmt },
271       { " XFree86, Fonts",      "XFree86 Font selection menu.",         NULL, dmenuSubmenu, NULL, &MenuXF86SelectFonts },
272       { " XFree86, Server",     "XFree86 Server selection menu.",       NULL, dmenuSubmenu, NULL, &MenuXF86SelectServer },
273 #if defined(__i386__) && defined(PC98)
274       { " XFree86, PC98 Server",        "XFree86 PC98 Server selection menu.",  NULL, dmenuSubmenu, NULL, &MenuXF86SelectPC98Server },
275 #endif
276       { NULL } },
277 };
278
279 /* The initial installation menu */
280 DMenu MenuInitial = {
281     DMENU_NORMAL_TYPE,
282     "/stand/sysinstall Main Menu",                      /* title */
283     "Welcome to the FreeBSD installation and configuration tool.  Please\n" /* prompt */
284     "select one of the options below by using the arrow keys or typing the\n"
285     "first character of the option name you're interested in.  Invoke an\n"
286     "option by pressing [ENTER] or [TAB-ENTER] to exit the installation.", 
287     "Press F1 for Installation Guide",                  /* help line */
288     "INSTALL",                                          /* help file */
289     { { "Select" },
290       { "X Exit Install",       NULL, NULL, dmenuExit },
291       { " Usage",       "Quick start - How to use this menu system",    NULL, dmenuDisplayFile, NULL, "usage" },
292       { "Standard",     "Begin a standard installation (recommended)",  NULL, installStandard },
293       { "Express",      "Begin a quick installation (for the impatient)", NULL, installExpress },
294       { " Custom",      "Begin a custom installation (for experts)",    NULL, dmenuSubmenu, NULL, &MenuInstallCustom },
295       { "Configure",    "Do post-install configuration of FreeBSD",     NULL, dmenuSubmenu, NULL, &MenuConfigure },
296       { "Doc",  "Installation instructions, README, etc.",      NULL, dmenuSubmenu, NULL, &MenuDocumentation },
297       { "Keymap",       "Select keyboard type",                         NULL, dmenuSubmenu, NULL, &MenuSysconsKeymap },
298       { "Options",      "View/Set various installation options",        NULL, optionsEditor },
299       { "Fixit",        "Enter repair mode with CDROM/floppy or start shell",   NULL, dmenuSubmenu, NULL, &MenuFixit },
300       { "Upgrade",      "Upgrade an existing system",                   NULL, installUpgrade },
301       { "Load Config","Load default install configuration",             NULL, dispatch_load_floppy },
302       { "Index",        "Glossary of functions",                        NULL, dmenuSubmenu, NULL, &MenuIndex },
303       { NULL } },
304 };
305
306 /* The main documentation menu */
307 DMenu MenuDocumentation = {
308     DMENU_NORMAL_TYPE,
309     "FreeBSD Documentation Menu",
310     "If you are at all unsure about the configuration of your hardware\n"
311     "or are looking to build a system specifically for FreeBSD, read the\n"
312     "Hardware guide!  New users should also read the Install document for\n"
313     "a step-by-step tutorial on installing FreeBSD.  For general information,\n"
314     "consult the README file.",
315     "Confused?  Press F1 for help.",
316     "usage",
317     { { "X Exit",       "Exit this menu (returning to previous)",       NULL, dmenuExit },
318       { "2 README",     "A general description of FreeBSD.  Read this!", NULL, dmenuDisplayFile, NULL, "README" },
319       { "3 Hardware",   "The FreeBSD survival guide for PC hardware.",  NULL, dmenuDisplayFile, NULL, "HARDWARE" },
320       { "4 Install",    "A step-by-step guide to installing FreeBSD.",  NULL, dmenuDisplayFile, NULL, "INSTALL" },
321       { "5 Copyright",  "The FreeBSD Copyright notices.",               NULL, dmenuDisplayFile, NULL, "COPYRIGHT" },
322       { "6 Release"     ,"The release notes for this version of FreeBSD.", NULL, dmenuDisplayFile, NULL, "RELNOTES" },
323       { "7 Shortcuts",  "Creating shortcuts to sysinstall.",            NULL, dmenuDisplayFile, NULL, "shortcuts" },
324       { "8 HTML Docs",  "Go to the HTML documentation menu (post-install).", NULL, docBrowser },
325       { NULL } },
326 };
327
328 DMenu MenuMouseType = {
329     DMENU_RADIO_TYPE | DMENU_SELECTION_RETURNS,
330     "Select a protocol type for your mouse",
331     "If your mouse is attached to the PS/2 mouse port or the bus mouse port,\n"
332     "you should always choose \"Auto\", regardless of the model and the brand\n"
333     "of the mouse.  All other protocol types are for serial mice and should\n"
334     "not be used with the PS/2 port mouse or the bus mouse.  If you have\n"
335     "a serial mouse and are not sure about its protocol, you should also try\n"
336     "\"Auto\".  It may not work for the serial mouse if the mouse does not\n"
337     "support the PnP standard.  But, it won't hurt.  Many 2-button serial mice\n"
338     "are compatible with \"Microsoft\" or \"MouseMan\".  3-button serial mice\n"
339     "may be compatible with \"MouseSystems\" or \"MouseMan\".  If the serial\n"
340     "mouse has a wheel, it may be compatible with \"IntelliMouse\".",
341     NULL,
342     NULL,
343     { { "1 Auto",       "Bus mouse, PS/2 style mouse or PnP serial mouse",      
344         dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_TYPE "=auto" },
345       { "2 GlidePoint", "ALPS GlidePoint pad (serial)",
346         dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_TYPE "=glidepoint" },
347       { "3 Hitachi","Hitachi tablet (serial)",
348         dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_TYPE "=mmhittab" },
349       { "4 IntelliMouse",       "Microsoft IntelliMouse (serial)",
350         dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_TYPE "=intellimouse" },
351       { "5 Logitech",   "Logitech protocol (old models) (serial)",
352         dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_TYPE "=logitech" },
353       { "6 Microsoft",  "Microsoft protocol (serial)",
354         dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_TYPE "=microsoft" },
355       { "7 MM Series","MM Series protocol (serial)",
356         dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_TYPE "=mmseries" },
357       { "8 MouseMan",   "Logitech MouseMan/TrackMan models (serial)",
358         dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_TYPE "=mouseman" },
359       { "9 MouseSystems",       "MouseSystems protocol (serial)",
360         dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_TYPE "=mousesystems" },
361       { "A ThinkingMouse","Kensington ThinkingMouse (serial)",
362         dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_TYPE "=thinkingmouse" },
363       { NULL } },
364 };
365
366 DMenu MenuMousePort = {
367     DMENU_RADIO_TYPE | DMENU_SELECTION_RETURNS,
368     "Select your mouse port from the following menu",
369     "The built-in pointing device of laptop/notebook computers is usually\n"
370     "a PS/2 style device.",
371     NULL,
372     NULL,
373     { { "1 PS/2",       "PS/2 style mouse (/dev/psm0)", 
374         dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_PORT "=/dev/psm0" },
375       { "2 COM1",       "Serial mouse on COM1 (/dev/cuaa0)",
376         dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_PORT "=/dev/cuaa0" },
377       { "3 COM2",       "Serial mouse on COM2 (/dev/cuaa1)",
378         dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_PORT "=/dev/cuaa1" },
379       { "4 COM3",       "Serial mouse on COM3 (/dev/cuaa2)",
380         dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_PORT "=/dev/cuaa2" },
381       { "5 COM4",       "Serial mouse on COM4 (/dev/cuaa3)", 
382         dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_PORT "=/dev/cuaa3" },
383       { "6 BusMouse",   "Logitech, ATI or MS bus mouse (/dev/mse0)", 
384         dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_PORT "=/dev/mse0" },
385       { NULL } },
386 };
387
388 DMenu MenuMouse = {
389     DMENU_NORMAL_TYPE,
390     "Please configure your mouse",
391     "You can cut and paste text in the text console by running the mouse\n"
392     "daemon.  Specify a port and a protocol type of your mouse and enable\n"
393     "the mouse daemon.  If you don't want this feature, select 6 to disable\n"
394     "the daemon.\n"
395     "Once you've enabled the mouse daemon, you can specify \"/dev/sysmouse\"\n"
396     "as your mouse device and \"SysMouse\" or \"MouseSystems\" as mouse\n"
397     "protocol when running the X configuration utility (see Configuration\n"
398     "menu).",
399     NULL,
400     NULL,
401     { { "X Exit", "Exit this menu (returning to previous)", NULL, dmenuExit },
402       { "2 Enable",     "Test and run the mouse daemon", NULL, mousedTest, NULL, NULL },
403       { "3 Type",       "Select mouse protocol type", NULL, dmenuSubmenu, NULL, &MenuMouseType },
404       { "4 Port",       "Select mouse port", NULL, dmenuSubmenu, NULL, &MenuMousePort },
405       { "5 Flags",      "Set additional flags", dmenuVarCheck, setMouseFlags,
406         NULL, VAR_MOUSED_FLAGS "=" },
407       { "6 Disable",    "Disable the mouse daemon", NULL, mousedDisable, NULL, NULL },
408       { NULL } },
409 };
410
411 DMenu MenuMediaCDROM = {
412     DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
413     "Choose a CDROM type",
414     "FreeBSD can be installed directly from a CDROM containing a valid\n"
415     "FreeBSD distribution.  If you are seeing this menu it is because\n"
416     "more than one CDROM drive was found on your system.  Please select one\n"
417     "of the following CDROM drives as your installation drive.",
418     "Press F1 to read the installation guide",
419     "INSTALL",
420     { { NULL } },
421 };
422
423 DMenu MenuMediaFloppy = {
424     DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
425     "Choose a Floppy drive",
426     "You have more than one floppy drive.  Please choose which drive\n"
427     "you would like to use.",
428     NULL,
429     NULL,
430     { { NULL } },
431 };
432
433 DMenu MenuMediaDOS = {
434     DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
435     "Choose a DOS partition",
436     "FreeBSD can be installed directly from a DOS partition\n"
437     "assuming, of course, that you have copied the relevant\n"
438     "distributions into your DOS partition before starting this\n"
439     "installation.  If this is not the case then you should reboot\n"
440     "DOS at this time and copy the distributions you wish to install\n"
441     "into a \"FREEBSD\" subdirectory on one of your DOS partitions.\n"
442     "Otherwise, please select the DOS partition containing the FreeBSD\n"
443     "distribution files.",
444     "Press F1 to read the installation guide",
445     "INSTALL",
446     { { NULL } },
447 };
448
449 DMenu MenuMediaFTP = {
450     DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
451     "Please select a FreeBSD FTP distribution site",
452     "Please select the site closest to you or \"other\" if you'd like to\n"
453     "specify a different choice.  Also note that not every site listed here\n"
454     "carries more than the base distribution kits. Only the Primary site is\n"
455     "guaranteed to carry the full range of possible distributions.",
456     "Select a site that's close!",
457     "INSTALL",
458     { { "Primary Site", "ftp.freebsd.org", NULL, dmenuSetVariable, NULL,
459         VAR_FTP_PATH "=ftp://ftp.freebsd.org" },
460       { "URL", "Specify some other ftp site by URL", NULL, dmenuSetVariable, NULL,
461         VAR_FTP_PATH "=other" },
462       { " 5.0 SNAP Server", "current.freebsd.org", NULL, dmenuSetVariable, NULL,
463         VAR_FTP_PATH "=ftp://current.freebsd.org" },
464       { " 4.0 SNAP Server", "releng4.freebsd.org", NULL, dmenuSetVariable, NULL,
465         VAR_FTP_PATH "=ftp://releng4.freebsd.org/pub/FreeBSD/snapshots/" },
466       { " IPv6 Ready", "ftp7.jp.freebsd.org", NULL, dmenuSetVariable, NULL,
467         VAR_FTP_PATH "=ftp://ftp7.jp.freebsd.org" },
468       { "Argentina",    "ftp.ar.freebsd.org", NULL, dmenuSetVariable, NULL,
469         VAR_FTP_PATH "=ftp://ftp.ar.freebsd.org" },
470       { " Australia",   "ftp.au.freebsd.org", NULL, dmenuSetVariable, NULL,
471         VAR_FTP_PATH "=ftp://ftp.au.freebsd.org" },
472       { " Australia #2","ftp2.au.freebsd.org", NULL, dmenuSetVariable, NULL,
473         VAR_FTP_PATH "=ftp://ftp2.au.freebsd.org" },
474       { " Australia #3","ftp3.au.freebsd.org", NULL, dmenuSetVariable, NULL,
475         VAR_FTP_PATH "=ftp://ftp3.au.freebsd.org" },
476       { " Australia #4","ftp4.au.freebsd.org", NULL, dmenuSetVariable, NULL,
477         VAR_FTP_PATH "=ftp://ftp4.au.freebsd.org" },
478       { " Australia #5","ftp5.au.freebsd.org", NULL, dmenuSetVariable, NULL,
479         VAR_FTP_PATH "=ftp://ftp5.au.freebsd.org" },
480       { "Brazil",       "ftp.br.freebsd.org", NULL, dmenuSetVariable, NULL,
481         VAR_FTP_PATH "=ftp://ftp.br.freebsd.org" },
482       { " Brazil #2",   "ftp2.br.freebsd.org", NULL, dmenuSetVariable, NULL,
483         VAR_FTP_PATH "=ftp://ftp2.br.freebsd.org" },
484       { " Brazil #3",   "ftp3.br.freebsd.org", NULL, dmenuSetVariable, NULL,
485         VAR_FTP_PATH "=ftp://ftp3.br.freebsd.org" },
486       { " Brazil #4",   "ftp4.br.freebsd.org", NULL, dmenuSetVariable, NULL,
487         VAR_FTP_PATH "=ftp://ftp4.br.freebsd.org" },
488       { " Brazil #5",   "ftp5.br.freebsd.org", NULL, dmenuSetVariable, NULL,
489         VAR_FTP_PATH "=ftp://ftp5.br.freebsd.org" },
490       { " Brazil #6",   "ftp6.br.freebsd.org", NULL, dmenuSetVariable, NULL,
491         VAR_FTP_PATH "=ftp://ftp6.br.freebsd.org" },
492       { " Brazil #7",   "ftp7.br.freebsd.org", NULL, dmenuSetVariable, NULL,
493         VAR_FTP_PATH "=ftp://ftp7.br.freebsd.org" },
494       { " Canada",      "ftp.ca.freebsd.org", NULL, dmenuSetVariable, NULL,
495         VAR_FTP_PATH "=ftp://ftp.ca.freebsd.org" },
496       { " Czech Republic", "ftp.cz.freebsd.org", NULL, dmenuSetVariable, NULL,
497         VAR_FTP_PATH "=ftp://ftp.cz.freebsd.org" },
498       { "Denmark",      "ftp.dk.freebsd.org", NULL, dmenuSetVariable, NULL,
499         VAR_FTP_PATH "=ftp://ftp.dk.freebsd.org" },
500       { " Denmark #2",  "ftp2.dk.freebsd.org", NULL, dmenuSetVariable, NULL,
501         VAR_FTP_PATH "=ftp://ftp2.dk.freebsd.org" },
502       { "Estonia",      "ftp.ee.freebsd.org", NULL, dmenuSetVariable, NULL,
503         VAR_FTP_PATH "=ftp://ftp.ee.freebsd.org" },
504       { "Finland",      "ftp.fi.freebsd.org", NULL, dmenuSetVariable, NULL,
505         VAR_FTP_PATH "=ftp://ftp.fi.freebsd.org" },
506       { " France",      "ftp.fr.freebsd.org", NULL, dmenuSetVariable, NULL,
507         VAR_FTP_PATH "=ftp://ftp.fr.freebsd.org" },
508       { " France #1",   "ftp.fr.freebsd.org", NULL, dmenuSetVariable, NULL,
509         VAR_FTP_PATH "=ftp://ftp.fr.freebsd.org" },
510       { " France #2",   "ftp2.fr.freebsd.org", NULL, dmenuSetVariable, NULL,
511         VAR_FTP_PATH "=ftp://ftp2.fr.freebsd.org" },
512       { " France #3",   "ftp3.fr.freebsd.org", NULL, dmenuSetVariable, NULL,
513         VAR_FTP_PATH "=ftp://ftp3.fr.freebsd.org" },
514       { " France #4",   "ftp4.fr.freebsd.org", NULL, dmenuSetVariable, NULL,
515         VAR_FTP_PATH "=ftp://ftp4.fr.freebsd.org" },
516       { " France #5",   "ftp5.fr.freebsd.org", NULL, dmenuSetVariable, NULL,
517         VAR_FTP_PATH "=ftp://ftp5.fr.freebsd.org" },
518       { " France #6",   "ftp6.fr.freebsd.org", NULL, dmenuSetVariable, NULL,
519         VAR_FTP_PATH "=ftp://ftp6.fr.freebsd.org" },
520       { "Germany",      "ftp.de.freebsd.org", NULL, dmenuSetVariable, NULL,
521         VAR_FTP_PATH "=ftp://ftp.de.freebsd.org" },
522       { " Germany #2",  "ftp2.de.freebsd.org", NULL, dmenuSetVariable, NULL,
523         VAR_FTP_PATH "=ftp://ftp2.de.freebsd.org" },
524       { " Germany #3",  "ftp3.de.freebsd.org", NULL, dmenuSetVariable, NULL,
525         VAR_FTP_PATH "=ftp://ftp3.de.freebsd.org" },
526       { " Germany #4",  "ftp4.de.freebsd.org", NULL, dmenuSetVariable, NULL,
527         VAR_FTP_PATH "=ftp://ftp4.de.freebsd.org" },
528       { " Germany #5",  "ftp5.de.freebsd.org", NULL, dmenuSetVariable, NULL,
529         VAR_FTP_PATH "=ftp://ftp5.de.freebsd.org" },
530       { " Germany #6",  "ftp6.de.freebsd.org", NULL, dmenuSetVariable, NULL,
531         VAR_FTP_PATH "=ftp://ftp6.de.freebsd.org" },
532       { " Germany #7",  "ftp7.de.freebsd.org", NULL, dmenuSetVariable, NULL,
533         VAR_FTP_PATH "=ftp://ftp7.de.freebsd.org" },
534       { " Greece",      "ftp.gr.freebsd.org", NULL, dmenuSetVariable, NULL,
535         VAR_FTP_PATH "=ftp://ftp.gr.freebsd.org" },
536       { " Greece #2",   "ftp2.gr.freebsd.org", NULL, dmenuSetVariable, NULL,
537         VAR_FTP_PATH "=ftp://ftp2.gr.freebsd.org" },
538       { "Holland",      "ftp.nl.freebsd.org", NULL, dmenuSetVariable, NULL,
539         VAR_FTP_PATH "=ftp://ftp.nl.freebsd.org" },
540       { " Hong Kong",   "ftp.hk.super.net", NULL, dmenuSetVariable, NULL,
541         VAR_FTP_PATH "=ftp://ftp.hk.super.net" },
542       { "Iceland",      "ftp.is.freebsd.org", NULL, dmenuSetVariable, NULL,
543         VAR_FTP_PATH "=ftp://ftp.is.freebsd.org" },
544       { " Ireland",     "ftp.ie.freebsd.org", NULL, dmenuSetVariable, NULL,
545         VAR_FTP_PATH "=ftp://ftp.ie.freebsd.org" },
546       { " Israel",      "ftp.il.freebsd.org", NULL, dmenuSetVariable, NULL,
547         VAR_FTP_PATH "=ftp://ftp.il.freebsd.org" },
548       { " Israel #2",   "ftp2.il.freebsd.org", NULL, dmenuSetVariable, NULL,
549         VAR_FTP_PATH "=ftp://ftp2.il.freebsd.org" },
550       { "Japan",        "ftp.jp.freebsd.org", NULL, dmenuSetVariable, NULL,
551         VAR_FTP_PATH "=ftp://ftp.jp.freebsd.org" },
552       { " Japan #2",    "ftp2.jp.freebsd.org", NULL, dmenuSetVariable, NULL,
553         VAR_FTP_PATH "=ftp://ftp2.jp.freebsd.org" },
554       { " Japan #3",    "ftp3.jp.freebsd.org", NULL, dmenuSetVariable, NULL,
555         VAR_FTP_PATH "=ftp://ftp3.jp.freebsd.org" },
556       { " Japan #4",    "ftp4.jp.freebsd.org", NULL, dmenuSetVariable, NULL,
557         VAR_FTP_PATH "=ftp://ftp4.jp.freebsd.org" },
558       { " Japan #5",    "ftp5.jp.freebsd.org", NULL, dmenuSetVariable, NULL,
559         VAR_FTP_PATH "=ftp://ftp5.jp.freebsd.org" },
560       { " Japan #6",    "ftp6.jp.freebsd.org", NULL, dmenuSetVariable, NULL,
561         VAR_FTP_PATH "=ftp://ftp6.jp.freebsd.org" },
562       { " Japan #7",    "ftp7.jp.freebsd.org", NULL, dmenuSetVariable, NULL,
563         VAR_FTP_PATH "=ftp://ftp7.jp.freebsd.org" },
564       { "Korea",        "ftp.kr.freebsd.org", NULL, dmenuSetVariable, NULL,
565         VAR_FTP_PATH "=ftp://ftp.kr.freebsd.org" },
566       { " Korea #2",    "ftp2.kr.freebsd.org", NULL, dmenuSetVariable, NULL,
567         VAR_FTP_PATH "=ftp://ftp2.kr.freebsd.org" },
568       { " Korea #3",    "ftp3.kr.freebsd.org", NULL, dmenuSetVariable, NULL,
569         VAR_FTP_PATH "=ftp://ftp3.kr.freebsd.org" },
570       { " Korea #4",    "ftp4.kr.freebsd.org", NULL, dmenuSetVariable, NULL,
571         VAR_FTP_PATH "=ftp://ftp4.kr.freebsd.org" },
572       { " Korea #5",    "ftp5.kr.freebsd.org", NULL, dmenuSetVariable, NULL,
573         VAR_FTP_PATH "=ftp://ftp5.kr.freebsd.org" },
574       { "Lithuania",    "ftp.lt.freebsd.org", NULL, dmenuSetVariable, NULL,
575         VAR_FTP_PATH "=ftp://ftp.lt.freebsd.org" },
576       { "New Zealand",  "ftp.nz.freebsd.org", NULL, dmenuSetVariable, NULL,
577         VAR_FTP_PATH "=ftp://ftp.nz.freebsd.org" },
578       { "Norway",       "ftp.no.freebsd.org", NULL, dmenuSetVariable, NULL,
579         VAR_FTP_PATH "=ftp://ftp.no.freebsd.org" },
580       { "Poland",       "ftp.pl.freebsd.org", NULL, dmenuSetVariable, NULL,
581         VAR_FTP_PATH "=ftp://ftp.pl.freebsd.org" },
582       { " Portugal",    "ftp.pt.freebsd.org", NULL, dmenuSetVariable, NULL,
583         VAR_FTP_PATH "=ftp://ftp.pt.freebsd.org" },
584       { " Portugal #2", "ftp2.pt.freebsd.org", NULL, dmenuSetVariable, NULL,
585         VAR_FTP_PATH "=ftp://ftp2.pt.freebsd.org" },
586       { "Romania",      "ftp.ro.freebsd.org", NULL, dmenuSetVariable, NULL,
587         VAR_FTP_PATH "=ftp://ftp.ro.freebsd.org" },
588       { " Russia",      "ftp.ru.freebsd.org", NULL, dmenuSetVariable, NULL,
589         VAR_FTP_PATH "=ftp://ftp.ru.freebsd.org" },
590       { " Russia #2",   "ftp2.ru.freebsd.org", NULL, dmenuSetVariable, NULL,
591         VAR_FTP_PATH "=ftp://ftp2.ru.freebsd.org" },
592       { " Russia #3",   "ftp3.ru.freebsd.org", NULL, dmenuSetVariable, NULL,
593         VAR_FTP_PATH "=ftp://ftp3.ru.freebsd.org" },
594       { " Russia #4",    "ftp4.ru.freebsd.org", NULL, dmenuSetVariable, NULL,
595         VAR_FTP_PATH "=ftp://ftp4.ru.freebsd.org" },
596       { "Slovak Republic",      "ftp.sk.freebsd.org", NULL, dmenuSetVariable, NULL,
597         VAR_FTP_PATH "=ftp://ftp.sk.freebsd.org" },
598       { "Slovenia",     "ftp.si.freebsd.org", NULL, dmenuSetVariable, NULL,
599         VAR_FTP_PATH "=ftp://ftp.si.freebsd.org" },
600       { " South Africa",        "ftp.za.freebsd.org", NULL, dmenuSetVariable, NULL,
601         VAR_FTP_PATH "=ftp://ftp.za.freebsd.org" },
602       { " South Africa #2", "ftp2.za.freebsd.org", NULL, dmenuSetVariable, NULL,
603         VAR_FTP_PATH "=ftp://ftp2.za.freebsd.org" },
604       { " South Africa #3", "ftp3.za.freebsd.org", NULL, dmenuSetVariable, NULL,
605         VAR_FTP_PATH "=ftp://ftp3.za.freebsd.org" },
606       { " South Africa #4", "ftp4.za.freebsd.org", NULL, dmenuSetVariable, NULL,
607         VAR_FTP_PATH "=ftp://ftp4.za.freebsd.org" },
608       { " Spain",       "ftp.es.freebsd.org", NULL, dmenuSetVariable, NULL,
609         VAR_FTP_PATH "=ftp://ftp.es.freebsd.org" },
610       { " Spain #2",    "ftp2.es.freebsd.org", NULL, dmenuSetVariable, NULL,
611         VAR_FTP_PATH "=ftp://ftp2.es.freebsd.org" },
612       { " Sweden",      "ftp.se.freebsd.org", NULL, dmenuSetVariable, NULL,
613         VAR_FTP_PATH "=ftp://ftp.se.freebsd.org" },
614       { " Sweden #2",   "ftp2.se.freebsd.org", NULL, dmenuSetVariable, NULL,
615         VAR_FTP_PATH "=ftp://ftp2.se.freebsd.org" },
616       { " Sweden #3",   "ftp3.se.freebsd.org", NULL, dmenuSetVariable, NULL,
617         VAR_FTP_PATH "=ftp://ftp3.se.freebsd.org" },
618       { "Taiwan",       "ftp.tw.freebsd.org", NULL, dmenuSetVariable, NULL,
619         VAR_FTP_PATH "=ftp://ftp.tw.freebsd.org" },
620       { " Taiwan #2",   "ftp2.tw.freebsd.org", NULL, dmenuSetVariable, NULL,
621         VAR_FTP_PATH "=ftp://ftp2.tw.freebsd.org" },
622       { " Taiwan #3",   "ftp3.tw.freebsd.org", NULL, dmenuSetVariable, NULL,
623         VAR_FTP_PATH "=ftp://ftp3.tw.freebsd.org" },
624       { " Taiwan #4",   "ftp4.tw.freebsd.org", NULL, dmenuSetVariable, NULL,
625         VAR_FTP_PATH "=ftp://ftp4.tw.freebsd.org" },
626       { " Thailand",    "ftp.nectec.or.th", NULL, dmenuSetVariable, NULL,
627         VAR_FTP_PATH "=ftp://ftp.nectec.or.th/pub/mirrors/FreeBSD/" },
628       { "UK",           "ftp.uk.freebsd.org", NULL, dmenuSetVariable, NULL,
629         VAR_FTP_PATH "=ftp://ftp.uk.freebsd.org" },
630       { " UK #2",       "ftp2.uk.freebsd.org", NULL, dmenuSetVariable, NULL,
631         VAR_FTP_PATH "=ftp://ftp2.uk.freebsd.org" },
632       { " UK #3",       "ftp3.uk.freebsd.org", NULL, dmenuSetVariable, NULL,
633         VAR_FTP_PATH "=ftp://ftp3.uk.freebsd.org" },
634       { " UK #4",       "ftp4.uk.freebsd.org", NULL, dmenuSetVariable, NULL,
635         VAR_FTP_PATH "=ftp://ftp4.uk.freebsd.org" },
636       { " UK #5",       "ftp5.uk.freebsd.org", NULL, dmenuSetVariable, NULL,
637         VAR_FTP_PATH "=ftp://ftp5.uk.freebsd.org" },
638       { " Ukraine",     "ftp.ua.freebsd.org", NULL, dmenuSetVariable, NULL,
639         VAR_FTP_PATH "=ftp://ftp.ua.freebsd.org" },
640       { " Ukraine #2",  "ftp2.ua.freebsd.org", NULL, dmenuSetVariable, NULL,
641         VAR_FTP_PATH "=ftp://ftp2.ua.freebsd.org" },
642       { " Ukraine #3",  "ftp3.ua.freebsd.org", NULL, dmenuSetVariable, NULL,
643         VAR_FTP_PATH "=ftp://ftp3.ua.freebsd.org" },
644       { " USA",         "ftp.freebsd.org", NULL, dmenuSetVariable, NULL,
645         VAR_FTP_PATH "=ftp://ftp.freebsd.org" },
646       { " USA #2",      "ftp2.freebsd.org", NULL, dmenuSetVariable, NULL,
647         VAR_FTP_PATH "=ftp://ftp2.freebsd.org" },
648       { " USA #3",      "ftp3.freebsd.org", NULL, dmenuSetVariable, NULL,
649         VAR_FTP_PATH "=ftp://ftp3.freebsd.org" },
650       { " USA #4",      "ftp4.freebsd.org", NULL, dmenuSetVariable, NULL,
651         VAR_FTP_PATH "=ftp://ftp4.freebsd.org" },
652       { " USA #5",      "ftp5.freebsd.org", NULL, dmenuSetVariable, NULL,
653         VAR_FTP_PATH "=ftp://ftp5.freebsd.org" },
654       { " USA #6",      "ftp6.freebsd.org", NULL, dmenuSetVariable, NULL,
655         VAR_FTP_PATH "=ftp://ftp6.freebsd.org" },
656       { NULL } }
657 };
658
659 DMenu MenuMediaTape = {
660     DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
661     "Choose a tape drive type",
662     "FreeBSD can be installed from tape drive, though this installation\n"
663     "method requires a certain amount of temporary storage in addition\n"
664     "to the space required by the distribution itself (tape drives make\n"
665     "poor random-access devices, so we extract _everything_ on the tape\n"
666     "in one pass).  If you have sufficient space for this, then you should\n"
667     "select one of the following tape devices detected on your system.",
668     "Press F1 to read the installation guide",
669     "INSTALL",
670     { { NULL } },
671 };
672
673 DMenu MenuNetworkDevice = {
674     DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
675     "Network interface information required",
676     "If you are using PPP over a serial device, as opposed to a direct\n"
677     "ethernet connection, then you may first need to dial your Internet\n"
678     "Service Provider using the ppp utility we provide for that purpose.\n"
679     "If you're using SLIP over a serial device then the expectation is\n"
680     "that you have a HARDWIRED connection.\n\n"
681     "You can also install over a parallel port using a special \"laplink\"\n"
682     "cable to another machine running a fairly recent (2.0R or later)\n"
683     "version of FreeBSD.",
684     "Press F1 to read network configuration manual",
685     "network_device",
686     { { NULL } },
687 };
688
689 /* The media selection menu */
690 DMenu MenuMedia = {
691     DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
692     "Choose Installation Media",
693     "FreeBSD can be installed from a variety of different installation\n"
694     "media, ranging from floppies to an Internet FTP server.  If you're\n"
695     "installing FreeBSD from a supported CDROM drive then this is generally\n"
696     "the best media to use if you have no overriding reason for using other\n"
697     "media.",
698     "Press F1 for more information on the various media types",
699     "media",
700     { { "1 CDROM",              "Install from a FreeBSD CDROM",         NULL, mediaSetCDROM },
701       { "2 FTP",                "Install from an FTP server",           NULL, mediaSetFTPActive },
702       { "3 FTP Passive",        "Install from an FTP server through a firewall", NULL, mediaSetFTPPassive },
703       { "4 HTTP",               "Install from an FTP server through a http proxy", NULL, mediaSetHTTP },
704       { "5 DOS",                "Install from a DOS partition",         NULL, mediaSetDOS },
705       { "6 NFS",                "Install over NFS",                     NULL, mediaSetNFS },
706       { "7 File System",        "Install from an existing filesystem",  NULL, mediaSetUFS },
707       { "8 Floppy",             "Install from a floppy disk set",       NULL, mediaSetFloppy },
708       { "9 Tape",               "Install from SCSI or QIC tape",        NULL, mediaSetTape },
709       { "X Options",            "Go to the Options screen",             NULL, optionsEditor },
710       { NULL } },
711 };
712
713 /* The distributions menu */
714 DMenu MenuDistributions = {
715     DMENU_CHECKLIST_TYPE | DMENU_SELECTION_RETURNS,
716     "Choose Distributions",
717     "As a convenience, we provide several \"canned\" distribution sets.\n"
718     "These select what we consider to be the most reasonable defaults for the\n"
719     "type of system in question.  If you would prefer to pick and choose the\n"
720     "list of distributions yourself, simply select \"Custom\".  You can also\n"
721     "pick a canned distribution set and then fine-tune it with the Custom item.\n\n"
722     "Choose an item by pressing [SPACE]. When you are finished, choose the Exit\n"
723     "item or press [ENTER].",
724     "Press F1 for more information on these options.",
725     "distributions",
726     { { "X Exit", "Exit this menu (returning to previous)",
727         checkTrue, dmenuExit, NULL, NULL, '<', '<', '<' },
728       { "All",                  "All system sources, binaries and X Window System)",
729         checkDistEverything,    distSetEverything, NULL, NULL, ' ', ' ', ' ' },
730       { "Reset",                "Reset selected distribution list to nothing",
731         NULL,                   distReset, NULL, NULL, ' ', ' ', ' ' },
732       { "4 Developer",          "Full sources, binaries and doc but no games", 
733         checkDistDeveloper,     distSetDeveloper },
734       { "5 X-Developer",        "Same as above + X Window System",
735         checkDistXDeveloper,    distSetXDeveloper },
736       { "6 Kern-Developer",     "Full binaries and doc, kernel sources only",
737         checkDistKernDeveloper, distSetKernDeveloper },
738       { "7 X-Kern-Developer",   "Same as above + X Window System",
739         checkDistXKernDeveloper, distSetXKernDeveloper },
740       { "8 User",               "Average user - binaries and doc only",
741         checkDistUser,          distSetUser },
742       { "9 X-User",             "Same as above + X Window System",
743         checkDistXUser,         distSetXUser },
744       { "A Minimal",            "The smallest configuration possible",
745         checkDistMinimum,       distSetMinimum },
746       { "B Custom",             "Specify your own distribution set",
747         NULL,                   dmenuSubmenu, NULL, &MenuSubDistributions, '>', '>', '>' },
748       { NULL } },
749 };
750
751 DMenu MenuSubDistributions = {
752     DMENU_CHECKLIST_TYPE | DMENU_SELECTION_RETURNS,
753     "Select the distributions you wish to install.",
754     "Please check off the distributions you wish to install.  At the\n"
755     "very minimum, this should be \"bin\".",
756     NULL,
757     NULL,
758     { { "X Exit", "Exit this menu (returning to previous)",
759         checkTrue, dmenuExit, NULL, NULL, '<', '<', '<' },
760       { "All",          "All system sources, binaries and X Window System",
761         NULL, distSetEverything, NULL, NULL, ' ', ' ', ' ' },
762       { "Reset",        "Reset all of the below",
763         NULL, distReset, NULL, NULL, ' ', ' ', ' ' },
764       { " bin",         "Binary base distribution (required)",
765         dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_BIN },
766 #ifdef __i386__
767       { " compat1x",    "FreeBSD 1.x binary compatibility",
768         dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_COMPAT1X },
769       { " compat20",    "FreeBSD 2.0 binary compatibility",
770         dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_COMPAT20 },
771       { " compat21",    "FreeBSD 2.1 binary compatibility",
772         dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_COMPAT21 },
773       { " compat22",    "FreeBSD 2.2.x and 3.0 a.out binary compatibility",
774         dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_COMPAT22 },
775 #if __FreeBSD__ > 3
776       { " compat3x",    "FreeBSD 3.x binary compatibility",
777         dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_COMPAT3X },
778 #endif
779 #if __FreeBSD__ > 4
780       { " compat4x",    "FreeBSD 4.x binary compatibility",
781         dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_COMPAT4X },
782 #endif
783 #endif
784       { " crypto",      "Basic encryption services",
785         dmenuFlagCheck, dmenuSetFlag, NULL, &CRYPTODists, '[', 'X', ']', DIST_CRYPTO_CRYPTO, },
786 #if __FreeBSD__ <= 3
787       { " krb",         "KerberosIV authentication services",
788         dmenuFlagCheck, dmenuSetFlag, NULL, &CRYPTODists, '[', 'X', ']', DIST_CRYPTO_KERBEROS },
789 #else
790       { " krb4",        "KerberosIV authentication services",
791         dmenuFlagCheck, dmenuSetFlag, NULL, &CRYPTODists, '[', 'X', ']', DIST_CRYPTO_KERBEROS4 },
792       { " krb5",        "Kerberos5 authentication services",
793         dmenuFlagCheck, dmenuSetFlag, NULL, &CRYPTODists, '[', 'X', ']', DIST_CRYPTO_KERBEROS5 },
794 #endif
795       { " dict",        "Spelling checker dictionary files",
796         dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_DICT },
797       { " doc",         "Miscellaneous FreeBSD online docs",
798         dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_DOC },
799       { " games",       "Games (non-commercial)",
800         dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_GAMES },
801       { " info",        "GNU info files",
802         dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_INFO },
803       { " man",         "System manual pages - recommended",
804         dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_MANPAGES },
805       { " catman",      "Preformatted system manual pages",
806         dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_CATPAGES },
807       { " proflibs",    "Profiled versions of the libraries",
808         dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_PROFLIBS },
809       { " src",         "Sources for everything",
810         srcFlagCheck,   distSetSrc },
811       { " ports",       "The FreeBSD Ports collection",
812         dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_PORTS },
813       { " local",       "Local additions collection",
814         dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_LOCAL},
815       { " XFree86",     "The XFree86 3.3.6 distribution",
816         x11FlagCheck,   distSetXF86 },
817       { NULL } },
818 };
819
820 DMenu MenuSrcDistributions = {
821     DMENU_CHECKLIST_TYPE | DMENU_SELECTION_RETURNS,
822     "Select the sub-components of src you wish to install.",
823     "Please check off those portions of the FreeBSD source tree\n"
824     "you wish to install (remember to use SPACE, not ENTER!).",
825     NULL,
826     NULL,
827     { { "X Exit", "Exit this menu (returning to previous)",
828         checkTrue, dmenuExit, NULL, NULL, '<', '<', '<' },
829       { "All",          "Select all of the below",
830         NULL,           setSrc, NULL, NULL, ' ', ' ', ' ' },
831       { "Reset",        "Reset all of the below",
832         NULL,           clearSrc, NULL, NULL, ' ', ' ', ' ' },
833       { " base",        "top-level files in /usr/src",
834         dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_BASE },
835       { " contrib",     "/usr/src/contrib (contributed software)",
836         dmenuFlagCheck, dmenuSetFlag,   NULL, &SrcDists, '[', 'X', ']', DIST_SRC_CONTRIB },
837       { " gnu",         "/usr/src/gnu (software from the GNU Project)",
838         dmenuFlagCheck, dmenuSetFlag,   NULL, &SrcDists, '[', 'X', ']', DIST_SRC_GNU },
839       { " etc",         "/usr/src/etc (miscellaneous system files)",
840         dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_ETC },
841       { " games",       "/usr/src/games (the obvious!)",
842         dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_GAMES },
843       { " include",     "/usr/src/include (header files)",
844         dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_INCLUDE },
845       { " lib",         "/usr/src/lib (system libraries)",
846         dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_LIB },
847       { " libexec",     "/usr/src/libexec (system programs)",
848         dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_LIBEXEC },
849       { " release",     "/usr/src/release (release-generation tools)",
850         dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_RELEASE },
851       { " bin",         "/usr/src/bin (system binaries)",
852         dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_BIN },
853       { " sbin",        "/usr/src/sbin (system binaries)",
854         dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_SBIN },
855       { " scrypto",     "/usr/src/crypto (contrib encryption sources)",
856         dmenuFlagCheck, dmenuSetFlag, NULL, &CRYPTODists, '[', 'X', ']', DIST_CRYPTO_SCRYPTO },
857       { " share",       "/usr/src/share (documents and shared files)",
858         dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_SHARE },
859       { " skrb4",       "/usr/src/kerberosIV (sources for KerberosIV)",
860         dmenuFlagCheck, dmenuSetFlag, NULL, &CRYPTODists, '[', 'X', ']', DIST_CRYPTO_SKERBEROS4 },
861       { " skrb5",       "/usr/src/kerberos5 (sources for Kerberos5)",
862         dmenuFlagCheck, dmenuSetFlag, NULL, &CRYPTODists, '[', 'X', ']', DIST_CRYPTO_SKERBEROS5 },
863       { " ssecure",     "/usr/src/secure (BSD encryption sources)",
864         dmenuFlagCheck, dmenuSetFlag, NULL, &CRYPTODists, '[', 'X', ']', DIST_CRYPTO_SSECURE },
865       { " sys",         "/usr/src/sys (FreeBSD kernel)",
866         dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_SYS },
867       { " tools",       "/usr/src/tools (miscellaneous tools)",
868         dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_TOOLS },
869       { " ubin",        "/usr/src/usr.bin (user binaries)",
870         dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_UBIN },
871       { " usbin",       "/usr/src/usr.sbin (aux system binaries)",
872         dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_USBIN },
873       { NULL } },
874 };
875
876 DMenu MenuXF86Config = {
877     DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
878     "Please select the XFree86 configuration tool you want to use.",
879 #ifdef __alpha__
880     "Due to problems with the VGA16 server right now, only the\n"
881     "text-mode configuration tool (xf86config) is currently supported.",
882 #else
883     "The first tool, XF86Setup, is fully graphical and requires the\n"
884     "VGA16 server in order to work (should have been selected by\n"
885     "default, but if you de-selected it then you won't be able to\n"
886     "use this fancy setup tool).  The second tool, xf86config, is\n"
887     "a more simplistic shell-script based tool and less friendly to\n"
888     "new users, but it may work in situations where the fancier one\n"
889     "does not.",
890 #endif
891     NULL,
892     NULL,
893     { { "X Exit", "Exit this menu (returning to previous)",
894         NULL, dmenuExit },
895 #ifdef __alpha__
896       { "2 xf86config", "Shell-script based XFree86 configuration tool.",
897         NULL, dmenuSetVariable, NULL, VAR_XF86_CONFIG "=xf86config" },
898 #else
899       { "2 XF86Setup",  "Fully graphical XFree86 configuration tool.",
900         NULL, dmenuSetVariable, NULL, VAR_XF86_CONFIG "=XF86Setup" },
901       { "3 xf86config", "Shell-script based XFree86 configuration tool.",
902         NULL, dmenuSetVariable, NULL, VAR_XF86_CONFIG "=xf86config" },
903 #ifdef PC98
904       { "4 XF98Setup",  "Fully graphical XFree86 configuration tool (PC98).",
905         NULL, dmenuSetVariable, NULL, VAR_XF86_CONFIG "=XF98Setup" },
906 #endif
907 #endif
908       { "D XDesktop",   "X already set up, just do desktop configuration.",
909         NULL, dmenuSubmenu, NULL, &MenuXDesktops },
910       { NULL } },
911 };
912
913 DMenu MenuXDesktops = {
914     DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
915     "Please select the default X desktop to use.",
916     "By default, XFree86 comes with a fairly vanilla desktop which\n"
917     "is based around the twm(1) window manager and does not offer\n"
918     "much in the way of features.  It does have the advantage of\n"
919     "being a standard part of X so you don't need to load anything\n"
920     "extra in order to use it.  If, however, you have access to a\n"
921     "reasonably full packages collection on your installation media,\n"
922     "you can choose any one of the following desktops as alternatives.",
923     NULL,
924     NULL,
925     { { "X Exit", "Exit this menu (returning to previous)",
926         NULL, dmenuExit },
927       { "2 KDE",                "The K Desktop Environment.",
928         NULL, dmenuSetVariable, NULL, VAR_DESKSTYLE "=kde" },
929       { "3 GNOME + Sawfish",    "GNOME + Sawfish window manager.",
930         NULL, dmenuSetVariable, NULL, VAR_DESKSTYLE "=gnome" },
931       { "4 GNOME + Enlightenment","GNOME + The E window manager",
932         NULL, dmenuSetVariable, NULL, VAR_DESKSTYLE "=enlightenment" },
933       { "5 Afterstep",  "The Afterstep window manager",
934         NULL, dmenuSetVariable, NULL, VAR_DESKSTYLE "=afterstep" },
935       { "6 Windowmaker",        "The Windowmaker window manager",
936         NULL, dmenuSetVariable, NULL, VAR_DESKSTYLE "=windowmaker" },
937       { "7 fvwm",               "The fvwm window manager",
938         NULL, dmenuSetVariable, NULL, VAR_DESKSTYLE "=fvwm2" },
939       { NULL } },
940 };
941
942 DMenu MenuXF86Select = {
943     DMENU_NORMAL_TYPE,
944     "XFree86 3.3.6 Distribution",
945     "Please select the components you need from the XFree86 3.3.6\n"
946     "distribution sets.",
947     NULL,
948     NULL,
949     { { "X Exit", "Exit this menu (returning to previous)", NULL, dmenuExit },
950       { "Basic",        "Basic component menu (required)",      NULL, dmenuSubmenu, NULL, &MenuXF86SelectCore },
951       { "Server",       "X server menu",                        NULL, dmenuSubmenu, NULL, &MenuXF86SelectServer },
952       { "Fonts",        "Font set menu",                        NULL, dmenuSubmenu, NULL, &MenuXF86SelectFonts },
953       { NULL } },
954 };
955
956 DMenu MenuXF86SelectCore = {
957     DMENU_CHECKLIST_TYPE | DMENU_SELECTION_RETURNS,
958     "XFree86 3.3.6 base distribution types",
959     "Please check off the basic XFree86 components you wish to install.\n"
960     "Bin, lib, and set are recommended for a minimum installaion.",
961     NULL,
962     NULL,
963     { { "X Exit",       "Exit this menu (returning to previous)",
964         checkTrue, dmenuExit, NULL, NULL, '<', '<', '<' },
965       { "All",          "Select all below",
966         NULL,           setX11Misc, NULL, NULL, ' ', ' ', ' ' },
967       { "Reset",        "Reset all below",
968         NULL,           clearX11Misc, NULL, NULL, ' ', ' ', ' ' },
969       { " bin",         "Client applications and shared libs",
970         dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_BIN },
971       { " lib",         "Data files needed at runtime",
972         dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_LIB },
973       { " cfg",         "Configuration files",
974         dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_CFG },
975       { " set",         "XFree86 Setup Utility",
976         dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_SET },
977       { " man",         "Manual pages",
978         dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_MAN },
979       { " doc",         "READMEs and release notes",
980         dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_DOC },
981       { " html",        "HTML documentation files",
982         dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_HTML },
983       { " lkit",        "Server link kit for all other machines",
984         dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_LKIT },
985       { " prog",        "Programmer's header and library files",
986         dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_PROG },
987 #if defined(__i386__) && defined(PC98)
988       { " 9set",        "XFree86 Setup Utility for PC98 machines",
989         dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_9SET },
990       { " lk98",        "Server link kit for PC98 machines",
991         dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_LKIT98 },
992 #endif
993       { NULL } },
994 };
995
996 DMenu MenuXF86SelectFonts = {
997     DMENU_CHECKLIST_TYPE | DMENU_SELECTION_RETURNS,
998     "Font distribution selection.",
999     "Please check off the individual font distributions you wish to\n\
1000 install.  At the minimum, you should install the standard\n\
1001 75 DPI and misc fonts if you're also installing a server\n\
1002 (these are selected by default).",
1003     NULL,
1004     NULL,
1005     { { "X Exit",       "Exit this menu (returning to previous)",
1006         checkTrue, dmenuExit, NULL, NULL, '<', '<', '<' },
1007       { "All",          "All fonts",
1008         NULL,           setX11Fonts, NULL, NULL, ' ', ' ', ' ' },
1009       { "Reset",        "Reset font selections",
1010         NULL,           clearX11Fonts, NULL, NULL, ' ', ' ', ' ' },
1011       { " fnts",        "Standard 75 DPI and miscellaneous fonts",
1012         dmenuFlagCheck, dmenuSetFlag, NULL, &XF86FontDists, '[', 'X', ']', DIST_XF86_FONTS_MISC },
1013       { " f100",        "100 DPI fonts",
1014         dmenuFlagCheck, dmenuSetFlag, NULL, &XF86FontDists, '[', 'X', ']', DIST_XF86_FONTS_100 },
1015       { " fcyr",        "Cyrillic Fonts",
1016         dmenuFlagCheck, dmenuSetFlag, NULL, &XF86FontDists, '[', 'X', ']', DIST_XF86_FONTS_CYR },
1017       { " fscl",        "Speedo and Type scalable fonts",
1018         dmenuFlagCheck, dmenuSetFlag, NULL, &XF86FontDists, '[', 'X', ']', DIST_XF86_FONTS_SCALE },
1019       { " non",         "Japanese, Chinese and other non-english fonts",
1020         dmenuFlagCheck, dmenuSetFlag, NULL, &XF86FontDists, '[', 'X', ']', DIST_XF86_FONTS_NON },
1021       { " server",      "Font server",
1022         dmenuFlagCheck, dmenuSetFlag, NULL, &XF86FontDists, '[', 'X', ']', DIST_XF86_FONTS_SERVER },
1023       { NULL } },
1024 };
1025
1026 DMenu MenuXF86SelectServer = {
1027     DMENU_CHECKLIST_TYPE | DMENU_SELECTION_RETURNS,
1028     "X Server selection.",
1029     "Please check off the types of X servers you wish to install.\n"
1030     "If you are unsure as to which server will work for your graphics card,\n"
1031     "it is recommended that try the SVGA or VGA16 servers or, for PC98\n"
1032     "machines, the 9EGC or 9840 servers.",
1033     NULL,
1034     NULL,
1035     { { "X Exit",       "Exit this menu (returning to previous)",
1036         checkTrue, dmenuExit, NULL, NULL, '<', '<', '<' },
1037       { "All",          "Select all of the above",
1038         NULL,           setX11Servers, NULL, NULL, ' ', ' ', ' ' },
1039       { "Reset",        "Reset all of the above",
1040         NULL,           clearX11Servers, NULL, NULL, ' ', ' ', ' ' },
1041       { " SVGA",        "Standard VGA or Super VGA card",
1042         dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_SVGA },
1043       { " VGA16",       "Standard 16 color VGA card",
1044         dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_VGA16 },
1045       { " Mono",        "Standard Monochrome card",
1046         dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_MONO },
1047       { " 3DL",         "8, 16 and 24 bit color 3D Labs boards",
1048         dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_3DL },
1049       { " 8514",        "8-bit (256 color) IBM 8514 or compatible card",
1050         dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_8514 },
1051       { " AGX",         "8-bit AGX card",
1052         dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_AGX },
1053       { " I128",        "8, 16 and 24-bit #9 Imagine I128 card",
1054         dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_I128 },
1055       { " Ma8",         "8-bit ATI Mach8 card",
1056         dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_MACH8 },
1057       { " Ma32",        "8 and 16-bit (65K color) ATI Mach32 card",
1058         dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_MACH32 },
1059       { " Ma64",        "8 and 16-bit (65K color) ATI Mach64 card",
1060         dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_MACH64 },
1061       { " P9K",         "8, 16, and 24-bit color Weitek P9000 based boards",
1062         dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_P9000 },
1063       { " S3",          "8, 16 and 24-bit color S3 based boards",
1064         dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_S3 },
1065       { " S3V",         "8, 16 and 24-bit color S3 Virge based boards",
1066         dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_S3V },
1067       { " W32",         "8-bit ET4000/W32, /W32i and /W32p cards",
1068         dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_W32 },
1069 #if defined(__i386__) && defined(PC98)
1070       { " PC98",        "Select an X server for a NEC PC98 [Submenu]",
1071         NULL,           dmenuSubmenu,  NULL, &MenuXF86SelectPC98Server, '>', ' ', '>', 0 },
1072 #elif __alpha__
1073       { " TGA",         "TGA cards (alpha architecture only)",
1074         dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_TGA },
1075 #endif
1076       { NULL } },
1077 };
1078
1079 #if defined(__i386__) && defined(PC98)
1080 DMenu MenuXF86SelectPC98Server = {
1081     DMENU_CHECKLIST_TYPE | DMENU_SELECTION_RETURNS,
1082     "PC98 X Server selection.",
1083     "Please check off the types of NEC PC98 X servers you wish to install.\n\
1084 If you are unsure as to which server will work for your graphics card,\n\
1085 it is recommended that try the SVGA or VGA16 servers (the VGA16 and\n\
1086 Mono servers are particularly well-suited to most LCD displays).",
1087     NULL,
1088     NULL,
1089     { { " 9480",        "PC98 8-bit (256 color) PEGC-480 card",
1090         dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_9480 },
1091       { " 9EGC",        "PC98 4-bit (16 color) EGC card",
1092         dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_9EGC },
1093       { " 9GA9",        "PC98 GA-968V4/PCI (S3 968) card",
1094         dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_9GA9 },
1095       { " 9GAN",        "PC98 GANB-WAP (cirrus) card",
1096         dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_9GAN },
1097       { " 9LPW",        "PC98 PowerWindowLB (S3) card",
1098         dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_9LPW },
1099       { " 9MGA",        "PC98 MGA (Matrox) card",
1100         dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_9MGA },
1101       { " 9NKV",        "PC98 NKV-NEC (cirrus) card",
1102         dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_9NKV },
1103       { " 9NS3",        "PC98 NEC (S3) card",
1104         dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_9NS3 },
1105       { " 9SPW",        "PC98 SKB-PowerWindow (S3) card",
1106         dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_9SPW },
1107       { " 9SVG",        "PC98 generic SVGA card",
1108         dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_9SVG },
1109       { " 9TGU",        "PC98 Cyber9320 and TGUI9680 cards",
1110         dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_9TGU },
1111       { " 9WEP",        "PC98 WAB-EP (cirrus) card",
1112         dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_9WEP },
1113       { " 9WS",         "PC98 WABS (cirrus) card",
1114         dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_9WS },
1115       { " 9WSN",        "PC98 WSN-A2F (cirrus) card",
1116         dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_9WSN },
1117       { NULL } }
1118 };
1119 #endif
1120
1121 DMenu MenuDiskDevices = {
1122     DMENU_CHECKLIST_TYPE | DMENU_SELECTION_RETURNS,
1123     "Select Drive(s)",
1124     "Please select the drive, or drives, on which you wish to perform\n"
1125     "this operation.  If you are attempting to install a boot partition\n"
1126     "on a drive other than the first one or have multiple operating\n"
1127     "systems on your machine, you will have the option to install a boot\n"
1128     "manager later.  To select a drive, use the arrow keys to move to it\n"
1129     "and press [SPACE].  To de-select it, press [SPACE] again.\n\n"
1130     "Select OK or Cancel to leave this menu.",
1131     "Press F1 for important information regarding disk geometry!",
1132     "drives",
1133     { { NULL } },
1134 };
1135
1136 DMenu MenuHTMLDoc = {
1137     DMENU_NORMAL_TYPE,
1138     "Select HTML Documentation pointer",
1139     "Please select the body of documentation you're interested in, the main\n"
1140     "ones right now being the FAQ and the Handbook.  You can also choose \"other\"\n"
1141     "to enter an arbitrary URL for browsing.",
1142     "Press F1 for more help on what you see here.",
1143     "html",
1144     { { "X Exit",       "Exit this menu (returning to previous)", NULL, dmenuExit },
1145       { "2 Handbook",   "The FreeBSD Handbook.",                                NULL, docShowDocument },
1146       { "3 FAQ",        "The Frequently Asked Questions guide.",                NULL, docShowDocument },
1147       { "4 Home",       "The Home Pages for the FreeBSD Project (requires net)", NULL, docShowDocument },
1148       { "5 Other",      "Enter a URL.",                                         NULL, docShowDocument },
1149       { NULL } },
1150 };
1151
1152 /* The main installation menu */
1153 DMenu MenuInstallCustom = {
1154     DMENU_NORMAL_TYPE,
1155     "Choose Custom Installation Options",
1156     "This is the custom installation menu. You may use this menu to specify\n"
1157     "details on the type of distribution you wish to have, where you wish\n"
1158     "to install it from and how you wish to allocate disk storage to FreeBSD.",
1159     "Press F1 to read the installation guide",
1160     "INSTALL",
1161     { { "X Exit",               "Exit this menu (returning to previous)", NULL, dmenuExit },
1162       { "2 Options",            "View/Set various installation options", NULL, optionsEditor },
1163 #ifdef __alpha__
1164       { "3 Label",              "Label disk partitions",                NULL, diskLabelEditor },
1165       { "4 Distributions",      "Select distribution(s) to extract",    NULL, dmenuSubmenu, NULL, &MenuDistributions },
1166       { "5 Media",              "Choose the installation media type",   NULL, dmenuSubmenu, NULL, &MenuMedia },
1167       { "6 Commit",             "Perform any pending Partition/Label/Extract actions", NULL, installCustomCommit },
1168 #else
1169       { "3 Partition",          "Allocate disk space for FreeBSD",      NULL, diskPartitionEditor },
1170       { "4 Label",              "Label allocated disk partitions",      NULL, diskLabelEditor },
1171       { "5 Distributions",      "Select distribution(s) to extract",    NULL, dmenuSubmenu, NULL, &MenuDistributions },
1172       { "6 Media",              "Choose the installation media type",   NULL, dmenuSubmenu, NULL, &MenuMedia },
1173       { "7 Commit",             "Perform any pending Partition/Label/Extract actions", NULL, installCustomCommit },
1174 #endif
1175       { NULL } },
1176 };
1177
1178 /* MBR type menu */
1179 DMenu MenuMBRType = {
1180     DMENU_RADIO_TYPE | DMENU_SELECTION_RETURNS,
1181     "overwrite me",             /* will be disk specific label */
1182     "FreeBSD comes with a boot selector that allows you to easily\n"
1183     "select between FreeBSD and any other operating systems on your machine\n"
1184     "at boot time.  If you have more than one drive and want to boot\n"
1185     "from the second one, the boot selector will also make it possible\n"
1186     "to do so (limitations in the PC BIOS usually prevent this otherwise).\n"
1187     "If you do not want a boot selector, or wish to replace an existing\n"
1188     "one, select \"standard\".  If you would prefer your Master Boot\n"
1189     "Record to remain untouched then select \"None\".\n\n"
1190     "  NOTE:  PC-DOS users will almost certainly require \"None\"!",
1191     "Press F1 to read about drive setup",
1192     "drives",
1193     { { "BootMgr",      "Install the FreeBSD Boot Manager",
1194         dmenuRadioCheck, dmenuSetValue, NULL, &BootMgr },
1195 #ifndef PC98
1196       { "Standard",     "Install a standard MBR (no boot manager)",
1197         dmenuRadioCheck, dmenuSetValue, NULL, &BootMgr, '(', '*', ')', 1 },
1198 #endif
1199       { "None",         "Leave the Master Boot Record untouched",
1200         dmenuRadioCheck, dmenuSetValue, NULL, &BootMgr, '(', '*', ')', 2 },
1201       { NULL } },
1202 };
1203
1204 /* Final configuration menu */
1205 DMenu MenuConfigure = {
1206     DMENU_NORMAL_TYPE,
1207     "FreeBSD Configuration Menu",       /* title */
1208     "If you've already installed FreeBSD, you may use this menu to customize\n"
1209     "it somewhat to suit your particular configuration.  Most importantly,\n"
1210     "you can use the Packages utility to load extra \"3rd party\"\n"
1211     "software not provided in the base distributions.",
1212     "Press F1 for more information on these options",
1213     "configure",
1214     { { "X Exit",               "Exit this menu (returning to previous)",
1215         NULL,   dmenuExit },
1216       { " Distributions", "Install additional distribution sets",
1217         NULL, distExtractAll },
1218       { " Packages",    "Install pre-packaged software for FreeBSD",
1219         NULL, configPackages },
1220       { " Root Password", "Set the system manager's password",
1221         NULL,   dmenuSystemCommand, NULL, "passwd root" },
1222 #ifdef __i386__
1223       { " Fdisk",       "The disk Slice (PC-style partition) Editor",
1224         NULL, diskPartitionEditor },
1225 #endif
1226       { " Label",       "The disk Label editor",
1227         NULL, diskLabelEditor },
1228       { " User Management",     "Add user and group information",
1229         NULL, dmenuSubmenu, NULL, &MenuUsermgmt },
1230       { " Console",     "Customize system console behavior",
1231         NULL,   dmenuSubmenu, NULL, &MenuSyscons },
1232       { " Time Zone",   "Set which time zone you're in",
1233         NULL,   dmenuSystemCommand, NULL, "tzsetup" },
1234       { " Media",       "Change the installation media type",
1235         NULL,   dmenuSubmenu, NULL, &MenuMedia },
1236       { " Mouse",       "Configure your mouse",
1237         NULL,   dmenuSubmenu, NULL, &MenuMouse, NULL },
1238       { " Networking",  "Configure additional network services",
1239         NULL,   dmenuSubmenu, NULL, &MenuNetworking },
1240       { " Security",    "Select default system security profile",
1241         NULL,   dmenuSubmenu, NULL, &MenuSecurityProfile },
1242       { " Startup",     "Configure system startup options",
1243         NULL,   dmenuSubmenu, NULL, &MenuStartup },
1244       { " Options",     "View/Set various installation options",
1245         NULL, optionsEditor },
1246       { " XFree86",     "Configure XFree86 Server",
1247         NULL, configXSetup },
1248       { " Desktop",     "Configure XFree86 Desktop",
1249         NULL, configXDesktop },
1250       { " HTML Docs",   "Go to the HTML documentation menu (post-install)",
1251         NULL, docBrowser },
1252       { NULL } },
1253 };
1254
1255 DMenu MenuStartup = {
1256     DMENU_CHECKLIST_TYPE | DMENU_SELECTION_RETURNS,
1257     "Startup Services Menu",
1258     "This menu allows you to configure various aspects of your system's\n"
1259     "startup configuration.  Remember to use SPACE to select items!  The\n"
1260     "RETURN key will leave this menu (as with all checkbox menus).",
1261     NULL,
1262     NULL,
1263     { { "X Exit",       "Exit this menu (returning to previous)",
1264         checkTrue, dmenuExit, NULL, NULL, '<', '<', '<' },
1265       { " APM",         "Auto-power management services (typically laptops)",
1266         dmenuVarCheck,  dmenuToggleVariable, NULL, "apm_enable=YES" },
1267       { " pccard",      "Enable PCCARD (AKA PCMCIA) services (also laptops)",
1268         dmenuVarCheck, dmenuToggleVariable, NULL, "pccard_enable=YES" },
1269       { " pccard mem",  "Set PCCARD memory address (if enabled)",
1270         dmenuVarCheck, dmenuISetVariable, NULL, "pccard_mem" },
1271       { " pccard ifconfig",     "List of PCCARD ethernet devices to configure",
1272         dmenuVarCheck, dmenuISetVariable, NULL, "pccard_ifconfig" },
1273       { " ",            " -- ", NULL,   NULL, NULL, NULL, ' ', ' ', ' ' },
1274       { " startup dirs",        "Set the list of dirs to look for startup scripts",
1275         dmenuVarCheck, dmenuISetVariable, NULL, "local_startup" },
1276       { " named",       "Run a local name server on this host",
1277         dmenuVarCheck, dmenuToggleVariable, NULL, "named_enable=YES" },
1278       { " named flags", "Set default flags to named (if enabled)",
1279         dmenuVarCheck, dmenuISetVariable, NULL, "named_flags" },
1280       { " nis client",  "This host wishes to be an NIS client.",
1281         dmenuVarCheck, dmenuToggleVariable, NULL, "nis_client_enable=YES" },
1282       { " nis domainname",      "Set NIS domainname (if enabled)",
1283         dmenuVarCheck, dmenuISetVariable, NULL, "nisdomainname" },
1284       { " nis server",  "This host wishes to be an NIS server.",
1285         dmenuVarCheck, dmenuToggleVariable, NULL, "nis_server_enable=YES" },
1286       { " ",            " -- ", NULL,   NULL, NULL, NULL, ' ', ' ', ' ' },
1287       { " accounting",  "This host wishes to run process accounting.",
1288         dmenuVarCheck, dmenuToggleVariable, NULL, "accounting_enable=YES" },
1289       { " lpd",         "This host has a printer and wants to run lpd.",
1290         dmenuVarCheck, dmenuToggleVariable, NULL, "lpd_enable=YES" },
1291 #ifdef __i386__
1292       { " linux",       "This host wants to be able to run linux binaries.",
1293         dmenuVarCheck, configLinux, NULL, VAR_LINUX_ENABLE "=YES" },
1294       { " SVR4",        "This host wants to be able to run SVR4 binaries.",
1295         dmenuVarCheck, dmenuToggleVariable, NULL, "svr4_enable=YES" },
1296       { " SCO",         "This host wants to be able to run IBCS2 binaries.",
1297         dmenuVarCheck, dmenuToggleVariable, NULL, "ibcs2_enable=YES" },
1298 #elif __alpha__
1299       { " OSF/1",       "This host wants to be able to run DEC OSF/1 binaries.",
1300         dmenuVarCheck, dmenuToggleVariable, NULL, "osf1_enable=YES" },
1301 #endif
1302       { " quotas",      "This host wishes to check quotas on startup.",
1303         dmenuVarCheck, dmenuToggleVariable, NULL, "check_quotas=YES" },
1304       { NULL } },
1305 };
1306
1307 DMenu MenuNetworking = {
1308     DMENU_CHECKLIST_TYPE | DMENU_SELECTION_RETURNS,
1309     "Network Services Menu",
1310     "You may have already configured one network device (and the other\n"
1311     "various hostname/gateway/name server parameters) in the process\n"
1312     "of installing FreeBSD.  This menu allows you to configure other\n"
1313     "aspects of your system's network configuration.",
1314     NULL,
1315     NULL,
1316     { { "X Exit",       "Exit this menu (returning to previous)",
1317         checkTrue, dmenuExit, NULL, NULL, '<', '<', '<' },
1318       { " Interfaces",  "Configure additional network interfaces",
1319         NULL, tcpMenuSelect },
1320       { " AMD",         "This machine wants to run the auto-mounter service",
1321         dmenuVarCheck,  dmenuToggleVariable, NULL, "amd_enable=YES" },
1322       { " AMD Flags",   "Set flags to AMD service (if enabled)",
1323         dmenuVarCheck,  dmenuISetVariable, NULL, "amd_flags" },
1324       { " Anon FTP",    "This machine wishes to allow anonymous FTP.",
1325         dmenuVarCheck,  configAnonFTP, NULL, "anon_ftp" },
1326       { " Gateway",     "This machine will route packets between interfaces",
1327         dmenuVarCheck,  dmenuToggleVariable, NULL, "gateway_enable=YES" },
1328       { " inetd",       "This machine wants to run the inet daemon",
1329         dmenuVarCheck,  dmenuToggleVariable, NULL, "inetd_enable=YES" },
1330       { " NFS client",  "This machine will be an NFS client",
1331         dmenuVarCheck,  dmenuToggleVariable, NULL, "nfs_client_enable=YES" },
1332       { " NFS server",  "This machine will be an NFS server",
1333         dmenuVarCheck,  configNFSServer, NULL, "nfs_server_enable=YES" },
1334       { " Ntpdate",     "Select a clock-synchronization server",
1335         dmenuVarCheck,  dmenuSubmenu, NULL, &MenuNTP, '[', 'X', ']', "ntpdate_enable=YES" },
1336       { " PCNFSD",      "Run authentication server for clients with PC-NFS.",
1337         dmenuVarCheck,  configPCNFSD, NULL, "pcnfsd" },
1338       { " portmap",     "This machine wants to run the portmapper daemon",
1339         dmenuVarCheck,  dmenuToggleVariable, NULL, "portmap_enable=YES" },
1340       { " Routed",      "Select routing daemon (default: routed)",
1341         dmenuVarCheck,  configRouter, NULL, "router_enable=YES" },
1342       { " Rwhod",       "This machine wants to run the rwho daemon",
1343         dmenuVarCheck,  dmenuToggleVariable, NULL, "rwhod_enable=YES" },
1344       { " Sendmail",    "This machine wants to run the sendmail daemon",
1345         dmenuVarCheck,  dmenuToggleVariable, NULL, "sendmail_enable=YES" },
1346       { " Sshd",        "This machine wants to run the ssh daemon",
1347         dmenuVarCheck,  dmenuToggleVariable, NULL, "sshd_enable=YES" },
1348       { " TCP Extensions", "Allow RFC1323 and RFC1644 TCP extensions?",
1349         dmenuVarCheck,  dmenuToggleVariable, NULL, "tcp_extensions=YES" },
1350       { NULL } },
1351 };
1352
1353 DMenu MenuNTP = {
1354     DMENU_RADIO_TYPE | DMENU_SELECTION_RETURNS,
1355     "NTPDATE Server Selection",
1356     "There are a number of time synchronization servers available\n"
1357     "for public use around the Internet.  Please select one reasonably\n"
1358     "close to you to have your system time synchronized accordingly.",
1359     "These are the primary open-access NTP servers",
1360     NULL,
1361     { { "None",                 "No NTP server",
1362         dmenuVarsCheck, dmenuSetVariables, NULL, 
1363         "ntpdate_enable=NO,ntpdate_flags=none" },
1364       { "Other",                "Select a site not on this list",
1365         dmenuVarsCheck, configNTP, NULL, NULL },
1366       { "Australia",            "ntp.nml.csiro.au (HP 5071A Cesium Beam)",
1367         dmenuVarsCheck, dmenuSetVariables, NULL, 
1368         "ntpdate_enable=YES,ntpdate_flags=ntp.tip.csiro.au" },
1369       { " Canada",              "tick.usask.ca (GOES clock)",
1370         dmenuVarsCheck, dmenuSetVariables, NULL, 
1371         "ntpdate_enable=YES,ntpdate_flags=tick.usask.ca" },
1372       { "France",               "canon.inria.fr (TDF clock)",
1373         dmenuVarsCheck, dmenuSetVariables, NULL, 
1374         "ntpdate_enable=YES,ntpdate_flags=canon.inria.fr" },
1375       { "Germany",              "ntps1-{0,1,2}.uni-erlangen.de (GPS)",
1376         dmenuVarsCheck, dmenuSetVariables, NULL, 
1377         "ntpdate_enable=YES,ntpdate_flags=ntps1-0.uni-erlangen.de" },
1378       { " Germany #2",          "ntps1-0.cs.tu-berlin.de (GPS)",
1379         dmenuVarsCheck, dmenuSetVariables, NULL, 
1380         "ntpdate_enable=YES,ntpdate_flags=ntps1-0.cs.tu-berlin.de" },
1381       { "Japan",                "clock.nc.fukuoka-u.ac.jp (GPS clock)",
1382         dmenuVarsCheck, dmenuSetVariables, NULL, 
1383         "ntpdate_enable=YES,ntpdate_flags=clock.nc.fukuoka-u.ac.jp" },
1384       { " Japan #2",            "clock.tl.fukuoka-u.ac.jp (GPS clock)",
1385         dmenuVarsCheck, dmenuSetVariables, NULL, 
1386         "ntpdate_enable=YES,ntpdate_flags=clock.tl.fukuoka-u.ac.jp" },
1387       { "Netherlands",          "ntp0.nl.net (GPS clock)",
1388         dmenuVarsCheck, dmenuSetVariables, NULL, 
1389         "ntpdate_enable=YES,ntpdate_flags=ntp0.nl.net" },
1390       { " Norway",              "timehost.ifi.uio.no (NTP clock)",
1391         dmenuVarsCheck, dmenuSetVariables, NULL, 
1392         "ntpdate_enable=YES,ntpdate_flags=timehost.ifi.uio.no" },
1393       { "Sweden",               "Time1.Stupi.SE (Cesium/GPS)",
1394         dmenuVarsCheck, dmenuSetVariables, NULL, 
1395         "ntpdate_enable=YES,ntpdate_flags=Time1.Stupi.SE" },
1396       { " Switzerland",         "swisstime.ethz.ch (DCF77 clock)",
1397         dmenuVarsCheck, dmenuSetVariables, NULL, 
1398         "ntpdate_enable=YES,ntpdate_flags=swisstime.ethz.ch" },
1399       { "U.S. East Coast",      "bitsy.mit.edu (WWV clock)",
1400         dmenuVarsCheck, dmenuSetVariables, NULL, 
1401         "ntpdate_enable=YES,ntpdate_flags=bitsy.mit.edu" },
1402       { " U.S. East Coast #2",  "otc1.psu.edu (WWV clock)",
1403         dmenuVarsCheck, dmenuSetVariables, NULL, 
1404         "ntpdate_enable=YES,ntpdate_flags=otc1.psu.edu" },
1405       { " U.S. West Coast #1",  "clepsydra.dec.com (GOES clock)",
1406         dmenuVarsCheck, dmenuSetVariables, NULL, 
1407         "ntpdate_enable=YES,ntpdate_flags=clepsydra.dec.com" },
1408       { " U.S. West Coast #2",  "clock.llnl.gov (WWVB clock)",
1409         dmenuVarsCheck, dmenuSetVariables, NULL, 
1410         "ntpdate_enable=YES,ntpdate_flags=clock.llnl.gov" },
1411       { " U.S. Midwest",                "ncar.ucar.edu (WWVB clock)",
1412         dmenuVarsCheck, dmenuSetVariables, NULL, 
1413         "ntpdate_enable=YES,ntpdate_flags=ncar.ucar.edu" },
1414       { NULL } },
1415 };
1416
1417 DMenu MenuSyscons = {
1418     DMENU_NORMAL_TYPE,
1419     "System Console Configuration",
1420     "The default system console driver for FreeBSD (syscons) has a\n"
1421     "number of configuration options which may be set according to\n"
1422     "your preference.\n\n"
1423     "When you are done setting configuration options, select Cancel.",
1424     "Configure your system console settings",
1425     NULL,
1426     { { "X Exit",       "Exit this menu (returning to previous)", NULL, dmenuExit },
1427       { "2 Font",       "Choose an alternate screen font",      NULL, dmenuSubmenu, NULL, &MenuSysconsFont },
1428       { "3 Keymap",     "Choose an alternate keyboard map",     NULL, dmenuSubmenu, NULL, &MenuSysconsKeymap },
1429       { "4 Repeat",     "Set the rate at which keys repeat",    NULL, dmenuSubmenu, NULL, &MenuSysconsKeyrate },
1430       { "5 Saver",      "Configure the screen saver",           NULL, dmenuSubmenu, NULL, &MenuSysconsSaver },
1431       { "6 Screenmap",  "Choose an alternate screenmap",        NULL, dmenuSubmenu, NULL, &MenuSysconsScrnmap },
1432       { NULL } },
1433 };
1434
1435 DMenu MenuSysconsKeymap = {
1436     DMENU_RADIO_TYPE | DMENU_SELECTION_RETURNS,
1437     "System Console Keymap",
1438     "The default system console driver for FreeBSD (syscons) defaults\n"
1439     "to a standard \"American\" keyboard map.  Users in other countries\n"
1440     "(or with different keyboard preferences) may wish to choose one of\n"
1441     "the other keymaps below.\n"
1442     "Note that sysinstall itself only uses the part of the keyboard map\n"
1443     "which is required to generate the ANSI character subset, but your\n"
1444     "choice of keymap will also be saved for later (fuller) use.",
1445     "Choose a keyboard map",
1446     NULL,
1447     { { "Belgian",      "Belgian ISO keymap",   dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=be.iso" },
1448       { " Brazil CP850",        "Brazil CP850 keymap",  dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=br275.cp850" },
1449       { " Brazil ISO (accent)", "Brazil ISO keymap (accent keys)",      dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=br275.iso.acc" },
1450       { " Brazil ISO",  "Brazil ISO keymap",    dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=br275.iso" },
1451       { " Croatian ISO",        "Croatian ISO keymap",  dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=hr.iso" },
1452       { "Danish CP865", "Danish Code Page 865 keymap",  dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=danish.cp865" },
1453       { " Danish ISO",  "Danish ISO keymap",    dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=danish.iso" },
1454       { "Estonian ISO", "Estonian ISO keymap",  dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=estonian.iso" },
1455       { " Estonian ISO 15", "Estonian ISO 8859-15 keymap",      dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=estonian.iso15" },
1456       { " Estonian CP850", "Estonian Code Page 850 keymap",     dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=estonian.cp850" },
1457       { "Finnish CP850","Finnish Code Page 850 keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=finnish.cp850" },
1458       { " Finnish ISO",  "Finnish ISO keymap",  dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=finnish.iso" },
1459       { " French ISO (accent)", "French ISO keymap (accent keys)",      dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=fr.iso.acc" },
1460       { " French ISO",  "French ISO keymap",    dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=fr.iso" },
1461       { "German CP850", "German Code Page 850 keymap",  dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=german.cp850"        },
1462       { " German ISO",  "German ISO keymap",    dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=german.iso" },
1463       { "Hungarian 101", "Hungarian ISO keymap (101 key)",      dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=hu.iso2.101keys" },
1464       { " Hungarian 102", "Hungarian ISO keymap (102 key)",     dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=hu.iso2.102keys" },
1465       { "Icelandic (accent)", "Icelandic ISO keymap (accent keys)",     dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=icelandic.iso.acc" },
1466       { " Icelandic",   "Icelandic ISO keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=icelandic.iso" },
1467       { " Italian",     "Italian ISO keymap",   dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=it.iso" },
1468       { "Japanese 106", "Japanese 106 keymap",  dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=jp.106" },
1469       { "Latin American", "Latin American ISO keymap",  dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=lat-amer" },
1470       { "Norway ISO",   "Norwegian ISO keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=norwegian.iso" },
1471       { "Polish ISO",   "Polish ISO keymap",    dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=pl_PL.ISO_8859-2" },
1472       { " Portuguese (accent)", "Portuguese ISO keymap (accent keys)",  dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=pt.iso.acc" },
1473       { " Portuguese",  "Portuguese ISO keymap",        dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=pt.iso" },
1474       { "Russia KOI8-R", "Russian KOI8-R keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=ru.koi8-r" },
1475       { "Slovenian", "Slovenian ISO keymap",    dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=si.iso" },
1476       { " Spanish (accent)", "Spanish ISO keymap (accent keys)",        dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=spanish.iso.acc" },
1477       { " Spanish",     "Spanish ISO keymap",   dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=spanish.iso" },
1478       { " Swedish CP850", "Swedish Code Page 850 keymap", dmenuVarCheck,        dmenuSetKmapVariable, NULL, "keymap=swedish.cp850" },
1479       { " Swedish ISO", "Swedish ISO keymap",   dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=swedish.iso" },
1480       { " Swiss French ISO (accent)", "Swiss French ISO keymap (accent keys)", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=swissfrench.iso.acc" },
1481       { " Swiss French ISO", "Swiss French ISO keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=swissfrench.iso" },
1482       { " Swiss French CP850", "Swiss French Code Page 850 keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=swissfrench.cp850" },
1483       { " Swiss German ISO (accent)", "Swiss German ISO keymap (accent keys)", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=swissgerman.iso.acc" },
1484       { " Swiss German ISO", "Swiss German ISO keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=swissgerman.iso" },
1485       { " Swiss German CP850", "Swiss German Code Page 850 keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=swissgerman.cp850" },
1486       { "UK CP850",     "UK Code Page 850 keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=uk.cp850" },
1487       { " UK ISO",      "UK ISO keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=uk.iso" },
1488       { " Ukrainian KOI8-U",    "Ukrainian KOI8-U keymap",      dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=ua.koi8-u" },
1489       { " Ukrainian KOI8-U+KOI8-R",     "Ukrainian KOI8-U+KOI8-R keymap (alter)",       dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=ua.koi8-u.shift.alt" },
1490       { " USA CapsLock->Ctrl",  "US standard (Caps as L-Control)",      dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=us.pc-ctrl" },
1491       { " USA Dvorak",  "US Dvorak keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=us.dvorak" },
1492       { " USA Dvorak (left)",   "US left handed Dvorak keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=us.dvorakl" },
1493       { " USA Dvorak (right)",  "US right handed Dvorak keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=us.dvorakr" },
1494       { " USA Emacs",   "US standard optimized for EMACS",      dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=us.emacs" },
1495       { " USA ISO",     "US ISO keymap",        dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=us.iso" },
1496       { " USA UNIX",    "US traditional UNIX-workstation",      dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=us.unix" },
1497       { NULL } },
1498 };
1499
1500 DMenu MenuSysconsKeyrate = {
1501     DMENU_RADIO_TYPE | DMENU_SELECTION_RETURNS,
1502     "System Console Keyboard Repeat Rate",
1503     "This menu allows you to set the speed at which keys repeat\n"
1504     "when held down.",
1505     "Choose a keyboard repeat rate",
1506     NULL,
1507     { { "Slow", "Slow keyboard repeat rate",    dmenuVarCheck,  dmenuSetVariable, NULL, "keyrate=slow" },
1508       { "Normal", "\"Normal\" keyboard repeat rate",    dmenuVarCheck,  dmenuSetVariable, NULL, "keyrate=normal" },
1509       { "Fast", "Fast keyboard repeat rate",    dmenuVarCheck,  dmenuSetVariable, NULL, "keyrate=fast" },
1510       { "Default", "Use default keyboard repeat rate",  dmenuVarCheck,  dmenuSetVariable, NULL, "keyrate=NO" },
1511       { NULL } },
1512 };
1513
1514 DMenu MenuSysconsSaver = {
1515     DMENU_RADIO_TYPE | DMENU_SELECTION_RETURNS,
1516     "System Console Screen Saver",
1517     "By default, the console driver will not attempt to do anything\n"
1518     "special with your screen when it's idle.  If you expect to leave your\n"
1519     "monitor switched on and idle for long periods of time then you should\n"
1520     "probably enable one of these screen savers to prevent phosphor burn-in.",
1521     "Choose a nifty-looking screen saver",
1522     NULL,
1523     { { "1 Blank",      "Simply blank the screen",
1524         dmenuVarCheck, configSaver, NULL, "saver=blank" },
1525       { "2 Daemon",     "\"BSD Daemon\" animated screen saver (text)",
1526         dmenuVarCheck, configSaver, NULL, "saver=daemon" },
1527       { "3 Fade",       "Fade out effect screen saver",
1528         dmenuVarCheck, configSaver, NULL, "saver=fade" },
1529       { "4 Fire",       "Flames effect screen saver",
1530         dmenuVarCheck, configSaver, NULL, "saver=fire" },
1531       { "5 Green",      "\"Green\" power saving mode (if supported by monitor)",
1532         dmenuVarCheck, configSaver, NULL, "saver=green" },
1533       { "6 Logo",       "\"BSD Daemon\" animated screen saver (graphics)",
1534         dmenuVarCheck, configSaver, NULL, "saver=logo" },
1535       { "7 Rain",       "Rain drops screen saver",
1536         dmenuVarCheck, configSaver, NULL, "saver=rain" },
1537       { "8 Snake",      "Draw a FreeBSD \"snake\" on your screen",
1538         dmenuVarCheck, configSaver, NULL, "saver=snake" },
1539       { "9 Star",       "A \"twinkling stars\" effect",
1540         dmenuVarCheck, configSaver, NULL, "saver=star" },
1541       { "Warp", "A \"stars warping\" effect",
1542         dmenuVarCheck, configSaver, NULL, "saver=warp" },
1543       { "Timeout",      "Set the screen saver timeout interval",
1544         NULL, configSaverTimeout, NULL, NULL, ' ', ' ', ' ' },
1545       { NULL } },
1546 };
1547
1548 DMenu MenuSysconsScrnmap = {
1549     DMENU_RADIO_TYPE | DMENU_SELECTION_RETURNS,
1550     "System Console Screenmap",
1551     "Unless you load a specific font, most PC hardware defaults to\n"
1552     "displaying characters in the IBM 437 character set.  However,\n"
1553     "in the Unix world, this character set is very rarely used.  Most\n"
1554     "Western European countries, for example, prefer ISO 8859-1.\n"
1555     "American users won't notice the difference since the bottom half\n"
1556     "of all these character sets is ANSI anyway.\n"
1557     "If your hardware is capable of downloading a new display font,\n"
1558     "you should probably choose that option.  However, for hardware\n"
1559     "where this is not possible (e.g. monochrome adapters), a screen\n"
1560     "map will give you the best approximation that your hardware can\n"
1561     "display at all.",
1562     "Choose a screen map",
1563     NULL,
1564     { { "None",                 "No screenmap, use default font", dmenuVarCheck, dmenuSetVariable, NULL, "scrnmap=NO" },
1565       { "KOI8-R to IBM866",     "Russian KOI8-R to IBM 866 screenmap", dmenuVarCheck, dmenuSetVariable, NULL, "scrnmap=koi8-r2cp866" },
1566       { "KOI8-U to IBM866u",    "Ukrainian KOI8-U to IBM 866u screenmap", dmenuVarCheck, dmenuSetVariable, NULL, "scrnmap=koi8-u2cp866u" },
1567       { "ISO 8859-1 to IBM437", "W-Europe ISO 8859-1 to IBM 437 screenmap", dmenuVarCheck, dmenuSetVariable, NULL, "scrnmap=iso-8859-1_to_cp437" },
1568       { NULL } },
1569 };
1570
1571 DMenu MenuSysconsFont = {
1572     DMENU_RADIO_TYPE | DMENU_SELECTION_RETURNS,
1573     "System Console Font",
1574     "Most PC hardware defaults to displaying characters in the\n"
1575     "IBM 437 character set.  However, in the Unix world, this\n"
1576     "character set is very rarely used.  Most Western European\n"
1577     "countries, for example, prefer ISO 8859-1.\n"
1578     "American users won't notice the difference since the bottom half\n"
1579     "of all these charactersets is ANSI anyway.  However, they might\n"
1580     "want to load a font anyway to use the 30- or 50-line displays.\n"
1581     "If your hardware is capable of downloading a new display font,\n"
1582     "you can select the appropriate font below.",
1583     "Choose a font",
1584     NULL,
1585     { { "1 None", "Use default font",   dmenuVarCheck,  dmenuSetVariables, NULL,
1586         "font8x8=NO,font8x14=NO,font8x16=NO" },
1587       { "2 IBM 437", "English", dmenuVarCheck,  dmenuSetVariables, NULL,
1588         "font8x8=cp437-8x8,font8x14=cp437-8x14,font8x16=cp437-8x16" },
1589       { "3 IBM 850", "Western Europe, IBM encoding",    dmenuVarCheck,  dmenuSetVariables, NULL,
1590         "font8x8=cp850-8x8,font8x14=cp850-8x14,font8x16=cp850-8x16" },
1591       { "4 IBM 865", "Norwegian, IBM encoding", dmenuVarCheck,  dmenuSetVariables, NULL,
1592         "font8x8=cp865-8x8,font8x14=cp865-8x14,font8x16=cp865-8x16" },
1593       { "5 IBM 866", "Russian, IBM encoding (use with KOI8-R screenmap)",   dmenuVarCheck,  dmenuSetVariables, NULL,
1594         "font8x8=cp866-8x8,font8x14=cp866-8x14,font8x16=cp866b-8x16,mousechar_start=3" },
1595       { "6 IBM 866u", "Ukrainian, IBM encoding (use with KOI8-U screenmap)",   dmenuVarCheck,  dmenuSetVariables, NULL,
1596         "font8x8=cp866u-8x8,font8x14=cp866u-8x14,font8x16=cp866u-8x16,mousechar_start=3" },
1597       { "7 ISO 8859-1", "Western Europe, ISO encoding", dmenuVarCheck,  dmenuSetVariables, NULL,
1598         "font8x8=iso-8x8,font8x14=iso-8x14,font8x16=iso-8x16" },
1599       { "8 ISO 8859-2", "Eastern Europe, ISO encoding", dmenuVarCheck,  dmenuSetVariables, NULL,
1600         "font8x8=iso02-8x8,font8x14=iso02-8x14,font8x16=iso02-8x16" },
1601       { "9 SWISS", "English, better resolution", dmenuVarCheck, dmenuSetVariables, NULL,
1602         "font8x8=swiss-8x8,font8x14=NO,font8x16=swiss-8x16" },
1603       { NULL } },
1604 };
1605
1606 DMenu MenuUsermgmt = {
1607     DMENU_NORMAL_TYPE,
1608     "User and group management",
1609     "The submenus here allow to manipulate user groups and\n"
1610     "login accounts.\n",
1611     "Configure your user groups and users",
1612     NULL,
1613     { { "X Exit",       "Exit this menu (returning to previous)", NULL, dmenuExit },
1614       { "User",         "Add a new user to the system.",        NULL, userAddUser },
1615       { "Group",        "Add a new user group to the system.",  NULL, userAddGroup },
1616       { NULL } },
1617 };
1618
1619 DMenu MenuSecurityProfile = {
1620     DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
1621     "Default system security profile",
1622     "Each item in this list will set what it considers to\n"
1623     "be \"appropriate\" values in that category for various\n"
1624     "security-related knobs in /etc/rc.conf.",
1625     "Select a canned security profile - F1 for help",
1626     "security",                                         /* help file */
1627     { { "X Exit",       "Exit this menu (returning to previous)", NULL, configSecurityModerate },
1628       { "Low",          "Fairly wide-open (little) security.", NULL, configSecurityLiberal },
1629       { "Medium",       "Moderate security settings [DEFAULT].", NULL, configSecurityModerate },
1630       { "High",         "Fairly safe security settings.", NULL, configSecurityHigh },
1631       { "Extreme",      "Very restrictive security settings.", NULL, configSecurityFascist },
1632       { NULL } },
1633 };
1634
1635 DMenu MenuFixit = {
1636     DMENU_NORMAL_TYPE,
1637     "Please choose a fixit option",
1638     "There are three ways of going into \"fixit\" mode:\n"
1639     "- you can use the 2nd FreeBSD CDROM, in which case there will be\n"
1640     "  full access to the complete set of FreeBSD commands and utilities,\n"
1641     "- you can use the more limited (but perhaps customized) fixit floppy,\n"
1642     "- or you can start an Emergency Holographic Shell now, which is\n"
1643     "  limited to the subset of commands that is already available right now.",
1644     "Press F1 for more detailed repair instructions",
1645     "fixit",
1646 { { "X Exit",   "Exit this menu (returning to previous)",               NULL, dmenuExit },
1647   { "2 CDROM",  "Use the 2nd \"live\" CDROM from the distribution",     NULL, installFixitCDROM },
1648   { "3 Floppy", "Use a floppy generated from the fixit image",          NULL, installFixitFloppy },
1649   { "4 Shell",  "Start an Emergency Holographic Shell",                 NULL, installFixitHoloShell },
1650   { NULL } },
1651 };