]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - usr.sbin/sysinstall/menus.c
This commit was generated by cvs2svn to compensate for changes in r174531,
[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       { " compat",      "/usr/src/compat (compatibility software)",
1070         dmenuFlagCheck, dmenuSetFlag,   NULL, &SrcDists, '[', 'X', ']', DIST_SRC_COMPAT },
1071       { " contrib",     "/usr/src/contrib (contributed software)",
1072         dmenuFlagCheck, dmenuSetFlag,   NULL, &SrcDists, '[', 'X', ']', DIST_SRC_CONTRIB },
1073       { " crypto",      "/usr/src/crypto (contrib encryption sources)",
1074         dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_SCRYPTO },
1075       { " gnu",         "/usr/src/gnu (software from the GNU Project)",
1076         dmenuFlagCheck, dmenuSetFlag,   NULL, &SrcDists, '[', 'X', ']', DIST_SRC_GNU },
1077       { " etc",         "/usr/src/etc (miscellaneous system files)",
1078         dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_ETC },
1079       { " games",       "/usr/src/games (the obvious!)",
1080         dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_GAMES },
1081       { " include",     "/usr/src/include (header files)",
1082         dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_INCLUDE },
1083       { " krb5",        "/usr/src/kerberos5 (sources for Kerberos5)",
1084         dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_SKERBEROS5 },
1085       { " lib",         "/usr/src/lib (system libraries)",
1086         dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_LIB },
1087       { " libexec",     "/usr/src/libexec (system programs)",
1088         dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_LIBEXEC },
1089       { " release",     "/usr/src/release (release-generation tools)",
1090         dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_RELEASE },
1091       { " rescue",      "/usr/src/rescue (static rescue tools)",
1092         dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_RESCUE },
1093       { " bin",         "/usr/src/bin (system binaries)",
1094         dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_BIN },
1095       { " sbin",        "/usr/src/sbin (system binaries)",
1096         dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_SBIN },
1097       { " secure",      "/usr/src/secure (BSD encryption sources)",
1098         dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_SSECURE },
1099       { " share",       "/usr/src/share (documents and shared files)",
1100         dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_SHARE },
1101       { " sys",         "/usr/src/sys (FreeBSD kernel)",
1102         dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_SYS },
1103       { " tools",       "/usr/src/tools (miscellaneous tools)",
1104         dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_TOOLS },
1105       { " ubin",        "/usr/src/usr.bin (user binaries)",
1106         dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_UBIN },
1107       { " usbin",       "/usr/src/usr.sbin (aux system binaries)",
1108         dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_USBIN },
1109       { NULL } },
1110 };
1111
1112 DMenu MenuXOrgConfig = {
1113     DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
1114     "Please select the X.Org configuration tool you want to use.",
1115     "The first option, xorgcfg, is fully graphical.\n"
1116     "The second option provides a menu-based interface similar to\n"
1117     "what you are currently using. "
1118     "The third option, xorgconfig, is\n"
1119     "a more simplistic shell-script based tool and less friendly to\n"
1120     "new users, but it may work in situations where the other options\n"
1121     "do not.",
1122     NULL,
1123     NULL,
1124     { { "X Exit", "Exit this menu (returning to previous)",
1125         NULL, dmenuExit },
1126       { "2 xorgcfg",    "Fully graphical X.Org configuration tool.",
1127         NULL, dmenuSetVariable, NULL, VAR_XORG_CONFIG "=xorgcfg" },
1128       { "3 xorgcfg -textmode",  "ncurses-based X.Org configuration tool.",
1129         NULL, dmenuSetVariable, NULL, VAR_XORG_CONFIG "=xorgcfg -textmode" },
1130       { "4 xorgconfig", "Shell-script based X.Org configuration tool.",
1131         NULL, dmenuSetVariable, NULL, VAR_XORG_CONFIG "=xorgconfig" },
1132       { "D XDesktop",   "X already set up, just do desktop configuration.",
1133         NULL, dmenuSubmenu, NULL, &MenuXDesktops },
1134       { NULL } },
1135 };
1136
1137 DMenu MenuXDesktops = {
1138     DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
1139     "Please select the default X desktop to use.",
1140     "By default, X.Org comes with a fairly vanilla desktop which\n"
1141     "is based around the twm(1) window manager and does not offer\n"
1142     "much in the way of features.  It does have the advantage of\n"
1143     "being a standard part of X so you don't need to load anything\n"
1144     "extra in order to use it.  If, however, you have access to a\n"
1145     "reasonably full packages collection on your installation media,\n"
1146     "you can choose any one of the following desktops as alternatives.",
1147     NULL,
1148     NULL,
1149     { { "X Exit", "Exit this menu (returning to previous)",
1150         NULL, dmenuExit },
1151       { "2 KDE",                "The K Desktop Environment (Lite Edition)",
1152         NULL, dmenuSetVariable, NULL, VAR_DESKSTYLE "=kde" },
1153       { "3 GNOME 2",            "The GNOME 2 Desktop Environment (Lite Edition)",
1154         NULL, dmenuSetVariable, NULL, VAR_DESKSTYLE "=gnome2" },
1155       { "4 Afterstep",  "The Afterstep window manager",
1156         NULL, dmenuSetVariable, NULL, VAR_DESKSTYLE "=afterstep" },
1157       { "5 Windowmaker",        "The Windowmaker window manager",
1158         NULL, dmenuSetVariable, NULL, VAR_DESKSTYLE "=windowmaker" },
1159       { "6 fvwm",               "The fvwm window manager",
1160         NULL, dmenuSetVariable, NULL, VAR_DESKSTYLE "=fvwm2" },
1161       { NULL } },
1162 };
1163
1164 DMenu MenuXOrgSelect = {
1165     DMENU_NORMAL_TYPE,
1166     "X.Org Distribution",
1167     "Please select the components you need from the X.Org\n"
1168     "distribution sets.",
1169     NULL,
1170     NULL,
1171     { { "X Exit", "Exit this menu (returning to previous)", NULL, dmenuExit },
1172       { "Basic",        "Basic component menu (required)",      NULL, dmenuSubmenu, NULL, &MenuXOrgSelectCore },
1173       { "Server",       "X server menu",                        NULL, dmenuSubmenu, NULL, &MenuXOrgSelectServer },
1174       { "Fonts",        "Font set menu",                        NULL, dmenuSubmenu, NULL, &MenuXOrgSelectFonts },
1175       { NULL } },
1176 };
1177
1178 DMenu MenuXOrgSelectCore = {
1179     DMENU_CHECKLIST_TYPE | DMENU_SELECTION_RETURNS,
1180     "X.Org base distribution types",
1181     "Please check off the basic X.Org components you wish to install.\n"
1182     "Bin, lib, and set are recommended for a minimum installaion.",
1183     NULL,
1184     NULL,
1185     { { "X Exit",       "Exit this menu (returning to previous)",
1186         checkTrue, dmenuExit, NULL, NULL, '<', '<', '<' },
1187       { "All",          "Select all below",
1188         NULL,           setX11Misc, NULL, NULL, ' ', ' ', ' ' },
1189       { "Reset",        "Reset all below",
1190         NULL,           clearX11Misc, NULL, NULL, ' ', ' ', ' ' },
1191       { " lib",         "Shared libraries and data files needed at runtime",
1192         dmenuFlagCheck, dmenuSetFlag, NULL, &XOrgDists, '[', 'X', ']', DIST_XORG_LIB },
1193       { " bin",         "Client applications",
1194         dmenuFlagCheck, dmenuSetFlag, NULL, &XOrgDists, '[', 'X', ']', DIST_XORG_APPS },
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       { NULL } },
1232 };
1233
1234 DMenu MenuXOrgSelectServer = {
1235     DMENU_CHECKLIST_TYPE | DMENU_SELECTION_RETURNS,
1236     "X.Org X Server selection.",
1237     "Please check off the types of X servers you wish to install.\n",
1238     NULL,
1239     NULL,
1240     { { "X Exit",       "Exit this menu (returning to previous)",
1241         checkTrue, dmenuExit, NULL, NULL, '<', '<', '<' },
1242       { "All",          "Select all of the above",
1243         NULL,           setX11Servers, NULL, NULL, ' ', ' ', ' ' },
1244       { "Reset",        "Reset all of the above",
1245         NULL,           clearX11Servers, NULL, NULL, ' ', ' ', ' ' },
1246       { " srv",         "Standard Graphics Framebuffer",
1247         dmenuFlagCheck, dmenuSetFlag, NULL, &XOrgDists, '[', 'X', ']', DIST_XORG_SERVER },
1248       { " nest",        "Nested X Server",
1249         dmenuFlagCheck, dmenuSetFlag, NULL, &XOrgDists, '[', 'X', ']', DIST_XORG_NESTSERVER },
1250       { " vfb",         "Virtual Framebuffer",
1251         dmenuFlagCheck, dmenuSetFlag, NULL, &XOrgDists, '[', 'X', ']', DIST_XORG_VFBSERVER },
1252       { NULL } },
1253 };
1254
1255 DMenu MenuDiskDevices = {
1256     DMENU_CHECKLIST_TYPE | DMENU_SELECTION_RETURNS,
1257     "Select Drive(s)",
1258     "Please select the drive, or drives, on which you wish to perform\n"
1259     "this operation.  If you are attempting to install a boot partition\n"
1260     "on a drive other than the first one or have multiple operating\n"
1261     "systems on your machine, you will have the option to install a boot\n"
1262     "manager later.  To select a drive, use the arrow keys to move to it\n"
1263     "and press [SPACE] or [ENTER].  To de-select it, press it again.\n\n"
1264     "Use [TAB] to get to the buttons and leave this menu.",
1265     "Press F1 for important information regarding disk geometry!",
1266     "drives",
1267     { { NULL } },
1268 };
1269
1270 DMenu MenuHTMLDoc = {
1271     DMENU_NORMAL_TYPE,
1272     "Select HTML Documentation pointer",
1273     "Please select the body of documentation you're interested in, the main\n"
1274     "ones right now being the FAQ and the Handbook.  You can also choose \"other\"\n"
1275     "to enter an arbitrary URL for browsing.",
1276     "Press F1 for more help on what you see here.",
1277     "html",
1278     { { "X Exit",       "Exit this menu (returning to previous)", NULL, dmenuExit },
1279       { "2 Handbook",   "The FreeBSD Handbook.",                                NULL, docShowDocument },
1280       { "3 FAQ",        "The Frequently Asked Questions guide.",                NULL, docShowDocument },
1281       { "4 Home",       "The Home Pages for the FreeBSD Project (requires net)", NULL, docShowDocument },
1282       { "5 Other",      "Enter a URL.",                                         NULL, docShowDocument },
1283       { NULL } },
1284 };
1285
1286 /* The main installation menu */
1287 DMenu MenuInstallCustom = {
1288     DMENU_NORMAL_TYPE,
1289     "Choose Custom Installation Options",
1290     "This is the custom installation menu. You may use this menu to specify\n"
1291     "details on the type of distribution you wish to have, where you wish\n"
1292     "to install it from and how you wish to allocate disk storage to FreeBSD.",
1293     NULL,
1294     NULL,
1295     { { "X Exit",               "Exit this menu (returning to previous)", NULL, dmenuExit },
1296       { "2 Options",            "View/Set various installation options", NULL, optionsEditor },
1297 #ifndef WITH_SLICES
1298       { "3 Label",              "Label disk partitions",                NULL, diskLabelEditor },
1299       { "4 Distributions",      "Select distribution(s) to extract",    NULL, dmenuSubmenu, NULL, &MenuDistributions },
1300       { "5 Media",              "Choose the installation media type",   NULL, dmenuSubmenu, NULL, &MenuMedia },
1301       { "6 Commit",             "Perform any pending Partition/Label/Extract actions", NULL, installCustomCommit },
1302 #else
1303       { "3 Partition",          "Allocate disk space for FreeBSD",      NULL, diskPartitionEditor },
1304       { "4 Label",              "Label allocated disk partitions",      NULL, diskLabelEditor },
1305       { "5 Distributions",      "Select distribution(s) to extract",    NULL, dmenuSubmenu, NULL, &MenuDistributions },
1306       { "6 Media",              "Choose the installation media type",   NULL, dmenuSubmenu, NULL, &MenuMedia },
1307       { "7 Commit",             "Perform any pending Partition/Label/Extract actions", NULL, installCustomCommit },
1308 #endif
1309       { NULL } },
1310 };
1311
1312 #if defined(__i386__) || defined(__amd64__)
1313 #ifdef PC98
1314 /* IPL type menu */
1315 DMenu MenuIPLType = {
1316     DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
1317     "overwrite me",             /* will be disk specific label */
1318     "If you want a FreeBSD Boot Manager, select \"BootMgr\".  If you would\n"
1319     "prefer your Boot Manager to remain untouched then select \"None\".\n\n",
1320     "Press F1 to read about drive setup",
1321     "drives",
1322     { { "BootMgr",      "Install the FreeBSD Boot Manager",
1323         dmenuRadioCheck, dmenuSetValue, NULL, &BootMgr },
1324       { "None",         "Leave the IPL untouched",
1325         dmenuRadioCheck, dmenuSetValue, NULL, &BootMgr, '(', '*', ')', 1 },
1326       { NULL } },
1327 };
1328 #else
1329 /* MBR type menu */
1330 DMenu MenuMBRType = {
1331     DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
1332     "overwrite me",             /* will be disk specific label */
1333     "FreeBSD comes with a boot selector that allows you to easily\n"
1334     "select between FreeBSD and any other operating systems on your machine\n"
1335     "at boot time.  If you have more than one drive and want to boot\n"
1336     "from the second one, the boot selector will also make it possible\n"
1337     "to do so (limitations in the PC BIOS usually prevent this otherwise).\n"
1338     "If you do not want a boot selector, or wish to replace an existing\n"
1339     "one, select \"standard\".  If you would prefer your Master Boot\n"
1340     "Record to remain untouched then select \"None\".\n\n"
1341     "  NOTE:  PC-DOS users will almost certainly require \"None\"!",
1342     "Press F1 to read about drive setup",
1343     "drives",
1344     { { "BootMgr",      "Install the FreeBSD Boot Manager",
1345         dmenuRadioCheck, dmenuSetValue, NULL, &BootMgr },
1346       { "Standard",     "Install a standard MBR (no boot manager)",
1347         dmenuRadioCheck, dmenuSetValue, NULL, &BootMgr, '(', '*', ')', 1 },
1348       { "None",         "Leave the Master Boot Record untouched",
1349         dmenuRadioCheck, dmenuSetValue, NULL, &BootMgr, '(', '*', ')', 2 },
1350       { NULL } },
1351 };
1352 #endif /* PC98 */
1353 #endif /* __i386__ */
1354
1355 /* Final configuration menu */
1356 DMenu MenuConfigure = {
1357     DMENU_NORMAL_TYPE,
1358     "FreeBSD Configuration Menu",       /* title */
1359     "If you've already installed FreeBSD, you may use this menu to customize\n"
1360     "it somewhat to suit your particular configuration.  Most importantly,\n"
1361     "you can use the Packages utility to load extra \"3rd party\"\n"
1362     "software not provided in the base distributions.",
1363     "Press F1 for more information on these options",
1364     "configure",
1365     { { "X Exit",               "Exit this menu (returning to previous)",
1366         NULL,   dmenuExit },
1367       { " Distributions", "Install additional distribution sets",
1368         NULL, distExtractAll },
1369       { " Packages",    "Install pre-packaged software for FreeBSD",
1370         NULL, configPackages },
1371       { " Root Password", "Set the system manager's password",
1372         NULL,   dmenuSystemCommand, NULL, "passwd root" },
1373 #ifdef WITH_SLICES
1374       { " Fdisk",       "The disk Slice (PC-style partition) Editor",
1375         NULL, diskPartitionEditor },
1376 #endif
1377       { " Label",       "The disk Label editor",
1378         NULL, diskLabelEditor },
1379       { " User Management",     "Add user and group information",
1380         NULL, dmenuSubmenu, NULL, &MenuUsermgmt },
1381 #ifdef WITH_SYSCONS
1382       { " Console",     "Customize system console behavior",
1383         NULL,   dmenuSubmenu, NULL, &MenuSyscons },
1384 #endif
1385       { " Time Zone",   "Set which time zone you're in",
1386         NULL,   dmenuSystemCommand, NULL, "tzsetup" },
1387       { " Media",       "Change the installation media type",
1388         NULL,   dmenuSubmenu, NULL, &MenuMedia },
1389 #ifdef WITH_MICE
1390       { " Mouse",       "Configure your mouse",
1391         NULL,   dmenuSubmenu, NULL, &MenuMouse },
1392 #endif
1393       { " Networking",  "Configure additional network services",
1394         NULL,   dmenuSubmenu, NULL, &MenuNetworking },
1395       { " Security",    "Configure system security options",
1396         NULL,   dmenuSubmenu, NULL, &MenuSecurity },
1397       { " Startup",     "Configure system startup options",
1398         NULL,   dmenuSubmenu, NULL, &MenuStartup },
1399       { " TTYs",        "Configure system ttys.",
1400         NULL,   configEtcTtys, NULL, "ttys" },
1401       { " Options",     "View/Set various installation options",
1402         NULL, optionsEditor },
1403       { " HTML Docs",   "Go to the HTML documentation menu (post-install)",
1404         NULL, docBrowser },
1405       { " Load KLD",    "Load a KLD from a floppy",
1406         NULL, kldBrowser },
1407       { NULL } },
1408 };
1409
1410 DMenu MenuStartup = {
1411     DMENU_CHECKLIST_TYPE | DMENU_SELECTION_RETURNS,
1412     "Startup Services Menu",
1413     "This menu allows you to configure various aspects of your system's\n"
1414     "startup configuration.  Use [SPACE] or [ENTER] to select items, and\n"
1415     "[TAB] to move to the buttons.  Select Exit to leave this menu.",
1416     NULL,
1417     NULL,
1418     { { "X Exit",       "Exit this menu (returning to previous)",
1419         checkTrue, dmenuExit, NULL, NULL, '<', '<', '<' },
1420 #ifdef __i386__
1421       { " APM",         "Auto-power management services (typically laptops)",
1422         dmenuVarCheck,  dmenuToggleVariable, NULL, "apm_enable=YES" },
1423 #endif
1424 #ifdef PCCARD_ARCH
1425       { " pccard",      "Enable PCCARD (AKA PCMCIA) services (also laptops)",
1426         dmenuVarCheck, dmenuToggleVariable, NULL, "pccard_enable=YES" },
1427       { " pccard mem",  "Set PCCARD memory address (if enabled)",
1428         dmenuVarCheck, dmenuISetVariable, NULL, "pccard_mem" },
1429       { " pccard ifconfig",     "List of PCCARD ethernet devices to configure",
1430         dmenuVarCheck, dmenuISetVariable, NULL, "pccard_ifconfig" },
1431 #endif
1432       { " ",            " -- ", NULL,   NULL, NULL, NULL, ' ', ' ', ' ' },
1433       { " Startup dirs",        "Set the list of dirs to look for startup scripts",
1434         dmenuVarCheck, dmenuISetVariable, NULL, "local_startup" },
1435       { " named",       "Run a local name server on this host",
1436         dmenuVarCheck, dmenuToggleVariable, NULL, "named_enable=YES" },
1437       { " named flags", "Set default flags to named (if enabled)",
1438         dmenuVarCheck, dmenuISetVariable, NULL, "named_flags" },
1439       { " NIS client",  "This host wishes to be an NIS client.",
1440         dmenuVarCheck, configRpcBind, NULL, "nis_client_enable=YES" },
1441       { " NIS domainname",      "Set NIS domainname (if enabled)",
1442         dmenuVarCheck, dmenuISetVariable, NULL, "nisdomainname" },
1443       { " NIS server",  "This host wishes to be an NIS server.",
1444         dmenuVarCheck, configRpcBind, NULL, "nis_server_enable=YES" },
1445       { " ",            " -- ", NULL,   NULL, NULL, NULL, ' ', ' ', ' ' },
1446       { " Accounting",  "This host wishes to run process accounting.",
1447         dmenuVarCheck, dmenuToggleVariable, NULL, "accounting_enable=YES" },
1448       { " lpd",         "This host has a printer and wants to run lpd.",
1449         dmenuVarCheck, dmenuToggleVariable, NULL, "lpd_enable=YES" },
1450 #ifdef WITH_LINUX
1451       { " Linux",       "This host wants to be able to run Linux binaries.",
1452         dmenuVarCheck, configLinux, NULL, VAR_LINUX_ENABLE "=YES" },
1453 #endif
1454 #ifdef __i386__
1455       { " SCO",         "This host wants to be able to run IBCS2 binaries.",
1456         dmenuVarCheck, dmenuToggleVariable, NULL, "ibcs2_enable=YES" },
1457       { " SVR4",        "This host wants to be able to run SVR4 binaries.",
1458         dmenuVarCheck, dmenuToggleVariable, NULL, "svr4_enable=YES" },
1459 #endif
1460 #ifdef __alpha__
1461       { " OSF/1",       "This host wants to be able to run DEC OSF/1 binaries.",
1462         dmenuVarCheck, configOSF1, NULL, VAR_OSF1_ENABLE "=YES" },
1463 #endif
1464       { " quotas",      "This host wishes to check quotas on startup.",
1465         dmenuVarCheck, dmenuToggleVariable, NULL, "check_quotas=YES" },
1466       { NULL } },
1467 };
1468
1469 DMenu MenuNetworking = {
1470     DMENU_CHECKLIST_TYPE | DMENU_SELECTION_RETURNS,
1471     "Network Services Menu",
1472     "You may have already configured one network device (and the other\n"
1473     "various hostname/gateway/name server parameters) in the process\n"
1474     "of installing FreeBSD.  This menu allows you to configure other\n"
1475     "aspects of your system's network configuration.",
1476     NULL,
1477     NULL,
1478     { { "X Exit",       "Exit this menu (returning to previous)",
1479         checkTrue, dmenuExit, NULL, NULL, '<', '<', '<' },
1480       { " Interfaces",  "Configure additional network interfaces",
1481         NULL, tcpMenuSelect },
1482       { " AMD",         "This machine wants to run the auto-mounter service",
1483         dmenuVarCheck,  configRpcBind, NULL, "amd_enable=YES" },
1484       { " AMD Flags",   "Set flags to AMD service (if enabled)",
1485         dmenuVarCheck,  dmenuISetVariable, NULL, "amd_flags" },
1486       { " Anon FTP",    "This machine wishes to allow anonymous FTP.",
1487         dmenuVarCheck,  configAnonFTP, NULL, "anon_ftp" },
1488       { " Gateway",     "This machine will route packets between interfaces",
1489         dmenuVarCheck,  dmenuToggleVariable, NULL, "gateway_enable=YES" },
1490       { " inetd",       "This machine wants to run the inet daemon",
1491         dmenuVarCheck,  configInetd, NULL, "inetd_enable=YES" },
1492       { " Mail",        "This machine wants to run a Mail Transfer Agent",
1493         NULL,           dmenuSubmenu, NULL, &MenuMTA },
1494       { " NFS client",  "This machine will be an NFS client",
1495         dmenuVarCheck,  dmenuToggleVariable, NULL, "nfs_client_enable=YES" },
1496       { " NFS server",  "This machine will be an NFS server",
1497         dmenuVarCheck,  configNFSServer, NULL, "nfs_server_enable=YES" },
1498       { " Ntpdate",     "Select a clock-synchronization server",
1499         dmenuVarCheck,  dmenuSubmenu, NULL, &MenuNTP, '[', 'X', ']',
1500         (uintptr_t)"ntpdate_enable=YES" },
1501       { " PCNFSD",      "Run authentication server for clients with PC-NFS.",
1502         dmenuVarCheck,  configPCNFSD, NULL, "pcnfsd" },
1503       { " rpcbind",     "RPC port mapping daemon (formerly portmapper)",
1504         dmenuVarCheck, dmenuToggleVariable, NULL, "rpcbind_enable=YES" },
1505       { " rpc.statd",   "NFS status monitoring daemon",
1506         dmenuVarCheck, configRpcBind, NULL, "rpc_statd_enable=YES" },
1507       { " rpc.lockd",   "NFS file locking daemon",
1508         dmenuVarCheck, configRpcBind, NULL, "rpc_lockd_enable=YES" },
1509       { " Routed",      "Select routing daemon (default: routed)",
1510         dmenuVarCheck,  configRouter, NULL, "router_enable=YES" },
1511       { " Rwhod",       "This machine wants to run the rwho daemon",
1512         dmenuVarCheck,  dmenuToggleVariable, NULL, "rwhod_enable=YES" },
1513       { " sshd",        "This machine wants to run the SSH daemon",
1514         dmenuVarCheck,  dmenuToggleVariable, NULL, "sshd_enable=YES" },
1515       { " TCP Extensions", "Allow RFC1323 and RFC1644 TCP extensions?",
1516         dmenuVarCheck,  dmenuToggleVariable, NULL, "tcp_extensions=YES" },
1517       { NULL } },
1518 };
1519
1520 DMenu MenuMTA = {
1521     DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
1522     "Mail Transfer Agent Selection",
1523     "You can choose which Mail Transfer Agent (MTA) you wish to install and run.\n"
1524     "Selecting Sendmail local disables sendmail's network socket for\n"
1525     "incoming mail, but still enables sendmail for local and outbound mail.\n"
1526     "The Postfix option will install the Postfix MTA from the ports\n"
1527     "collection.  The Exim option will install the Exim MTA from the ports\n"
1528     "collection.  To return to the previous menu, select Exit.",
1529     NULL,
1530     NULL,
1531     {
1532       { "Sendmail",           "Use sendmail",
1533         dmenuVarCheck, dmenuSetVariable, NULL, "sendmail_enable=YES" },
1534       { "Sendmail local",    "Use sendmail, but do not listen on the network",
1535         dmenuVarCheck, dmenuSetVariable, NULL, "sendmail_enable=NO" },
1536       { "Postfix",            "Use the Postfix MTA",
1537       NULL, configMTAPostfix, NULL, NULL },
1538       { "Exim",               "Use the Exim MTA",
1539       NULL, configMTAExim, NULL, NULL },
1540       { "None",               "Do not install an MTA",
1541         dmenuVarCheck, dmenuSetVariable, NULL, "sendmail_enable=NONE" },
1542       { "X Exit",             "Exit this menu (returning to previous)",
1543         checkTrue, dmenuExit, NULL, NULL, '<', '<', '<' },
1544       { NULL } },
1545 };
1546
1547 DMenu MenuNTP = {
1548     DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
1549     "NTPDATE Server Selection",
1550     "There are a number of time synchronization servers available\n"
1551     "for public use around the Internet.  Please select one reasonably\n"
1552     "close to you to have your system time synchronized accordingly.",
1553     "These are the primary open-access NTP servers",
1554     NULL,
1555     { { "None",                 "No NTP server",
1556         dmenuVarsCheck, dmenuSetVariables, NULL, 
1557         "ntpdate_enable=NO,ntpdate_flags=none" },
1558       { "Other",                "Select a site not on this list",
1559         dmenuVarsCheck, configNTP, NULL, NULL },
1560       { "Worldwide",            "pool.ntp.org",
1561         dmenuVarsCheck, dmenuSetVariables, NULL, 
1562         "ntpdate_enable=YES,ntpdate_flags=pool.ntp.org" },
1563       { "Asia",         "asia.pool.ntp.org",
1564         dmenuVarsCheck, dmenuSetVariables, NULL, 
1565         "ntpdate_enable=YES,ntpdate_flags=asia.pool.ntp.org" },
1566       { "Europe",               "europe.pool.ntp.org",
1567         dmenuVarsCheck, dmenuSetVariables, NULL, 
1568         "ntpdate_enable=YES,ntpdate_flags=europe.pool.ntp.org" },
1569       { "Oceania",              "oceania.pool.ntp.org",
1570         dmenuVarsCheck, dmenuSetVariables, NULL, 
1571         "ntpdate_enable=YES,ntpdate_flags=oceania.pool.ntp.org" },
1572       { "North America",        "north-america.pool.ntp.org",
1573         dmenuVarsCheck, dmenuSetVariables, NULL, 
1574         "ntpdate_enable=YES,ntpdate_flags=north-america.pool.ntp.org" },
1575       { "Argentina",            "tick.nap.com.ar",
1576         dmenuVarsCheck, dmenuSetVariables, NULL,
1577         "ntpdate_enable=YES,ntpdate_flags=tick.nap.com.ar" },
1578       { "Argentina #2",         "time.sinectis.com.ar",
1579         dmenuVarsCheck, dmenuSetVariables, NULL,
1580         "ntpdate_enable=YES,ntpdate_flags=time.sinectis.com.ar" },
1581       { "Argentina #3",         "tock.nap.com.ar",
1582         dmenuVarsCheck, dmenuSetVariables, NULL,
1583         "ntpdate_enable=YES,ntpdate_flags=tock.nap.com.ar" },
1584       { "Australia",            "au.pool.ntp.org",
1585         dmenuVarsCheck, dmenuSetVariables, NULL, 
1586         "ntpdate_enable=YES,ntpdate_flags=au.pool.ntp.org" },
1587       { "Australia #2",         "augean.eleceng.adelaide.edu.au",
1588         dmenuVarsCheck, dmenuSetVariables, NULL, 
1589         "ntpdate_enable=YES,ntpdate_flags=augean.eleceng.adelaide.edu.au" },
1590       { "Australia #3",         "ntp.adelaide.edu.au",
1591         dmenuVarsCheck, dmenuSetVariables, NULL, 
1592         "ntpdate_enable=YES,ntpdate_flags=ntp.adelaide.edu.au" },
1593       { "Australia #4",         "ntp.saard.net",
1594         dmenuVarsCheck, dmenuSetVariables, NULL, 
1595         "ntpdate_enable=YES,ntpdate_flags=ntp.saard.net" },
1596       { "Australia #5",         "time.deakin.edu.au",
1597         dmenuVarsCheck, dmenuSetVariables, NULL, 
1598         "ntpdate_enable=YES,ntpdate_flags=time.deakin.edu.au" },
1599       { "Belgium",              "ntp1.belbone.be",
1600         dmenuVarsCheck, dmenuSetVariables, NULL,
1601         "ntpdate_enable=YES,ntpdate_flags=ntp1.belbone.be" },
1602       { "Belgium #2",           "ntp2.belbone.be",
1603         dmenuVarsCheck, dmenuSetVariables, NULL,
1604         "ntpdate_enable=YES,ntpdate_flags=ntp2.belbone.be" },
1605       { "Brazil",               "ntp.cais.rnp.br",
1606         dmenuVarsCheck, dmenuSetVariables, NULL,
1607         "ntpdate_enable=YES,ntpdate_flags=ntp.cais.rnp.br" },
1608       { "Brazil #2",            "ntp.pop-df.rnp.br",
1609         dmenuVarsCheck, dmenuSetVariables, NULL,
1610         "ntpdate_enable=YES,ntpdate_flags=ntp.pop-df.rnp.br" },
1611       { "Brazil #3",            "ntp.ufes.br",
1612         dmenuVarsCheck, dmenuSetVariables, NULL,
1613         "ntpdate_enable=YES,ntpdate_flags=ntp.ufes.br" },
1614       { "Brazil #4",            "ntp1.pucpr.br",
1615         dmenuVarsCheck, dmenuSetVariables, NULL,
1616         "ntpdate_enable=YES,ntpdate_flags=ntp1.pucpr.br" },
1617       { "Canada",               "ca.pool.ntp.org",
1618         dmenuVarsCheck, dmenuSetVariables, NULL, 
1619         "ntpdate_enable=YES,ntpdate_flags=ca.pool.ntp.org" },
1620       { "Canada #2",            "ntp.cpsc.ucalgary.ca",
1621         dmenuVarsCheck, dmenuSetVariables, NULL, 
1622         "ntpdate_enable=YES,ntpdate_flags=ntp.cpsc.ucalgary.ca" },
1623       { "Canada #3",            "ntp1.cmc.ec.gc.ca",
1624         dmenuVarsCheck, dmenuSetVariables, NULL, 
1625         "ntpdate_enable=YES,ntpdate_flags=ntp1.cmc.ec.gc.ca" },
1626       { "Canada #4",            "ntp2.cmc.ec.gc.ca",
1627         dmenuVarsCheck, dmenuSetVariables, NULL, 
1628         "ntpdate_enable=YES,ntpdate_flags=ntp2.cmc.ec.gc.ca" },
1629       { "Canada #5",            "tick.utoronto.ca",
1630         dmenuVarsCheck, dmenuSetVariables, NULL, 
1631         "ntpdate_enable=YES,ntpdate_flags=tick.utoronto.ca" },
1632       { "Canada #6",            "time.chu.nrc.ca",
1633         dmenuVarsCheck, dmenuSetVariables, NULL, 
1634         "ntpdate_enable=YES,ntpdate_flags=time.chu.nrc.ca" },
1635       { "Canada #7",            "time.nrc.ca",
1636         dmenuVarsCheck, dmenuSetVariables, NULL, 
1637         "ntpdate_enable=YES,ntpdate_flags=time.nrc.ca" },
1638       { "Canada #8",            "timelord.uregina.ca",
1639         dmenuVarsCheck, dmenuSetVariables, NULL, 
1640         "ntpdate_enable=YES,ntpdate_flags=timelord.uregina.ca" },
1641       { "Canada #9",            "tock.utoronto.ca",
1642         dmenuVarsCheck, dmenuSetVariables, NULL, 
1643         "ntpdate_enable=YES,ntpdate_flags=tock.utoronto.ca" },
1644       { "Czech",                "ntp.karpo.cz",
1645         dmenuVarsCheck, dmenuSetVariables, NULL,
1646         "ntpdate_enable=YES,ntpdate_flags=ntp.karpo.cz" },
1647       { "Czech #2",             "ntp.cgi.cz",
1648         dmenuVarsCheck, dmenuSetVariables, NULL,
1649         "ntpdate_enable=YES,ntpdate_flags=ntp.cgi.cz" },
1650       { "Denmark",              "clock.netcetera.dk",
1651         dmenuVarsCheck, dmenuSetVariables, NULL,
1652         "ntpdate_enable=YES,ntpdate_flags=clock.netcetera.dk" },
1653       { "Denmark",              "clock2.netcetera.dk",
1654         dmenuVarsCheck, dmenuSetVariables, NULL,
1655         "ntpdate_enable=YES,ntpdate_flags=clock2.netcetera.dk" },
1656       { "Spain",                "slug.ctv.es",
1657         dmenuVarsCheck, dmenuSetVariables, NULL,
1658         "ntpdate_enable=YES,ntpdate_flags=slug.ctv.es" },
1659       { "Finland",              "tick.keso.fi",
1660         dmenuVarsCheck, dmenuSetVariables, NULL,
1661         "ntpdate_enable=YES,ntpdate_flags=tick.keso.fi" },
1662       { "Finland #2",           "tock.keso.fi",
1663         dmenuVarsCheck, dmenuSetVariables, NULL,
1664         "ntpdate_enable=YES,ntpdate_flags=tock.keso.fi" },
1665       { "France",               "ntp.obspm.fr",
1666         dmenuVarsCheck, dmenuSetVariables, NULL, 
1667         "ntpdate_enable=YES,ntpdate_flags=ntp.obspm.fr" },
1668       { "France #2",            "ntp.univ-lyon1.fr",
1669         dmenuVarsCheck, dmenuSetVariables, NULL,
1670         "ntpdate_enable=YES,ntpdate_flags=ntp.univ-lyon1.fr" },
1671       { "France #3",            "ntp.via.ecp.fr",
1672         dmenuVarsCheck, dmenuSetVariables, NULL,
1673         "ntpdate_enable=YES,ntpdate_flags=ntp.via.ecp.fr" },
1674       { "Croatia",              "zg1.ntp.carnet.hr",
1675         dmenuVarsCheck, dmenuSetVariables, NULL,
1676         "ntpdate_enable=YES,ntpdate_flags=zg1.ntp.carnet.hr" },
1677       { "Croatia #2",           "zg2.ntp.carnet.hr",
1678         dmenuVarsCheck, dmenuSetVariables, NULL,
1679         "ntpdate_enable=YES,ntpdate_flags=zg2.ntp.carnet.hr" },
1680       { "Croatia #3",           "st.ntp.carnet.hr",
1681         dmenuVarsCheck, dmenuSetVariables, NULL,
1682         "ntpdate_enable=YES,ntpdate_flags=st.ntp.carnet.hr" },
1683       { "Croatia #4",           "ri.ntp.carnet.hr",
1684         dmenuVarsCheck, dmenuSetVariables, NULL,
1685         "ntpdate_enable=YES,ntpdate_flags=ri.ntp.carnet.hr" },
1686       { "Croatia #5",           "os.ntp.carnet.hr",
1687         dmenuVarsCheck, dmenuSetVariables, NULL,
1688         "ntpdate_enable=YES,ntpdate_flags=os.ntp.carnet.hr" },
1689       { "Hungary",              "time.kfki.hu",
1690         dmenuVarsCheck, dmenuSetVariables, NULL,
1691         "ntpdate_enable=YES,ntpdate_flags=time.kfki.hu" },
1692       { "Indonesia",            "ntp.kim.lipi.go.id",
1693         dmenuVarsCheck, dmenuSetVariables, NULL,
1694         "ntpdate_enable=YES,ntpdate_flags=ntp.kim.lipi.go.id" },
1695       { "Ireland",              "ntp.maths.tcd.ie",
1696         dmenuVarsCheck, dmenuSetVariables, NULL,
1697         "ntpdate_enable=YES,ntpdate_flags=ntp.maths.tcd.ie" },
1698       { "Italy",                "it.pool.ntp.org",
1699         dmenuVarsCheck, dmenuSetVariables, NULL,
1700         "ntpdate_enable=YES,ntpdate_flags=it.pool.ntp.org" },
1701       { "Japan",                "ntp.jst.mfeed.ad.jp",
1702         dmenuVarsCheck, dmenuSetVariables, NULL,
1703         "ntpdate_enable=YES,ntpdate_flags=ntp.jst.mfeed.ad.jp" },
1704       { "Japan IPv6",           "ntp1.v6.mfeed.ad.jp",
1705         dmenuVarsCheck, dmenuSetVariables, NULL,
1706         "ntpdate_enable=YES,ntpdate_flags=ntp1.v6.mfeed.ad.jp" },
1707       { "Korea",                "time.nuri.net",
1708         dmenuVarsCheck, dmenuSetVariables, NULL, 
1709         "ntpdate_enable=YES,ntpdate_flags=time.nuri.net" },
1710       { "Mexico",               "mx.pool.ntp.org",
1711         dmenuVarsCheck, dmenuSetVariables, NULL,
1712         "ntpdate_enable=YES,ntpdate_flags=mx.pool.ntp.org" },
1713       { "Netherlands",          "ntp0.nl.net",
1714         dmenuVarsCheck, dmenuSetVariables, NULL,
1715         "ntpdate_enable=YES,ntpdate_flags=ntp0.nl.net" },
1716       { "Netherlands #2",       "ntp1.nl.net",
1717         dmenuVarsCheck, dmenuSetVariables, NULL,
1718         "ntpdate_enable=YES,ntpdate_flags=ntp1.nl.net" },
1719       { "Netherlands #3",       "ntp2.nl.net",
1720         dmenuVarsCheck, dmenuSetVariables, NULL,
1721         "ntpdate_enable=YES,ntpdate_flags=ntp2.nl.net" },
1722       { "Norway",               "fartein.ifi.uio.no",
1723         dmenuVarsCheck, dmenuSetVariables, NULL, 
1724         "ntpdate_enable=YES,ntpdate_flags=fartein.ifi.uio.no" },
1725       { "Norway #2",            "time.alcanet.no",
1726         dmenuVarsCheck, dmenuSetVariables, NULL, 
1727         "ntpdate_enable=YES,ntpdate_flags=time.alcanet.no" },
1728       { "New Zealand",          "ntp.massey.ac.nz",
1729         dmenuVarsCheck, dmenuSetVariables, NULL,
1730         "ntpdate_enable=YES,ntpdate_flags=ntp.massey.ac.nz" },
1731       { "New Zealand #2",       "ntp.public.otago.ac.nz",
1732         dmenuVarsCheck, dmenuSetVariables, NULL,
1733         "ntpdate_enable=YES,ntpdate_flags=ntp.public.otago.ac.nz" },
1734       { "New Zealand #3",       "tk1.ihug.co.nz",
1735         dmenuVarsCheck, dmenuSetVariables, NULL,
1736         "ntpdate_enable=YES,ntpdate_flags=tk1.ihug.co.nz" },
1737       { "New Zealand #4",       "ntp.waikato.ac.nz",
1738         dmenuVarsCheck, dmenuSetVariables, NULL,
1739         "ntpdate_enable=YES,ntpdate_flags=ntp.waikato.ac.nz" },
1740       { "Poland",               "info.cyf-kr.edu.pl",
1741         dmenuVarsCheck, dmenuSetVariables, NULL,
1742         "ntpdate_enable=YES,ntpdate_flags=info.cyf-kr.edu.pl" },
1743       { "Romania",              "ticks.roedu.net",
1744         dmenuVarsCheck, dmenuSetVariables, NULL,
1745         "ntpdate_enable=YES,ntpdate_flags=ticks.roedu.net" },
1746       { "Russia",               "ru.pool.ntp.org",
1747         dmenuVarsCheck, dmenuSetVariables, NULL,
1748         "ntpdate_enable=YES,ntpdate_flags=ru.pool.ntp.org" },
1749       { "Russia #2",            "ntp.psn.ru",
1750         dmenuVarsCheck, dmenuSetVariables, NULL,
1751         "ntpdate_enable=YES,ntpdate_flags=ntp.psn.ru" },
1752       { "Sweden",               "se.pool.ntp.org",
1753         dmenuVarsCheck, dmenuSetVariables, NULL, 
1754         "ntpdate_enable=YES,ntpdate_flags=se.pool.ntp.org" },
1755       { "Sweden #2",            "ntp.lth.se",
1756         dmenuVarsCheck, dmenuSetVariables, NULL, 
1757         "ntpdate_enable=YES,ntpdate_flags=ntp.lth.se" },
1758       { "Sweden #3",            "ntp1.sp.se",
1759         dmenuVarsCheck, dmenuSetVariables, NULL, 
1760         "ntpdate_enable=YES,ntpdate_flags=ntp1.sp.se" },
1761       { "Sweden #4",            "ntp2.sp.se",
1762         dmenuVarsCheck, dmenuSetVariables, NULL, 
1763         "ntpdate_enable=YES,ntpdate_flags=ntp2.sp.se" },
1764       { "Sweden #5",            "ntp.kth.se",
1765         dmenuVarsCheck, dmenuSetVariables, NULL, 
1766         "ntpdate_enable=YES,ntpdate_flags=ntp.kth.se" },
1767       { "Singapore",            "sg.pool.ntp.org",
1768         dmenuVarsCheck, dmenuSetVariables, NULL,
1769         "ntpdate_enable=YES,ntpdate_flags=sg.pool.ntp.org" },
1770       { "Slovenia",             "si.pool.ntp.org",
1771         dmenuVarsCheck, dmenuSetVariables, NULL,
1772         "ntpdate_enable=YES,ntpdate_flags=si.pool.ntp.org" },
1773       { "Slovenia #2",          "sizif.mf.uni-lj.si",
1774         dmenuVarsCheck, dmenuSetVariables, NULL,
1775         "ntpdate_enable=YES,ntpdate_flags=sizif.mf.uni-lj.si" },
1776       { "Slovenia #3",          "ntp1.arnes.si",
1777         dmenuVarsCheck, dmenuSetVariables, NULL,
1778         "ntpdate_enable=YES,ntpdate_flags=ntp1.arnes.si" },
1779       { "Slovenia #4",          "ntp2.arnes.si",
1780         dmenuVarsCheck, dmenuSetVariables, NULL,
1781         "ntpdate_enable=YES,ntpdate_flags=ntp2.arnes.si" },
1782       { "Slovenia #5",          "time.ijs.si",
1783         dmenuVarsCheck, dmenuSetVariables, NULL,
1784         "ntpdate_enable=YES,ntpdate_flags=time.ijs.si" },
1785       { "Scotland",             "ntp.cs.strath.ac.uk",
1786         dmenuVarsCheck, dmenuSetVariables, NULL,
1787         "ntpdate_enable=YES,ntpdate_flags=ntp.cs.strath.ac.uk" },
1788       { "Taiwan",              "time.stdtime.gov.tw",
1789         dmenuVarsCheck, dmenuSetVariables, NULL,
1790         "ntpdate_enable=YES,ntpdate_flags=time.stdtime.gov.tw" },
1791       { "Taiwan #2",           "clock.stdtime.gov.tw",
1792         dmenuVarsCheck, dmenuSetVariables, NULL,
1793         "ntpdate_enable=YES,ntpdate_flags=clock.stdtime.gov.tw" },
1794       { "Taiwan #3",           "tick.stdtime.gov.tw",
1795         dmenuVarsCheck, dmenuSetVariables, NULL,
1796         "ntpdate_enable=YES,ntpdate_flags=tick.stdtime.gov.tw" },
1797       { "Taiwan #4",           "tock.stdtime.gov.tw",
1798         dmenuVarsCheck, dmenuSetVariables, NULL,
1799         "ntpdate_enable=YES,ntpdate_flags=tock.stdtime.gov.tw" },
1800       { "Taiwan #5",           "watch.stdtime.gov.tw",
1801         dmenuVarsCheck, dmenuSetVariables, NULL,
1802         "ntpdate_enable=YES,ntpdate_flags=watch.stdtime.gov.tw" },
1803       { "United Kingdom",       "uk.pool.ntp.org",
1804         dmenuVarsCheck, dmenuSetVariables, NULL,
1805         "ntpdate_enable=YES,ntpdate_flags=uk.pool.ntp.org" },
1806       { "United Kingdom #2",    "ntp.exnet.com",
1807         dmenuVarsCheck, dmenuSetVariables, NULL,
1808         "ntpdate_enable=YES,ntpdate_flags=ntp.exnet.com" },
1809       { "United Kingdom #3",    "ntp0.uk.uu.net",
1810         dmenuVarsCheck, dmenuSetVariables, NULL,
1811         "ntpdate_enable=YES,ntpdate_flags=ntp0.uk.uu.net" },
1812       { "United Kingdom #4",    "ntp1.uk.uu.net",
1813         dmenuVarsCheck, dmenuSetVariables, NULL,
1814         "ntpdate_enable=YES,ntpdate_flags=ntp1.uk.uu.net" },
1815       { "United Kingdom #5",    "ntp2.uk.uu.net",
1816         dmenuVarsCheck, dmenuSetVariables, NULL,
1817         "ntpdate_enable=YES,ntpdate_flags=ntp2.uk.uu.net" },
1818       { "United Kingdom #6",    "ntp2a.mcc.ac.uk",
1819         dmenuVarsCheck, dmenuSetVariables, NULL,
1820         "ntpdate_enable=YES,ntpdate_flags=ntp2a.mcc.ac.uk" },
1821       { "United Kingdom #7",    "ntp2b.mcc.ac.uk",
1822         dmenuVarsCheck, dmenuSetVariables, NULL,
1823         "ntpdate_enable=YES,ntpdate_flags=ntp2b.mcc.ac.uk" },
1824       { "United Kingdom #8",    "ntp2c.mcc.ac.uk",
1825         dmenuVarsCheck, dmenuSetVariables, NULL,
1826         "ntpdate_enable=YES,ntpdate_flags=ntp2c.mcc.ac.uk" },
1827       { "United Kingdom #9",    "ntp2d.mcc.ac.uk",
1828         dmenuVarsCheck, dmenuSetVariables, NULL,
1829         "ntpdate_enable=YES,ntpdate_flags=ntp2d.mcc.ac.uk" },
1830       { "U.S.", "us.pool.ntp.org",
1831         dmenuVarsCheck, dmenuSetVariables, NULL, 
1832         "ntpdate_enable=YES,ntpdate_flags=us.pool.ntp.org" },
1833       { "U.S. AR",      "sushi.lyon.edu",
1834         dmenuVarsCheck, dmenuSetVariables, NULL, 
1835         "ntpdate_enable=YES,ntpdate_flags=sushi.compsci.lyon.edu" },
1836       { "U.S. AZ",      "ntp.drydog.com",
1837         dmenuVarsCheck, dmenuSetVariables, NULL, 
1838         "ntpdate_enable=YES,ntpdate_flags=ntp.drydog.com" },
1839       { "U.S. CA",      "ntp.ucsd.edu",
1840         dmenuVarsCheck, dmenuSetVariables, NULL, 
1841         "ntpdate_enable=YES,ntpdate_flags=ntp.ucsd.edu" },
1842       { "U.S. CA #2",   "ntp1.mainecoon.com",
1843         dmenuVarsCheck, dmenuSetVariables, NULL, 
1844         "ntpdate_enable=YES,ntpdate_flags=ntp1.mainecoon.com" },
1845       { "U.S. CA #3",   "ntp2.mainecoon.com",
1846         dmenuVarsCheck, dmenuSetVariables, NULL, 
1847         "ntpdate_enable=YES,ntpdate_flags=ntp2.mainecoon.com" },
1848       { "U.S. CA #4",   "reloj.kjsl.com",
1849         dmenuVarsCheck, dmenuSetVariables, NULL, 
1850         "ntpdate_enable=YES,ntpdate_flags=reloj.kjsl.com" },
1851       { "U.S. CA #5",   "time.five-ten-sg.com",
1852         dmenuVarsCheck, dmenuSetVariables, NULL, 
1853         "ntpdate_enable=YES,ntpdate_flags=time.five-ten-sg.com" },
1854       { "U.S. DE",      "louie.udel.edu",
1855         dmenuVarsCheck, dmenuSetVariables, NULL, 
1856         "ntpdate_enable=YES,ntpdate_flags=louie.udel.edu" },
1857       { "U.S. GA",              "ntp.shorty.com",
1858         dmenuVarsCheck, dmenuSetVariables, NULL, 
1859         "ntpdate_enable=YES,ntpdate_flags=ntp.shorty.com" },
1860       { "U.S. GA #2",           "rolex.usg.edu",
1861         dmenuVarsCheck, dmenuSetVariables, NULL, 
1862         "ntpdate_enable=YES,ntpdate_flags=rolex.usg.edu" },
1863       { "U.S. GA #3",           "timex.usg.edu",
1864         dmenuVarsCheck, dmenuSetVariables, NULL, 
1865         "ntpdate_enable=YES,ntpdate_flags=timex.usg.edu" },
1866       { "U.S. IL",      "ntp-0.cso.uiuc.edu",
1867         dmenuVarsCheck, dmenuSetVariables, NULL,
1868         "ntpdate_enable=YES,ntpdate_flags=ntp-0.cso.uiuc.edu" },
1869       { "U.S. IL #2",   "ntp-1.cso.uiuc.edu",
1870         dmenuVarsCheck, dmenuSetVariables, NULL,
1871         "ntpdate_enable=YES,ntpdate_flags=ntp-1.cso.uiuc.edu" },
1872       { "U.S. IL #3",   "ntp-1.mcs.anl.gov",
1873         dmenuVarsCheck, dmenuSetVariables, NULL,
1874         "ntpdate_enable=YES,ntpdate_flags=ntp-1.mcs.anl.gov" },
1875       { "U.S. IL #4",   "ntp-2.cso.uiuc.edu",
1876         dmenuVarsCheck, dmenuSetVariables, NULL,
1877         "ntpdate_enable=YES,ntpdate_flags=ntp-2.cso.uiuc.edu" },
1878       { "U.S. IL #5",   "ntp-2.mcs.anl.gov",
1879         dmenuVarsCheck, dmenuSetVariables, NULL,
1880         "ntpdate_enable=YES,ntpdate_flags=ntp-2.mcs.anl.gov" },
1881       { "U.S. IN",      "gilbreth.ecn.purdue.edu",
1882         dmenuVarsCheck, dmenuSetVariables, NULL,
1883         "ntpdate_enable=YES,ntpdate_flags=gilbreth.ecn.purdue.edu" },
1884       { "U.S. IN #2",   "harbor.ecn.purdue.edu",
1885         dmenuVarsCheck, dmenuSetVariables, NULL,
1886         "ntpdate_enable=YES,ntpdate_flags=harbor.ecn.purdue.edu" },
1887       { "U.S. IN #3",   "molecule.ecn.purdue.edu",
1888         dmenuVarsCheck, dmenuSetVariables, NULL,
1889         "ntpdate_enable=YES,ntpdate_flags=molecule.ecn.purdue.edu" },
1890       { "U.S. KS",      "ntp1.kansas.net",
1891         dmenuVarsCheck, dmenuSetVariables, NULL,
1892         "ntpdate_enable=YES,ntpdate_flags=ntp1.kansas.net" },
1893       { "U.S. KS #2",   "ntp2.kansas.net",
1894         dmenuVarsCheck, dmenuSetVariables, NULL,
1895         "ntpdate_enable=YES,ntpdate_flags=ntp2.kansas.net" },
1896       { "U.S. MA",      "ntp.ourconcord.net",
1897         dmenuVarsCheck, dmenuSetVariables, NULL,
1898         "ntpdate_enable=YES,ntpdate_flags=ntp.ourconcord.net" },
1899       { "U.S. MA #2",   "timeserver.cs.umb.edu",
1900         dmenuVarsCheck, dmenuSetVariables, NULL,
1901         "ntpdate_enable=YES,ntpdate_flags=timeserver.cs.umb.edu" },
1902       { "U.S. MN",      "ns.nts.umn.edu",
1903         dmenuVarsCheck, dmenuSetVariables, NULL,
1904         "ntpdate_enable=YES,ntpdate_flags=ns.nts.umn.edu" },
1905       { "U.S. MN #2",   "nss.nts.umn.edu",
1906         dmenuVarsCheck, dmenuSetVariables, NULL,
1907         "ntpdate_enable=YES,ntpdate_flags=nss.nts.umn.edu" },
1908       { "U.S. MO",      "time-ext.missouri.edu",
1909         dmenuVarsCheck, dmenuSetVariables, NULL,
1910         "ntpdate_enable=YES,ntpdate_flags=time-ext.missouri.edu" },
1911       { "U.S. MT",      "chronos1.umt.edu",
1912         dmenuVarsCheck, dmenuSetVariables, NULL,
1913         "ntpdate_enable=YES,ntpdate_flags=chronos1.umt.edu" },
1914       { "U.S. MT #2",   "chronos2.umt.edu",
1915         dmenuVarsCheck, dmenuSetVariables, NULL,
1916         "ntpdate_enable=YES,ntpdate_flags=chronos2.umt.edu" },
1917       { "U.S. MT #3",   "chronos3.umt.edu",
1918         dmenuVarsCheck, dmenuSetVariables, NULL,
1919         "ntpdate_enable=YES,ntpdate_flags=chronos3.umt.edu" },
1920       { "U.S. NC",      "clock1.unc.edu",
1921         dmenuVarsCheck, dmenuSetVariables, NULL,
1922         "ntpdate_enable=YES,ntpdate_flags=clock1.unc.edu" },
1923       { "U.S. NV",      "cuckoo.nevada.edu",
1924         dmenuVarsCheck, dmenuSetVariables, NULL,
1925         "ntpdate_enable=YES,ntpdate_flags=cuckoo.nevada.edu" },
1926       { "U.S. NV #2",   "tick.cs.unlv.edu",
1927         dmenuVarsCheck, dmenuSetVariables, NULL,
1928         "ntpdate_enable=YES,ntpdate_flags=tick.cs.unlv.edu" },
1929       { "U.S. NV #3",   "tock.cs.unlv.edu",
1930         dmenuVarsCheck, dmenuSetVariables, NULL,
1931         "ntpdate_enable=YES,ntpdate_flags=tock.cs.unlv.edu" },
1932       { "U.S. NY",      "ntp0.cornell.edu",
1933         dmenuVarsCheck, dmenuSetVariables, NULL,
1934         "ntpdate_enable=YES,ntpdate_flags=ntp0.cornell.edu" },
1935       { "U.S. NY #2",   "sundial.columbia.edu",
1936         dmenuVarsCheck, dmenuSetVariables, NULL,
1937         "ntpdate_enable=YES,ntpdate_flags=sundial.columbia.edu" },
1938       { "U.S. NY #3",   "timex.cs.columbia.edu",
1939         dmenuVarsCheck, dmenuSetVariables, NULL,
1940         "ntpdate_enable=YES,ntpdate_flags=timex.cs.columbia.edu" },
1941       { "U.S. PA",      "clock-1.cs.cmu.edu",
1942         dmenuVarsCheck, dmenuSetVariables, NULL,
1943         "ntpdate_enable=YES,ntpdate_flags=clock-1.cs.cmu.edu" },
1944       { "U.S. PA #2",   "clock-2.cs.cmu.edu",
1945         dmenuVarsCheck, dmenuSetVariables, NULL,
1946         "ntpdate_enable=YES,ntpdate_flags=clock-2.cs.cmu.edu" },
1947       { "U.S. PA #3",   "clock.psu.edu",
1948         dmenuVarsCheck, dmenuSetVariables, NULL,
1949         "ntpdate_enable=YES,ntpdate_flags=clock.psu.edu" },
1950       { "U.S. PA #4",   "fuzz.psc.edu",
1951         dmenuVarsCheck, dmenuSetVariables, NULL,
1952         "ntpdate_enable=YES,ntpdate_flags=fuzz.psc.edu" },
1953       { "U.S. PA #5",   "ntp-1.ece.cmu.edu",
1954         dmenuVarsCheck, dmenuSetVariables, NULL,
1955         "ntpdate_enable=YES,ntpdate_flags=ntp-1.ece.cmu.edu" },
1956       { "U.S. PA #6",   "ntp-2.ece.cmu.edu",
1957         dmenuVarsCheck, dmenuSetVariables, NULL,
1958         "ntpdate_enable=YES,ntpdate_flags=ntp-2.ece.cmu.edu" },
1959       { "U.S. TX",      "ntp.fnbhs.com",
1960         dmenuVarsCheck, dmenuSetVariables, NULL,
1961         "ntpdate_enable=YES,ntpdate_flags=ntp.fnbhs.com" },
1962       { "U.S. TX #2",   "ntp.tmc.edu",
1963         dmenuVarsCheck, dmenuSetVariables, NULL,
1964         "ntpdate_enable=YES,ntpdate_flags=ntp.tmc.edu" },
1965       { "U.S. TX #3",   "ntp5.tamu.edu",
1966         dmenuVarsCheck, dmenuSetVariables, NULL,
1967         "ntpdate_enable=YES,ntpdate_flags=ntp5.tamu.edu" },
1968       { "U.S. TX #4",   "tick.greyware.com",
1969         dmenuVarsCheck, dmenuSetVariables, NULL,
1970         "ntpdate_enable=YES,ntpdate_flags=tick.greyware.com" },
1971       { "U.S. TX #5",   "tock.greyware.com",
1972         dmenuVarsCheck, dmenuSetVariables, NULL,
1973         "ntpdate_enable=YES,ntpdate_flags=tock.greyware.com" },
1974       { "U.S. VA",      "ntp-1.vt.edu",
1975         dmenuVarsCheck, dmenuSetVariables, NULL,
1976         "ntpdate_enable=YES,ntpdate_flags=ntp-1.vt.edu" },
1977       { "U.S. VA #2",   "ntp-2.vt.edu",
1978         dmenuVarsCheck, dmenuSetVariables, NULL,
1979         "ntpdate_enable=YES,ntpdate_flags=ntp-2.vt.edu" },
1980       { "U.S. VA #3",   "ntp.cmr.gov",
1981         dmenuVarsCheck, dmenuSetVariables, NULL,
1982         "ntpdate_enable=YES,ntpdate_flags=ntp.cmr.gov" },
1983       { "U.S. VT",      "ntp0.state.vt.us",
1984         dmenuVarsCheck, dmenuSetVariables, NULL,
1985         "ntpdate_enable=YES,ntpdate_flags=ntp0.state.vt.us" },
1986       { "U.S. VT #2",   "ntp1.state.vt.us",
1987         dmenuVarsCheck, dmenuSetVariables, NULL,
1988         "ntpdate_enable=YES,ntpdate_flags=ntp1.state.vt.us" },
1989       { "U.S. VT #3",   "ntp2.state.vt.us",
1990         dmenuVarsCheck, dmenuSetVariables, NULL,
1991         "ntpdate_enable=YES,ntpdate_flags=ntp2.state.vt.us" },
1992       { "U.S. WA",      "ntp.tcp-udp.net",
1993         dmenuVarsCheck, dmenuSetVariables, NULL,
1994         "ntpdate_enable=YES,ntpdate_flags=ntp.tcp-udp.net" },
1995       { "U.S. WI",      "ntp1.cs.wisc.edu",
1996         dmenuVarsCheck, dmenuSetVariables, NULL,
1997         "ntpdate_enable=YES,ntpdate_flags=ntp1.cs.wisc.edu" },
1998       { "U.S. WI #2",   "ntp3.cs.wisc.edu",
1999         dmenuVarsCheck, dmenuSetVariables, NULL,
2000         "ntpdate_enable=YES,ntpdate_flags=ntp3.cs.wisc.edu" },
2001       { "South Africa", "ntp.cs.unp.ac.za",
2002         dmenuVarsCheck, dmenuSetVariables, NULL,
2003         "ntpdate_enable=YES,ntpdate_flags=ntp.cs.unp.ac.za" },
2004       { NULL } },
2005 };
2006
2007 #ifdef WITH_SYSCONS
2008 DMenu MenuSyscons = {
2009     DMENU_NORMAL_TYPE,
2010     "System Console Configuration",
2011     "The default system console driver for FreeBSD (syscons) has a\n"
2012     "number of configuration options which may be set according to\n"
2013     "your preference.\n\n"
2014     "When you are done setting configuration options, select Cancel.",
2015     "Configure your system console settings",
2016     NULL,
2017     { { "X Exit",       "Exit this menu (returning to previous)", NULL, dmenuExit },
2018 #ifdef PC98
2019       { "2 Keymap",     "Choose an alternate keyboard map",     NULL, dmenuSubmenu, NULL, &MenuSysconsKeymap },
2020       { "3 Repeat",     "Set the rate at which keys repeat",    NULL, dmenuSubmenu, NULL, &MenuSysconsKeyrate },
2021       { "4 Saver",      "Configure the screen saver",           NULL, dmenuSubmenu, NULL, &MenuSysconsSaver },
2022 #else
2023       { "2 Font",       "Choose an alternate screen font",      NULL, dmenuSubmenu, NULL, &MenuSysconsFont },
2024       { "3 Keymap",     "Choose an alternate keyboard map",     NULL, dmenuSubmenu, NULL, &MenuSysconsKeymap },
2025       { "4 Repeat",     "Set the rate at which keys repeat",    NULL, dmenuSubmenu, NULL, &MenuSysconsKeyrate },
2026       { "5 Saver",      "Configure the screen saver",           NULL, dmenuSubmenu, NULL, &MenuSysconsSaver },
2027       { "6 Screenmap",  "Choose an alternate screenmap",        NULL, dmenuSubmenu, NULL, &MenuSysconsScrnmap },
2028       { "7 Ttys",       "Choose console terminal type",         NULL, dmenuSubmenu, NULL, &MenuSysconsTtys },
2029 #endif
2030       { NULL } },
2031 };
2032
2033 #ifdef PC98
2034 DMenu MenuSysconsKeymap = {
2035     DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
2036     "System Console Keymap",
2037     "The default system console driver for FreeBSD (syscons) defaults\n"
2038     "to a standard \"PC-98x1\" keyboard map.  Users may wish to choose\n"
2039     "one of the other keymaps below.\n"
2040     "Note that sysinstall itself only uses the part of the keyboard map\n"
2041     "which is required to generate the ANSI character subset, but your\n"
2042     "choice of keymap will also be saved for later (fuller) use.",
2043     "Choose a keyboard map",
2044     NULL,
2045     { { "Japanese PC-98x1",             "Japanese PC-98x1 keymap",  dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=jp.pc98" },
2046       { " Japanese PC-98x1 (ISO)",      "Japanese PC-98x1 (ISO) keymap",  dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=jp.pc98.iso" },
2047       { NULL } },
2048 };
2049 #else
2050 DMenu MenuSysconsKeymap = {
2051     DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
2052     "System Console Keymap",
2053     "The default system console driver for FreeBSD (syscons) defaults\n"
2054     "to a standard \"American\" keyboard map.  Users in other countries\n"
2055     "(or with different keyboard preferences) may wish to choose one of\n"
2056     "the other keymaps below.\n"
2057     "Note that sysinstall itself only uses the part of the keyboard map\n"
2058     "which is required to generate the ANSI character subset, but your\n"
2059     "choice of keymap will also be saved for later (fuller) use.",
2060     "Choose a keyboard map",
2061     NULL,
2062     { { "Belgian",      "Belgian ISO keymap",   dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=be.iso" },
2063       { " Brazil CP850",        "Brazil CP850 keymap",  dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=br275.cp850" },
2064       { " Brazil ISO (accent)", "Brazil ISO keymap (accent keys)",      dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=br275.iso.acc" },
2065       { " Brazil ISO",  "Brazil ISO keymap",    dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=br275.iso" },
2066       { " Bulgarian BDS",       "Bulgarian BDS keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=bg.bds.ctrlcaps" },
2067       { " Bulgarian Phonetic",  "Bulgarian Phonetic keymap",    dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=bg.phonetic.ctrlcaps" },
2068       { "Central European ISO", "Central European ISO keymap",  dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=ce.iso2" },
2069       { " Croatian ISO",        "Croatian ISO keymap",  dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=hr.iso" },
2070       { " Czech ISO (accent)",  "Czech ISO keymap (accent keys)",       dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=cs.latin2.qwertz" },
2071       { "Danish CP865", "Danish Code Page 865 keymap",  dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=danish.cp865" },
2072       { " Danish ISO",  "Danish ISO keymap",    dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=danish.iso" },
2073       { "Estonian ISO", "Estonian ISO keymap",  dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=estonian.iso" },
2074       { " Estonian ISO 15", "Estonian ISO 8859-15 keymap",      dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=estonian.iso15" },
2075       { " Estonian CP850", "Estonian Code Page 850 keymap",     dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=estonian.cp850" },
2076       { "Finnish CP850","Finnish Code Page 850 keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=finnish.cp850" },
2077       { " Finnish ISO",  "Finnish ISO keymap",  dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=finnish.iso" },
2078       { " French ISO (accent)", "French ISO keymap (accent keys)",      dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=fr.iso.acc" },
2079       { " French ISO",  "French ISO keymap",    dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=fr.iso" },
2080       { "German CP850", "German Code Page 850 keymap",  dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=german.cp850"        },
2081       { " German ISO",  "German ISO keymap",    dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=german.iso" },
2082       { " Greek 101",   "Greek ISO keymap (101 keys)",  dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=gr.us101.acc" },
2083       { " Greek 104",   "Greek ISO keymap (104 keys)",  dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=el.iso07" },
2084       { " Greek ELOT",  "Greek ISO keymap (ELOT 1000)", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=gr.elot.acc" },
2085       { "Hungarian 101", "Hungarian ISO keymap (101 key)",      dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=hu.iso2.101keys" },
2086       { " Hungarian 102", "Hungarian ISO keymap (102 key)",     dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=hu.iso2.102keys" },
2087       { "Icelandic (accent)", "Icelandic ISO keymap (accent keys)",     dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=icelandic.iso.acc" },
2088       { " Icelandic",   "Icelandic ISO keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=icelandic.iso" },
2089       { " Italian",     "Italian ISO keymap",   dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=it.iso" },
2090       { "Japanese 106", "Japanese 106 keymap",  dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=jp.106" },
2091       { "Latin American (accent)",      "Latin American ISO keymap (accent keys)",      dmenuVarCheck,  dmenuSetKmapVariable,   NULL,   "keymap=latinamerican.iso.acc" },
2092       { " Latin American",      "Latin American ISO keymap",    dmenuVarCheck,  dmenuSetKmapVariable,   NULL,   "keymap=latinamerican" },
2093       { "Norway ISO",   "Norwegian ISO keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=norwegian.iso" },
2094       { "Polish ISO",   "Polish ISO keymap",    dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=pl_PL.ISO8859-2" },
2095       { " Portuguese (accent)", "Portuguese ISO keymap (accent keys)",  dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=pt.iso.acc" },
2096       { " Portuguese",  "Portuguese ISO keymap",        dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=pt.iso" },
2097       { "Russia KOI8-R", "Russian KOI8-R keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=ru.koi8-r" },
2098       { "Slovak", "Slovak ISO keymap",  dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=sk.iso2" },
2099       { "Slovenian", "Slovenian ISO keymap",    dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=si.iso" },
2100       { " Spanish (accent)", "Spanish ISO keymap (accent keys)",        dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=spanish.iso.acc" },
2101       { " Spanish",     "Spanish ISO keymap",   dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=spanish.iso" },
2102       { " Swedish CP850", "Swedish Code Page 850 keymap", dmenuVarCheck,        dmenuSetKmapVariable, NULL, "keymap=swedish.cp850" },
2103       { " Swedish ISO", "Swedish ISO keymap",   dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=swedish.iso" },
2104       { " Swiss French ISO (accent)", "Swiss French ISO keymap (accent keys)", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=swissfrench.iso.acc" },
2105       { " Swiss French ISO", "Swiss French ISO keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=swissfrench.iso" },
2106       { " Swiss French CP850", "Swiss French Code Page 850 keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=swissfrench.cp850" },
2107       { " Swiss German ISO (accent)", "Swiss German ISO keymap (accent keys)", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=swissgerman.iso.acc" },
2108       { " Swiss German ISO", "Swiss German ISO keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=swissgerman.iso" },
2109       { " Swiss German CP850", "Swiss German Code Page 850 keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=swissgerman.cp850" },
2110       { "UK CP850",     "UK Code Page 850 keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=uk.cp850" },
2111       { " UK ISO",      "UK ISO keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=uk.iso" },
2112       { " Ukrainian KOI8-U",    "Ukrainian KOI8-U keymap",      dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=ua.koi8-u" },
2113       { " Ukrainian KOI8-U+KOI8-R",     "Ukrainian KOI8-U+KOI8-R keymap (alter)",       dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=ua.koi8-u.shift.alt" },
2114       { " USA CapsLock->Ctrl",  "US standard (Caps as L-Control)",      dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=us.pc-ctrl" },
2115       { " USA Dvorak",  "US Dvorak keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=us.dvorak" },
2116       { " USA Dvorak (left)",   "US left handed Dvorak keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=us.dvorakl" },
2117       { " USA Dvorak (right)",  "US right handed Dvorak keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=us.dvorakr" },
2118       { " USA Emacs",   "US standard optimized for EMACS",      dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=us.emacs" },
2119       { " USA ISO",     "US ISO keymap",        dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=us.iso" },
2120       { " USA UNIX",    "US traditional UNIX-workstation",      dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=us.unix" },
2121       { NULL } },
2122 };
2123 #endif /* PC98 */
2124
2125 DMenu MenuSysconsKeyrate = {
2126     DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
2127     "System Console Keyboard Repeat Rate",
2128     "This menu allows you to set the speed at which keys repeat\n"
2129     "when held down.",
2130     "Choose a keyboard repeat rate",
2131     NULL,
2132     { { "Slow", "Slow keyboard repeat rate",    dmenuVarCheck,  dmenuSetVariable, NULL, "keyrate=slow" },
2133       { "Normal", "\"Normal\" keyboard repeat rate",    dmenuVarCheck,  dmenuSetVariable, NULL, "keyrate=normal" },
2134       { "Fast", "Fast keyboard repeat rate",    dmenuVarCheck,  dmenuSetVariable, NULL, "keyrate=fast" },
2135       { "Default", "Use default keyboard repeat rate",  dmenuVarCheck,  dmenuSetVariable, NULL, "keyrate=NO" },
2136       { NULL } },
2137 };
2138
2139 DMenu MenuSysconsSaver = {
2140     DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
2141     "System Console Screen Saver",
2142     "By default, the console driver will not attempt to do anything\n"
2143     "special with your screen when it's idle.  If you expect to leave your\n"
2144     "monitor switched on and idle for long periods of time then you should\n"
2145     "probably enable one of these screen savers to prevent burn-in.",
2146     "Choose a nifty-looking screen saver",
2147     NULL,
2148     { { "1 Blank",      "Simply blank the screen",
2149         dmenuVarCheck, configSaver, NULL, "saver=blank" },
2150       { "2 Daemon",     "\"BSD Daemon\" animated screen saver (text)",
2151         dmenuVarCheck, configSaver, NULL, "saver=daemon" },
2152       { "3 Fade",       "Fade out effect screen saver",
2153         dmenuVarCheck, configSaver, NULL, "saver=fade" },
2154       { "4 Fire",       "Flames effect screen saver",
2155         dmenuVarCheck, configSaver, NULL, "saver=fire" },
2156       { "5 Green",      "\"Green\" power saving mode (if supported by monitor)",
2157         dmenuVarCheck, configSaver, NULL, "saver=green" },
2158       { "6 Logo",       "\"BSD Daemon\" animated screen saver (graphics)",
2159         dmenuVarCheck, configSaver, NULL, "saver=logo" },
2160       { "7 Rain",       "Rain drops screen saver",
2161         dmenuVarCheck, configSaver, NULL, "saver=rain" },
2162       { "8 Snake",      "Draw a FreeBSD \"snake\" on your screen",
2163         dmenuVarCheck, configSaver, NULL, "saver=snake" },
2164       { "9 Star",       "A \"twinkling stars\" effect",
2165         dmenuVarCheck, configSaver, NULL, "saver=star" },
2166       { "Warp", "A \"stars warping\" effect",
2167         dmenuVarCheck, configSaver, NULL, "saver=warp" },
2168       { "Dragon", "Dragon screensaver (graphics)",
2169         dmenuVarCheck, configSaver, NULL, "saver=dragon" },
2170       { "Timeout",      "Set the screen saver timeout interval",
2171         NULL, configSaverTimeout, NULL, NULL, ' ', ' ', ' ' },
2172       { NULL } },
2173 };
2174
2175 #ifndef PC98
2176 DMenu MenuSysconsScrnmap = {
2177     DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
2178     "System Console Screenmap",
2179     "Unless you load a specific font, most PC hardware defaults to\n"
2180     "displaying characters in the IBM 437 character set.  However,\n"
2181     "in the Unix world, this character set is very rarely used.  Most\n"
2182     "Western European countries, for example, prefer ISO 8859-1.\n"
2183     "American users won't notice the difference since the bottom half\n"
2184     "of all these character sets is ANSI anyway.\n"
2185     "If your hardware is capable of downloading a new display font,\n"
2186     "you should probably choose that option.  However, for hardware\n"
2187     "where this is not possible (e.g. monochrome adapters), a screen\n"
2188     "map will give you the best approximation that your hardware can\n"
2189     "display at all.",
2190     "Choose a screen map",
2191     NULL,
2192     { { "1 None",                 "No screenmap, don't touch font", dmenuVarCheck, dmenuSetVariable, NULL, "scrnmap=NO" },
2193       { "2 ISO 8859-1 to IBM437", "W-Europe ISO 8859-1 to IBM 437 screenmap", dmenuVarCheck, dmenuSetVariable, NULL, "scrnmap=iso-8859-1_to_cp437" },
2194       { "3 ISO 8859-7 to IBM437", "Greek ISO 8859-7 to IBM 437 screenmap", dmenuVarCheck, dmenuSetVariable, NULL, "scrnmap=iso-8859-7_to_cp437" },
2195       { "4 US-ASCII to IBM437",   "US-ASCII to IBM 437 screenmap", dmenuVarCheck, dmenuSetVariable, NULL, "scrnmap=us-ascii_to_cp437" },
2196       { "5 KOI8-R to IBM866",     "Russian KOI8-R to IBM 866 screenmap", dmenuVarCheck, dmenuSetVariable, NULL, "scrnmap=koi8-r2cp866" },
2197       { "6 KOI8-U to IBM866u",    "Ukrainian KOI8-U to IBM 866u screenmap", dmenuVarCheck, dmenuSetVariable, NULL, "scrnmap=koi8-u2cp866u" },
2198       { NULL } },
2199 };
2200
2201 DMenu MenuSysconsTtys = {
2202     DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
2203     "System Console Terminal Type",
2204     "For various console encodings, a corresponding terminal type\n"
2205     "must be chosen in /etc/ttys.\n\n"
2206     "WARNING: For compatibility reasons, only entries starting with\n"
2207     "ttyv and terminal types starting with cons[0-9] can be changed\n"
2208     "via this menu.\n",
2209     "Choose a terminal type",
2210     NULL,
2211     { { "1 None",               "Don't touch anything",  dmenuVarCheck, dmenuSetVariable, NULL, VAR_CONSTERM "=NO" },
2212       { "2 IBM437 (VGA default)", "cons25", dmenuVarCheck, dmenuSetVariable, NULL, VAR_CONSTERM "=cons25" },
2213       { "3 ISO 8859-1",         "cons25l1", dmenuVarCheck, dmenuSetVariable, NULL, VAR_CONSTERM "=cons25l1" },
2214       { "4 ISO 8859-2",         "cons25l2", dmenuVarCheck, dmenuSetVariable, NULL, VAR_CONSTERM "=cons25l2" },
2215       { "5 ISO 8859-7",         "cons25l7", dmenuVarCheck, dmenuSetVariable, NULL, VAR_CONSTERM "=cons25l7" },
2216       { "6 KOI8-R",             "cons25r", dmenuVarCheck, dmenuSetVariable, NULL, VAR_CONSTERM "=cons25r" },
2217       { "7 KOI8-U",             "cons25u", dmenuVarCheck, dmenuSetVariable, NULL, VAR_CONSTERM "=cons25u" },
2218       { "8 US-ASCII",           "cons25w", dmenuVarCheck, dmenuSetVariable, NULL, VAR_CONSTERM "=cons25w" },
2219       { NULL } },
2220 };
2221
2222 DMenu MenuSysconsFont = {
2223     DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
2224     "System Console Font",
2225     "Most PC hardware defaults to displaying characters in the\n"
2226     "IBM 437 character set.  However, in the Unix world, this\n"
2227     "character set is very rarely used.  Most Western European\n"
2228     "countries, for example, prefer ISO 8859-1.\n"
2229     "American users won't notice the difference since the bottom half\n"
2230     "of all these charactersets is ANSI anyway.  However, they might\n"
2231     "want to load a font anyway to use the 30- or 50-line displays.\n"
2232     "If your hardware is capable of downloading a new display font,\n"
2233     "you can select the appropriate font below.",
2234     "Choose a font",
2235     NULL,
2236     { { "1 None", "Use hardware default font", dmenuVarCheck, dmenuSetVariables, NULL,
2237         "font8x8=NO,font8x14=NO,font8x16=NO" },
2238       { "2 IBM 437", "English and others, VGA default", dmenuVarCheck,  dmenuSetVariables, NULL,
2239         "font8x8=cp437-8x8,font8x14=cp437-8x14,font8x16=cp437-8x16" },
2240       { "3 IBM 850", "Western Europe, IBM encoding",    dmenuVarCheck,  dmenuSetVariables, NULL,
2241         "font8x8=cp850-8x8,font8x14=cp850-8x14,font8x16=cp850-8x16" },
2242       { "4 IBM 865", "Norwegian, IBM encoding", dmenuVarCheck,  dmenuSetVariables, NULL,
2243         "font8x8=cp865-8x8,font8x14=cp865-8x14,font8x16=cp865-8x16" },
2244       { "5 IBM 866", "Russian, IBM encoding (use with KOI8-R screenmap)",   dmenuVarCheck,  dmenuSetVariables, NULL,
2245         "font8x8=cp866-8x8,font8x14=cp866-8x14,font8x16=cp866b-8x16,mousechar_start=3" },
2246       { "6 IBM 866u", "Ukrainian, IBM encoding (use with KOI8-U screenmap)",   dmenuVarCheck,  dmenuSetVariables, NULL,
2247         "font8x8=cp866u-8x8,font8x14=cp866u-8x14,font8x16=cp866u-8x16,mousechar_start=3" },
2248       { "7 IBM 1251", "Cyrillic, MS Windows encoding",  dmenuVarCheck, dmenuSetVariables, NULL,
2249         "font8x8=cp1251-8x8,font8x14=cp1251-8x14,font8x16=cp1251-8x16,mousechar_start=3" },
2250       { "8 ISO 8859-1", "Western Europe, ISO encoding", dmenuVarCheck,  dmenuSetVariables, NULL,
2251         "font8x8=iso-8x8,font8x14=iso-8x14,font8x16=iso-8x16" },
2252       { "9 ISO 8859-2", "Eastern Europe, ISO encoding", dmenuVarCheck,  dmenuSetVariables, NULL,
2253         "font8x8=iso02-8x8,font8x14=iso02-8x14,font8x16=iso02-8x16" },
2254       { "a ISO 8859-4", "Baltic, ISO encoding", dmenuVarCheck,  dmenuSetVariables, NULL,
2255         "font8x8=iso04-8x8,font8x14=iso04-8x14,font8x16=iso04-8x16" },
2256       { "b ISO 8859-7", "Greek, ISO encoding", dmenuVarCheck,  dmenuSetVariables, NULL,
2257         "font8x8=iso07-8x8,font8x14=iso07-8x14,font8x16=iso07-8x16" },
2258       { "c ISO 8859-8", "Hebrew, ISO encoding", dmenuVarCheck,  dmenuSetVariables, NULL,
2259         "font8x8=iso08-8x8,font8x14=iso08-8x14,font8x16=iso08-8x16" },
2260       { "d ISO 8859-15", "Europe, ISO encoding", dmenuVarCheck,  dmenuSetVariables, NULL,
2261         "font8x8=iso15-8x8,font8x14=iso15-8x14,font8x16=iso15-8x16" },
2262       { "e SWISS", "English, better resolution", dmenuVarCheck, dmenuSetVariables, NULL,
2263         "font8x8=swiss-8x8,font8x14=NO,font8x16=swiss-8x16" },
2264       { NULL } },
2265 };
2266 #endif /* PC98 */
2267 #endif /* WITH_SYSCONS */
2268
2269 DMenu MenuUsermgmt = {
2270     DMENU_NORMAL_TYPE,
2271     "User and group management",
2272     "The submenus here allow to manipulate user groups and\n"
2273     "login accounts.\n",
2274     "Configure your user groups and users",
2275     NULL,
2276     { { "X Exit",       "Exit this menu (returning to previous)", NULL, dmenuExit },
2277       { "User",         "Add a new user to the system.",        NULL, userAddUser },
2278       { "Group",        "Add a new user group to the system.",  NULL, userAddGroup },
2279       { NULL } },
2280 };
2281
2282 DMenu MenuSecurity = {
2283     DMENU_CHECKLIST_TYPE | DMENU_SELECTION_RETURNS,
2284     "System Security Options Menu",
2285     "This menu allows you to configure aspects of the operating system security\n"
2286     "policy.  Please read the system documentation carefully before modifying\n"
2287     "these settings, as they may cause service disruption if used improperly.\n"
2288     "\n"
2289     "Most settings will take affect only following a system reboot.",
2290     "Configure system security options",
2291     NULL,
2292     { { "X Exit",      "Exit this menu (returning to previous)",
2293         checkTrue, dmenuExit, NULL, NULL, '<', '<', '<' },
2294       { " Securelevel", "Configure securelevels for the system",
2295         NULL, configSecurelevel },
2296 #if 0
2297       { " LOMAC",         "Use Low Watermark Mandatory Access Control at boot",
2298         dmenuVarCheck,  dmenuToggleVariable, NULL, "lomac_enable=YES" },
2299 #endif
2300       { " NFS port",    "Require that the NFS clients use reserved ports",
2301         dmenuVarCheck,  dmenuToggleVariable, NULL, "nfs_reserved_port_only=YES" },
2302       { NULL } },
2303 };
2304
2305 DMenu MenuSecurelevel = {
2306     DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
2307     "Securelevel Configuration Menu",
2308     "This menu allows you to select the securelevel your system runs with.\n"
2309     "When operating at a securelevel, certain root privileges are disabled,\n"
2310     "which may increase resistance to exploits and protect system integrity.\n"
2311     "In secure mode system flags may not be overriden by the root user,\n"
2312     "access to direct kernel memory is limited, and kernel modules may not\n"
2313     "be changed.  In highly secure mode, mounted file systems may not be\n"
2314     "modified on-disk, tampering with the system clock is prohibited.  In\n"
2315     "network secure mode configuration changes to firewalling are prohibited.\n",
2316     "Select a securelevel to operate at - F1 for help",
2317     "securelevel",
2318     { { "X Exit",      "Exit this menu (returning to previous)",
2319         checkTrue, dmenuExit, NULL, NULL, '<', '<', '<' },
2320       { "Disabled", "Disable securelevels", NULL, configSecurelevelDisabled, },
2321       { "Secure", "Secure mode", NULL, configSecurelevelSecure },
2322       { "Highly Secure", "Highly secure mode", NULL, configSecurelevelHighlySecure }, 
2323       { "Network Secure", "Network secure mode", NULL, configSecurelevelNetworkSecure },
2324       { NULL } }
2325 };
2326
2327 DMenu MenuFixit = {
2328     DMENU_NORMAL_TYPE,
2329     "Please choose a fixit option",
2330     "There are three ways of going into \"fixit\" mode:\n"
2331     "- you can use the live filesystem CDROM/DVD, in which case there will be\n"
2332     "  full access to the complete set of FreeBSD commands and utilities,\n"
2333     "- you can use the more limited (but perhaps customized) fixit floppy,\n"
2334     "- or you can start an Emergency Holographic Shell now, which is\n"
2335     "  limited to the subset of commands that is already available right now.",
2336     "Press F1 for more detailed repair instructions",
2337     "fixit",
2338 { { "X Exit",           "Exit this menu (returning to previous)",       NULL, dmenuExit },
2339   { "2 CDROM/DVD",      "Use the \"live\" filesystem CDROM/DVD",        NULL, installFixitCDROM },
2340   { "3 Floppy",         "Use a floppy generated from the fixit image",  NULL, installFixitFloppy },
2341   { "4 Shell",          "Start an Emergency Holographic Shell",         NULL, installFixitHoloShell },
2342   { NULL } },
2343 };