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