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