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