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