]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - usr.sbin/sysinstall/menus.c
This commit was generated by cvs2svn to compensate for changes in r171366,
[FreeBSD/FreeBSD.git] / usr.sbin / 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  * Copyright (c) 1995
8  *      Jordan Hubbard.  All rights reserved.
9  *
10  * Redistribution and use in source and binary forms, with or without
11  * modification, are permitted provided that the following conditions
12  * are met:
13  * 1. Redistributions of source code must retain the above copyright
14  *    notice, this list of conditions and the following disclaimer,
15  *    verbatim and that no modifications are made prior to this
16  *    point in the file.
17  * 2. Redistributions in binary form must reproduce the above copyright
18  *    notice, this list of conditions and the following disclaimer in the
19  *    documentation and/or other materials provided with the distribution.
20  *
21  * THIS SOFTWARE IS PROVIDED BY JORDAN HUBBARD ``AS IS'' AND
22  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24  * ARE DISCLAIMED.  IN NO EVENT SHALL JORDAN HUBBARD OR HIS PETS BE LIABLE
25  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27  * OR SERVICES; LOSS OF USE, DATA, LIFE OR PROFITS; OR BUSINESS INTERRUPTION)
28  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31  * SUCH DAMAGE.
32  *
33  */
34
35 #ifndef lint
36 static const char rcsid[] =
37   "$FreeBSD$";
38 #endif
39
40 #include "sysinstall.h"
41
42 /* Miscellaneous work routines for menus */
43 static int
44 setSrc(dialogMenuItem *self)
45 {
46     Dists |= DIST_SRC;
47     SrcDists = DIST_SRC_ALL;
48     return DITEM_SUCCESS | DITEM_REDRAW;
49 }
50
51 static int
52 clearSrc(dialogMenuItem *self)
53 {
54     Dists &= ~DIST_SRC;
55     SrcDists = 0;
56     return DITEM_SUCCESS | DITEM_REDRAW;
57 }
58
59 static int
60 setKernel(dialogMenuItem *self)
61 {
62     Dists |= DIST_KERNEL;
63     KernelDists = DIST_KERNEL_ALL;
64     return DITEM_SUCCESS | DITEM_REDRAW;
65 }
66
67 static int
68 clearKernel(dialogMenuItem *self)
69 {
70     Dists &= ~DIST_KERNEL;
71     KernelDists = 0;
72     return DITEM_SUCCESS | DITEM_REDRAW;
73 }
74
75 static int
76 setX11Misc(dialogMenuItem *self)
77 {
78     XOrgDists |= DIST_XORG_MISC_ALL;
79     Dists |= DIST_XORG;
80     return DITEM_SUCCESS | DITEM_REDRAW;
81 }
82
83 static int
84 clearX11Misc(dialogMenuItem *self)
85 {
86     XOrgDists &= ~DIST_XORG_MISC_ALL;
87     if (!XOrgDists)
88         Dists &= ~DIST_XORG;
89     return DITEM_SUCCESS | DITEM_REDRAW;
90 }
91
92 static int
93 setX11Servers(dialogMenuItem *self)
94 {
95     XOrgDists |= DIST_XORG_SERVER_ALL;
96     return DITEM_SUCCESS | DITEM_REDRAW;
97 }
98
99 static int
100 clearX11Servers(dialogMenuItem *self)
101 {
102     XOrgDists &= ~DIST_XORG_SERVER_ALL;
103     if (!XOrgDists)
104         Dists &= ~DIST_XORG;
105     return DITEM_SUCCESS | DITEM_REDRAW;
106 }
107
108 static int
109 setX11Fonts(dialogMenuItem *self)
110 {
111     XOrgDists |= DIST_XORG_FONTS_ALL;
112     return DITEM_SUCCESS | DITEM_REDRAW;
113 }
114
115 static int
116 clearX11Fonts(dialogMenuItem *self)
117 {
118     XOrgDists &= ~DIST_XORG_FONTS_ALL;
119     if (!XOrgDists)
120         Dists &= ~DIST_XORG;
121     return DITEM_SUCCESS | DITEM_REDRAW;
122 }
123
124 #define _IS_SET(dist, set) (((dist) & (set)) == (set))
125
126 #define IS_DEVELOPER(dist, extra) (_IS_SET(dist, _DIST_DEVELOPER | extra) || \
127         _IS_SET(dist, _DIST_DEVELOPER | extra))
128
129 #define IS_USER(dist, extra) (_IS_SET(dist, _DIST_USER | extra) || \
130         _IS_SET(dist, _DIST_USER | extra))
131
132 static int
133 checkDistDeveloper(dialogMenuItem *self)
134 {
135     return IS_DEVELOPER(Dists, 0) && _IS_SET(SrcDists, DIST_SRC_ALL);
136 }
137
138 static int
139 checkDistXDeveloper(dialogMenuItem *self)
140 {
141     return IS_DEVELOPER(Dists, DIST_XORG) && _IS_SET(SrcDists, DIST_SRC_ALL);
142 }
143
144 static int
145 checkDistKernDeveloper(dialogMenuItem *self)
146 {
147     return IS_DEVELOPER(Dists, 0) && _IS_SET(SrcDists, DIST_SRC_SYS);
148 }
149
150 static int
151 checkDistXKernDeveloper(dialogMenuItem *self)
152 {
153     return IS_DEVELOPER(Dists, DIST_XORG) && _IS_SET(SrcDists, DIST_SRC_SYS);
154 }
155
156 static int
157 checkDistUser(dialogMenuItem *self)
158 {
159     return IS_USER(Dists, 0);
160 }
161
162 static int
163 checkDistXUser(dialogMenuItem *self)
164 {
165     return IS_USER(Dists, DIST_XORG);
166 }
167
168 static int
169 checkDistMinimum(dialogMenuItem *self)
170 {
171     return Dists == (DIST_BASE | DIST_KERNEL);
172 }
173
174 static int
175 checkDistEverything(dialogMenuItem *self)
176 {
177     return Dists == DIST_ALL &&
178         _IS_SET(SrcDists, DIST_SRC_ALL) &&
179         _IS_SET(XOrgDists, DIST_XORG_ALL) &&
180         _IS_SET(KernelDists, DIST_KERNEL_ALL);
181 }
182
183 static int
184 srcFlagCheck(dialogMenuItem *item)
185 {
186     return SrcDists;
187 }
188
189 static int
190 x11FlagCheck(dialogMenuItem *item)
191 {
192     if (XOrgDists != 0)
193         Dists |= DIST_XORG;
194     else
195         Dists &= ~DIST_XORG;
196
197     return Dists & DIST_XORG;
198 }
199
200 static int
201 kernelFlagCheck(dialogMenuItem *item)
202 {
203     return KernelDists;
204 }
205
206 static int
207 checkTrue(dialogMenuItem *item)
208 {
209     return TRUE;
210 }
211
212 /* All the system menus go here.
213  *
214  * Hardcoded things like version number strings will disappear from
215  * these menus just as soon as I add the code for doing inline variable
216  * expansion.
217  */
218
219 DMenu MenuIndex = {
220     DMENU_NORMAL_TYPE,
221     "Glossary of functions",
222     "This menu contains an alphabetized index of the top level functions in\n"
223     "this program (sysinstall).  Invoke an option by pressing [SPACE] or\n"
224     "[ENTER].  To exit, use [TAB] to move to the Cancel button.",
225     "Use PageUp or PageDown to move through this menu faster!",
226     NULL,
227     { { " Anon FTP",            "Configure anonymous FTP logins.",      dmenuVarCheck, configAnonFTP, NULL, "anon_ftp" },
228       { " Commit",              "Commit any pending actions (dangerous!)", NULL, installCustomCommit },
229       { " Country",             "Set the system's country",             NULL, configCountry },
230 #ifdef WITH_SYSCONS
231       { " Console settings",    "Customize system console behavior.",   NULL, dmenuSubmenu, NULL, &MenuSyscons },
232 #endif
233       { " Configure",           "The system configuration menu.",       NULL, dmenuSubmenu, NULL, &MenuConfigure },
234       { " Defaults, Load",      "Load default settings.",               NULL, dispatch_load_floppy },
235 #ifdef WITH_MICE
236       { " Device, Mouse",       "The mouse configuration menu.",        NULL, dmenuSubmenu, NULL, &MenuMouse },
237 #endif
238       { " Disklabel",           "The disk Label editor",                NULL, diskLabelEditor },
239       { " Dists, All",          "Root of the distribution tree.",       NULL, dmenuSubmenu, NULL, &MenuDistributions },
240       { " Dists, Basic",                "Basic FreeBSD distribution menu.",     NULL, dmenuSubmenu, NULL, &MenuSubDistributions },
241       { " Dists, Developer",    "Select developer's distribution.",     checkDistDeveloper, distSetDeveloper },
242       { " Dists, Src",          "Src distribution menu.",               NULL, dmenuSubmenu, NULL, &MenuSrcDistributions },
243       { " Dists, X Developer",  "Select X developer's distribution.",   checkDistXDeveloper, distSetXDeveloper },
244       { " Dists, Kern Developer", "Select kernel developer's distribution.", checkDistKernDeveloper, distSetKernDeveloper },
245       { " Dists, User",         "Select average user distribution.",    checkDistUser, distSetUser },
246       { " Dists, X User",       "Select average X user distribution.",  checkDistXUser, distSetXUser },
247       { " Distributions, Adding", "Installing additional distribution sets", NULL, distExtractAll },
248       { " Distributions, X.Org","X.Org distribution menu.",             NULL, distSetXOrg },
249       { " Documentation",       "Installation instructions, README, etc.", NULL, dmenuSubmenu, NULL, &MenuDocumentation },
250       { " Doc, README",         "The distribution README file.",        NULL, dmenuDisplayFile, NULL, "README" },
251       { " Doc, Errata",         "The distribution errata.",     NULL, dmenuDisplayFile, NULL, "ERRATA" },
252       { " Doc, Hardware",       "The distribution hardware guide.",     NULL, dmenuDisplayFile, NULL, "HARDWARE" },
253       { " Doc, Install",                "The distribution installation guide.", NULL, dmenuDisplayFile, NULL, "INSTALL" },
254       { " Doc, Copyright",      "The distribution copyright notices.",  NULL, dmenuDisplayFile, NULL, "COPYRIGHT" },
255       { " Doc, Release",                "The distribution release notes.",      NULL, dmenuDisplayFile, NULL, "RELNOTES" },
256       { " Doc, HTML",           "The HTML documentation menu.",         NULL, docBrowser },
257       { " Dump Vars",           "(debugging) dump out internal variables.", NULL, dump_variables },
258       { " Emergency shell",     "Start an Emergency Holographic shell.",        NULL, installFixitHoloShell },
259 #ifdef WITH_SLICES
260       { " Fdisk",               "The disk Partition Editor",            NULL, diskPartitionEditor },
261 #endif
262       { " Fixit",               "Repair mode with CDROM or fixit floppy.",      NULL, dmenuSubmenu, NULL, &MenuFixit },
263       { " FTP sites",           "The FTP mirror site listing.",         NULL, dmenuSubmenu, NULL, &MenuMediaFTP },
264       { " Gateway",             "Set flag to route packets between interfaces.", dmenuVarCheck, dmenuToggleVariable, NULL, "gateway=YES" },
265       { " HTML Docs",           "The HTML documentation menu",          NULL, docBrowser },
266       { " inetd Configuration", "Configure inetd and simple internet services.",        dmenuVarCheck, configInetd, NULL, "inetd_enable=YES" },
267       { " Install, Standard",   "A standard system installation.",      NULL, installStandard },
268       { " Install, Express",    "An express system installation.",      NULL, installExpress },
269       { " Install, Custom",     "The custom installation menu",         NULL, dmenuSubmenu, NULL, &MenuInstallCustom },
270       { " Label",               "The disk Label editor",                NULL, diskLabelEditor },
271       { " Media",               "Top level media selection menu.",      NULL, dmenuSubmenu, NULL, &MenuMedia },
272       { " Media, Tape",         "Select tape installation media.",      NULL, mediaSetTape },
273       { " Media, NFS",          "Select NFS installation media.",       NULL, mediaSetNFS },
274       { " Media, Floppy",       "Select floppy installation media.",    NULL, mediaSetFloppy },
275       { " Media, CDROM/DVD",    "Select CDROM/DVD installation media.", NULL, mediaSetCDROM },
276       { " Media, DOS",          "Select DOS installation media.",       NULL, mediaSetDOS },
277       { " Media, UFS",          "Select UFS installation media.",       NULL, mediaSetUFS },
278       { " Media, FTP",          "Select FTP installation media.",       NULL, mediaSetFTP },
279       { " Media, FTP Passive",  "Select passive FTP installation media.", NULL, mediaSetFTPPassive },
280       { " Media, HTTP",         "Select FTP via HTTP proxy installation media.", NULL, mediaSetHTTP },
281       { " Network Interfaces",  "Configure network interfaces",         NULL, tcpMenuSelect },
282       { " Networking Services", "The network services menu.",           NULL, dmenuSubmenu, NULL, &MenuNetworking },
283       { " NFS, client",         "Set NFS client flag.",                 dmenuVarCheck, dmenuToggleVariable, NULL, "nfs_client_enable=YES" },
284       { " NFS, server",         "Set NFS server flag.",                 dmenuVarCheck, configNFSServer, NULL, "nfs_server_enable=YES" },
285       { " NTP Menu",            "The NTP configuration menu.",          NULL, dmenuSubmenu, NULL, &MenuNTP },
286       { " Options",             "The options editor.",                  NULL, optionsEditor },
287       { " Packages",            "The packages collection",              NULL, configPackages },
288 #ifdef WITH_SLICES
289       { " Partition",           "The disk Slice (PC-style partition) Editor",   NULL, diskPartitionEditor },
290 #endif
291       { " PCNFSD",              "Run authentication server for PC-NFS.", dmenuVarCheck, configPCNFSD, NULL, "pcnfsd" },
292       { " Root Password",       "Set the system manager's password.",   NULL, dmenuSystemCommand, NULL, "passwd root" },
293       { " Router",              "Select routing daemon (default: routed)", NULL, configRouter, NULL, "router_enable" },
294       { " Security",            "Configure system security options", NULL, dmenuSubmenu, NULL, &MenuSecurity },
295 #ifdef WITH_SYSCONS
296       { " Syscons",             "The system console configuration menu.", NULL, dmenuSubmenu, NULL, &MenuSyscons },
297 #ifndef PC98
298       { " Syscons, Font",       "The console screen font.",       NULL, dmenuSubmenu, NULL, &MenuSysconsFont },
299 #endif
300       { " Syscons, Keymap",     "The console keymap configuration menu.", NULL, keymapMenuSelect },
301       { " Syscons, Keyrate",    "The console key rate configuration menu.", NULL, dmenuSubmenu, NULL, &MenuSysconsKeyrate },
302       { " Syscons, Saver",      "The console screen saver configuration menu.", NULL, dmenuSubmenu, NULL, &MenuSysconsSaver },
303 #ifndef PC98
304       { " Syscons, Screenmap",  "The console screenmap configuration menu.", NULL, dmenuSubmenu, NULL, &MenuSysconsScrnmap },
305       { " Syscons, Ttys",       "The console terminal type menu.", NULL, dmenuSubmenu, NULL, &MenuSysconsTtys },
306 #endif
307 #endif /* WITH_SYSCONS */
308       { " Time Zone",           "Set the system's time zone.",          NULL, dmenuSystemCommand, NULL, "tzsetup" },
309       { " TTYs",                "Configure system ttys.",               NULL, configEtcTtys, NULL, "ttys" },
310       { " Upgrade",             "Upgrade an existing system.",          NULL, installUpgrade },
311       { " Usage",               "Quick start - How to use this menu system.",   NULL, dmenuDisplayFile, NULL, "usage" },
312       { " User Management",     "Add user and group information.",      NULL, dmenuSubmenu, NULL, &MenuUsermgmt },
313       { " X.Org, Fonts",        "X.Org Font selection menu.",           NULL, dmenuSubmenu, NULL, &MenuXOrgSelectFonts },
314       { " X.Org, Server",       "X.Org Server selection menu.", NULL, dmenuSubmenu, NULL, &MenuXOrgSelectServer },
315       { NULL } },
316 };
317
318 /* The country menu */
319 #include "countries.h"
320
321 /* The initial installation menu */
322 DMenu MenuInitial = {
323     DMENU_NORMAL_TYPE,
324     "sysinstall Main Menu",                             /* title */
325     "Welcome to the FreeBSD installation and configuration tool.  Please\n" /* prompt */
326     "select one of the options below by using the arrow keys or typing the\n"
327     "first character of the option name you're interested in.  Invoke an\n"
328     "option with [SPACE] or [ENTER].  To exit, use [TAB] to move to Exit.", 
329     "Press F1 for Installation Guide",                  /* help line */
330     "INSTALL",                                          /* help file */
331     { { " Select " },
332       { "X Exit Install",       NULL, NULL, dmenuExit },
333       { " Usage",       "Quick start - How to use this menu system",    NULL, dmenuDisplayFile, NULL, "usage" },
334       { "Standard",     "Begin a standard installation (recommended)",  NULL, installStandard },
335       { "Express",      "Begin a quick installation (for experts)", NULL, installExpress },
336       { " Custom",      "Begin a custom installation (for experts)",    NULL, dmenuSubmenu, NULL, &MenuInstallCustom },
337       { "Configure",    "Do post-install configuration of FreeBSD",     NULL, dmenuSubmenu, NULL, &MenuConfigure },
338       { "Doc",  "Installation instructions, README, etc.",      NULL, dmenuSubmenu, NULL, &MenuDocumentation },
339 #ifdef WITH_SYSCONS
340       { "Keymap",       "Select keyboard type",                         NULL, keymapMenuSelect },
341 #endif
342       { "Options",      "View/Set various installation options",        NULL, optionsEditor },
343       { "Fixit",        "Repair mode with CDROM/DVD/floppy or start shell",     NULL, dmenuSubmenu, NULL, &MenuFixit },
344       { "Upgrade",      "Upgrade an existing system",                   NULL, installUpgrade },
345       { "Load Config","Load default install configuration",             NULL, dispatch_load_floppy },
346       { "Index",        "Glossary of functions",                        NULL, dmenuSubmenu, NULL, &MenuIndex },
347       { NULL } },
348 };
349
350 /* The main documentation menu */
351 DMenu MenuDocumentation = {
352     DMENU_NORMAL_TYPE,
353     "FreeBSD Documentation Menu",
354     "If you are at all unsure about the configuration of your hardware\n"
355     "or are looking to build a system specifically for FreeBSD, read the\n"
356     "Hardware guide!  New users should also read the Install document for\n"
357     "a step-by-step tutorial on installing FreeBSD.  For general information,\n"
358     "consult the README file.",
359     "Confused?  Press F1 for help.",
360     "usage",
361     { { "X Exit",       "Exit this menu (returning to previous)",       NULL, dmenuExit },
362       { "1 README",     "A general description of FreeBSD.  Read this!", NULL, dmenuDisplayFile, NULL, "README" },
363       { "2 Errata",     "Late-breaking, post-release news.", NULL, dmenuDisplayFile, NULL, "ERRATA" },
364       { "3 Hardware",   "The FreeBSD survival guide for PC hardware.",  NULL, dmenuDisplayFile, NULL, "HARDWARE" },
365       { "4 Install",    "A step-by-step guide to installing FreeBSD.",  NULL, dmenuDisplayFile, NULL, "INSTALL" },
366       { "5 Copyright",  "The FreeBSD Copyright notices.",               NULL, dmenuDisplayFile, NULL, "COPYRIGHT" },
367       { "6 Release"     ,"The release notes for this version of FreeBSD.", NULL, dmenuDisplayFile, NULL, "RELNOTES" },
368       { "7 Shortcuts",  "Creating shortcuts to sysinstall.",            NULL, dmenuDisplayFile, NULL, "shortcuts" },
369       { "8 HTML Docs",  "Go to the HTML documentation menu (post-install).", NULL, docBrowser },
370       { NULL } },
371 };
372
373 #ifdef WITH_MICE
374 DMenu MenuMouseType = {
375     DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
376 #ifdef PC98
377     "Select a protocol type for your mouse",
378     "If your mouse is attached to the bus mouse port, you should always choose\n"
379     "\"Auto\", regardless of the model and the brand of the mouse.  All other\n"
380     "protocol types are for serial mice and should not be used with the bus\n"
381     "mouse.  If you have a serial mouse and are not sure about its protocol,\n"
382     "you should also try \"Auto\".  It may not work for the serial mouse if the\n"
383     "mouse does not support the PnP standard.  But, it won't hurt.  Many\n"
384     "2-button serial mice are compatible with \"Microsoft\" or \"MouseMan\".\n"
385     "3-button serial mice may be compatible with \"MouseSystems\" or \"MouseMan\".\n"
386     "If the serial mouse has a wheel, it may be compatible with \"IntelliMouse\".",
387     NULL,
388     NULL,
389     { { "1 Auto",       "Bus mouse or PnP serial mouse",        
390         dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_TYPE "=auto" },
391 #else
392     "Select a protocol type for your mouse",
393     "If your mouse is attached to the PS/2 mouse port or the bus mouse port,\n"
394     "you should always choose \"Auto\", regardless of the model and the brand\n"
395     "of the mouse.  All other protocol types are for serial mice and should\n"
396     "not be used with the PS/2 port mouse or the bus mouse.  If you have\n"
397     "a serial mouse and are not sure about its protocol, you should also try\n"
398     "\"Auto\".  It may not work for the serial mouse if the mouse does not\n"
399     "support the PnP standard.  But, it won't hurt.  Many 2-button serial mice\n"
400     "are compatible with \"Microsoft\" or \"MouseMan\".  3-button serial mice\n"
401     "may be compatible with \"MouseSystems\" or \"MouseMan\".  If the serial\n"
402     "mouse has a wheel, it may be compatible with \"IntelliMouse\".",
403     NULL,
404     NULL,
405     { { "1 Auto",       "Bus mouse, PS/2 style mouse or PnP serial mouse",      
406         dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_TYPE "=auto" },
407 #endif /* PC98 */
408       { "2 GlidePoint", "ALPS GlidePoint pad (serial)",
409         dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_TYPE "=glidepoint" },
410       { "3 Hitachi","Hitachi tablet (serial)",
411         dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_TYPE "=mmhittab" },
412       { "4 IntelliMouse",       "Microsoft IntelliMouse (serial)",
413         dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_TYPE "=intellimouse" },
414       { "5 Logitech",   "Logitech protocol (old models) (serial)",
415         dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_TYPE "=logitech" },
416       { "6 Microsoft",  "Microsoft protocol (serial)",
417         dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_TYPE "=microsoft" },
418       { "7 MM Series","MM Series protocol (serial)",
419         dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_TYPE "=mmseries" },
420       { "8 MouseMan",   "Logitech MouseMan/TrackMan models (serial)",
421         dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_TYPE "=mouseman" },
422       { "9 MouseSystems",       "MouseSystems protocol (serial)",
423         dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_TYPE "=mousesystems" },
424       { "A ThinkingMouse","Kensington ThinkingMouse (serial)",
425         dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_TYPE "=thinkingmouse" },
426       { NULL } },
427 };
428
429 #ifdef PC98
430 DMenu MenuMousePort = {
431     DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
432     "Select your mouse port from the following menu",
433     "The built-in pointing device of laptop/notebook computers is usually\n"
434     "a BusMouse style device.",
435     NULL,
436     NULL,
437     {
438       { "1 BusMouse",   "PC-98x1 bus mouse (/dev/mse0)", 
439         dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_PORT "=/dev/mse0" },
440       { "2 COM1",       "Serial mouse on COM1 (/dev/cuad0)",
441         dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_PORT "=/dev/cuad0" },
442       { "3 COM2",       "Serial mouse on COM2 (/dev/cuad1)",
443         dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_PORT "=/dev/cuad1" },
444       { NULL } },
445 };
446 #else
447 DMenu MenuMousePort = {
448     DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
449     "Select your mouse port from the following menu",
450     "The built-in pointing device of laptop/notebook computers is usually\n"
451     "a PS/2 style device.",
452     NULL,
453     NULL,
454     { { "1 PS/2",       "PS/2 style mouse (/dev/psm0)", 
455         dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_PORT "=/dev/psm0" },
456       { "2 COM1",       "Serial mouse on COM1 (/dev/cuad0)",
457         dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_PORT "=/dev/cuad0" },
458       { "3 COM2",       "Serial mouse on COM2 (/dev/cuad1)",
459         dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_PORT "=/dev/cuad1" },
460       { "4 COM3",       "Serial mouse on COM3 (/dev/cuad2)",
461         dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_PORT "=/dev/cuad2" },
462       { "5 COM4",       "Serial mouse on COM4 (/dev/cuad3)", 
463         dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_PORT "=/dev/cuad3" },
464       { "6 BusMouse",   "Logitech, ATI or MS bus mouse (/dev/mse0)", 
465         dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_PORT "=/dev/mse0" },
466       { NULL } },
467 };
468 #endif /* PC98 */
469
470 DMenu MenuMouse = {
471     DMENU_NORMAL_TYPE,
472     "Please configure your mouse",
473     "You can cut and paste text in the text console by running the mouse\n"
474     "daemon.  Specify a port and a protocol type of your mouse and enable\n"
475     "the mouse daemon.  If you don't want this feature, select 6 to disable\n"
476     "the daemon.\n"
477     "Once you've enabled the mouse daemon, you can specify \"/dev/sysmouse\"\n"
478     "as your mouse device and \"SysMouse\" or \"MouseSystems\" as mouse\n"
479     "protocol when running the X configuration utility (see Configuration\n"
480     "menu).",
481     NULL,
482     NULL,
483     { { "X Exit", "Exit this menu (returning to previous)", NULL, dmenuExit },
484       { "2 Enable",     "Test and run the mouse daemon", NULL, mousedTest, NULL, NULL },
485       { "3 Type",       "Select mouse protocol type", NULL, dmenuSubmenu, NULL, &MenuMouseType },
486       { "4 Port",       "Select mouse port", NULL, dmenuSubmenu, NULL, &MenuMousePort },
487       { "5 Flags",      "Set additional flags", dmenuVarCheck, setMouseFlags,
488         NULL, VAR_MOUSED_FLAGS "=" },
489       { "6 Disable",    "Disable the mouse daemon", NULL, mousedDisable, NULL, NULL },
490       { NULL } },
491 };
492 #endif /* WITH_MICE */
493
494 DMenu MenuMediaCDROM = {
495     DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
496     "Choose a CD/DVD type",
497     "FreeBSD can be installed directly from a CD/DVD containing a valid\n"
498     "FreeBSD distribution.  If you are seeing this menu it is because\n"
499     "more than one CD/DVD drive was found on your system.  Please select one\n"
500     "of the following CD/DVD drives as your installation drive.",
501     "Press F1 to read the installation guide",
502     "INSTALL",
503     { { NULL } },
504 };
505
506 DMenu MenuMediaFloppy = {
507     DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
508     "Choose a Floppy drive",
509     "You have more than one floppy drive.  Please choose which drive\n"
510     "you would like to use.",
511     NULL,
512     NULL,
513     { { NULL } },
514 };
515
516 DMenu MenuMediaDOS = {
517     DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
518     "Choose a DOS partition",
519     "FreeBSD can be installed directly from a DOS partition\n"
520     "assuming, of course, that you have copied the relevant\n"
521     "distributions into your DOS partition before starting this\n"
522     "installation.  If this is not the case then you should reboot\n"
523     "DOS at this time and copy the distributions you wish to install\n"
524     "into a \"FREEBSD\" subdirectory on one of your DOS partitions.\n"
525     "Otherwise, please select the DOS partition containing the FreeBSD\n"
526     "distribution files.",
527     "Press F1 to read the installation guide",
528     "INSTALL",
529     { { NULL } },
530 };
531
532 DMenu MenuMediaFTP = {
533     DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
534     "Please select a FreeBSD FTP distribution site",
535     "Please select the site closest to you or \"other\" if you'd like to\n"
536     "specify a different choice.  Also note that not every site listed here\n"
537     "carries more than the base distribution kits. Only Primary sites are\n"
538     "guaranteed to carry the full range of possible distributions.",
539     "Select a site that's close!",
540     "INSTALL",
541     { { "Main Site",    "ftp.freebsd.org", NULL, dmenuSetVariable, NULL,
542         VAR_FTP_PATH "=ftp://ftp.freebsd.org" },
543       { "URL", "Specify some other ftp site by URL", NULL, dmenuSetVariable, NULL,
544         VAR_FTP_PATH "=other" },
545       { "Snapshots Server Japan", "snapshots.jp.freebsd.org", NULL, dmenuSetVariable, NULL,
546         VAR_FTP_PATH "=ftp://snapshots.jp.freebsd.org" },
547       { "Snapshots Server Sweden", "snapshots.se.freebsd.org", NULL, dmenuSetVariable, NULL,
548         VAR_FTP_PATH "=ftp://snapshots.se.freebsd.org" },
549
550       { "IPv6 Main Site", "ftp.freebsd.org", NULL, dmenuSetVariable, NULL,
551         VAR_FTP_PATH "=ftp://ftp.freebsd.org" },
552       { " IPv6 Ireland", "ftp3.ie.freebsd.org", NULL, dmenuSetVariable, NULL,
553         VAR_FTP_PATH "=ftp://ftp3.ie.freebsd.org" },
554       { " IPv6 Israel", "ftp.il.freebsd.org", NULL, dmenuSetVariable, NULL,
555         VAR_FTP_PATH "=ftp://ftp.il.freebsd.org" },
556       { " IPv6 Japan", "ftp2.jp.freebsd.org", NULL, dmenuSetVariable, NULL,
557         VAR_FTP_PATH "=ftp://ftp2.jp.freebsd.org" },
558       { " IPv6 USA", "ftp4.us.freebsd.org", NULL, dmenuSetVariable, NULL,
559         VAR_FTP_PATH "=ftp://ftp4.us.freebsd.org" },
560       { " IPv6 Turkey", "ftp2.tr.freebsd.org", NULL, dmenuSetVariable, NULL,
561         VAR_FTP_PATH "=ftp://ftp2.tr.freebsd.org" },
562
563       { "Primary",      "ftp1.freebsd.org", NULL, dmenuSetVariable, NULL,
564         VAR_FTP_PATH "=ftp://ftp1.freebsd.org" },
565       { " Primary #2",  "ftp2.freebsd.org", NULL, dmenuSetVariable, NULL,
566         VAR_FTP_PATH "=ftp://ftp2.freebsd.org" },
567       { " Primary #3",  "ftp3.freebsd.org", NULL, dmenuSetVariable, NULL,
568         VAR_FTP_PATH "=ftp://ftp3.freebsd.org" },
569       { " Primary #4",  "ftp4.freebsd.org", NULL, dmenuSetVariable, NULL,
570         VAR_FTP_PATH "=ftp://ftp4.freebsd.org" },
571       { " Primary #5",  "ftp5.freebsd.org", NULL, dmenuSetVariable, NULL,
572         VAR_FTP_PATH "=ftp://ftp5.freebsd.org" },
573       { " Primary #6",  "ftp6.freebsd.org", NULL, dmenuSetVariable, NULL,
574         VAR_FTP_PATH "=ftp://ftp6.freebsd.org" },
575       { " Primary #7",  "ftp7.freebsd.org", NULL, dmenuSetVariable, NULL,
576         VAR_FTP_PATH "=ftp://ftp7.freebsd.org" },
577       { " Primary #8",  "ftp8.freebsd.org", NULL, dmenuSetVariable, NULL,
578         VAR_FTP_PATH "=ftp://ftp8.freebsd.org" },
579       { " Primary #9",  "ftp9.freebsd.org", NULL, dmenuSetVariable, NULL,
580         VAR_FTP_PATH "=ftp://ftp9.freebsd.org" },
581       { " Primary #10", "ftp10.freebsd.org", NULL, dmenuSetVariable, NULL,
582         VAR_FTP_PATH "=ftp://ftp10.freebsd.org" },
583       { " Primary #11", "ftp11.freebsd.org", NULL, dmenuSetVariable, NULL,
584         VAR_FTP_PATH "=ftp://ftp11.freebsd.org" },
585       { " Primary #12", "ftp12.freebsd.org", NULL, dmenuSetVariable, NULL,
586         VAR_FTP_PATH "=ftp://ftp12.freebsd.org" },
587       { " Primary #13", "ftp13.freebsd.org", NULL, dmenuSetVariable, NULL,
588         VAR_FTP_PATH "=ftp://ftp13.freebsd.org" },
589       { " Primary #14", "ftp14.freebsd.org", NULL, dmenuSetVariable, NULL,
590         VAR_FTP_PATH "=ftp://ftp14.freebsd.org" },
591
592       { "Argentina",    "ftp.ar.freebsd.org", NULL, dmenuSetVariable, NULL,
593         VAR_FTP_PATH "=ftp://ftp.ar.freebsd.org" },
594
595       { "Australia",    "ftp.au.freebsd.org", NULL, dmenuSetVariable, NULL,
596         VAR_FTP_PATH "=ftp://ftp.au.freebsd.org" },
597       { " Australia #2","ftp2.au.freebsd.org", NULL, dmenuSetVariable, NULL,
598         VAR_FTP_PATH "=ftp://ftp2.au.freebsd.org" },
599       { " Australia #3","ftp3.au.freebsd.org", NULL, dmenuSetVariable, NULL,
600         VAR_FTP_PATH "=ftp://ftp3.au.freebsd.org" },
601
602       { "Austria","ftp.at.freebsd.org", NULL, dmenuSetVariable, NULL,
603         VAR_FTP_PATH "=ftp://ftp.at.freebsd.org" },
604       { " Austria #2","ftp2.at.freebsd.org", NULL, dmenuSetVariable, NULL,
605         VAR_FTP_PATH "=ftp://ftp2.at.freebsd.org" },
606
607       { "Brazil",       "ftp.br.freebsd.org", NULL, dmenuSetVariable, NULL,
608         VAR_FTP_PATH "=ftp://ftp.br.freebsd.org" },
609       { " Brazil #2",   "ftp2.br.freebsd.org", NULL, dmenuSetVariable, NULL,
610         VAR_FTP_PATH "=ftp://ftp2.br.freebsd.org" },
611       { " Brazil #3",   "ftp3.br.freebsd.org", NULL, dmenuSetVariable, NULL,
612         VAR_FTP_PATH "=ftp://ftp3.br.freebsd.org" },
613       { " Brazil #4",   "ftp4.br.freebsd.org", NULL, dmenuSetVariable, NULL,
614         VAR_FTP_PATH "=ftp://ftp4.br.freebsd.org" },
615       { " Brazil #5",   "ftp5.br.freebsd.org", NULL, dmenuSetVariable, NULL,
616         VAR_FTP_PATH "=ftp://ftp5.br.freebsd.org" },
617       { " Brazil #6",   "ftp6.br.freebsd.org", NULL, dmenuSetVariable, NULL,
618         VAR_FTP_PATH "=ftp://ftp6.br.freebsd.org" },
619       { " Brazil #7",   "ftp7.br.freebsd.org", NULL, dmenuSetVariable, NULL,
620         VAR_FTP_PATH "=ftp://ftp7.br.freebsd.org" },
621
622       { "Canada",       "ftp.ca.freebsd.org", NULL, dmenuSetVariable, NULL,
623         VAR_FTP_PATH "=ftp://ftp.ca.freebsd.org" },
624
625       { "China",        "ftp.cn.freebsd.org", NULL, dmenuSetVariable, NULL,
626         VAR_FTP_PATH "=ftp://ftp.cn.freebsd.org" },
627       { " China #2",    "ftp2.cn.freebsd.org", NULL, dmenuSetVariable, NULL,
628         VAR_FTP_PATH "=ftp://ftp2.cn.freebsd.org" },
629
630       { "Croatia",      "ftp.hr.freebsd.org", NULL, dmenuSetVariable, NULL,
631         VAR_FTP_PATH "=ftp://ftp.hr.freebsd.org" },
632
633       { "Czech Republic", "ftp.cz.freebsd.org", NULL, dmenuSetVariable, NULL,
634         VAR_FTP_PATH "=ftp://ftp.cz.freebsd.org" },
635
636       { "Denmark",      "ftp.dk.freebsd.org", NULL, dmenuSetVariable, NULL,
637         VAR_FTP_PATH "=ftp://ftp.dk.freebsd.org" },
638       { " Denmark #2",  "ftp2.dk.freebsd.org", NULL, dmenuSetVariable, NULL,
639         VAR_FTP_PATH "=ftp://ftp2.dk.freebsd.org" },
640
641       { "Estonia",      "ftp.ee.freebsd.org", NULL, dmenuSetVariable, NULL,
642         VAR_FTP_PATH "=ftp://ftp.ee.freebsd.org" },
643
644       { "Finland",      "ftp.fi.freebsd.org", NULL, dmenuSetVariable, NULL,
645         VAR_FTP_PATH "=ftp://ftp.fi.freebsd.org" },
646
647       { "France",       "ftp.fr.freebsd.org", NULL, dmenuSetVariable, NULL,
648         VAR_FTP_PATH "=ftp://ftp.fr.freebsd.org" },
649       { " France #2",   "ftp2.fr.freebsd.org", NULL, dmenuSetVariable, NULL,
650         VAR_FTP_PATH "=ftp://ftp2.fr.freebsd.org" },
651       { " France #3",   "ftp3.fr.freebsd.org", NULL, dmenuSetVariable, NULL,
652         VAR_FTP_PATH "=ftp://ftp3.fr.freebsd.org" },
653       { " France #5",   "ftp5.fr.freebsd.org", NULL, dmenuSetVariable, NULL,
654         VAR_FTP_PATH "=ftp://ftp5.fr.freebsd.org" },
655       { " France #6",   "ftp6.fr.freebsd.org", NULL, dmenuSetVariable, NULL,
656         VAR_FTP_PATH "=ftp://ftp6.fr.freebsd.org" },
657       { " France #8",   "ftp8.fr.freebsd.org", NULL, dmenuSetVariable, NULL,
658         VAR_FTP_PATH "=ftp://ftp8.fr.freebsd.org" },
659
660       { "Germany",      "ftp.de.freebsd.org", NULL, dmenuSetVariable, NULL,
661         VAR_FTP_PATH "=ftp://ftp.de.freebsd.org" },
662       { " Germany #2",  "ftp2.de.freebsd.org", NULL, dmenuSetVariable, NULL,
663         VAR_FTP_PATH "=ftp://ftp2.de.freebsd.org" },
664       { " Germany #3",  "ftp3.de.freebsd.org", NULL, dmenuSetVariable, NULL,
665         VAR_FTP_PATH "=ftp://ftp3.de.freebsd.org" },
666       { " Germany #4",  "ftp4.de.freebsd.org", NULL, dmenuSetVariable, NULL,
667         VAR_FTP_PATH "=ftp://ftp4.de.freebsd.org" },
668       { " Germany #5",  "ftp5.de.freebsd.org", NULL, dmenuSetVariable, NULL,
669         VAR_FTP_PATH "=ftp://ftp5.de.freebsd.org" },
670       { " Germany #6",  "ftp6.de.freebsd.org", NULL, dmenuSetVariable, NULL,
671         VAR_FTP_PATH "=ftp://ftp6.de.freebsd.org" },
672       { " Germany #7",  "ftp7.de.freebsd.org", NULL, dmenuSetVariable, NULL,
673         VAR_FTP_PATH "=ftp://ftp7.de.freebsd.org" },
674       { " Germany #8",  "ftp8.de.freebsd.org", NULL, dmenuSetVariable, NULL,
675         VAR_FTP_PATH "=ftp://ftp8.de.freebsd.org" },
676
677       { "Greece",       "ftp.gr.freebsd.org", NULL, dmenuSetVariable, NULL,
678         VAR_FTP_PATH "=ftp://ftp.gr.freebsd.org" },
679       { " Greece #2",   "ftp2.gr.freebsd.org", NULL, dmenuSetVariable, NULL,
680         VAR_FTP_PATH "=ftp://ftp2.gr.freebsd.org" },
681
682       { "Hong Kong",    "ftp.hk.super.net", NULL, dmenuSetVariable, NULL,
683         VAR_FTP_PATH "=ftp://ftp.hk.super.net" },
684
685       { "Hungary",     "ftp.hu.freebsd.org", NULL, dmenuSetVariable, NULL,
686         VAR_FTP_PATH "=ftp://ftp.hu.freebsd.org" },
687
688       { "Iceland",      "ftp.is.freebsd.org", NULL, dmenuSetVariable, NULL,
689         VAR_FTP_PATH "=ftp://ftp.is.freebsd.org" },
690
691       { "Ireland",      "ftp.ie.freebsd.org", NULL, dmenuSetVariable, NULL,
692         VAR_FTP_PATH "=ftp://ftp.ie.freebsd.org" },
693       { " Ireland #2",  "ftp2.ie.freebsd.org", NULL, dmenuSetVariable, NULL,
694         VAR_FTP_PATH "=ftp://ftp2.ie.freebsd.org" },
695       { " Ireland #3",  "ftp3.ie.freebsd.org", NULL, dmenuSetVariable, NULL,
696         VAR_FTP_PATH "=ftp://ftp3.ie.freebsd.org" },
697
698       { "Isreal",       "ftp.il.freebsd.org", NULL, dmenuSetVariable, NULL,
699         VAR_FTP_PATH "=ftp://ftp.il.freebsd.org" },
700
701       { "Italy",        "ftp.it.freebsd.org", NULL, dmenuSetVariable, NULL,
702         VAR_FTP_PATH "=ftp://ftp.it.freebsd.org" },
703
704       { "Japan",        "ftp.jp.freebsd.org", NULL, dmenuSetVariable, NULL,
705         VAR_FTP_PATH "=ftp://ftp.jp.freebsd.org" },
706       { " Japan #2",    "ftp2.jp.freebsd.org", NULL, dmenuSetVariable, NULL,
707         VAR_FTP_PATH "=ftp://ftp2.jp.freebsd.org" },
708       { " Japan #3",    "ftp3.jp.freebsd.org", NULL, dmenuSetVariable, NULL,
709         VAR_FTP_PATH "=ftp://ftp3.jp.freebsd.org" },
710       { " Japan #4",    "ftp4.jp.freebsd.org", NULL, dmenuSetVariable, NULL,
711         VAR_FTP_PATH "=ftp://ftp4.jp.freebsd.org" },
712       { " Japan #5",    "ftp5.jp.freebsd.org", NULL, dmenuSetVariable, NULL,
713         VAR_FTP_PATH "=ftp://ftp5.jp.freebsd.org" },
714       { " Japan #6",    "ftp6.jp.freebsd.org", NULL, dmenuSetVariable, NULL,
715         VAR_FTP_PATH "=ftp://ftp6.jp.freebsd.org" },
716       { " Japan #7",    "ftp7.jp.freebsd.org", NULL, dmenuSetVariable, NULL,
717         VAR_FTP_PATH "=ftp://ftp7.jp.freebsd.org" },
718       { " Japan #8",    "ftp8.jp.freebsd.org", NULL, dmenuSetVariable, NULL,
719         VAR_FTP_PATH "=ftp://ftp8.jp.freebsd.org" },
720       { " Japan #9",    "ftp9.jp.freebsd.org", NULL, dmenuSetVariable, NULL,
721         VAR_FTP_PATH "=ftp://ftp9.jp.freebsd.org" },
722
723       { "Korea",        "ftp.kr.freebsd.org", NULL, dmenuSetVariable, NULL,
724         VAR_FTP_PATH "=ftp://ftp.kr.freebsd.org" },
725       { " Korea #2",    "ftp2.kr.freebsd.org", NULL, dmenuSetVariable, NULL,
726         VAR_FTP_PATH "=ftp://ftp2.kr.freebsd.org" },
727
728       { "Lithuania",    "ftp.lt.freebsd.org", NULL, dmenuSetVariable, NULL,
729         VAR_FTP_PATH "=ftp://ftp.lt.freebsd.org" },
730
731       { "Netherlands",  "ftp.nl.freebsd.org", NULL, dmenuSetVariable, NULL,
732         VAR_FTP_PATH "=ftp://ftp.nl.freebsd.org" },
733       { " Netherlands #2",      "ftp2.nl.freebsd.org", NULL, dmenuSetVariable, NULL,
734         VAR_FTP_PATH "=ftp://ftp2.nl.freebsd.org" },
735
736       { "Norway",       "ftp.no.freebsd.org", NULL, dmenuSetVariable, NULL,
737         VAR_FTP_PATH "=ftp://ftp.no.freebsd.org" },
738       { " Norway #3",   "ftp3.no.freebsd.org", NULL, dmenuSetVariable, NULL,
739         VAR_FTP_PATH "=ftp://ftp3.no.freebsd.org" },
740
741       { "Poland",       "ftp.pl.freebsd.org", NULL, dmenuSetVariable, NULL,
742         VAR_FTP_PATH "=ftp://ftp.pl.freebsd.org" },
743       { " Poland #2",   "ftp2.pl.freebsd.org", NULL, dmenuSetVariable, NULL,
744         VAR_FTP_PATH "=ftp://ftp2.pl.freebsd.org" },
745       { " Poland #5",   "ftp5.pl.freebsd.org", NULL, dmenuSetVariable, NULL,
746         VAR_FTP_PATH "=ftp://ftp5.pl.freebsd.org" },
747
748       { "Portugal",     "ftp.pt.freebsd.org", NULL, dmenuSetVariable, NULL,
749         VAR_FTP_PATH "=ftp://ftp.pt.freebsd.org" },
750       { " Portugal #2", "ftp2.pt.freebsd.org", NULL, dmenuSetVariable, NULL,
751         VAR_FTP_PATH "=ftp://ftp2.pt.freebsd.org" },
752       { " Portugal #4", "ftp4.pt.freebsd.org", NULL, dmenuSetVariable, NULL,
753         VAR_FTP_PATH "=ftp://ftp4.pt.freebsd.org" },
754
755       { "Romania",      "ftp.ro.freebsd.org", NULL, dmenuSetVariable, NULL,
756         VAR_FTP_PATH "=ftp://ftp.ro.freebsd.org" },
757
758       { "Russia",       "ftp.ru.freebsd.org", NULL, dmenuSetVariable, NULL,
759         VAR_FTP_PATH "=ftp://ftp.ru.freebsd.org" },
760       { " Russia #2",   "ftp2.ru.freebsd.org", NULL, dmenuSetVariable, NULL,
761         VAR_FTP_PATH "=ftp://ftp2.ru.freebsd.org" },
762       { " Russia #3",   "ftp3.ru.freebsd.org", NULL, dmenuSetVariable, NULL,
763         VAR_FTP_PATH "=ftp://ftp3.ru.freebsd.org" },
764       { " Russia #4",   "ftp4.ru.freebsd.org", NULL, dmenuSetVariable, NULL,
765         VAR_FTP_PATH "=ftp://ftp4.ru.freebsd.org" },
766
767       { "Singapore",    "ftp.sg.freebsd.org", NULL, dmenuSetVariable, NULL,
768         VAR_FTP_PATH "=ftp://ftp.sg.freebsd.org" },
769
770       { "Slovak Republic",      "ftp.sk.freebsd.org", NULL, dmenuSetVariable, NULL,
771         VAR_FTP_PATH "=ftp://ftp.sk.freebsd.org" },
772
773       { "Slovenia",     "ftp.si.freebsd.org", NULL, dmenuSetVariable, NULL,
774         VAR_FTP_PATH "=ftp://ftp.si.freebsd.org" },
775       { " Slovenia #2", "ftp2.si.freebsd.org", NULL, dmenuSetVariable, NULL,
776         VAR_FTP_PATH "=ftp://ftp2.si.freebsd.org" },
777
778       { "South Africa", "ftp.za.freebsd.org", NULL, dmenuSetVariable, NULL,
779         VAR_FTP_PATH "=ftp://ftp.za.freebsd.org" },
780       { " South Africa #2", "ftp2.za.freebsd.org", NULL, dmenuSetVariable, NULL,
781         VAR_FTP_PATH "=ftp://ftp2.za.freebsd.org" },
782       { " South Africa #3", "ftp3.za.freebsd.org", NULL, dmenuSetVariable, NULL,
783         VAR_FTP_PATH "=ftp://ftp3.za.freebsd.org" },
784       { " South Africa #4", "ftp4.za.freebsd.org", NULL, dmenuSetVariable, NULL,
785         VAR_FTP_PATH "=ftp://ftp4.za.freebsd.org" },
786
787       { "Spain",        "ftp.es.freebsd.org", NULL, dmenuSetVariable, NULL,
788         VAR_FTP_PATH "=ftp://ftp.es.freebsd.org" },
789       { " Spain #2",    "ftp2.es.freebsd.org", NULL, dmenuSetVariable, NULL,
790         VAR_FTP_PATH "=ftp://ftp2.es.freebsd.org" },
791       { " Spain #3",    "ftp3.es.freebsd.org", NULL, dmenuSetVariable, NULL,
792         VAR_FTP_PATH "=ftp://ftp3.es.freebsd.org" },
793
794       { "Sweden",       "ftp.se.freebsd.org", NULL, dmenuSetVariable, NULL,
795         VAR_FTP_PATH "=ftp://ftp.se.freebsd.org" },
796       { " Sweden #2",   "ftp2.se.freebsd.org", NULL, dmenuSetVariable, NULL,
797         VAR_FTP_PATH "=ftp://ftp2.se.freebsd.org" },
798       { " Sweden #3",   "ftp3.se.freebsd.org", NULL, dmenuSetVariable, NULL,
799         VAR_FTP_PATH "=ftp://ftp3.se.freebsd.org" },
800       { " Sweden #5",   "ftp5.se.freebsd.org", NULL, dmenuSetVariable, NULL,
801         VAR_FTP_PATH "=ftp://ftp5.se.freebsd.org" },
802
803       { "Switzerland",  "ftp.ch.freebsd.org", NULL, dmenuSetVariable, NULL,
804         VAR_FTP_PATH "=ftp://ftp.ch.freebsd.org" },
805       { " Switzerland #2",      "ftp2.ch.freebsd.org", NULL, dmenuSetVariable, NULL,
806         VAR_FTP_PATH "=ftp://ftp2.ch.freebsd.org" },
807
808       { "Taiwan",       "ftp.tw.freebsd.org", NULL, dmenuSetVariable, NULL,
809         VAR_FTP_PATH "=ftp://ftp.tw.freebsd.org" },
810       { " Taiwan #2",   "ftp2.tw.freebsd.org", NULL, dmenuSetVariable, NULL,
811         VAR_FTP_PATH "=ftp://ftp2.tw.freebsd.org" },
812       { " Taiwan #3",   "ftp3.tw.freebsd.org", NULL, dmenuSetVariable, NULL,
813         VAR_FTP_PATH "=ftp://ftp3.tw.freebsd.org" },
814       { " Taiwan #4",   "ftp4.tw.freebsd.org", NULL, dmenuSetVariable, NULL,
815         VAR_FTP_PATH "=ftp://ftp4.tw.freebsd.org" },
816       { " Taiwan #6",   "ftp6.tw.freebsd.org", NULL, dmenuSetVariable, NULL,
817         VAR_FTP_PATH "=ftp://ftp6.tw.freebsd.org" },
818       { " Taiwan #11",   "ftp11.tw.freebsd.org", NULL, dmenuSetVariable, NULL,
819         VAR_FTP_PATH "=ftp://ftp11.tw.freebsd.org" },
820
821       { "Turkey",       "ftp.tr.freebsd.org", NULL, dmenuSetVariable, NULL,
822         VAR_FTP_PATH "=ftp://ftp.tr.freebsd.org" },
823       { " Turkey #2",   "ftp2.tr.freebsd.org", NULL, dmenuSetVariable, NULL,
824         VAR_FTP_PATH "=ftp://ftp.tr.freebsd.org" },
825
826       { "UK",           "ftp.uk.freebsd.org", NULL, dmenuSetVariable, NULL,
827         VAR_FTP_PATH "=ftp://ftp.uk.freebsd.org" },
828       { " UK #2",       "ftp2.uk.freebsd.org", NULL, dmenuSetVariable, NULL,
829         VAR_FTP_PATH "=ftp://ftp2.uk.freebsd.org" },
830       { " UK #3",       "ftp3.uk.freebsd.org", NULL, dmenuSetVariable, NULL,
831         VAR_FTP_PATH "=ftp://ftp3.uk.freebsd.org" },
832       { " UK #4",       "ftp4.uk.freebsd.org", NULL, dmenuSetVariable, NULL,
833         VAR_FTP_PATH "=ftp://ftp4.uk.freebsd.org" },
834       { " UK #5",       "ftp5.uk.freebsd.org", NULL, dmenuSetVariable, NULL,
835         VAR_FTP_PATH "=ftp://ftp5.uk.freebsd.org" },
836       { " UK #6",       "ftp6.uk.freebsd.org", NULL, dmenuSetVariable, NULL,
837         VAR_FTP_PATH "=ftp://ftp6.uk.freebsd.org" },
838
839       { "Ukraine",      "ftp.ua.freebsd.org", NULL, dmenuSetVariable, NULL,
840         VAR_FTP_PATH "=ftp://ftp.ua.freebsd.org" },
841       { " Ukraine #2",  "ftp2.ua.freebsd.org", NULL, dmenuSetVariable, NULL,
842         VAR_FTP_PATH "=ftp://ftp2.ua.freebsd.org" },
843       { " Ukraine #5",  "ftp5.ua.freebsd.org", NULL, dmenuSetVariable, NULL,
844         VAR_FTP_PATH "=ftp://ftp5.ua.freebsd.org" },
845       { " Ukraine #6",  "ftp6.ua.freebsd.org", NULL, dmenuSetVariable, NULL,
846         VAR_FTP_PATH "=ftp://ftp6.ua.freebsd.org" },
847       { " Ukraine #7",  "ftp7.ua.freebsd.org", NULL, dmenuSetVariable, NULL,
848         VAR_FTP_PATH "=ftp://ftp7.ua.freebsd.org" },
849       { " Ukraine #8",  "ftp8.ua.freebsd.org", NULL, dmenuSetVariable, NULL,
850         VAR_FTP_PATH "=ftp://ftp8.ua.freebsd.org" },
851
852       { "USA #1",       "ftp1.us.freebsd.org", NULL, dmenuSetVariable, NULL,
853         VAR_FTP_PATH "=ftp://ftp1.us.freebsd.org" },
854       { " USA #2",      "ftp2.us.freebsd.org", NULL, dmenuSetVariable, NULL,
855         VAR_FTP_PATH "=ftp://ftp2.us.freebsd.org" },
856       { " USA #3",      "ftp3.us.freebsd.org", NULL, dmenuSetVariable, NULL,
857         VAR_FTP_PATH "=ftp://ftp3.us.freebsd.org" },
858       { " USA #4",      "ftp4.us.freebsd.org", NULL, dmenuSetVariable, NULL,
859         VAR_FTP_PATH "=ftp://ftp4.us.freebsd.org" },
860       { " USA #5",      "ftp5.us.freebsd.org", NULL, dmenuSetVariable, NULL,
861         VAR_FTP_PATH "=ftp://ftp5.us.freebsd.org" },
862       { " USA #6",      "ftp6.us.freebsd.org", NULL, dmenuSetVariable, NULL,
863         VAR_FTP_PATH "=ftp://ftp6.us.freebsd.org" },
864       { " USA #7",      "ftp7.us.freebsd.org", NULL, dmenuSetVariable, NULL,
865         VAR_FTP_PATH "=ftp://ftp7.us.freebsd.org" },
866       { " USA #8",      "ftp8.us.freebsd.org", NULL, dmenuSetVariable, NULL,
867         VAR_FTP_PATH "=ftp://ftp8.us.freebsd.org" },
868       { " USA #9",      "ftp9.us.freebsd.org", NULL, dmenuSetVariable, NULL,
869         VAR_FTP_PATH "=ftp://ftp9.us.freebsd.org" },
870       { " USA #10",     "ftp10.us.freebsd.org", NULL, dmenuSetVariable, NULL,
871         VAR_FTP_PATH "=ftp://ftp10.us.freebsd.org" },
872       { " USA #11",     "ftp11.us.freebsd.org", NULL, dmenuSetVariable, NULL,
873         VAR_FTP_PATH "=ftp://ftp11.us.freebsd.org" },
874       { " USA #12",     "ftp12.us.freebsd.org", NULL, dmenuSetVariable, NULL,
875         VAR_FTP_PATH "=ftp://ftp12.us.freebsd.org" },
876       { " USA #13",     "ftp13.us.freebsd.org", NULL, dmenuSetVariable, NULL,
877         VAR_FTP_PATH "=ftp://ftp13.us.freebsd.org" },
878       { " USA #14",     "ftp14.us.freebsd.org", NULL, dmenuSetVariable, NULL,
879         VAR_FTP_PATH "=ftp://ftp14.us.freebsd.org" },
880       { " USA #15",     "ftp15.us.freebsd.org", NULL, dmenuSetVariable, NULL,
881         VAR_FTP_PATH "=ftp://ftp15.us.freebsd.org" },
882
883       { NULL } }
884 };
885
886 DMenu MenuMediaTape = {
887     DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
888     "Choose a tape drive type",
889     "FreeBSD can be installed from tape drive, though this installation\n"
890     "method requires a certain amount of temporary storage in addition\n"
891     "to the space required by the distribution itself (tape drives make\n"
892     "poor random-access devices, so we extract _everything_ on the tape\n"
893     "in one pass).  If you have sufficient space for this, then you should\n"
894     "select one of the following tape devices detected on your system.",
895     "Press F1 to read the installation guide",
896     "INSTALL",
897     { { NULL } },
898 };
899
900 DMenu MenuNetworkDevice = {
901     DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
902     "Network interface information required",
903     "If you are using PPP over a serial device, as opposed to a direct\n"
904     "ethernet connection, then you may first need to dial your Internet\n"
905     "Service Provider using the ppp utility we provide for that purpose.\n"
906     "If you're using SLIP over a serial device then the expectation is\n"
907     "that you have a HARDWIRED connection.\n\n"
908     "You can also install over a parallel port using a special \"laplink\"\n"
909     "cable to another machine running FreeBSD.",
910     "Press F1 to read network configuration manual",
911     "network_device",
912     { { NULL } },
913 };
914
915 /* Prototype KLD load menu */
916 DMenu MenuKLD = {
917     DMENU_NORMAL_TYPE,
918     "KLD Menu",
919     "Load a KLD from a floppy\n",
920     NULL,
921     NULL,
922     { { NULL } },
923 };
924
925 /* The media selection menu */
926 DMenu MenuMedia = {
927     DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
928     "Choose Installation Media",
929     "FreeBSD can be installed from a variety of different installation\n"
930     "media, ranging from floppies to an Internet FTP server.  If you're\n"
931     "installing FreeBSD from a supported CD/DVD drive then this is generally\n"
932     "the best media to use if you have no overriding reason for using other\n"
933     "media.",
934     "Press F1 for more information on the various media types",
935     "media",
936     { { "1 CD/DVD",             "Install from a FreeBSD CD/DVD",        NULL, mediaSetCDROM },
937       { "2 FTP",                "Install from an FTP server",           NULL, mediaSetFTPActive },
938       { "3 FTP Passive",        "Install from an FTP server through a firewall", NULL, mediaSetFTPPassive },
939       { "4 HTTP",               "Install from an FTP server through a http proxy", NULL, mediaSetHTTP },
940       { "5 DOS",                "Install from a DOS partition",         NULL, mediaSetDOS },
941       { "6 NFS",                "Install over NFS",                     NULL, mediaSetNFS },
942       { "7 File System",        "Install from an existing filesystem",  NULL, mediaSetUFS },
943       { "8 Floppy",             "Install from a floppy disk set",       NULL, mediaSetFloppy },
944       { "9 Tape",               "Install from SCSI or QIC tape",        NULL, mediaSetTape },
945       { "X Options",            "Go to the Options screen",             NULL, optionsEditor },
946       { NULL } },
947 };
948
949 /* The distributions menu */
950 DMenu MenuDistributions = {
951     DMENU_CHECKLIST_TYPE | DMENU_SELECTION_RETURNS,
952     "Choose Distributions",
953     "As a convenience, we provide several \"canned\" distribution sets.\n"
954     "These select what we consider to be the most reasonable defaults for the\n"
955     "type of system in question.  If you would prefer to pick and choose the\n"
956     "list of distributions yourself, simply select \"Custom\".  You can also\n"
957     "pick a canned distribution set and then fine-tune it with the Custom item.\n\n"
958     "Choose an item by pressing [SPACE] or [ENTER].  When finished, choose the\n"
959     "Exit item or move to the OK button with [TAB].",
960     "Press F1 for more information on these options.",
961     "distributions",
962     { { "X Exit", "Exit this menu (returning to previous)",
963         checkTrue, dmenuExit, NULL, NULL, '<', '<', '<' },
964       { "All",                  "All system sources, binaries and X Window System",
965         checkDistEverything,    distSetEverything, NULL, NULL, ' ', ' ', ' ' },
966       { "Reset",                "Reset selected distribution list to nothing",
967         NULL,                   distReset, NULL, NULL, ' ', ' ', ' ' },
968       { "4 Developer",          "Full sources, binaries and doc but no games", 
969         checkDistDeveloper,     distSetDeveloper },
970       { "5 X-Developer",        "Same as above + X Window System",
971         checkDistXDeveloper,    distSetXDeveloper },
972       { "6 Kern-Developer",     "Full binaries and doc, kernel sources only",
973         checkDistKernDeveloper, distSetKernDeveloper },
974       { "7 X-Kern-Developer",   "Same as above + X Window System",
975         checkDistXKernDeveloper, distSetXKernDeveloper },
976       { "8 User",               "Average user - binaries and doc only",
977         checkDistUser,          distSetUser },
978       { "9 X-User",             "Same as above + X Window System",
979         checkDistXUser,         distSetXUser },
980       { "A Minimal",            "The smallest configuration possible",
981         checkDistMinimum,       distSetMinimum },
982       { "B Custom",             "Specify your own distribution set",
983         NULL,                   dmenuSubmenu, NULL, &MenuSubDistributions, '>', '>', '>' },
984       { NULL } },
985 };
986
987 DMenu MenuSubDistributions = {
988     DMENU_CHECKLIST_TYPE | DMENU_SELECTION_RETURNS,
989     "Select the distributions you wish to install.",
990     "Please check off the distributions you wish to install.  At the\n"
991     "very minimum, this should be \"base\".",
992     NULL,
993     NULL,
994     { { "X Exit", "Exit this menu (returning to previous)",
995         checkTrue, dmenuExit, NULL, NULL, '<', '<', '<' },
996       { "All",          "All system sources, binaries and X Window System",
997         NULL, distSetEverything, NULL, NULL, ' ', ' ', ' ' },
998       { "Reset",        "Reset all of the below",
999         NULL, distReset, NULL, NULL, ' ', ' ', ' ' },
1000       { " base",        "Binary base distribution (required)",
1001         dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_BASE },
1002       { " kernels",     "Binary kernel distributions (required)",
1003         kernelFlagCheck,distSetKernel },
1004       { " dict",        "Spelling checker dictionary files",
1005         dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_DICT },
1006       { " doc",         "Miscellaneous FreeBSD online docs",
1007         dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_DOC },
1008       { " games",       "Games (non-commercial)",
1009         dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_GAMES },
1010       { " info",        "GNU info files",
1011         dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_INFO },
1012 #ifdef __amd64__
1013       { " lib32",       "32-bit runtime compatibility libraries",
1014         dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_LIB32 },
1015 #endif
1016       { " man",         "System manual pages - recommended",
1017         dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_MANPAGES },
1018       { " catman",      "Preformatted system manual pages",
1019         dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_CATPAGES },
1020       { " proflibs",    "Profiled versions of the libraries",
1021         dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_PROFLIBS },
1022       { " src",         "Sources for everything",
1023         srcFlagCheck,   distSetSrc },
1024       { " ports",       "The FreeBSD Ports collection",
1025         dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_PORTS },
1026       { " local",       "Local additions collection",
1027         dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_LOCAL},
1028       { " X.Org",       "The X.Org distribution",
1029         x11FlagCheck,   distSetXOrg },
1030       { NULL } },
1031 };
1032
1033 DMenu MenuKernelDistributions = {
1034     DMENU_CHECKLIST_TYPE | DMENU_SELECTION_RETURNS,
1035     "Select the operating system kernels you wish to install.",
1036     "Please check off those kernels you wish to install.\n",
1037     NULL,
1038     NULL,
1039     { { "X Exit", "Exit this menu (returning to previous)",
1040         checkTrue, dmenuExit, NULL, NULL, '<', '<', '<' },
1041       { "All",          "Select all of the below",
1042         NULL,           setKernel, NULL, NULL, ' ', ' ', ' ' },
1043       { "Reset",        "Reset all of the below",
1044         NULL,           clearKernel, NULL, NULL, ' ', ' ', ' ' },
1045       { " GENERIC",     "GENERIC kernel configuration",
1046         dmenuFlagCheck, dmenuSetFlag, NULL, &KernelDists, '[', 'X', ']', DIST_KERNEL_GENERIC },
1047 #ifdef WITH_SMP
1048       { " SMP",         "GENERIC symmetric multiprocessor kernel configuration",
1049         dmenuFlagCheck, dmenuSetFlag,   NULL, &KernelDists, '[', 'X', ']', DIST_KERNEL_SMP },
1050 #endif
1051       { NULL } },
1052 };
1053
1054 DMenu MenuSrcDistributions = {
1055     DMENU_CHECKLIST_TYPE | DMENU_SELECTION_RETURNS,
1056     "Select the sub-components of src you wish to install.",
1057     "Please check off those portions of the FreeBSD source tree\n"
1058     "you wish to install.",
1059     NULL,
1060     NULL,
1061     { { "X Exit", "Exit this menu (returning to previous)",
1062         checkTrue, dmenuExit, NULL, NULL, '<', '<', '<' },
1063       { "All",          "Select all of the below",
1064         NULL,           setSrc, NULL, NULL, ' ', ' ', ' ' },
1065       { "Reset",        "Reset all of the below",
1066         NULL,           clearSrc, NULL, NULL, ' ', ' ', ' ' },
1067       { " base",        "top-level files in /usr/src",
1068         dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_BASE },
1069       { " cddl",        "/usr/src/cddl (software from Sun)",
1070         dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_CDDL },
1071       { " contrib",     "/usr/src/contrib (contributed software)",
1072         dmenuFlagCheck, dmenuSetFlag,   NULL, &SrcDists, '[', 'X', ']', DIST_SRC_CONTRIB },
1073       { " crypto",      "/usr/src/crypto (contrib encryption sources)",
1074         dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_SCRYPTO },
1075       { " gnu",         "/usr/src/gnu (software from the GNU Project)",
1076         dmenuFlagCheck, dmenuSetFlag,   NULL, &SrcDists, '[', 'X', ']', DIST_SRC_GNU },
1077       { " etc",         "/usr/src/etc (miscellaneous system files)",
1078         dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_ETC },
1079       { " games",       "/usr/src/games (the obvious!)",
1080         dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_GAMES },
1081       { " include",     "/usr/src/include (header files)",
1082         dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_INCLUDE },
1083       { " krb5",        "/usr/src/kerberos5 (sources for Kerberos5)",
1084         dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_SKERBEROS5 },
1085       { " lib",         "/usr/src/lib (system libraries)",
1086         dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_LIB },
1087       { " libexec",     "/usr/src/libexec (system programs)",
1088         dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_LIBEXEC },
1089       { " release",     "/usr/src/release (release-generation tools)",
1090         dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_RELEASE },
1091       { " rescue",      "/usr/src/rescue (static rescue tools)",
1092         dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_RESCUE },
1093       { " bin",         "/usr/src/bin (system binaries)",
1094         dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_BIN },
1095       { " sbin",        "/usr/src/sbin (system binaries)",
1096         dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_SBIN },
1097       { " secure",      "/usr/src/secure (BSD encryption sources)",
1098         dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_SSECURE },
1099       { " share",       "/usr/src/share (documents and shared files)",
1100         dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_SHARE },
1101       { " sys",         "/usr/src/sys (FreeBSD kernel)",
1102         dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_SYS },
1103       { " tools",       "/usr/src/tools (miscellaneous tools)",
1104         dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_TOOLS },
1105       { " ubin",        "/usr/src/usr.bin (user binaries)",
1106         dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_UBIN },
1107       { " usbin",       "/usr/src/usr.sbin (aux system binaries)",
1108         dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_USBIN },
1109       { NULL } },
1110 };
1111
1112 DMenu MenuXOrgConfig = {
1113     DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
1114     "Please select the X.Org configuration tool you want to use.",
1115     "The first option, xorgcfg, is fully graphical.\n"
1116     "The second option provides a menu-based interface similar to\n"
1117     "what you are currently using. "
1118     "The third option, xorgconfig, is\n"
1119     "a more simplistic shell-script based tool and less friendly to\n"
1120     "new users, but it may work in situations where the other options\n"
1121     "do not.",
1122     NULL,
1123     NULL,
1124     { { "X Exit", "Exit this menu (returning to previous)",
1125         NULL, dmenuExit },
1126       { "2 xorgcfg",    "Fully graphical X.Org configuration tool.",
1127         NULL, dmenuSetVariable, NULL, VAR_XORG_CONFIG "=xorgcfg" },
1128       { "3 xorgcfg -textmode",  "ncurses-based X.Org configuration tool.",
1129         NULL, dmenuSetVariable, NULL, VAR_XORG_CONFIG "=xorgcfg -textmode" },
1130       { "4 xorgconfig", "Shell-script based X.Org configuration tool.",
1131         NULL, dmenuSetVariable, NULL, VAR_XORG_CONFIG "=xorgconfig" },
1132       { "D XDesktop",   "X already set up, just do desktop configuration.",
1133         NULL, dmenuSubmenu, NULL, &MenuXDesktops },
1134       { NULL } },
1135 };
1136
1137 DMenu MenuXDesktops = {
1138     DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
1139     "Please select the default X desktop to use.",
1140     "By default, X.Org comes with a fairly vanilla desktop which\n"
1141     "is based around the twm(1) window manager and does not offer\n"
1142     "much in the way of features.  It does have the advantage of\n"
1143     "being a standard part of X so you don't need to load anything\n"
1144     "extra in order to use it.  If, however, you have access to a\n"
1145     "reasonably full packages collection on your installation media,\n"
1146     "you can choose any one of the following desktops as alternatives.",
1147     NULL,
1148     NULL,
1149     { { "X Exit", "Exit this menu (returning to previous)",
1150         NULL, dmenuExit },
1151       { "2 KDE",                "The K Desktop Environment (Lite Edition)",
1152         NULL, dmenuSetVariable, NULL, VAR_DESKSTYLE "=kde" },
1153       { "3 GNOME 2",            "The GNOME 2 Desktop Environment (Lite Edition)",
1154         NULL, dmenuSetVariable, NULL, VAR_DESKSTYLE "=gnome2" },
1155       { "4 Afterstep",  "The Afterstep window manager",
1156         NULL, dmenuSetVariable, NULL, VAR_DESKSTYLE "=afterstep" },
1157       { "5 Windowmaker",        "The Windowmaker window manager",
1158         NULL, dmenuSetVariable, NULL, VAR_DESKSTYLE "=windowmaker" },
1159       { "6 fvwm",               "The fvwm window manager",
1160         NULL, dmenuSetVariable, NULL, VAR_DESKSTYLE "=fvwm2" },
1161       { NULL } },
1162 };
1163
1164 DMenu MenuXOrgSelect = {
1165     DMENU_NORMAL_TYPE,
1166     "X.Org Distribution",
1167     "Please select the components you need from the X.Org\n"
1168     "distribution sets.",
1169     NULL,
1170     NULL,
1171     { { "X Exit", "Exit this menu (returning to previous)", NULL, dmenuExit },
1172       { "Basic",        "Basic component menu (required)",      NULL, dmenuSubmenu, NULL, &MenuXOrgSelectCore },
1173       { "Server",       "X server menu",                        NULL, dmenuSubmenu, NULL, &MenuXOrgSelectServer },
1174       { "Fonts",        "Font set menu",                        NULL, dmenuSubmenu, NULL, &MenuXOrgSelectFonts },
1175       { NULL } },
1176 };
1177
1178 DMenu MenuXOrgSelectCore = {
1179     DMENU_CHECKLIST_TYPE | DMENU_SELECTION_RETURNS,
1180     "X.Org base distribution types",
1181     "Please check off the basic X.Org components you wish to install.\n"
1182     "Bin, lib, and set are recommended for a minimum installaion.",
1183     NULL,
1184     NULL,
1185     { { "X Exit",       "Exit this menu (returning to previous)",
1186         checkTrue, dmenuExit, NULL, NULL, '<', '<', '<' },
1187       { "All",          "Select all below",
1188         NULL,           setX11Misc, NULL, NULL, ' ', ' ', ' ' },
1189       { "Reset",        "Reset all below",
1190         NULL,           clearX11Misc, NULL, NULL, ' ', ' ', ' ' },
1191       { " lib",         "Shared libraries and data files needed at runtime",
1192         dmenuFlagCheck, dmenuSetFlag, NULL, &XOrgDists, '[', 'X', ']', DIST_XORG_LIB },
1193       { " bin",         "Client applications",
1194         dmenuFlagCheck, dmenuSetFlag, NULL, &XOrgDists, '[', 'X', ']', DIST_XORG_CLIENTS },
1195       { " man",         "Manual pages",
1196         dmenuFlagCheck, dmenuSetFlag, NULL, &XOrgDists, '[', 'X', ']', DIST_XORG_MAN },
1197       { " doc",         "Documentation",
1198         dmenuFlagCheck, dmenuSetFlag, NULL, &XOrgDists, '[', 'X', ']', DIST_XORG_DOC },
1199       { " prog",        "Programming tools",
1200         dmenuFlagCheck, dmenuSetFlag, NULL, &XOrgDists, '[', 'X', ']', DIST_XORG_IMAKE },
1201       { NULL } },
1202 };
1203
1204 DMenu MenuXOrgSelectFonts = {
1205     DMENU_CHECKLIST_TYPE | DMENU_SELECTION_RETURNS,
1206     "X.Org Font distribution selection.",
1207     "Please check off the individual font distributions you wish to\n\
1208 install.  At the minimum, you should install the standard\n\
1209 75 DPI and misc fonts if you're also installing an X server\n\
1210 (these are selected by default).  The TrueType set is also \n\
1211 highly recommended.  The font server is unnecessary in most\n\
1212 configurations.",
1213     NULL,
1214     NULL,
1215     { { "X Exit",       "Exit this menu (returning to previous)",
1216         checkTrue, dmenuExit, NULL, NULL, '<', '<', '<' },
1217       { "All",          "All fonts",
1218         NULL,           setX11Fonts, NULL, NULL, ' ', ' ', ' ' },
1219       { "Reset",        "Reset font selections",
1220         NULL,           clearX11Fonts, NULL, NULL, ' ', ' ', ' ' },
1221       { " fmsc",        "Standard miscellaneous fonts",
1222         dmenuFlagCheck, dmenuSetFlag, NULL, &XOrgDists, '[', 'X', ']', DIST_XORG_FONTS_MISC },
1223       { " f75",         "75 DPI fonts",
1224         dmenuFlagCheck, dmenuSetFlag, NULL, &XOrgDists, '[', 'X', ']', DIST_XORG_FONTS_75 },
1225       { " f100",        "100 DPI fonts",
1226         dmenuFlagCheck, dmenuSetFlag, NULL, &XOrgDists, '[', 'X', ']', DIST_XORG_FONTS_100 },
1227       { " fcyr",        "Cyrillic Fonts",
1228         dmenuFlagCheck, dmenuSetFlag, NULL, &XOrgDists, '[', 'X', ']', DIST_XORG_FONTS_CYR },
1229       { " ft1",         "Type1 scalable fonts",
1230         dmenuFlagCheck, dmenuSetFlag, NULL, &XOrgDists, '[', 'X', ']', DIST_XORG_FONTS_T1 },
1231       { " ftt",         "TrueType scalable fonts",
1232         dmenuFlagCheck, dmenuSetFlag, NULL, &XOrgDists, '[', 'X', ']', DIST_XORG_FONTS_TT },
1233       { " fs",          "Font server",
1234         dmenuFlagCheck, dmenuSetFlag, NULL, &XOrgDists, '[', 'X', ']', DIST_XORG_FONTSERVER },
1235       { NULL } },
1236 };
1237
1238 DMenu MenuXOrgSelectServer = {
1239     DMENU_CHECKLIST_TYPE | DMENU_SELECTION_RETURNS,
1240     "X.Org X Server selection.",
1241     "Please check off the types of X servers you wish to install.\n",
1242     NULL,
1243     NULL,
1244     { { "X Exit",       "Exit this menu (returning to previous)",
1245         checkTrue, dmenuExit, NULL, NULL, '<', '<', '<' },
1246       { "All",          "Select all of the above",
1247         NULL,           setX11Servers, NULL, NULL, ' ', ' ', ' ' },
1248       { "Reset",        "Reset all of the above",
1249         NULL,           clearX11Servers, NULL, NULL, ' ', ' ', ' ' },
1250       { " srv",         "Standard Graphics Framebuffer",
1251         dmenuFlagCheck, dmenuSetFlag, NULL, &XOrgDists, '[', 'X', ']', DIST_XORG_SERVER },
1252       { " nest",        "Nested X Server",
1253         dmenuFlagCheck, dmenuSetFlag, NULL, &XOrgDists, '[', 'X', ']', DIST_XORG_NESTSERVER },
1254       { " prt",         "X Print Server",
1255         dmenuFlagCheck, dmenuSetFlag, NULL, &XOrgDists, '[', 'X', ']', DIST_XORG_PRINTSERVER },
1256       { " vfb",         "Virtual Framebuffer",
1257         dmenuFlagCheck, dmenuSetFlag, NULL, &XOrgDists, '[', 'X', ']', DIST_XORG_VFBSERVER },
1258       { NULL } },
1259 };
1260
1261 DMenu MenuDiskDevices = {
1262     DMENU_CHECKLIST_TYPE | DMENU_SELECTION_RETURNS,
1263     "Select Drive(s)",
1264     "Please select the drive, or drives, on which you wish to perform\n"
1265     "this operation.  If you are attempting to install a boot partition\n"
1266     "on a drive other than the first one or have multiple operating\n"
1267     "systems on your machine, you will have the option to install a boot\n"
1268     "manager later.  To select a drive, use the arrow keys to move to it\n"
1269     "and press [SPACE] or [ENTER].  To de-select it, press it again.\n\n"
1270     "Use [TAB] to get to the buttons and leave this menu.",
1271     "Press F1 for important information regarding disk geometry!",
1272     "drives",
1273     { { NULL } },
1274 };
1275
1276 DMenu MenuHTMLDoc = {
1277     DMENU_NORMAL_TYPE,
1278     "Select HTML Documentation pointer",
1279     "Please select the body of documentation you're interested in, the main\n"
1280     "ones right now being the FAQ and the Handbook.  You can also choose \"other\"\n"
1281     "to enter an arbitrary URL for browsing.",
1282     "Press F1 for more help on what you see here.",
1283     "html",
1284     { { "X Exit",       "Exit this menu (returning to previous)", NULL, dmenuExit },
1285       { "2 Handbook",   "The FreeBSD Handbook.",                                NULL, docShowDocument },
1286       { "3 FAQ",        "The Frequently Asked Questions guide.",                NULL, docShowDocument },
1287       { "4 Home",       "The Home Pages for the FreeBSD Project (requires net)", NULL, docShowDocument },
1288       { "5 Other",      "Enter a URL.",                                         NULL, docShowDocument },
1289       { NULL } },
1290 };
1291
1292 /* The main installation menu */
1293 DMenu MenuInstallCustom = {
1294     DMENU_NORMAL_TYPE,
1295     "Choose Custom Installation Options",
1296     "This is the custom installation menu. You may use this menu to specify\n"
1297     "details on the type of distribution you wish to have, where you wish\n"
1298     "to install it from and how you wish to allocate disk storage to FreeBSD.",
1299     "Press F1 to read the installation guide",
1300     "INSTALL",
1301     { { "X Exit",               "Exit this menu (returning to previous)", NULL, dmenuExit },
1302       { "2 Options",            "View/Set various installation options", NULL, optionsEditor },
1303 #ifndef WITH_SLICES
1304       { "3 Label",              "Label disk partitions",                NULL, diskLabelEditor },
1305       { "4 Distributions",      "Select distribution(s) to extract",    NULL, dmenuSubmenu, NULL, &MenuDistributions },
1306       { "5 Media",              "Choose the installation media type",   NULL, dmenuSubmenu, NULL, &MenuMedia },
1307       { "6 Commit",             "Perform any pending Partition/Label/Extract actions", NULL, installCustomCommit },
1308 #else
1309       { "3 Partition",          "Allocate disk space for FreeBSD",      NULL, diskPartitionEditor },
1310       { "4 Label",              "Label allocated disk partitions",      NULL, diskLabelEditor },
1311       { "5 Distributions",      "Select distribution(s) to extract",    NULL, dmenuSubmenu, NULL, &MenuDistributions },
1312       { "6 Media",              "Choose the installation media type",   NULL, dmenuSubmenu, NULL, &MenuMedia },
1313       { "7 Commit",             "Perform any pending Partition/Label/Extract actions", NULL, installCustomCommit },
1314 #endif
1315       { NULL } },
1316 };
1317
1318 #if defined(__i386__) || defined(__amd64__)
1319 #ifdef PC98
1320 /* IPL type menu */
1321 DMenu MenuIPLType = {
1322     DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
1323     "overwrite me",             /* will be disk specific label */
1324     "If you want a FreeBSD Boot Manager, select \"BootMgr\".  If you would\n"
1325     "prefer your Boot Manager to remain untouched then select \"None\".\n\n",
1326     "Press F1 to read about drive setup",
1327     "drives",
1328     { { "BootMgr",      "Install the FreeBSD Boot Manager",
1329         dmenuRadioCheck, dmenuSetValue, NULL, &BootMgr },
1330       { "None",         "Leave the IPL untouched",
1331         dmenuRadioCheck, dmenuSetValue, NULL, &BootMgr, '(', '*', ')', 1 },
1332       { NULL } },
1333 };
1334 #else
1335 /* MBR type menu */
1336 DMenu MenuMBRType = {
1337     DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
1338     "overwrite me",             /* will be disk specific label */
1339     "FreeBSD comes with a boot selector that allows you to easily\n"
1340     "select between FreeBSD and any other operating systems on your machine\n"
1341     "at boot time.  If you have more than one drive and want to boot\n"
1342     "from the second one, the boot selector will also make it possible\n"
1343     "to do so (limitations in the PC BIOS usually prevent this otherwise).\n"
1344     "If you do not want a boot selector, or wish to replace an existing\n"
1345     "one, select \"standard\".  If you would prefer your Master Boot\n"
1346     "Record to remain untouched then select \"None\".\n\n"
1347     "  NOTE:  PC-DOS users will almost certainly require \"None\"!",
1348     "Press F1 to read about drive setup",
1349     "drives",
1350     { { "BootMgr",      "Install the FreeBSD Boot Manager",
1351         dmenuRadioCheck, dmenuSetValue, NULL, &BootMgr },
1352       { "Standard",     "Install a standard MBR (no boot manager)",
1353         dmenuRadioCheck, dmenuSetValue, NULL, &BootMgr, '(', '*', ')', 1 },
1354       { "None",         "Leave the Master Boot Record untouched",
1355         dmenuRadioCheck, dmenuSetValue, NULL, &BootMgr, '(', '*', ')', 2 },
1356       { NULL } },
1357 };
1358 #endif /* PC98 */
1359 #endif /* __i386__ */
1360
1361 /* Final configuration menu */
1362 DMenu MenuConfigure = {
1363     DMENU_NORMAL_TYPE,
1364     "FreeBSD Configuration Menu",       /* title */
1365     "If you've already installed FreeBSD, you may use this menu to customize\n"
1366     "it somewhat to suit your particular configuration.  Most importantly,\n"
1367     "you can use the Packages utility to load extra \"3rd party\"\n"
1368     "software not provided in the base distributions.",
1369     "Press F1 for more information on these options",
1370     "configure",
1371     { { "X Exit",               "Exit this menu (returning to previous)",
1372         NULL,   dmenuExit },
1373       { " Distributions", "Install additional distribution sets",
1374         NULL, distExtractAll },
1375       { " Packages",    "Install pre-packaged software for FreeBSD",
1376         NULL, configPackages },
1377       { " Root Password", "Set the system manager's password",
1378         NULL,   dmenuSystemCommand, NULL, "passwd root" },
1379 #ifdef WITH_SLICES
1380       { " Fdisk",       "The disk Slice (PC-style partition) Editor",
1381         NULL, diskPartitionEditor },
1382 #endif
1383       { " Label",       "The disk Label editor",
1384         NULL, diskLabelEditor },
1385       { " User Management",     "Add user and group information",
1386         NULL, dmenuSubmenu, NULL, &MenuUsermgmt },
1387 #ifdef WITH_SYSCONS
1388       { " Console",     "Customize system console behavior",
1389         NULL,   dmenuSubmenu, NULL, &MenuSyscons },
1390 #endif
1391       { " Time Zone",   "Set which time zone you're in",
1392         NULL,   dmenuSystemCommand, NULL, "tzsetup" },
1393       { " Media",       "Change the installation media type",
1394         NULL,   dmenuSubmenu, NULL, &MenuMedia },
1395 #ifdef WITH_MICE
1396       { " Mouse",       "Configure your mouse",
1397         NULL,   dmenuSubmenu, NULL, &MenuMouse },
1398 #endif
1399       { " Networking",  "Configure additional network services",
1400         NULL,   dmenuSubmenu, NULL, &MenuNetworking },
1401       { " Security",    "Configure system security options",
1402         NULL,   dmenuSubmenu, NULL, &MenuSecurity },
1403       { " Startup",     "Configure system startup options",
1404         NULL,   dmenuSubmenu, NULL, &MenuStartup },
1405       { " TTYs",        "Configure system ttys.",
1406         NULL,   configEtcTtys, NULL, "ttys" },
1407       { " Options",     "View/Set various installation options",
1408         NULL, optionsEditor },
1409       { " HTML Docs",   "Go to the HTML documentation menu (post-install)",
1410         NULL, docBrowser },
1411       { " Load KLD",    "Load a KLD from a floppy",
1412         NULL, kldBrowser },
1413       { NULL } },
1414 };
1415
1416 DMenu MenuStartup = {
1417     DMENU_CHECKLIST_TYPE | DMENU_SELECTION_RETURNS,
1418     "Startup Services Menu",
1419     "This menu allows you to configure various aspects of your system's\n"
1420     "startup configuration.  Use [SPACE] or [ENTER] to select items, and\n"
1421     "[TAB] to move to the buttons.  Select Exit to leave this menu.",
1422     NULL,
1423     NULL,
1424     { { "X Exit",       "Exit this menu (returning to previous)",
1425         checkTrue, dmenuExit, NULL, NULL, '<', '<', '<' },
1426 #ifdef __i386__
1427       { " APM",         "Auto-power management services (typically laptops)",
1428         dmenuVarCheck,  dmenuToggleVariable, NULL, "apm_enable=YES" },
1429 #endif
1430 #ifdef PCCARD_ARCH
1431       { " pccard",      "Enable PCCARD (AKA PCMCIA) services (also laptops)",
1432         dmenuVarCheck, dmenuToggleVariable, NULL, "pccard_enable=YES" },
1433       { " pccard mem",  "Set PCCARD memory address (if enabled)",
1434         dmenuVarCheck, dmenuISetVariable, NULL, "pccard_mem" },
1435       { " pccard ifconfig",     "List of PCCARD ethernet devices to configure",
1436         dmenuVarCheck, dmenuISetVariable, NULL, "pccard_ifconfig" },
1437 #endif
1438       { " ",            " -- ", NULL,   NULL, NULL, NULL, ' ', ' ', ' ' },
1439       { " Startup dirs",        "Set the list of dirs to look for startup scripts",
1440         dmenuVarCheck, dmenuISetVariable, NULL, "local_startup" },
1441       { " named",       "Run a local name server on this host",
1442         dmenuVarCheck, dmenuToggleVariable, NULL, "named_enable=YES" },
1443       { " named flags", "Set default flags to named (if enabled)",
1444         dmenuVarCheck, dmenuISetVariable, NULL, "named_flags" },
1445       { " NIS client",  "This host wishes to be an NIS client.",
1446         dmenuVarCheck, configRpcBind, NULL, "nis_client_enable=YES" },
1447       { " NIS domainname",      "Set NIS domainname (if enabled)",
1448         dmenuVarCheck, dmenuISetVariable, NULL, "nisdomainname" },
1449       { " NIS server",  "This host wishes to be an NIS server.",
1450         dmenuVarCheck, configRpcBind, NULL, "nis_server_enable=YES" },
1451       { " ",            " -- ", NULL,   NULL, NULL, NULL, ' ', ' ', ' ' },
1452       { " Accounting",  "This host wishes to run process accounting.",
1453         dmenuVarCheck, dmenuToggleVariable, NULL, "accounting_enable=YES" },
1454       { " lpd",         "This host has a printer and wants to run lpd.",
1455         dmenuVarCheck, dmenuToggleVariable, NULL, "lpd_enable=YES" },
1456 #ifdef WITH_LINUX
1457       { " Linux",       "This host wants to be able to run Linux binaries.",
1458         dmenuVarCheck, configLinux, NULL, VAR_LINUX_ENABLE "=YES" },
1459 #endif
1460 #ifdef __i386__
1461       { " SCO",         "This host wants to be able to run IBCS2 binaries.",
1462         dmenuVarCheck, dmenuToggleVariable, NULL, "ibcs2_enable=YES" },
1463       { " SVR4",        "This host wants to be able to run SVR4 binaries.",
1464         dmenuVarCheck, dmenuToggleVariable, NULL, "svr4_enable=YES" },
1465 #endif
1466 #ifdef __alpha__
1467       { " OSF/1",       "This host wants to be able to run DEC OSF/1 binaries.",
1468         dmenuVarCheck, configOSF1, NULL, VAR_OSF1_ENABLE "=YES" },
1469 #endif
1470       { " quotas",      "This host wishes to check quotas on startup.",
1471         dmenuVarCheck, dmenuToggleVariable, NULL, "check_quotas=YES" },
1472       { NULL } },
1473 };
1474
1475 DMenu MenuNetworking = {
1476     DMENU_CHECKLIST_TYPE | DMENU_SELECTION_RETURNS,
1477     "Network Services Menu",
1478     "You may have already configured one network device (and the other\n"
1479     "various hostname/gateway/name server parameters) in the process\n"
1480     "of installing FreeBSD.  This menu allows you to configure other\n"
1481     "aspects of your system's network configuration.",
1482     NULL,
1483     NULL,
1484     { { "X Exit",       "Exit this menu (returning to previous)",
1485         checkTrue, dmenuExit, NULL, NULL, '<', '<', '<' },
1486       { " Interfaces",  "Configure additional network interfaces",
1487         NULL, tcpMenuSelect },
1488       { " AMD",         "This machine wants to run the auto-mounter service",
1489         dmenuVarCheck,  configRpcBind, NULL, "amd_enable=YES" },
1490       { " AMD Flags",   "Set flags to AMD service (if enabled)",
1491         dmenuVarCheck,  dmenuISetVariable, NULL, "amd_flags" },
1492       { " Anon FTP",    "This machine wishes to allow anonymous FTP.",
1493         dmenuVarCheck,  configAnonFTP, NULL, "anon_ftp" },
1494       { " Gateway",     "This machine will route packets between interfaces",
1495         dmenuVarCheck,  dmenuToggleVariable, NULL, "gateway_enable=YES" },
1496       { " inetd",       "This machine wants to run the inet daemon",
1497         dmenuVarCheck,  configInetd, NULL, "inetd_enable=YES" },
1498       { " Mail",        "This machine wants to run a Mail Transfer Agent",
1499         NULL,           dmenuSubmenu, NULL, &MenuMTA },
1500       { " NFS client",  "This machine will be an NFS client",
1501         dmenuVarCheck,  dmenuToggleVariable, NULL, "nfs_client_enable=YES" },
1502       { " NFS server",  "This machine will be an NFS server",
1503         dmenuVarCheck,  configNFSServer, NULL, "nfs_server_enable=YES" },
1504       { " Ntpdate",     "Select a clock-synchronization server",
1505         dmenuVarCheck,  dmenuSubmenu, NULL, &MenuNTP, '[', 'X', ']',
1506         (uintptr_t)"ntpdate_enable=YES" },
1507       { " PCNFSD",      "Run authentication server for clients with PC-NFS.",
1508         dmenuVarCheck,  configPCNFSD, NULL, "pcnfsd" },
1509       { " rpcbind",     "RPC port mapping daemon (formerly portmapper)",
1510         dmenuVarCheck, dmenuToggleVariable, NULL, "rpcbind_enable=YES" },
1511       { " rpc.statd",   "NFS status monitoring daemon",
1512         dmenuVarCheck, configRpcBind, NULL, "rpc_statd_enable=YES" },
1513       { " rpc.lockd",   "NFS file locking daemon",
1514         dmenuVarCheck, configRpcBind, NULL, "rpc_lockd_enable=YES" },
1515       { " Routed",      "Select routing daemon (default: routed)",
1516         dmenuVarCheck,  configRouter, NULL, "router_enable=YES" },
1517       { " Rwhod",       "This machine wants to run the rwho daemon",
1518         dmenuVarCheck,  dmenuToggleVariable, NULL, "rwhod_enable=YES" },
1519       { " sshd",        "This machine wants to run the SSH daemon",
1520         dmenuVarCheck,  dmenuToggleVariable, NULL, "sshd_enable=YES" },
1521       { " TCP Extensions", "Allow RFC1323 and RFC1644 TCP extensions?",
1522         dmenuVarCheck,  dmenuToggleVariable, NULL, "tcp_extensions=YES" },
1523       { NULL } },
1524 };
1525
1526 DMenu MenuMTA = {
1527     DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
1528     "Mail Transfer Agent Selection",
1529     "You can choose which Mail Transfer Agent (MTA) you wish to install and run.\n"
1530     "Selecting Sendmail local disables sendmail's network socket for\n"
1531     "incoming mail, but still enables sendmail for local and outbound mail.\n"
1532     "The Postfix option will install the Postfix MTA from the ports\n"
1533     "collection.  The Exim option will install the Exim MTA from the ports\n"
1534     "collection.  To return to the previous menu, select Exit.",
1535     NULL,
1536     NULL,
1537     {
1538       { "Sendmail",           "Use sendmail",
1539         dmenuVarCheck, dmenuSetVariable, NULL, "sendmail_enable=YES" },
1540       { "Sendmail local",    "Use sendmail, but do not listen on the network",
1541         dmenuVarCheck, dmenuSetVariable, NULL, "sendmail_enable=NO" },
1542       { "Postfix",            "Use the Postfix MTA",
1543       NULL, configMTAPostfix, NULL, NULL },
1544       { "Exim",               "Use the Exim MTA",
1545       NULL, configMTAExim, NULL, NULL },
1546       { "None",               "Do not install an MTA",
1547         dmenuVarCheck, dmenuSetVariable, NULL, "sendmail_enable=NONE" },
1548       { "X Exit",             "Exit this menu (returning to previous)",
1549         checkTrue, dmenuExit, NULL, NULL, '<', '<', '<' },
1550       { NULL } },
1551 };
1552
1553 DMenu MenuNTP = {
1554     DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
1555     "NTPDATE Server Selection",
1556     "There are a number of time synchronization servers available\n"
1557     "for public use around the Internet.  Please select one reasonably\n"
1558     "close to you to have your system time synchronized accordingly.",
1559     "These are the primary open-access NTP servers",
1560     NULL,
1561     { { "None",                 "No NTP server",
1562         dmenuVarsCheck, dmenuSetVariables, NULL, 
1563         "ntpdate_enable=NO,ntpdate_flags=none" },
1564       { "Other",                "Select a site not on this list",
1565         dmenuVarsCheck, configNTP, NULL, NULL },
1566       { "Worldwide",            "pool.ntp.org",
1567         dmenuVarsCheck, dmenuSetVariables, NULL, 
1568         "ntpdate_enable=YES,ntpdate_flags=pool.ntp.org" },
1569       { "Asia",         "asia.pool.ntp.org",
1570         dmenuVarsCheck, dmenuSetVariables, NULL, 
1571         "ntpdate_enable=YES,ntpdate_flags=asia.pool.ntp.org" },
1572       { "Europe",               "europe.pool.ntp.org",
1573         dmenuVarsCheck, dmenuSetVariables, NULL, 
1574         "ntpdate_enable=YES,ntpdate_flags=europe.pool.ntp.org" },
1575       { "Oceania",              "oceania.pool.ntp.org",
1576         dmenuVarsCheck, dmenuSetVariables, NULL, 
1577         "ntpdate_enable=YES,ntpdate_flags=oceania.pool.ntp.org" },
1578       { "North America",        "north-america.pool.ntp.org",
1579         dmenuVarsCheck, dmenuSetVariables, NULL, 
1580         "ntpdate_enable=YES,ntpdate_flags=north-america.pool.ntp.org" },
1581       { "Argentina",            "tick.nap.com.ar",
1582         dmenuVarsCheck, dmenuSetVariables, NULL,
1583         "ntpdate_enable=YES,ntpdate_flags=tick.nap.com.ar" },
1584       { "Argentina #2",         "time.sinectis.com.ar",
1585         dmenuVarsCheck, dmenuSetVariables, NULL,
1586         "ntpdate_enable=YES,ntpdate_flags=time.sinectis.com.ar" },
1587       { "Argentina #3",         "tock.nap.com.ar",
1588         dmenuVarsCheck, dmenuSetVariables, NULL,
1589         "ntpdate_enable=YES,ntpdate_flags=tock.nap.com.ar" },
1590       { "Australia",            "au.pool.ntp.org",
1591         dmenuVarsCheck, dmenuSetVariables, NULL, 
1592         "ntpdate_enable=YES,ntpdate_flags=au.pool.ntp.org" },
1593       { "Australia #2",         "augean.eleceng.adelaide.edu.au",
1594         dmenuVarsCheck, dmenuSetVariables, NULL, 
1595         "ntpdate_enable=YES,ntpdate_flags=augean.eleceng.adelaide.edu.au" },
1596       { "Australia #3",         "ntp.adelaide.edu.au",
1597         dmenuVarsCheck, dmenuSetVariables, NULL, 
1598         "ntpdate_enable=YES,ntpdate_flags=ntp.adelaide.edu.au" },
1599       { "Australia #4",         "ntp.saard.net",
1600         dmenuVarsCheck, dmenuSetVariables, NULL, 
1601         "ntpdate_enable=YES,ntpdate_flags=ntp.saard.net" },
1602       { "Australia #5",         "time.deakin.edu.au",
1603         dmenuVarsCheck, dmenuSetVariables, NULL, 
1604         "ntpdate_enable=YES,ntpdate_flags=time.deakin.edu.au" },
1605       { "Belgium",              "ntp1.belbone.be",
1606         dmenuVarsCheck, dmenuSetVariables, NULL,
1607         "ntpdate_enable=YES,ntpdate_flags=ntp1.belbone.be" },
1608       { "Belgium #2",           "ntp2.belbone.be",
1609         dmenuVarsCheck, dmenuSetVariables, NULL,
1610         "ntpdate_enable=YES,ntpdate_flags=ntp2.belbone.be" },
1611       { "Brazil",               "ntp.cais.rnp.br",
1612         dmenuVarsCheck, dmenuSetVariables, NULL,
1613         "ntpdate_enable=YES,ntpdate_flags=ntp.cais.rnp.br" },
1614       { "Brazil #2",            "ntp.pop-df.rnp.br",
1615         dmenuVarsCheck, dmenuSetVariables, NULL,
1616         "ntpdate_enable=YES,ntpdate_flags=ntp.pop-df.rnp.br" },
1617       { "Brazil #3",            "ntp.ufes.br",
1618         dmenuVarsCheck, dmenuSetVariables, NULL,
1619         "ntpdate_enable=YES,ntpdate_flags=ntp.ufes.br" },
1620       { "Brazil #4",            "ntp1.pucpr.br",
1621         dmenuVarsCheck, dmenuSetVariables, NULL,
1622         "ntpdate_enable=YES,ntpdate_flags=ntp1.pucpr.br" },
1623       { "Canada",               "ca.pool.ntp.org",
1624         dmenuVarsCheck, dmenuSetVariables, NULL, 
1625         "ntpdate_enable=YES,ntpdate_flags=ca.pool.ntp.org" },
1626       { "Canada #2",            "ntp.cpsc.ucalgary.ca",
1627         dmenuVarsCheck, dmenuSetVariables, NULL, 
1628         "ntpdate_enable=YES,ntpdate_flags=ntp.cpsc.ucalgary.ca" },
1629       { "Canada #3",            "ntp1.cmc.ec.gc.ca",
1630         dmenuVarsCheck, dmenuSetVariables, NULL, 
1631         "ntpdate_enable=YES,ntpdate_flags=ntp1.cmc.ec.gc.ca" },
1632       { "Canada #4",            "ntp2.cmc.ec.gc.ca",
1633         dmenuVarsCheck, dmenuSetVariables, NULL, 
1634         "ntpdate_enable=YES,ntpdate_flags=ntp2.cmc.ec.gc.ca" },
1635       { "Canada #5",            "tick.utoronto.ca",
1636         dmenuVarsCheck, dmenuSetVariables, NULL, 
1637         "ntpdate_enable=YES,ntpdate_flags=tick.utoronto.ca" },
1638       { "Canada #6",            "time.chu.nrc.ca",
1639         dmenuVarsCheck, dmenuSetVariables, NULL, 
1640         "ntpdate_enable=YES,ntpdate_flags=time.chu.nrc.ca" },
1641       { "Canada #7",            "time.nrc.ca",
1642         dmenuVarsCheck, dmenuSetVariables, NULL, 
1643         "ntpdate_enable=YES,ntpdate_flags=time.nrc.ca" },
1644       { "Canada #8",            "timelord.uregina.ca",
1645         dmenuVarsCheck, dmenuSetVariables, NULL, 
1646         "ntpdate_enable=YES,ntpdate_flags=timelord.uregina.ca" },
1647       { "Canada #9",            "tock.utoronto.ca",
1648         dmenuVarsCheck, dmenuSetVariables, NULL, 
1649         "ntpdate_enable=YES,ntpdate_flags=tock.utoronto.ca" },
1650       { "Czech",                "ntp.karpo.cz",
1651         dmenuVarsCheck, dmenuSetVariables, NULL,
1652         "ntpdate_enable=YES,ntpdate_flags=ntp.karpo.cz" },
1653       { "Czech #2",             "ntp.cgi.cz",
1654         dmenuVarsCheck, dmenuSetVariables, NULL,
1655         "ntpdate_enable=YES,ntpdate_flags=ntp.cgi.cz" },
1656       { "Denmark",              "clock.netcetera.dk",
1657         dmenuVarsCheck, dmenuSetVariables, NULL,
1658         "ntpdate_enable=YES,ntpdate_flags=clock.netcetera.dk" },
1659       { "Denmark",              "clock2.netcetera.dk",
1660         dmenuVarsCheck, dmenuSetVariables, NULL,
1661         "ntpdate_enable=YES,ntpdate_flags=clock2.netcetera.dk" },
1662       { "Spain",                "slug.ctv.es",
1663         dmenuVarsCheck, dmenuSetVariables, NULL,
1664         "ntpdate_enable=YES,ntpdate_flags=slug.ctv.es" },
1665       { "Finland",              "tick.keso.fi",
1666         dmenuVarsCheck, dmenuSetVariables, NULL,
1667         "ntpdate_enable=YES,ntpdate_flags=tick.keso.fi" },
1668       { "Finland #2",           "tock.keso.fi",
1669         dmenuVarsCheck, dmenuSetVariables, NULL,
1670         "ntpdate_enable=YES,ntpdate_flags=tock.keso.fi" },
1671       { "France",               "ntp.obspm.fr",
1672         dmenuVarsCheck, dmenuSetVariables, NULL, 
1673         "ntpdate_enable=YES,ntpdate_flags=ntp.obspm.fr" },
1674       { "France #2",            "ntp.univ-lyon1.fr",
1675         dmenuVarsCheck, dmenuSetVariables, NULL,
1676         "ntpdate_enable=YES,ntpdate_flags=ntp.univ-lyon1.fr" },
1677       { "France #3",            "ntp.via.ecp.fr",
1678         dmenuVarsCheck, dmenuSetVariables, NULL,
1679         "ntpdate_enable=YES,ntpdate_flags=ntp.via.ecp.fr" },
1680       { "Croatia",              "zg1.ntp.carnet.hr",
1681         dmenuVarsCheck, dmenuSetVariables, NULL,
1682         "ntpdate_enable=YES,ntpdate_flags=zg1.ntp.carnet.hr" },
1683       { "Croatia #2",           "zg2.ntp.carnet.hr",
1684         dmenuVarsCheck, dmenuSetVariables, NULL,
1685         "ntpdate_enable=YES,ntpdate_flags=zg2.ntp.carnet.hr" },
1686       { "Croatia #3",           "st.ntp.carnet.hr",
1687         dmenuVarsCheck, dmenuSetVariables, NULL,
1688         "ntpdate_enable=YES,ntpdate_flags=st.ntp.carnet.hr" },
1689       { "Croatia #4",           "ri.ntp.carnet.hr",
1690         dmenuVarsCheck, dmenuSetVariables, NULL,
1691         "ntpdate_enable=YES,ntpdate_flags=ri.ntp.carnet.hr" },
1692       { "Croatia #5",           "os.ntp.carnet.hr",
1693         dmenuVarsCheck, dmenuSetVariables, NULL,
1694         "ntpdate_enable=YES,ntpdate_flags=os.ntp.carnet.hr" },
1695       { "Hungary",              "time.kfki.hu",
1696         dmenuVarsCheck, dmenuSetVariables, NULL,
1697         "ntpdate_enable=YES,ntpdate_flags=time.kfki.hu" },
1698       { "Indonesia",            "ntp.kim.lipi.go.id",
1699         dmenuVarsCheck, dmenuSetVariables, NULL,
1700         "ntpdate_enable=YES,ntpdate_flags=ntp.kim.lipi.go.id" },
1701       { "Ireland",              "ntp.maths.tcd.ie",
1702         dmenuVarsCheck, dmenuSetVariables, NULL,
1703         "ntpdate_enable=YES,ntpdate_flags=ntp.maths.tcd.ie" },
1704       { "Italy",                "it.pool.ntp.org",
1705         dmenuVarsCheck, dmenuSetVariables, NULL,
1706         "ntpdate_enable=YES,ntpdate_flags=it.pool.ntp.org" },
1707       { "Japan",                "ntp.jst.mfeed.ad.jp",
1708         dmenuVarsCheck, dmenuSetVariables, NULL,
1709         "ntpdate_enable=YES,ntpdate_flags=ntp.jst.mfeed.ad.jp" },
1710       { "Japan IPv6",           "ntp1.v6.mfeed.ad.jp",
1711         dmenuVarsCheck, dmenuSetVariables, NULL,
1712         "ntpdate_enable=YES,ntpdate_flags=ntp1.v6.mfeed.ad.jp" },
1713       { "Korea",                "time.nuri.net",
1714         dmenuVarsCheck, dmenuSetVariables, NULL, 
1715         "ntpdate_enable=YES,ntpdate_flags=time.nuri.net" },
1716       { "Mexico",               "mx.pool.ntp.org",
1717         dmenuVarsCheck, dmenuSetVariables, NULL,
1718         "ntpdate_enable=YES,ntpdate_flags=mx.pool.ntp.org" },
1719       { "Netherlands",          "ntp0.nl.net",
1720         dmenuVarsCheck, dmenuSetVariables, NULL,
1721         "ntpdate_enable=YES,ntpdate_flags=ntp0.nl.net" },
1722       { "Netherlands #2",       "ntp1.nl.net",
1723         dmenuVarsCheck, dmenuSetVariables, NULL,
1724         "ntpdate_enable=YES,ntpdate_flags=ntp1.nl.net" },
1725       { "Netherlands #3",       "ntp2.nl.net",
1726         dmenuVarsCheck, dmenuSetVariables, NULL,
1727         "ntpdate_enable=YES,ntpdate_flags=ntp2.nl.net" },
1728       { "Norway",               "fartein.ifi.uio.no",
1729         dmenuVarsCheck, dmenuSetVariables, NULL, 
1730         "ntpdate_enable=YES,ntpdate_flags=fartein.ifi.uio.no" },
1731       { "Norway #2",            "time.alcanet.no",
1732         dmenuVarsCheck, dmenuSetVariables, NULL, 
1733         "ntpdate_enable=YES,ntpdate_flags=time.alcanet.no" },
1734       { "New Zealand",          "ntp.massey.ac.nz",
1735         dmenuVarsCheck, dmenuSetVariables, NULL,
1736         "ntpdate_enable=YES,ntpdate_flags=ntp.massey.ac.nz" },
1737       { "New Zealand #2",       "ntp.public.otago.ac.nz",
1738         dmenuVarsCheck, dmenuSetVariables, NULL,
1739         "ntpdate_enable=YES,ntpdate_flags=ntp.public.otago.ac.nz" },
1740       { "New Zealand #3",       "tk1.ihug.co.nz",
1741         dmenuVarsCheck, dmenuSetVariables, NULL,
1742         "ntpdate_enable=YES,ntpdate_flags=tk1.ihug.co.nz" },
1743       { "New Zealand #4",       "ntp.waikato.ac.nz",
1744         dmenuVarsCheck, dmenuSetVariables, NULL,
1745         "ntpdate_enable=YES,ntpdate_flags=ntp.waikato.ac.nz" },
1746       { "Poland",               "info.cyf-kr.edu.pl",
1747         dmenuVarsCheck, dmenuSetVariables, NULL,
1748         "ntpdate_enable=YES,ntpdate_flags=info.cyf-kr.edu.pl" },
1749       { "Romania",              "ticks.roedu.net",
1750         dmenuVarsCheck, dmenuSetVariables, NULL,
1751         "ntpdate_enable=YES,ntpdate_flags=ticks.roedu.net" },
1752       { "Russia",               "ru.pool.ntp.org",
1753         dmenuVarsCheck, dmenuSetVariables, NULL,
1754         "ntpdate_enable=YES,ntpdate_flags=ru.pool.ntp.org" },
1755       { "Russia #2",            "ntp.psn.ru",
1756         dmenuVarsCheck, dmenuSetVariables, NULL,
1757         "ntpdate_enable=YES,ntpdate_flags=ntp.psn.ru" },
1758       { "Sweden",               "se.pool.ntp.org",
1759         dmenuVarsCheck, dmenuSetVariables, NULL, 
1760         "ntpdate_enable=YES,ntpdate_flags=se.pool.ntp.org" },
1761       { "Sweden #2",            "ntp.lth.se",
1762         dmenuVarsCheck, dmenuSetVariables, NULL, 
1763         "ntpdate_enable=YES,ntpdate_flags=ntp.lth.se" },
1764       { "Sweden #3",            "ntp1.sp.se",
1765         dmenuVarsCheck, dmenuSetVariables, NULL, 
1766         "ntpdate_enable=YES,ntpdate_flags=ntp1.sp.se" },
1767       { "Sweden #4",            "ntp2.sp.se",
1768         dmenuVarsCheck, dmenuSetVariables, NULL, 
1769         "ntpdate_enable=YES,ntpdate_flags=ntp2.sp.se" },
1770       { "Sweden #5",            "ntp.kth.se",
1771         dmenuVarsCheck, dmenuSetVariables, NULL, 
1772         "ntpdate_enable=YES,ntpdate_flags=ntp.kth.se" },
1773       { "Singapore",            "sg.pool.ntp.org",
1774         dmenuVarsCheck, dmenuSetVariables, NULL,
1775         "ntpdate_enable=YES,ntpdate_flags=sg.pool.ntp.org" },
1776       { "Slovenia",             "si.pool.ntp.org",
1777         dmenuVarsCheck, dmenuSetVariables, NULL,
1778         "ntpdate_enable=YES,ntpdate_flags=si.pool.ntp.org" },
1779       { "Slovenia #2",          "sizif.mf.uni-lj.si",
1780         dmenuVarsCheck, dmenuSetVariables, NULL,
1781         "ntpdate_enable=YES,ntpdate_flags=sizif.mf.uni-lj.si" },
1782       { "Slovenia #3",          "ntp1.arnes.si",
1783         dmenuVarsCheck, dmenuSetVariables, NULL,
1784         "ntpdate_enable=YES,ntpdate_flags=ntp1.arnes.si" },
1785       { "Slovenia #4",          "ntp2.arnes.si",
1786         dmenuVarsCheck, dmenuSetVariables, NULL,
1787         "ntpdate_enable=YES,ntpdate_flags=ntp2.arnes.si" },
1788       { "Slovenia #5",          "time.ijs.si",
1789         dmenuVarsCheck, dmenuSetVariables, NULL,
1790         "ntpdate_enable=YES,ntpdate_flags=time.ijs.si" },
1791       { "Scotland",             "ntp.cs.strath.ac.uk",
1792         dmenuVarsCheck, dmenuSetVariables, NULL,
1793         "ntpdate_enable=YES,ntpdate_flags=ntp.cs.strath.ac.uk" },
1794       { "Taiwan",              "time.stdtime.gov.tw",
1795         dmenuVarsCheck, dmenuSetVariables, NULL,
1796         "ntpdate_enable=YES,ntpdate_flags=time.stdtime.gov.tw" },
1797       { "Taiwan #2",           "clock.stdtime.gov.tw",
1798         dmenuVarsCheck, dmenuSetVariables, NULL,
1799         "ntpdate_enable=YES,ntpdate_flags=clock.stdtime.gov.tw" },
1800       { "Taiwan #3",           "tick.stdtime.gov.tw",
1801         dmenuVarsCheck, dmenuSetVariables, NULL,
1802         "ntpdate_enable=YES,ntpdate_flags=tick.stdtime.gov.tw" },
1803       { "Taiwan #4",           "tock.stdtime.gov.tw",
1804         dmenuVarsCheck, dmenuSetVariables, NULL,
1805         "ntpdate_enable=YES,ntpdate_flags=tock.stdtime.gov.tw" },
1806       { "Taiwan #5",           "watch.stdtime.gov.tw",
1807         dmenuVarsCheck, dmenuSetVariables, NULL,
1808         "ntpdate_enable=YES,ntpdate_flags=watch.stdtime.gov.tw" },
1809       { "United Kingdom",       "uk.pool.ntp.org",
1810         dmenuVarsCheck, dmenuSetVariables, NULL,
1811         "ntpdate_enable=YES,ntpdate_flags=uk.pool.ntp.org" },
1812       { "United Kingdom #2",    "ntp.exnet.com",
1813         dmenuVarsCheck, dmenuSetVariables, NULL,
1814         "ntpdate_enable=YES,ntpdate_flags=ntp.exnet.com" },
1815       { "United Kingdom #3",    "ntp0.uk.uu.net",
1816         dmenuVarsCheck, dmenuSetVariables, NULL,
1817         "ntpdate_enable=YES,ntpdate_flags=ntp0.uk.uu.net" },
1818       { "United Kingdom #4",    "ntp1.uk.uu.net",
1819         dmenuVarsCheck, dmenuSetVariables, NULL,
1820         "ntpdate_enable=YES,ntpdate_flags=ntp1.uk.uu.net" },
1821       { "United Kingdom #5",    "ntp2.uk.uu.net",
1822         dmenuVarsCheck, dmenuSetVariables, NULL,
1823         "ntpdate_enable=YES,ntpdate_flags=ntp2.uk.uu.net" },
1824       { "United Kingdom #6",    "ntp2a.mcc.ac.uk",
1825         dmenuVarsCheck, dmenuSetVariables, NULL,
1826         "ntpdate_enable=YES,ntpdate_flags=ntp2a.mcc.ac.uk" },
1827       { "United Kingdom #7",    "ntp2b.mcc.ac.uk",
1828         dmenuVarsCheck, dmenuSetVariables, NULL,
1829         "ntpdate_enable=YES,ntpdate_flags=ntp2b.mcc.ac.uk" },
1830       { "United Kingdom #8",    "ntp2c.mcc.ac.uk",
1831         dmenuVarsCheck, dmenuSetVariables, NULL,
1832         "ntpdate_enable=YES,ntpdate_flags=ntp2c.mcc.ac.uk" },
1833       { "United Kingdom #9",    "ntp2d.mcc.ac.uk",
1834         dmenuVarsCheck, dmenuSetVariables, NULL,
1835         "ntpdate_enable=YES,ntpdate_flags=ntp2d.mcc.ac.uk" },
1836       { "U.S.", "us.pool.ntp.org",
1837         dmenuVarsCheck, dmenuSetVariables, NULL, 
1838         "ntpdate_enable=YES,ntpdate_flags=us.pool.ntp.org" },
1839       { "U.S. AR",      "sushi.lyon.edu",
1840         dmenuVarsCheck, dmenuSetVariables, NULL, 
1841         "ntpdate_enable=YES,ntpdate_flags=sushi.compsci.lyon.edu" },
1842       { "U.S. AZ",      "ntp.drydog.com",
1843         dmenuVarsCheck, dmenuSetVariables, NULL, 
1844         "ntpdate_enable=YES,ntpdate_flags=ntp.drydog.com" },
1845       { "U.S. CA",      "ntp.ucsd.edu",
1846         dmenuVarsCheck, dmenuSetVariables, NULL, 
1847         "ntpdate_enable=YES,ntpdate_flags=ntp.ucsd.edu" },
1848       { "U.S. CA #2",   "ntp1.mainecoon.com",
1849         dmenuVarsCheck, dmenuSetVariables, NULL, 
1850         "ntpdate_enable=YES,ntpdate_flags=ntp1.mainecoon.com" },
1851       { "U.S. CA #3",   "ntp2.mainecoon.com",
1852         dmenuVarsCheck, dmenuSetVariables, NULL, 
1853         "ntpdate_enable=YES,ntpdate_flags=ntp2.mainecoon.com" },
1854       { "U.S. CA #4",   "reloj.kjsl.com",
1855         dmenuVarsCheck, dmenuSetVariables, NULL, 
1856         "ntpdate_enable=YES,ntpdate_flags=reloj.kjsl.com" },
1857       { "U.S. CA #5",   "time.five-ten-sg.com",
1858         dmenuVarsCheck, dmenuSetVariables, NULL, 
1859         "ntpdate_enable=YES,ntpdate_flags=time.five-ten-sg.com" },
1860       { "U.S. DE",      "louie.udel.edu",
1861         dmenuVarsCheck, dmenuSetVariables, NULL, 
1862         "ntpdate_enable=YES,ntpdate_flags=louie.udel.edu" },
1863       { "U.S. GA",              "ntp.shorty.com",
1864         dmenuVarsCheck, dmenuSetVariables, NULL, 
1865         "ntpdate_enable=YES,ntpdate_flags=ntp.shorty.com" },
1866       { "U.S. GA #2",           "rolex.usg.edu",
1867         dmenuVarsCheck, dmenuSetVariables, NULL, 
1868         "ntpdate_enable=YES,ntpdate_flags=rolex.usg.edu" },
1869       { "U.S. GA #3",           "timex.usg.edu",
1870         dmenuVarsCheck, dmenuSetVariables, NULL, 
1871         "ntpdate_enable=YES,ntpdate_flags=timex.usg.edu" },
1872       { "U.S. IL",      "ntp-0.cso.uiuc.edu",
1873         dmenuVarsCheck, dmenuSetVariables, NULL,
1874         "ntpdate_enable=YES,ntpdate_flags=ntp-0.cso.uiuc.edu" },
1875       { "U.S. IL #2",   "ntp-1.cso.uiuc.edu",
1876         dmenuVarsCheck, dmenuSetVariables, NULL,
1877         "ntpdate_enable=YES,ntpdate_flags=ntp-1.cso.uiuc.edu" },
1878       { "U.S. IL #3",   "ntp-1.mcs.anl.gov",
1879         dmenuVarsCheck, dmenuSetVariables, NULL,
1880         "ntpdate_enable=YES,ntpdate_flags=ntp-1.mcs.anl.gov" },
1881       { "U.S. IL #4",   "ntp-2.cso.uiuc.edu",
1882         dmenuVarsCheck, dmenuSetVariables, NULL,
1883         "ntpdate_enable=YES,ntpdate_flags=ntp-2.cso.uiuc.edu" },
1884       { "U.S. IL #5",   "ntp-2.mcs.anl.gov",
1885         dmenuVarsCheck, dmenuSetVariables, NULL,
1886         "ntpdate_enable=YES,ntpdate_flags=ntp-2.mcs.anl.gov" },
1887       { "U.S. IN",      "gilbreth.ecn.purdue.edu",
1888         dmenuVarsCheck, dmenuSetVariables, NULL,
1889         "ntpdate_enable=YES,ntpdate_flags=gilbreth.ecn.purdue.edu" },
1890       { "U.S. IN #2",   "harbor.ecn.purdue.edu",
1891         dmenuVarsCheck, dmenuSetVariables, NULL,
1892         "ntpdate_enable=YES,ntpdate_flags=harbor.ecn.purdue.edu" },
1893       { "U.S. IN #3",   "molecule.ecn.purdue.edu",
1894         dmenuVarsCheck, dmenuSetVariables, NULL,
1895         "ntpdate_enable=YES,ntpdate_flags=molecule.ecn.purdue.edu" },
1896       { "U.S. KS",      "ntp1.kansas.net",
1897         dmenuVarsCheck, dmenuSetVariables, NULL,
1898         "ntpdate_enable=YES,ntpdate_flags=ntp1.kansas.net" },
1899       { "U.S. KS #2",   "ntp2.kansas.net",
1900         dmenuVarsCheck, dmenuSetVariables, NULL,
1901         "ntpdate_enable=YES,ntpdate_flags=ntp2.kansas.net" },
1902       { "U.S. MA",      "ntp.ourconcord.net",
1903         dmenuVarsCheck, dmenuSetVariables, NULL,
1904         "ntpdate_enable=YES,ntpdate_flags=ntp.ourconcord.net" },
1905       { "U.S. MA #2",   "timeserver.cs.umb.edu",
1906         dmenuVarsCheck, dmenuSetVariables, NULL,
1907         "ntpdate_enable=YES,ntpdate_flags=timeserver.cs.umb.edu" },
1908       { "U.S. MN",      "ns.nts.umn.edu",
1909         dmenuVarsCheck, dmenuSetVariables, NULL,
1910         "ntpdate_enable=YES,ntpdate_flags=ns.nts.umn.edu" },
1911       { "U.S. MN #2",   "nss.nts.umn.edu",
1912         dmenuVarsCheck, dmenuSetVariables, NULL,
1913         "ntpdate_enable=YES,ntpdate_flags=nss.nts.umn.edu" },
1914       { "U.S. MO",      "time-ext.missouri.edu",
1915         dmenuVarsCheck, dmenuSetVariables, NULL,
1916         "ntpdate_enable=YES,ntpdate_flags=time-ext.missouri.edu" },
1917       { "U.S. MT",      "chronos1.umt.edu",
1918         dmenuVarsCheck, dmenuSetVariables, NULL,
1919         "ntpdate_enable=YES,ntpdate_flags=chronos1.umt.edu" },
1920       { "U.S. MT #2",   "chronos2.umt.edu",
1921         dmenuVarsCheck, dmenuSetVariables, NULL,
1922         "ntpdate_enable=YES,ntpdate_flags=chronos2.umt.edu" },
1923       { "U.S. MT #3",   "chronos3.umt.edu",
1924         dmenuVarsCheck, dmenuSetVariables, NULL,
1925         "ntpdate_enable=YES,ntpdate_flags=chronos3.umt.edu" },
1926       { "U.S. NC",      "clock1.unc.edu",
1927         dmenuVarsCheck, dmenuSetVariables, NULL,
1928         "ntpdate_enable=YES,ntpdate_flags=clock1.unc.edu" },
1929       { "U.S. NV",      "cuckoo.nevada.edu",
1930         dmenuVarsCheck, dmenuSetVariables, NULL,
1931         "ntpdate_enable=YES,ntpdate_flags=cuckoo.nevada.edu" },
1932       { "U.S. NV #2",   "tick.cs.unlv.edu",
1933         dmenuVarsCheck, dmenuSetVariables, NULL,
1934         "ntpdate_enable=YES,ntpdate_flags=tick.cs.unlv.edu" },
1935       { "U.S. NV #3",   "tock.cs.unlv.edu",
1936         dmenuVarsCheck, dmenuSetVariables, NULL,
1937         "ntpdate_enable=YES,ntpdate_flags=tock.cs.unlv.edu" },
1938       { "U.S. NY",      "ntp0.cornell.edu",
1939         dmenuVarsCheck, dmenuSetVariables, NULL,
1940         "ntpdate_enable=YES,ntpdate_flags=ntp0.cornell.edu" },
1941       { "U.S. NY #2",   "sundial.columbia.edu",
1942         dmenuVarsCheck, dmenuSetVariables, NULL,
1943         "ntpdate_enable=YES,ntpdate_flags=sundial.columbia.edu" },
1944       { "U.S. NY #3",   "timex.cs.columbia.edu",
1945         dmenuVarsCheck, dmenuSetVariables, NULL,
1946         "ntpdate_enable=YES,ntpdate_flags=timex.cs.columbia.edu" },
1947       { "U.S. PA",      "clock-1.cs.cmu.edu",
1948         dmenuVarsCheck, dmenuSetVariables, NULL,
1949         "ntpdate_enable=YES,ntpdate_flags=clock-1.cs.cmu.edu" },
1950       { "U.S. PA #2",   "clock-2.cs.cmu.edu",
1951         dmenuVarsCheck, dmenuSetVariables, NULL,
1952         "ntpdate_enable=YES,ntpdate_flags=clock-2.cs.cmu.edu" },
1953       { "U.S. PA #3",   "clock.psu.edu",
1954         dmenuVarsCheck, dmenuSetVariables, NULL,
1955         "ntpdate_enable=YES,ntpdate_flags=clock.psu.edu" },
1956       { "U.S. PA #4",   "fuzz.psc.edu",
1957         dmenuVarsCheck, dmenuSetVariables, NULL,
1958         "ntpdate_enable=YES,ntpdate_flags=fuzz.psc.edu" },
1959       { "U.S. PA #5",   "ntp-1.ece.cmu.edu",
1960         dmenuVarsCheck, dmenuSetVariables, NULL,
1961         "ntpdate_enable=YES,ntpdate_flags=ntp-1.ece.cmu.edu" },
1962       { "U.S. PA #6",   "ntp-2.ece.cmu.edu",
1963         dmenuVarsCheck, dmenuSetVariables, NULL,
1964         "ntpdate_enable=YES,ntpdate_flags=ntp-2.ece.cmu.edu" },
1965       { "U.S. TX",      "ntp.fnbhs.com",
1966         dmenuVarsCheck, dmenuSetVariables, NULL,
1967         "ntpdate_enable=YES,ntpdate_flags=ntp.fnbhs.com" },
1968       { "U.S. TX #2",   "ntp.tmc.edu",
1969         dmenuVarsCheck, dmenuSetVariables, NULL,
1970         "ntpdate_enable=YES,ntpdate_flags=ntp.tmc.edu" },
1971       { "U.S. TX #3",   "ntp5.tamu.edu",
1972         dmenuVarsCheck, dmenuSetVariables, NULL,
1973         "ntpdate_enable=YES,ntpdate_flags=ntp5.tamu.edu" },
1974       { "U.S. TX #4",   "tick.greyware.com",
1975         dmenuVarsCheck, dmenuSetVariables, NULL,
1976         "ntpdate_enable=YES,ntpdate_flags=tick.greyware.com" },
1977       { "U.S. TX #5",   "tock.greyware.com",
1978         dmenuVarsCheck, dmenuSetVariables, NULL,
1979         "ntpdate_enable=YES,ntpdate_flags=tock.greyware.com" },
1980       { "U.S. VA",      "ntp-1.vt.edu",
1981         dmenuVarsCheck, dmenuSetVariables, NULL,
1982         "ntpdate_enable=YES,ntpdate_flags=ntp-1.vt.edu" },
1983       { "U.S. VA #2",   "ntp-2.vt.edu",
1984         dmenuVarsCheck, dmenuSetVariables, NULL,
1985         "ntpdate_enable=YES,ntpdate_flags=ntp-2.vt.edu" },
1986       { "U.S. VA #3",   "ntp.cmr.gov",
1987         dmenuVarsCheck, dmenuSetVariables, NULL,
1988         "ntpdate_enable=YES,ntpdate_flags=ntp.cmr.gov" },
1989       { "U.S. VT",      "ntp0.state.vt.us",
1990         dmenuVarsCheck, dmenuSetVariables, NULL,
1991         "ntpdate_enable=YES,ntpdate_flags=ntp0.state.vt.us" },
1992       { "U.S. VT #2",   "ntp1.state.vt.us",
1993         dmenuVarsCheck, dmenuSetVariables, NULL,
1994         "ntpdate_enable=YES,ntpdate_flags=ntp1.state.vt.us" },
1995       { "U.S. VT #3",   "ntp2.state.vt.us",
1996         dmenuVarsCheck, dmenuSetVariables, NULL,
1997         "ntpdate_enable=YES,ntpdate_flags=ntp2.state.vt.us" },
1998       { "U.S. WA",      "ntp.tcp-udp.net",
1999         dmenuVarsCheck, dmenuSetVariables, NULL,
2000         "ntpdate_enable=YES,ntpdate_flags=ntp.tcp-udp.net" },
2001       { "U.S. WI",      "ntp1.cs.wisc.edu",
2002         dmenuVarsCheck, dmenuSetVariables, NULL,
2003         "ntpdate_enable=YES,ntpdate_flags=ntp1.cs.wisc.edu" },
2004       { "U.S. WI #2",   "ntp3.cs.wisc.edu",
2005         dmenuVarsCheck, dmenuSetVariables, NULL,
2006         "ntpdate_enable=YES,ntpdate_flags=ntp3.cs.wisc.edu" },
2007       { "South Africa", "ntp.cs.unp.ac.za",
2008         dmenuVarsCheck, dmenuSetVariables, NULL,
2009         "ntpdate_enable=YES,ntpdate_flags=ntp.cs.unp.ac.za" },
2010       { NULL } },
2011 };
2012
2013 #ifdef WITH_SYSCONS
2014 DMenu MenuSyscons = {
2015     DMENU_NORMAL_TYPE,
2016     "System Console Configuration",
2017     "The default system console driver for FreeBSD (syscons) has a\n"
2018     "number of configuration options which may be set according to\n"
2019     "your preference.\n\n"
2020     "When you are done setting configuration options, select Cancel.",
2021     "Configure your system console settings",
2022     NULL,
2023     { { "X Exit",       "Exit this menu (returning to previous)", NULL, dmenuExit },
2024 #ifdef PC98
2025       { "2 Keymap",     "Choose an alternate keyboard map",     NULL, dmenuSubmenu, NULL, &MenuSysconsKeymap },
2026       { "3 Repeat",     "Set the rate at which keys repeat",    NULL, dmenuSubmenu, NULL, &MenuSysconsKeyrate },
2027       { "4 Saver",      "Configure the screen saver",           NULL, dmenuSubmenu, NULL, &MenuSysconsSaver },
2028 #else
2029       { "2 Font",       "Choose an alternate screen font",      NULL, dmenuSubmenu, NULL, &MenuSysconsFont },
2030       { "3 Keymap",     "Choose an alternate keyboard map",     NULL, dmenuSubmenu, NULL, &MenuSysconsKeymap },
2031       { "4 Repeat",     "Set the rate at which keys repeat",    NULL, dmenuSubmenu, NULL, &MenuSysconsKeyrate },
2032       { "5 Saver",      "Configure the screen saver",           NULL, dmenuSubmenu, NULL, &MenuSysconsSaver },
2033       { "6 Screenmap",  "Choose an alternate screenmap",        NULL, dmenuSubmenu, NULL, &MenuSysconsScrnmap },
2034       { "7 Ttys",       "Choose console terminal type",         NULL, dmenuSubmenu, NULL, &MenuSysconsTtys },
2035 #endif
2036       { NULL } },
2037 };
2038
2039 #ifdef PC98
2040 DMenu MenuSysconsKeymap = {
2041     DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
2042     "System Console Keymap",
2043     "The default system console driver for FreeBSD (syscons) defaults\n"
2044     "to a standard \"PC-98x1\" keyboard map.  Users may wish to choose\n"
2045     "one of the other keymaps below.\n"
2046     "Note that sysinstall itself only uses the part of the keyboard map\n"
2047     "which is required to generate the ANSI character subset, but your\n"
2048     "choice of keymap will also be saved for later (fuller) use.",
2049     "Choose a keyboard map",
2050     NULL,
2051     { { "Japanese PC-98x1",             "Japanese PC-98x1 keymap",  dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=jp.pc98" },
2052       { " Japanese PC-98x1 (ISO)",      "Japanese PC-98x1 (ISO) keymap",  dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=jp.pc98.iso" },
2053       { NULL } },
2054 };
2055 #else
2056 DMenu MenuSysconsKeymap = {
2057     DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
2058     "System Console Keymap",
2059     "The default system console driver for FreeBSD (syscons) defaults\n"
2060     "to a standard \"American\" keyboard map.  Users in other countries\n"
2061     "(or with different keyboard preferences) may wish to choose one of\n"
2062     "the other keymaps below.\n"
2063     "Note that sysinstall itself only uses the part of the keyboard map\n"
2064     "which is required to generate the ANSI character subset, but your\n"
2065     "choice of keymap will also be saved for later (fuller) use.",
2066     "Choose a keyboard map",
2067     NULL,
2068     { { "Belgian",      "Belgian ISO keymap",   dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=be.iso" },
2069       { " Brazil CP850",        "Brazil CP850 keymap",  dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=br275.cp850" },
2070       { " Brazil ISO (accent)", "Brazil ISO keymap (accent keys)",      dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=br275.iso.acc" },
2071       { " Brazil ISO",  "Brazil ISO keymap",    dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=br275.iso" },
2072       { " Bulgarian BDS",       "Bulgarian BDS keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=bg.bds.ctrlcaps" },
2073       { " Bulgarian Phonetic",  "Bulgarian Phonetic keymap",    dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=bg.phonetic.ctrlcaps" },
2074       { "Central European ISO", "Central European ISO keymap",  dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=ce.iso2" },
2075       { " Croatian ISO",        "Croatian ISO keymap",  dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=hr.iso" },
2076       { " Czech ISO (accent)",  "Czech ISO keymap (accent keys)",       dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=cs.latin2.qwertz" },
2077       { "Danish CP865", "Danish Code Page 865 keymap",  dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=danish.cp865" },
2078       { " Danish ISO",  "Danish ISO keymap",    dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=danish.iso" },
2079       { "Estonian ISO", "Estonian ISO keymap",  dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=estonian.iso" },
2080       { " Estonian ISO 15", "Estonian ISO 8859-15 keymap",      dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=estonian.iso15" },
2081       { " Estonian CP850", "Estonian Code Page 850 keymap",     dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=estonian.cp850" },
2082       { "Finnish CP850","Finnish Code Page 850 keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=finnish.cp850" },
2083       { " Finnish ISO",  "Finnish ISO keymap",  dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=finnish.iso" },
2084       { " French ISO (accent)", "French ISO keymap (accent keys)",      dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=fr.iso.acc" },
2085       { " French ISO",  "French ISO keymap",    dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=fr.iso" },
2086       { "German CP850", "German Code Page 850 keymap",  dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=german.cp850"        },
2087       { " German ISO",  "German ISO keymap",    dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=german.iso" },
2088       { " Greek 101",   "Greek ISO keymap (101 keys)",  dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=gr.us101.acc" },
2089       { " Greek 104",   "Greek ISO keymap (104 keys)",  dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=el.iso07" },
2090       { " Greek ELOT",  "Greek ISO keymap (ELOT 1000)", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=gr.elot.acc" },
2091       { "Hungarian 101", "Hungarian ISO keymap (101 key)",      dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=hu.iso2.101keys" },
2092       { " Hungarian 102", "Hungarian ISO keymap (102 key)",     dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=hu.iso2.102keys" },
2093       { "Icelandic (accent)", "Icelandic ISO keymap (accent keys)",     dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=icelandic.iso.acc" },
2094       { " Icelandic",   "Icelandic ISO keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=icelandic.iso" },
2095       { " Italian",     "Italian ISO keymap",   dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=it.iso" },
2096       { "Japanese 106", "Japanese 106 keymap",  dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=jp.106" },
2097       { "Latin American (accent)",      "Latin American ISO keymap (accent keys)",      dmenuVarCheck,  dmenuSetKmapVariable,   NULL,   "keymap=latinamerican.iso.acc" },
2098       { " Latin American",      "Latin American ISO keymap",    dmenuVarCheck,  dmenuSetKmapVariable,   NULL,   "keymap=latinamerican" },
2099       { "Norway ISO",   "Norwegian ISO keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=norwegian.iso" },
2100       { "Polish ISO",   "Polish ISO keymap",    dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=pl_PL.ISO8859-2" },
2101       { " Portuguese (accent)", "Portuguese ISO keymap (accent keys)",  dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=pt.iso.acc" },
2102       { " Portuguese",  "Portuguese ISO keymap",        dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=pt.iso" },
2103       { "Russia KOI8-R", "Russian KOI8-R keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=ru.koi8-r" },
2104       { "Slovak", "Slovak ISO keymap",  dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=sk.iso2" },
2105       { "Slovenian", "Slovenian ISO keymap",    dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=si.iso" },
2106       { " Spanish (accent)", "Spanish ISO keymap (accent keys)",        dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=spanish.iso.acc" },
2107       { " Spanish",     "Spanish ISO keymap",   dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=spanish.iso" },
2108       { " Swedish CP850", "Swedish Code Page 850 keymap", dmenuVarCheck,        dmenuSetKmapVariable, NULL, "keymap=swedish.cp850" },
2109       { " Swedish ISO", "Swedish ISO keymap",   dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=swedish.iso" },
2110       { " Swiss French ISO (accent)", "Swiss French ISO keymap (accent keys)", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=swissfrench.iso.acc" },
2111       { " Swiss French ISO", "Swiss French ISO keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=swissfrench.iso" },
2112       { " Swiss French CP850", "Swiss French Code Page 850 keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=swissfrench.cp850" },
2113       { " Swiss German ISO (accent)", "Swiss German ISO keymap (accent keys)", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=swissgerman.iso.acc" },
2114       { " Swiss German ISO", "Swiss German ISO keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=swissgerman.iso" },
2115       { " Swiss German CP850", "Swiss German Code Page 850 keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=swissgerman.cp850" },
2116       { "UK CP850",     "UK Code Page 850 keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=uk.cp850" },
2117       { " UK ISO",      "UK ISO keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=uk.iso" },
2118       { " Ukrainian KOI8-U",    "Ukrainian KOI8-U keymap",      dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=ua.koi8-u" },
2119       { " Ukrainian KOI8-U+KOI8-R",     "Ukrainian KOI8-U+KOI8-R keymap (alter)",       dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=ua.koi8-u.shift.alt" },
2120       { " USA CapsLock->Ctrl",  "US standard (Caps as L-Control)",      dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=us.pc-ctrl" },
2121       { " USA Dvorak",  "US Dvorak keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=us.dvorak" },
2122       { " USA Dvorak (left)",   "US left handed Dvorak keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=us.dvorakl" },
2123       { " USA Dvorak (right)",  "US right handed Dvorak keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=us.dvorakr" },
2124       { " USA Emacs",   "US standard optimized for EMACS",      dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=us.emacs" },
2125       { " USA ISO",     "US ISO keymap",        dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=us.iso" },
2126       { " USA UNIX",    "US traditional UNIX-workstation",      dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=us.unix" },
2127       { NULL } },
2128 };
2129 #endif /* PC98 */
2130
2131 DMenu MenuSysconsKeyrate = {
2132     DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
2133     "System Console Keyboard Repeat Rate",
2134     "This menu allows you to set the speed at which keys repeat\n"
2135     "when held down.",
2136     "Choose a keyboard repeat rate",
2137     NULL,
2138     { { "Slow", "Slow keyboard repeat rate",    dmenuVarCheck,  dmenuSetVariable, NULL, "keyrate=slow" },
2139       { "Normal", "\"Normal\" keyboard repeat rate",    dmenuVarCheck,  dmenuSetVariable, NULL, "keyrate=normal" },
2140       { "Fast", "Fast keyboard repeat rate",    dmenuVarCheck,  dmenuSetVariable, NULL, "keyrate=fast" },
2141       { "Default", "Use default keyboard repeat rate",  dmenuVarCheck,  dmenuSetVariable, NULL, "keyrate=NO" },
2142       { NULL } },
2143 };
2144
2145 DMenu MenuSysconsSaver = {
2146     DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
2147     "System Console Screen Saver",
2148     "By default, the console driver will not attempt to do anything\n"
2149     "special with your screen when it's idle.  If you expect to leave your\n"
2150     "monitor switched on and idle for long periods of time then you should\n"
2151     "probably enable one of these screen savers to prevent burn-in.",
2152     "Choose a nifty-looking screen saver",
2153     NULL,
2154     { { "1 Blank",      "Simply blank the screen",
2155         dmenuVarCheck, configSaver, NULL, "saver=blank" },
2156       { "2 Daemon",     "\"BSD Daemon\" animated screen saver (text)",
2157         dmenuVarCheck, configSaver, NULL, "saver=daemon" },
2158       { "3 Fade",       "Fade out effect screen saver",
2159         dmenuVarCheck, configSaver, NULL, "saver=fade" },
2160       { "4 Fire",       "Flames effect screen saver",
2161         dmenuVarCheck, configSaver, NULL, "saver=fire" },
2162       { "5 Green",      "\"Green\" power saving mode (if supported by monitor)",
2163         dmenuVarCheck, configSaver, NULL, "saver=green" },
2164       { "6 Logo",       "\"BSD Daemon\" animated screen saver (graphics)",
2165         dmenuVarCheck, configSaver, NULL, "saver=logo" },
2166       { "7 Rain",       "Rain drops screen saver",
2167         dmenuVarCheck, configSaver, NULL, "saver=rain" },
2168       { "8 Snake",      "Draw a FreeBSD \"snake\" on your screen",
2169         dmenuVarCheck, configSaver, NULL, "saver=snake" },
2170       { "9 Star",       "A \"twinkling stars\" effect",
2171         dmenuVarCheck, configSaver, NULL, "saver=star" },
2172       { "Warp", "A \"stars warping\" effect",
2173         dmenuVarCheck, configSaver, NULL, "saver=warp" },
2174       { "Dragon", "Dragon screensaver (graphics)",
2175         dmenuVarCheck, configSaver, NULL, "saver=dragon" },
2176       { "Timeout",      "Set the screen saver timeout interval",
2177         NULL, configSaverTimeout, NULL, NULL, ' ', ' ', ' ' },
2178       { NULL } },
2179 };
2180
2181 #ifndef PC98
2182 DMenu MenuSysconsScrnmap = {
2183     DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
2184     "System Console Screenmap",
2185     "Unless you load a specific font, most PC hardware defaults to\n"
2186     "displaying characters in the IBM 437 character set.  However,\n"
2187     "in the Unix world, this character set is very rarely used.  Most\n"
2188     "Western European countries, for example, prefer ISO 8859-1.\n"
2189     "American users won't notice the difference since the bottom half\n"
2190     "of all these character sets is ANSI anyway.\n"
2191     "If your hardware is capable of downloading a new display font,\n"
2192     "you should probably choose that option.  However, for hardware\n"
2193     "where this is not possible (e.g. monochrome adapters), a screen\n"
2194     "map will give you the best approximation that your hardware can\n"
2195     "display at all.",
2196     "Choose a screen map",
2197     NULL,
2198     { { "1 None",                 "No screenmap, don't touch font", dmenuVarCheck, dmenuSetVariable, NULL, "scrnmap=NO" },
2199       { "2 ISO 8859-1 to IBM437", "W-Europe ISO 8859-1 to IBM 437 screenmap", dmenuVarCheck, dmenuSetVariable, NULL, "scrnmap=iso-8859-1_to_cp437" },
2200       { "3 ISO 8859-7 to IBM437", "Greek ISO 8859-7 to IBM 437 screenmap", dmenuVarCheck, dmenuSetVariable, NULL, "scrnmap=iso-8859-7_to_cp437" },
2201       { "4 US-ASCII to IBM437",   "US-ASCII to IBM 437 screenmap", dmenuVarCheck, dmenuSetVariable, NULL, "scrnmap=us-ascii_to_cp437" },
2202       { "5 KOI8-R to IBM866",     "Russian KOI8-R to IBM 866 screenmap", dmenuVarCheck, dmenuSetVariable, NULL, "scrnmap=koi8-r2cp866" },
2203       { "6 KOI8-U to IBM866u",    "Ukrainian KOI8-U to IBM 866u screenmap", dmenuVarCheck, dmenuSetVariable, NULL, "scrnmap=koi8-u2cp866u" },
2204       { NULL } },
2205 };
2206
2207 DMenu MenuSysconsTtys = {
2208     DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
2209     "System Console Terminal Type",
2210     "For various console encodings, a corresponding terminal type\n"
2211     "must be chosen in /etc/ttys.\n\n"
2212     "WARNING: For compatibility reasons, only entries starting with\n"
2213     "ttyv and terminal types starting with cons[0-9] can be changed\n"
2214     "via this menu.\n",
2215     "Choose a terminal type",
2216     NULL,
2217     { { "1 None",               "Don't touch anything",  dmenuVarCheck, dmenuSetVariable, NULL, VAR_CONSTERM "=NO" },
2218       { "2 IBM437 (VGA default)", "cons25", dmenuVarCheck, dmenuSetVariable, NULL, VAR_CONSTERM "=cons25" },
2219       { "3 ISO 8859-1",         "cons25l1", dmenuVarCheck, dmenuSetVariable, NULL, VAR_CONSTERM "=cons25l1" },
2220       { "4 ISO 8859-2",         "cons25l2", dmenuVarCheck, dmenuSetVariable, NULL, VAR_CONSTERM "=cons25l2" },
2221       { "5 ISO 8859-7",         "cons25l7", dmenuVarCheck, dmenuSetVariable, NULL, VAR_CONSTERM "=cons25l7" },
2222       { "6 KOI8-R",             "cons25r", dmenuVarCheck, dmenuSetVariable, NULL, VAR_CONSTERM "=cons25r" },
2223       { "7 KOI8-U",             "cons25u", dmenuVarCheck, dmenuSetVariable, NULL, VAR_CONSTERM "=cons25u" },
2224       { "8 US-ASCII",           "cons25w", dmenuVarCheck, dmenuSetVariable, NULL, VAR_CONSTERM "=cons25w" },
2225       { NULL } },
2226 };
2227
2228 DMenu MenuSysconsFont = {
2229     DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
2230     "System Console Font",
2231     "Most PC hardware defaults to displaying characters in the\n"
2232     "IBM 437 character set.  However, in the Unix world, this\n"
2233     "character set is very rarely used.  Most Western European\n"
2234     "countries, for example, prefer ISO 8859-1.\n"
2235     "American users won't notice the difference since the bottom half\n"
2236     "of all these charactersets is ANSI anyway.  However, they might\n"
2237     "want to load a font anyway to use the 30- or 50-line displays.\n"
2238     "If your hardware is capable of downloading a new display font,\n"
2239     "you can select the appropriate font below.",
2240     "Choose a font",
2241     NULL,
2242     { { "1 None", "Use hardware default font", dmenuVarCheck, dmenuSetVariables, NULL,
2243         "font8x8=NO,font8x14=NO,font8x16=NO" },
2244       { "2 IBM 437", "English and others, VGA default", dmenuVarCheck,  dmenuSetVariables, NULL,
2245         "font8x8=cp437-8x8,font8x14=cp437-8x14,font8x16=cp437-8x16" },
2246       { "3 IBM 850", "Western Europe, IBM encoding",    dmenuVarCheck,  dmenuSetVariables, NULL,
2247         "font8x8=cp850-8x8,font8x14=cp850-8x14,font8x16=cp850-8x16" },
2248       { "4 IBM 865", "Norwegian, IBM encoding", dmenuVarCheck,  dmenuSetVariables, NULL,
2249         "font8x8=cp865-8x8,font8x14=cp865-8x14,font8x16=cp865-8x16" },
2250       { "5 IBM 866", "Russian, IBM encoding (use with KOI8-R screenmap)",   dmenuVarCheck,  dmenuSetVariables, NULL,
2251         "font8x8=cp866-8x8,font8x14=cp866-8x14,font8x16=cp866b-8x16,mousechar_start=3" },
2252       { "6 IBM 866u", "Ukrainian, IBM encoding (use with KOI8-U screenmap)",   dmenuVarCheck,  dmenuSetVariables, NULL,
2253         "font8x8=cp866u-8x8,font8x14=cp866u-8x14,font8x16=cp866u-8x16,mousechar_start=3" },
2254       { "7 IBM 1251", "Cyrillic, MS Windows encoding",  dmenuVarCheck, dmenuSetVariables, NULL,
2255         "font8x8=cp1251-8x8,font8x14=cp1251-8x14,font8x16=cp1251-8x16,mousechar_start=3" },
2256       { "8 ISO 8859-1", "Western Europe, ISO encoding", dmenuVarCheck,  dmenuSetVariables, NULL,
2257         "font8x8=iso-8x8,font8x14=iso-8x14,font8x16=iso-8x16" },
2258       { "9 ISO 8859-2", "Eastern Europe, ISO encoding", dmenuVarCheck,  dmenuSetVariables, NULL,
2259         "font8x8=iso02-8x8,font8x14=iso02-8x14,font8x16=iso02-8x16" },
2260       { "a ISO 8859-4", "Baltic, ISO encoding", dmenuVarCheck,  dmenuSetVariables, NULL,
2261         "font8x8=iso04-8x8,font8x14=iso04-8x14,font8x16=iso04-8x16" },
2262       { "b ISO 8859-7", "Greek, ISO encoding", dmenuVarCheck,  dmenuSetVariables, NULL,
2263         "font8x8=iso07-8x8,font8x14=iso07-8x14,font8x16=iso07-8x16" },
2264       { "c ISO 8859-8", "Hebrew, ISO encoding", dmenuVarCheck,  dmenuSetVariables, NULL,
2265         "font8x8=iso08-8x8,font8x14=iso08-8x14,font8x16=iso08-8x16" },
2266       { "d ISO 8859-15", "Europe, ISO encoding", dmenuVarCheck,  dmenuSetVariables, NULL,
2267         "font8x8=iso15-8x8,font8x14=iso15-8x14,font8x16=iso15-8x16" },
2268       { "e SWISS", "English, better resolution", dmenuVarCheck, dmenuSetVariables, NULL,
2269         "font8x8=swiss-8x8,font8x14=NO,font8x16=swiss-8x16" },
2270       { NULL } },
2271 };
2272 #endif /* PC98 */
2273 #endif /* WITH_SYSCONS */
2274
2275 DMenu MenuUsermgmt = {
2276     DMENU_NORMAL_TYPE,
2277     "User and group management",
2278     "The submenus here allow to manipulate user groups and\n"
2279     "login accounts.\n",
2280     "Configure your user groups and users",
2281     NULL,
2282     { { "X Exit",       "Exit this menu (returning to previous)", NULL, dmenuExit },
2283       { "User",         "Add a new user to the system.",        NULL, userAddUser },
2284       { "Group",        "Add a new user group to the system.",  NULL, userAddGroup },
2285       { NULL } },
2286 };
2287
2288 DMenu MenuSecurity = {
2289     DMENU_CHECKLIST_TYPE | DMENU_SELECTION_RETURNS,
2290     "System Security Options Menu",
2291     "This menu allows you to configure aspects of the operating system security\n"
2292     "policy.  Please read the system documentation carefully before modifying\n"
2293     "these settings, as they may cause service disruption if used improperly.\n"
2294     "\n"
2295     "Most settings will take affect only following a system reboot.",
2296     "Configure system security options",
2297     NULL,
2298     { { "X Exit",      "Exit this menu (returning to previous)",
2299         checkTrue, dmenuExit, NULL, NULL, '<', '<', '<' },
2300       { " Securelevel", "Configure securelevels for the system",
2301         NULL, configSecurelevel },
2302 #if 0
2303       { " LOMAC",         "Use Low Watermark Mandatory Access Control at boot",
2304         dmenuVarCheck,  dmenuToggleVariable, NULL, "lomac_enable=YES" },
2305 #endif
2306       { " NFS port",    "Require that the NFS clients use reserved ports",
2307         dmenuVarCheck,  dmenuToggleVariable, NULL, "nfs_reserved_port_only=YES" },
2308       { NULL } },
2309 };
2310
2311 DMenu MenuSecurelevel = {
2312     DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
2313     "Securelevel Configuration Menu",
2314     "This menu allows you to select the securelevel your system runs with.\n"
2315     "When operating at a securelevel, certain root privileges are disabled,\n"
2316     "which may increase resistance to exploits and protect system integrity.\n"
2317     "In secure mode system flags may not be overriden by the root user,\n"
2318     "access to direct kernel memory is limited, and kernel modules may not\n"
2319     "be changed.  In highly secure mode, mounted file systems may not be\n"
2320     "modified on-disk, tampering with the system clock is prohibited.  In\n"
2321     "network secure mode configuration changes to firewalling are prohibited.\n",
2322     "Select a securelevel to operate at - F1 for help",
2323     "securelevel",
2324     { { "X Exit",      "Exit this menu (returning to previous)",
2325         checkTrue, dmenuExit, NULL, NULL, '<', '<', '<' },
2326       { "Disabled", "Disable securelevels", NULL, configSecurelevelDisabled, },
2327       { "Secure", "Secure mode", NULL, configSecurelevelSecure },
2328       { "Highly Secure", "Highly secure mode", NULL, configSecurelevelHighlySecure }, 
2329       { "Network Secure", "Network secure mode", NULL, configSecurelevelNetworkSecure },
2330       { NULL } }
2331 };
2332
2333 DMenu MenuFixit = {
2334     DMENU_NORMAL_TYPE,
2335     "Please choose a fixit option",
2336     "There are three ways of going into \"fixit\" mode:\n"
2337     "- you can use the live filesystem CDROM/DVD, in which case there will be\n"
2338     "  full access to the complete set of FreeBSD commands and utilities,\n"
2339     "- you can use the more limited (but perhaps customized) fixit floppy,\n"
2340     "- or you can start an Emergency Holographic Shell now, which is\n"
2341     "  limited to the subset of commands that is already available right now.",
2342     "Press F1 for more detailed repair instructions",
2343     "fixit",
2344 { { "X Exit",           "Exit this menu (returning to previous)",       NULL, dmenuExit },
2345   { "2 CDROM/DVD",      "Use the \"live\" filesystem CDROM/DVD",        NULL, installFixitCDROM },
2346   { "3 Floppy",         "Use a floppy generated from the fixit image",  NULL, installFixitFloppy },
2347   { "4 Shell",          "Start an Emergency Holographic Shell",         NULL, installFixitHoloShell },
2348   { NULL } },
2349 };