summaryrefslogtreecommitdiffstats
path: root/usr.sbin/sade
diff options
context:
space:
mode:
authornetchild <netchild@FreeBSD.org>2006-08-07 23:35:49 +0000
committernetchild <netchild@FreeBSD.org>2006-08-07 23:35:49 +0000
commit012251a3785007f4c2b62a2f3fa4f6565c0844ad (patch)
treeacf7384d53e487deaf4f17dac1e632ca6d68a316 /usr.sbin/sade
parent3eeb401259c48fc216756107d2aecf7064ab359a (diff)
downloadFreeBSD-src-012251a3785007f4c2b62a2f3fa4f6565c0844ad.zip
FreeBSD-src-012251a3785007f4c2b62a2f3fa4f6565c0844ad.tar.gz
Say welcome to 'sade', the SysAdmins Disk Editor. It's the fdisk and disklabel part
of sysinstall. So sysinstall may retire now, we have the important non-install part of it covered. ATM it doesn't understand GEOM stuff (like mirror, stripe, raid, ...), but patches to change this and to clean it up internally are more than welcome. Submitted by: mami@nyitolap.hu
Diffstat (limited to 'usr.sbin/sade')
-rw-r--r--usr.sbin/sade/Makefile73
-rw-r--r--usr.sbin/sade/command.c7
-rw-r--r--usr.sbin/sade/config.c763
-rw-r--r--usr.sbin/sade/devices.c264
-rw-r--r--usr.sbin/sade/disks.c12
-rw-r--r--usr.sbin/sade/dispatch.c184
-rw-r--r--usr.sbin/sade/dmenu.c79
-rw-r--r--usr.sbin/sade/globals.c11
-rw-r--r--usr.sbin/sade/install.c1042
-rw-r--r--usr.sbin/sade/keymap.c75
-rw-r--r--usr.sbin/sade/label.c11
-rw-r--r--usr.sbin/sade/list.h5
-rw-r--r--usr.sbin/sade/main.c70
-rw-r--r--usr.sbin/sade/menus.c2232
-rw-r--r--usr.sbin/sade/misc.c16
-rw-r--r--usr.sbin/sade/msg.c8
-rw-r--r--usr.sbin/sade/sade.8909
-rw-r--r--usr.sbin/sade/sade.h413
-rw-r--r--usr.sbin/sade/system.c227
-rw-r--r--usr.sbin/sade/termcap.c31
-rw-r--r--usr.sbin/sade/usb.c44
-rw-r--r--usr.sbin/sade/variable.c7
-rw-r--r--usr.sbin/sade/wizard.c3
23 files changed, 131 insertions, 6355 deletions
diff --git a/usr.sbin/sade/Makefile b/usr.sbin/sade/Makefile
index d9aeb5c..b67e5a1 100644
--- a/usr.sbin/sade/Makefile
+++ b/usr.sbin/sade/Makefile
@@ -4,15 +4,16 @@
_wizard= wizard.c
.endif
-PROG= sysinstall
-MAN= sysinstall.8
-SRCS= anonFTP.c cdrom.c command.c config.c devices.c dhcp.c \
- disks.c dispatch.c dist.c dmenu.c doc.c dos.c floppy.c \
- ftp.c globals.c http.c index.c install.c installUpgrade.c keymap.c \
- label.c main.c makedevs.c media.c menus.c misc.c modules.c \
- mouse.c msg.c network.c nfs.c options.c package.c \
- system.c tape.c tcpip.c termcap.c ttys.c ufs.c user.c \
- variable.c ${_wizard} keymap.h countries.h
+PROG= sade
+MAN= sade.8
+SRCS= command.c config.c devices.c \
+ disks.c dispatch.c dmenu.c \
+ globals.c install.c keymap.c \
+ label.c main.c makedevs.c menus.c misc.c \
+ msg.c system.c termcap.c \
+ variable.c ${_wizard} keymap.h
+
+# command.c
CFLAGS+= -DUSE_GZIP=1
.if ${MACHINE} == "pc98"
@@ -23,39 +24,8 @@ CFLAGS+= -I${.CURDIR}/../../gnu/lib/libdialog -I.
DPADD= ${LIBDIALOG} ${LIBNCURSES} ${LIBUTIL} ${LIBDISK} ${LIBFTPIO}
LDADD= -ldialog -lncurses -lutil -ldisk -lftpio
-#
-# When distributions have both UP and SMP kernels sysinstall
-# will probe for the number of cpus on the target machine and
-# automatically select which is appropriate. This can be overridden
-# through the menus or both kernels can be installed (with the
-# most "appropriate" one setup as /boot/kernel). For now this
-# is done for i386 and amd64; for other systems support must be
-# added to identify the cpu count if acpi and MPTable probing
-# is insufficient.
-#
-# The unmber of cpus probed is passed through the environment in
-# VAR_NCPUS ("ncpus") to scripts.
-#
-# Note that WITH_SMP is a compile time option that enables the
-# builtin menus for the SMP kernel configuration. If this kernel
-# is not built (see release/Makefile) then this should not be
-# enabled as sysinstall may try to select an SMP kernel config
-# where none is available. This option should not be needed--we
-# should probe for an SMP kernel in the distribution but doing
-# that is painful because of media changes and the structure of
-# sysinstall so for now it's a priori.
-#
-.if ${MACHINE} == "i386" || ${MACHINE_ARCH} == "amd64"
-SRCS+= acpi.c biosmptable.c
-.if exists(${.CURDIR}/../../sys/${MACHINE}/conf/SMP)
-CFLAGS+=-DWITH_SMP
-.endif
-DPADD+= ${LIBDEVINFO}
-LDADD+= -ldevinfo
-.endif
-
CLEANFILES= makedevs.c rtermcap
-CLEANFILES+= keymap.tmp keymap.h countries.tmp countries.h
+CLEANFILES+= keymap.tmp keymap.h
.if exists(${.CURDIR}/../../share/termcap/termcap.src)
RTERMCAP= TERMCAP=${.CURDIR}/../../share/termcap/termcap.src ./rtermcap
@@ -130,25 +100,4 @@ keymap.h:
( echo " { NULL, NULL }"; echo "};" ; echo "" ) >> keymap.tmp
mv keymap.tmp keymap.h
-countries.h: ${.CURDIR}/../../share/misc/iso3166
- rm -f countries.tmp
- awk 'BEGIN { \
- FS = "\t"; \
- num = 1; \
- print "DMenu MenuCountry = {"; \
- print " DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,"; \
- print " \"Country Selection\","; \
- print " \"Please choose a country, region, or group.\\n\""; \
- print " \"Select an item using [SPACE] or [ENTER].\","; \
- printf " NULL,\n NULL,\n { "; \
- } \
- /^[[:space:]]*#/ {next;} \
- {if (num > 1) {printf " ";} \
- print "{ \"" num "\", \"" $$4 "\"" \
- ", dmenuVarCheck, dmenuSetCountryVariable" \
- ", NULL, VAR_COUNTRY \"=" tolower($$1) "\" },"; \
- ++num;} \
- END {print " { NULL } }\n};\n";}' < ${.ALLSRC} > countries.tmp
- mv countries.tmp ${.TARGET}
-
.include <bsd.prog.mk>
diff --git a/usr.sbin/sade/command.c b/usr.sbin/sade/command.c
index 33ebc35..a9913d1 100644
--- a/usr.sbin/sade/command.c
+++ b/usr.sbin/sade/command.c
@@ -1,9 +1,4 @@
/*
- * The new sysinstall program.
- *
- * This is probably the last program in the `sysinstall' line - the next
- * generation being essentially a complete rewrite.
- *
* $FreeBSD$
*
* Copyright (c) 1995
@@ -34,7 +29,7 @@
*
*/
-#include "sysinstall.h"
+#include "sade.h"
#define MAX_NUM_COMMANDS 10
diff --git a/usr.sbin/sade/config.c b/usr.sbin/sade/config.c
index ba8e1cd..304e547 100644
--- a/usr.sbin/sade/config.c
+++ b/usr.sbin/sade/config.c
@@ -1,9 +1,4 @@
/*
- * The new sysinstall program.
- *
- * This is probably the last program in the `sysinstall' line - the next
- * generation being essentially a complete rewrite.
- *
* $FreeBSD$
*
* Copyright (c) 1995
@@ -34,7 +29,7 @@
*
*/
-#include "sysinstall.h"
+#include "sade.h"
#include <sys/disklabel.h>
#include <sys/wait.h>
#include <sys/errno.h>
@@ -182,7 +177,6 @@ configFstab(dialogMenuItem *self)
int i, cnt;
Chunk *c1, *c2;
- if (!RunningAsInit) {
if (file_readable("/etc/fstab"))
return DITEM_SUCCESS;
else {
@@ -190,7 +184,6 @@ configFstab(dialogMenuItem *self)
"any CD devices in use before running sysinstall then they may NOT\n"
"be found by this run!");
}
- }
devs = deviceFind(NULL, DEVICE_TYPE_DISK);
if (!devs) {
@@ -241,20 +234,6 @@ configFstab(dialogMenuItem *self)
fprintf(fstab, "/dev/%s\t\t%s\t\t%s\t%s\t\t%d\t%d\n", name_of(chunk_list[i]), mount_point(chunk_list[i]),
fstype(chunk_list[i]), fstype_short(chunk_list[i]), seq_num(chunk_list[i]), seq_num(chunk_list[i]));
- /* Now look for the CDROMs */
- devs = deviceFind(NULL, DEVICE_TYPE_CDROM);
- cnt = deviceCount(devs);
-
- /* Write out the CDROM entries */
- for (i = 0; i < cnt; i++) {
- char cdname[10];
-
- sprintf(cdname, "/cdrom%s", i ? itoa(i) : "");
- if (Mkdir(cdname))
- msgConfirm("Unable to make mount point for: %s", cdname);
- else
- fprintf(fstab, "/dev/%s\t\t%s\t\tcd9660\tro,noauto\t0\t0\n", devs[i]->name, cdname);
- }
fclose(fstab);
if (isDebug())
@@ -262,6 +241,7 @@ configFstab(dialogMenuItem *self)
return DITEM_SUCCESS;
}
+#if 0
/* Do the work of sucking in a config file.
* config is the filename to read in.
* lines is a fixed (max) sized array of char*
@@ -291,9 +271,11 @@ readConfig(char *config, char **lines, int max)
msgDebug("readConfig: Read %d lines from %s.\n", nlines, config);
return nlines;
}
+#endif
#define MAX_LINES 2000 /* Some big number we're not likely to ever reach - I'm being really lazy here, I know */
+#if 0
static void
readConfigFile(char *config, int marked)
{
@@ -319,7 +301,7 @@ readConfigFile(char *config, int marked)
/* If valid quotes, use it */
if (cp2) {
*cp2 = '\0';
- /* If we have a legit value, set it */
+ /* If we have a legit value, set it */
if (strlen(cp))
variable_set2(lines[i], cp, marked);
}
@@ -347,740 +329,5 @@ configEnvironmentRC_conf(void)
readConfigFile(configs[i].fname, configs[i].marked);
}
}
-
-/* Load the environment from a resolv.conf file */
-void
-configEnvironmentResolv(char *config)
-{
- char *lines[MAX_LINES];
- int i, nlines;
-
- nlines = readConfig(config, lines, MAX_LINES);
- if (nlines == -1)
- return;
- for (i = 0; i < nlines; i++) {
- Boolean name_set = variable_get(VAR_NAMESERVER) ? 1 : 0;
-
- if (!strncmp(lines[i], "domain", 6) && !variable_get(VAR_DOMAINNAME))
- variable_set2(VAR_DOMAINNAME, string_skipwhite(string_prune(lines[i] + 6)), 0);
- else if (!name_set && !strncmp(lines[i], "nameserver", 10)) {
- /* Only take the first nameserver setting - we're lame */
- variable_set2(VAR_NAMESERVER, string_skipwhite(string_prune(lines[i] + 10)), 0);
- }
- free(lines[i]);
- }
-}
-
-/* Version of below for dispatch routines */
-int
-configRC(dialogMenuItem *unused)
-{
- configRC_conf();
- return DITEM_SUCCESS;
-}
-
-/*
- * Write out rc.conf
- *
- * rc.conf is sorted if running as init and the needed utilities are
- * present
- *
- * If rc.conf is sorted, all variables in rc.conf which conflict with
- * the variables in the environment are removed from the original
- * rc.conf
- */
-void
-configRC_conf(void)
-{
- char line[256];
- FILE *rcSite, *rcOld;
- Variable *v;
- int write_header;
- time_t t_loc;
- char *cp;
- static int did_marker = 0;
- int do_sort;
- int do_merge;
- time_t tp;
-
- configTtys();
- write_header = !file_readable("/etc/rc.conf");
- do_sort = RunningAsInit && file_readable("/usr/bin/sort") &&
- file_readable("/usr/bin/uniq");
- do_merge = do_sort && file_readable("/etc/rc.conf");
-
- if(do_merge) {
- rcSite = fopen("/etc/rc.conf.new", "w");
- } else
- rcSite = fopen("/etc/rc.conf", "a");
- if (rcSite == NULL) {
- msgError("Error opening new rc.conf for writing: %s (%u)", strerror(errno), errno);
- return;
- }
-
- if (do_merge) {
- /* "Copy" the old rc.conf */
- rcOld = fopen("/etc/rc.conf", "r");
- if(!rcOld) {
- msgError("Error opening rc.conf for reading: %s (%u)", strerror(errno), errno);
- return;
- }
- while(fgets(line, sizeof(line), rcOld)) {
- if(line[0] == '#' || variable_check2(line) != 0)
- fprintf(rcSite, "%s", line);
- else
- fprintf(rcSite, "#REMOVED: %s", line);
- }
- fclose(rcOld);
- } else if (write_header) {
- fprintf(rcSite, "# This file now contains just the overrides from /etc/defaults/rc.conf.\n");
- fprintf(rcSite, "# Please make all changes to this file, not to /etc/defaults/rc.conf.\n\n");
- fprintf(rcSite, "# Enable network daemons for user convenience.\n");
- if ((t_loc = time(NULL)) != -1 && (cp = ctime(&t_loc)))
- fprintf(rcSite, "# Created: %s", cp);
- }
-
- /* Now do variable substitutions */
- for (v = VarHead; v; v = v->next) {
- if (v->dirty) {
- if (!did_marker) {
- time(&tp);
- fprintf(rcSite, "# -- sysinstall generated deltas -- # "
- "%s", ctime(&tp));
- did_marker = 1;
- }
- fprintf(rcSite, "%s=\"%s\"\n", v->name, v->value);
- v->dirty = 0;
- }
- }
- fclose(rcSite);
-
- if(do_merge) {
- if(rename("/etc/rc.conf.new", "/etc/rc.conf") != 0) {
- msgError("Error renaming temporary rc.conf: %s (%u)", strerror(errno), errno);
- return;
- }
- }
-
- /* Tidy up the resulting file if it's late enough in the installation
- for sort and uniq to be available */
- if (do_sort) {
- (void)vsystem("sort /etc/rc.conf | uniq > /etc/rc.conf.new && mv /etc/rc.conf.new /etc/rc.conf");
- }
-}
-
-int
-configSaver(dialogMenuItem *self)
-{
- variable_set((char *)self->data, 1);
- if (!variable_get(VAR_BLANKTIME))
- variable_set2(VAR_BLANKTIME, "300", 1);
- return DITEM_SUCCESS;
-}
-
-int
-configSaverTimeout(dialogMenuItem *self)
-{
- return (variable_get_value(VAR_BLANKTIME,
- "Enter time-out period in seconds for screen saver", 1) ?
- DITEM_SUCCESS : DITEM_FAILURE);
-}
-
-int
-configNTP(dialogMenuItem *self)
-{
- int status;
-
- status = variable_get_value(VAR_NTPDATE_FLAGS,
- "Enter the name of an NTP server", 1)
- ? DITEM_SUCCESS : DITEM_FAILURE;
- if (status == DITEM_SUCCESS) {
- static char tmp[255];
-
- snprintf(tmp, sizeof(tmp), "ntpdate_enable=YES,ntpdate_flags=%s",
- variable_get(VAR_NTPDATE_FLAGS));
- self->data = tmp;
- dmenuSetVariables(self);
- }
- return status;
-}
-
-int
-configCountry(dialogMenuItem *self)
-{
- int choice, scroll, curr, max;
-
- WINDOW *w = savescr();
-
- dialog_clear_norefresh();
- dmenuSetDefaultItem(&MenuCountry, NULL, NULL,
- VAR_COUNTRY "=" DEFAULT_COUNTRY, &choice, &scroll, &curr, &max);
- dmenuOpen(&MenuCountry, &choice, &scroll, &curr, &max, FALSE);
- restorescr(w);
- return DITEM_SUCCESS;
-}
-
-int
-configUsers(dialogMenuItem *self)
-{
- WINDOW *w = savescr();
-
- dialog_clear_norefresh();
- dmenuOpenSimple(&MenuUsermgmt, FALSE);
- restorescr(w);
- return DITEM_SUCCESS;
-}
-
-#ifdef WITH_LINUX
-int
-configLinux(dialogMenuItem *self)
-{
- WINDOW *w = savescr();
- int i;
-
- dialog_clear_norefresh();
- variable_set2(VAR_LINUX_ENABLE, "YES", 1);
- Mkdir("/compat/linux");
- msgNotify("Installing Linux compatibility library...");
- i = package_add("linux_base-8");
- restorescr(w);
- return i;
-}
-#endif
-
-#ifdef __alpha__
-int
-configOSF1(dialogMenuItem *self)
-{
-
- variable_set2(VAR_OSF1_ENABLE, "YES", 1);
- Mkdir("/compat/osf1");
- return DITEM_SUCCESS;
-}
-#endif
-
-int
-configSecurelevel(dialogMenuItem *self)
-{
- WINDOW *w = savescr();
-
- dialog_clear_norefresh();
- dmenuOpenSimple(&MenuSecurelevel, FALSE);
- restorescr(w);
- return DITEM_SUCCESS;
-}
-
-int
-configSecurelevelDisabled(dialogMenuItem *self)
-{
-
- variable_set2("kern_securelevel_enable", "NO", 1);
- return DITEM_SUCCESS;
-}
-
-int
-configSecurelevelSecure(dialogMenuItem *self)
-{
-
- variable_set2("kern_securelevel_enable", "YES", 1);
- variable_set2("kern_securelevel", "1", 1);
- return DITEM_SUCCESS;
-}
-
-int
-configSecurelevelHighlySecure(dialogMenuItem *self)
-{
-
- variable_set2("kern_securelevel_enable", "YES", 1);
- variable_set2("kern_securelevel", "2", 1);
- return DITEM_SUCCESS;
-}
-
-int
-configSecurelevelNetworkSecure(dialogMenuItem *self)
-{
-
- variable_set2("kern_securelevel_enable", "YES", 1);
- variable_set2("kern_securelevel", "3", 1);
- return DITEM_SUCCESS;
-}
-
-int
-configResolv(dialogMenuItem *ditem)
-{
- FILE *fp;
- char *cp, *c6p, *dp, *hp;
-
- cp = variable_get(VAR_NAMESERVER);
- if (!cp || !*cp)
- goto skip;
- Mkdir("/etc");
- fp = fopen("/etc/resolv.conf", "w");
- if (!fp)
- return DITEM_FAILURE;
- if (variable_get(VAR_DOMAINNAME))
- fprintf(fp, "domain\t%s\n", variable_get(VAR_DOMAINNAME));
- fprintf(fp, "nameserver\t%s\n", cp);
- fclose(fp);
- if (isDebug())
- msgDebug("Wrote out /etc/resolv.conf\n");
-
-skip:
- dp = variable_get(VAR_DOMAINNAME);
- cp = variable_get(VAR_IPADDR);
- c6p = variable_get(VAR_IPV6ADDR);
- hp = variable_get(VAR_HOSTNAME);
- /* Tack ourselves into /etc/hosts */
- fp = fopen("/etc/hosts", "w");
- if (!fp)
- return DITEM_FAILURE;
- /* Add an entry for localhost */
- if (dp) {
- fprintf(fp, "::1\t\t\tlocalhost.%s localhost\n", dp);
- fprintf(fp, "127.0.0.1\t\tlocalhost.%s localhost\n", dp);
- } else {
- fprintf(fp, "::1\t\t\tlocalhost\n");
- fprintf(fp, "127.0.0.1\t\tlocalhost\n");
- }
- /* Now the host entries, if applicable */
- if (((cp && cp[0] != '0') || (c6p && c6p[0] != '0')) && hp) {
- char cp2[255];
-
- if (!index(hp, '.'))
- cp2[0] = '\0';
- else {
- SAFE_STRCPY(cp2, hp);
- *(index(cp2, '.')) = '\0';
- }
- if (c6p && c6p[0] != '0') {
- fprintf(fp, "%s\t%s %s\n", c6p, hp, cp2);
- fprintf(fp, "%s\t%s.\n", c6p, hp);
- }
- if (cp && cp[0] != '0') {
- fprintf(fp, "%s\t\t%s %s\n", cp, hp, cp2);
- fprintf(fp, "%s\t\t%s.\n", cp, hp);
- }
- }
- fclose(fp);
- if (isDebug())
- msgDebug("Wrote out /etc/hosts\n");
- return DITEM_SUCCESS;
-}
-
-int
-configRouter(dialogMenuItem *self)
-{
- int ret;
-
- ret = variable_get_value(VAR_ROUTER,
- "Please specify the router you wish to use. Routed is\n"
- "provided with the stock system and gated is provided\n"
- "as an optional package which this installation system\n"
- "will attempt to load if you select gated. Any other\n"
- "choice of routing daemon will be assumed to be something\n"
- "the user intends to install themselves before rebooting\n"
- "the system. If you don't want any routing daemon, choose NO", 1)
- ? DITEM_SUCCESS : DITEM_FAILURE;
-
- if (ret == DITEM_SUCCESS) {
- char *cp = variable_get(VAR_ROUTER);
-
- if (cp && strcmp(cp, "NO")) {
- variable_set2(VAR_ROUTER_ENABLE, "YES", 1);
- if (!strcmp(cp, "gated")) {
- if (package_add("gated") != DITEM_SUCCESS) {
- msgConfirm("Unable to load gated package. Falling back to no router.");
- variable_unset(VAR_ROUTER);
- variable_unset(VAR_ROUTERFLAGS);
- variable_set2(VAR_ROUTER_ENABLE, "NO", 1);
- cp = NULL;
- }
- }
- if (cp) {
- /* Now get the flags, if they chose a router */
- ret = variable_get_value(VAR_ROUTERFLAGS,
- "Please Specify the routing daemon flags; if you're running routed\n"
- "then -q is the right choice for nodes and -s for gateway hosts.\n", 1)
- ? DITEM_SUCCESS : DITEM_FAILURE;
- if (ret != DITEM_SUCCESS)
- variable_unset(VAR_ROUTERFLAGS);
- }
- }
- else {
- /* No router case */
- variable_set2(VAR_ROUTER_ENABLE, "NO", 1);
- variable_unset(VAR_ROUTERFLAGS);
- variable_unset(VAR_ROUTER);
- }
- }
- else {
- variable_set2(VAR_ROUTER_ENABLE, "NO", 1);
- variable_unset(VAR_ROUTERFLAGS);
- variable_unset(VAR_ROUTER);
- }
- return ret;
-}
-
-/* Shared between us and index_initialize() */
-extern PkgNode Top, Plist;
-
-int
-configPackages(dialogMenuItem *self)
-{
- int i, restoreflag = 0;
- PkgNodePtr tmp;
-
- /* Did we get an INDEX? */
- i = index_initialize("packages/INDEX");
- if (DITEM_STATUS(i) == DITEM_FAILURE)
- return i;
-
- while (1) {
- int ret, pos, scroll;
-
- /* Bring up the packages menu */
- pos = scroll = 0;
- index_menu(&Top, &Top, &Plist, &pos, &scroll);
-
- if (Plist.kids && Plist.kids->name) {
- /* Now show the packing list menu */
- pos = scroll = 0;
- ret = index_menu(&Plist, &Plist, NULL, &pos, &scroll);
- if (ret & DITEM_LEAVE_MENU)
- break;
- else if (DITEM_STATUS(ret) != DITEM_FAILURE) {
- dialog_clear();
- restoreflag = 1;
- for (tmp = Plist.kids; tmp && tmp->name; tmp = tmp->next)
- (void)index_extract(mediaDevice, &Top, tmp, FALSE);
- break;
- }
- }
- else {
- msgConfirm("No packages were selected for extraction.");
- break;
- }
- }
- tmp = Plist.kids;
- while (tmp) {
- PkgNodePtr tmp2 = tmp->next;
-
- safe_free(tmp);
- tmp = tmp2;
- }
- index_init(NULL, &Plist);
- return DITEM_SUCCESS | (restoreflag ? DITEM_RESTORE : 0);
-}
-
-/* Load pcnfsd package */
-int
-configPCNFSD(dialogMenuItem *self)
-{
- int ret;
-
- ret = package_add("pcnfsd");
- if (DITEM_STATUS(ret) == DITEM_SUCCESS) {
- variable_set2(VAR_PCNFSD, "YES", 0);
- variable_set2("mountd_flags", "-n", 1);
- }
- return ret;
-}
-
-int
-configInetd(dialogMenuItem *self)
-{
- char cmd[256];
-
- WINDOW *w = savescr();
-
- if (msgYesNo("The Internet Super Server (inetd) allows a number of simple Internet\n"
- "services to be enabled, including finger, ftp, and telnetd. Enabling\n"
- "these services may increase risk of security problems by increasing\n"
- "the exposure of your system.\n\n"
- "With this in mind, do you wish to enable inetd?\n")) {
- variable_set2("inetd_enable", "NO", 1);
- } else {
- /* If inetd is enabled, we'll need an inetd.conf */
- variable_set2("inetd_enable", "YES", 1);
- if (!msgYesNo("inetd(8) relies on its configuration file, /etc/inetd.conf, to determine\n"
- "which of its Internet services will be available. The default FreeBSD\n"
- "inetd.conf(5) leaves all services disabled by default, so they must be\n"
- "specifically enabled in the configuration file before they will\n"
- "function, even once inetd(8) is enabled. Note that services for\n"
- "IPv6 must be separately enabled from IPv4 services.\n\n"
- "Select [Yes] now to invoke an editor on /etc/inetd.conf, or [No] to\n"
- "use the current settings.\n")) {
- sprintf(cmd, "%s /etc/inetd.conf", variable_get(VAR_EDITOR));
- dialog_clear();
- systemExecute(cmd);
- }
- }
- restorescr(w);
- return DITEM_SUCCESS;
-}
-
-int
-configNFSServer(dialogMenuItem *self)
-{
- char cmd[256];
- int retval = 0;
-
- /* If we're an NFS server, we need an exports file */
- if (!file_readable("/etc/exports")) {
- WINDOW *w = savescr();
-
- if (file_readable("/etc/exports.disabled"))
- vsystem("mv /etc/exports.disabled /etc/exports");
- else {
- dialog_clear_norefresh();
- msgConfirm("Operating as an NFS server means that you must first configure\n"
- "an /etc/exports file to indicate which hosts are allowed certain\n"
- "kinds of access to your local file systems.\n"
- "Press [ENTER] now to invoke an editor on /etc/exports\n");
- vsystem("echo '#The following examples export /usr to 3 machines named after ducks,' > /etc/exports");
- vsystem("echo '#/usr/src and /usr/ports read-only to machines named after trouble makers' >> /etc/exports");
- vsystem("echo '#/home and all directories under it to machines named after dead rock stars' >> /etc/exports");
- vsystem("echo '#and, /a to a network of privileged machines allowed to write on it as root.' >> /etc/exports");
- vsystem("echo '#/usr huey louie dewie' >> /etc/exports");
- vsystem("echo '#/usr/src /usr/obj -ro calvin hobbes' >> /etc/exports");
- vsystem("echo '#/home -alldirs janice jimmy frank' >> /etc/exports");
- vsystem("echo '#/a -maproot=0 -network 10.0.1.0 -mask 255.255.248.0' >> /etc/exports");
- vsystem("echo '#' >> /etc/exports");
- vsystem("echo '# You should replace these lines with your actual exported filesystems.' >> /etc/exports");
- vsystem("echo \"# Note that BSD's export syntax is 'host-centric' vs. Sun's 'FS-centric' one.\" >> /etc/exports");
- vsystem("echo >> /etc/exports");
- sprintf(cmd, "%s /etc/exports", variable_get(VAR_EDITOR));
- dialog_clear();
- systemExecute(cmd);
- }
- variable_set2(VAR_NFS_SERVER, "YES", 1);
- retval = configRpcBind(NULL);
- restorescr(w);
- }
- else if (variable_get(VAR_NFS_SERVER)) { /* We want to turn it off again? */
- vsystem("mv -f /etc/exports /etc/exports.disabled");
- variable_unset(VAR_NFS_SERVER);
- }
- return DITEM_SUCCESS | retval;
-}
-
-/*
- * Extend the standard dmenuToggleVariable() method to also check and set
- * the rpcbind variable if needed.
- */
-int
-configRpcBind(dialogMenuItem *self)
-{
- int retval = 0;
- int doupdate = 1;
-
- if (self != NULL) {
- retval = dmenuToggleVariable(self);
- if (strcmp(variable_get(self->data), "YES") != 0)
- doupdate = 0;
- }
-
- if (doupdate && strcmp(variable_get(VAR_RPCBIND_ENABLE), "YES") != 0) {
- variable_set2(VAR_RPCBIND_ENABLE, "YES", 1);
- retval |= DITEM_REDRAW;
- }
-
- return retval;
-}
-
-int
-configEtcTtys(dialogMenuItem *self)
-{
- char cmd[256];
-
- WINDOW *w = savescr();
-
- /* Simply prompt for confirmation, then edit away. */
- if (msgYesNo("Configuration of system TTYs requires editing the /etc/ttys file.\n"
- "Typical configuration activities might include enabling getty(8)\n"
- "on the first serial port to allow login via serial console after\n"
- "reboot, or to enable xdm. The default ttys file enables normal\n"
- "virtual consoles, and most sites will not need to perform manual\n"
- "configuration.\n\n"
- "To load /etc/ttys in the editor, select [Yes], otherwise, [No].")) {
- } else {
- configTtys();
- sprintf(cmd, "%s /etc/ttys", variable_get(VAR_EDITOR));
- dialog_clear();
- systemExecute(cmd);
- }
-
- restorescr(w);
- return DITEM_SUCCESS;
-}
-
-#ifdef __i386__
-int
-checkLoaderACPI(void)
-{
- char val[4];
-
- if (kenv(KENV_GET, "loader.acpi_disabled_by_user", &val[0], 4) <= 0) {
- return (0);
- }
-
- if (strtol(&val[0], NULL, 10) <= 0) {
- return (0);
- }
-
- return (1);
-}
-
-int
-configLoaderACPI(int disable)
-{
- FILE *ldconf;
-
- ldconf = fopen("/boot/loader.conf", "a");
- if (ldconf == NULL) {
- msgConfirm("Unable to open /boot/loader.conf. Please consult the\n"
- "FreeBSD Handbook for instructions on disabling ACPI");
- return DITEM_FAILURE;
- }
-
- fprintf(ldconf, "# --- Generated by sysinstall ---\n");
- fprintf(ldconf, "hint.acpi.0.disabled=%d\n", disable);
- fclose(ldconf);
-
- return DITEM_SUCCESS;
-}
#endif
-int
-configMTAPostfix(dialogMenuItem *self)
-{
- int ret;
- FILE *perconf;
-
- if(setenv("POSTFIX_DEFAULT_MTA", "YES", 1) != 0)
- msgError("Error setting the enviroment variable POSTFIX_DEFAULT_MTA: %s (%u)",
- strerror(errno), errno);
-
- ret = package_add("postfix-2.2");
- unsetenv("POSTFIX_DEFAULT_MTA");
-
- if(DITEM_STATUS(ret) == DITEM_FAILURE) {
- msgConfirm("An error occurred while adding the postfix package\n"
- "Please change installation media and try again.");
- return ret;
- }
-
- variable_set2(VAR_SENDMAIL_ENABLE, "YES", 1);
- variable_set2("sendmail_flags", "-bd", 1);
- variable_set2("sendmail_outbound_enable", "NO", 1);
- variable_set2("sendmail_submit_enable", "NO", 1);
- variable_set2("sendmail_msp_queue_enable", "NO", 1);
-
- perconf = fopen("/etc/periodic.conf", "a");
- if (perconf == NULL) {
- msgConfirm("Unable to open /etc/periodic.conf.\n"
- "The daily cleanup scripts might generate errors when\n"
- "trying to run some sendmail only cleanup scripts.\n"
- "Please consult the documentation for the postfix port on how to\n"
- "fix this.");
-
- /* Not really a serious problem, so we return success */
- return DITEM_SUCCESS;
- }
-
- fprintf(perconf, "# --- Generated by sysinstall ---\n");
- fprintf(perconf, "daily_clean_hoststat_enable=\"NO\"\n");
- fprintf(perconf, "daily_status_mail_rejects_enable=\"NO\"\n");
- fprintf(perconf, "daily_status_include_submit_mailq=\"NO\"\n");
- fprintf(perconf, "daily_submit_queuerun=\"NO\"\n");
- fclose(perconf);
-
- msgConfirm("Postfix is now installed and enabled as the default MTA.\n"
- "Please check that the configuration works as expected.\n"
- "See the Postfix documentation for more information.\n"
- "The documentation can be found in /usr/local/share/doc/postfix/\n"
- "or on the Postfix website at http://www.postfix.org/.");
-
- return DITEM_SUCCESS;
-}
-
-int
-configMTAExim(dialogMenuItem *self)
-{
- int ret;
- FILE *perconf, *mailerconf, *newsyslogconf;
-
- ret = package_add("exim");
-
- if(DITEM_STATUS(ret) == DITEM_FAILURE) {
- msgConfirm("An error occurred while adding the exim package\n"
- "Please change installation media and try again.");
- return ret;
- }
-
- variable_set2(VAR_SENDMAIL_ENABLE, "NONE", 1);
- variable_set2("exim_enable", "YES", 1);
-
- /* Update periodic.conf */
- perconf = fopen("/etc/periodic.conf", "a");
- if (perconf == NULL) {
- /* Not really a serious problem, so we do not abort */
- msgConfirm("Unable to open /etc/periodic.conf.\n"
- "The daily cleanup scripts might generate errors when\n"
- "trying to run some sendmail only cleanup scripts.\n"
- "Please consult the documentation for the exim port on how to\n"
- "fix this.");
- } else {
- fprintf(perconf, "# --- Generated by sysinstall ---\n");
- fprintf(perconf, "daily_clean_hoststat_enable=\"NO\"\n");
- fprintf(perconf, "daily_status_include_submit_mailq=\"NO\"\n");
- fprintf(perconf, "daily_status_mail_rejects_enable=\"NO\"\n");
- fprintf(perconf, "daily_submit_queuerun=\"NO\"\n");
- fclose(perconf);
- }
-
- /* Update mailer.conf */
- vsystem("mv -f /etc/mail/mailer.conf /etc/mail/mailer.conf.old");
- mailerconf = fopen("/etc/mail/mailer.conf", "w");
- if (mailerconf == NULL) {
- /* Not really a serious problem, so we do not abort */
- msgConfirm("Unable to open /etc/mailer.conf.\n"
- "Some programs which use the sendmail wrappers may not work.\n"
- "Please consult the documentation for the exim port on how\n"
- "to correct this.");
- } else {
- fprintf(mailerconf, "# --- Generated by sysinstall ---\n");
- fprintf(mailerconf, "# Execute exim instead of sendmail\n");
- fprintf(mailerconf, "#\n");
- fprintf(mailerconf, "sendmail /usr/local/sbin/exim\n");
- fprintf(mailerconf, "send-mail /usr/local/sbin/exim\n");
- fprintf(mailerconf, "mailq /usr/local/sbin/exim\n");
- fprintf(mailerconf, "newaliases /usr/local/sbin/exim\n");
- fprintf(mailerconf, "hoststat /usr/bin/true\n");
- fprintf(mailerconf, "purgestat /usr/bin/true\n");
- fclose(mailerconf);
- }
-
- /* Make newsyslog rotate exim logfiles */
- newsyslogconf = fopen("/etc/newsyslog.conf", "a");
- if (newsyslogconf == NULL) {
- /* Not really a serious problem, so we do not abort */
- msgConfirm("Unable to open /etc/newsyslog.conf.\n"
- "The exim logfiles will not be rotated.\n"
- "Please consult the documentation for the exim port on how to\n"
- "rotate the logfiles.");
- } else {
- fprintf(newsyslogconf, "# --- Generated by sysinstall ---\n");
- fprintf(newsyslogconf, "/var/log/exim/mainlog mailnull:mail 640 7 * @T00 ZN\n");
- fprintf(newsyslogconf, "/var/log/exim/rejectlog mailnull:mail 640 7 * @T00 ZN\n");
- fclose(newsyslogconf);
- }
-
- msgConfirm("Exim is now installed and enabled as the default MTA.\n"
- "Please check that the configuration works as expected.\n"
- "See the Exim documentation for more information.\n"
- "The documentation can be found in /usr/local/share/doc/exim/\n"
- "or on the Exim website at http://www.exim.org/.");
-
- return DITEM_SUCCESS;
-}
diff --git a/usr.sbin/sade/devices.c b/usr.sbin/sade/devices.c
index 33fbc7d..89f0389 100644
--- a/usr.sbin/sade/devices.c
+++ b/usr.sbin/sade/devices.c
@@ -1,9 +1,4 @@
/*
- * The new sysinstall program.
- *
- * This is probably the last program in the `sysinstall' line - the next
- * generation being essentially a complete rewrite.
- *
* $FreeBSD$
*
* Copyright (c) 1995
@@ -34,39 +29,27 @@
*
*/
-#include "sysinstall.h"
+#include "sade.h"
#include <sys/fcntl.h>
#include <sys/param.h>
#include <sys/socket.h>
#include <sys/ioctl.h>
#include <sys/errno.h>
#include <sys/time.h>
-#include <net/if.h>
-#include <net/if_var.h>
-#include <net/if_dl.h>
-#include <netinet/in.h>
-#include <netinet/in_var.h>
-#include <arpa/inet.h>
+#include <sys/stat.h>
#include <ctype.h>
#include <libdisk.h>
+/* how much to bias minor number for a given /dev/<ct#><un#>s<s#> slice */
+#define SLICE_DELTA (0x10000)
+
static Device *Devices[DEV_MAX];
static int numDevs;
-#define DEVICE_ENTRY(type, name, descr, max) { type, name, descr, max }
+#define DEVICE_ENTRY(type, name, descr, max) { type, name, descr, max }
-#define CDROM(name, descr, max) \
- DEVICE_ENTRY(DEVICE_TYPE_CDROM, name, descr, max)
-#define TAPE(name, descr, max) \
- DEVICE_ENTRY(DEVICE_TYPE_TAPE, name, descr, max)
-#define DISK(name, descr, max) \
+#define DISK(name, descr, max) \
DEVICE_ENTRY(DEVICE_TYPE_DISK, name, descr, max)
-#define FLOPPY(name, descr, max) \
- DEVICE_ENTRY(DEVICE_TYPE_FLOPPY, name, descr, max)
-#define NETWORK(name, descr) \
- DEVICE_ENTRY(DEVICE_TYPE_NETWORK, name, descr, 0)
-#define SERIAL(name, descr, max) \
- DEVICE_ENTRY(DEVICE_TYPE_NETWORK, name, descr, max)
static struct _devname {
DeviceType type;
@@ -74,83 +57,18 @@ static struct _devname {
char *description;
int max;
} device_names[] = {
- CDROM("cd%d", "SCSI CDROM drive", 4),
- CDROM("mcd%d", "Mitsumi (old model) CDROM drive", 4),
- CDROM("scd%d", "Sony CDROM drive - CDU31/33A type", 4),
- CDROM("acd%d", "ATAPI/IDE CDROM", 4),
- TAPE("sa%d", "SCSI tape drive", 4),
- TAPE("rwt%d", "Wangtek tape drive", 4),
- DISK("da%d", "SCSI disk device", 16),
- DISK("ad%d", "ATA/IDE disk device", 16),
- DISK("ar%d", "ATA/IDE RAID device", 16),
- DISK("afd%d", "ATAPI/IDE floppy device", 4),
- DISK("mlxd%d", "Mylex RAID disk", 4),
- DISK("amrd%d", "AMI MegaRAID drive", 4),
- DISK("idad%d", "Compaq RAID array", 4),
- DISK("twed%d", "3ware ATA RAID array", 4),
- DISK("aacd%d", "Adaptec FSA RAID array", 4),
- DISK("ipsd%d", "IBM ServeRAID RAID array", 4),
- DISK("mfid%d", "LSI MegaRAID SAS array", 4),
- FLOPPY("fd%d", "floppy drive unit A", 4),
- SERIAL("cuad%d", "%s on device %s (COM%d)", 16),
- NETWORK("an", "Aironet 4500/4800 802.11 wireless adapter"),
- NETWORK("aue", "ADMtek USB ethernet adapter"),
- NETWORK("axe", "ASIX Electronics USB ethernet adapter"),
- NETWORK("bfe", "Broadcom BCM440x PCI ethernet card"),
- NETWORK("bge", "Broadcom BCM570x PCI gigabit ethernet card"),
- NETWORK("cue", "CATC USB ethernet adapter"),
- NETWORK("fpa", "DEC DEFPA PCI FDDI card"),
- NETWORK("sr", "SDL T1/E1 sync serial PCI card"),
- NETWORK("cc3i", "SDL HSSI sync serial PCI card"),
- NETWORK("en", "Efficient Networks ATM PCI card"),
- NETWORK("dc", "DEC/Intel 21143 (and clones) PCI fast ethernet card"),
- NETWORK("de", "DEC DE435 PCI NIC or other DC21040-AA based card"),
- NETWORK("fxp", "Intel EtherExpress Pro/100B PCI Fast Ethernet card"),
- NETWORK("ed", "Novell NE1000/2000; 3C503; NE2000-compatible PCMCIA"),
- NETWORK("ep", "3Com 3C509 ethernet card/3C589 PCMCIA"),
- NETWORK("el", "3Com 3C501 ethernet card"),
- NETWORK("em", "Intel(R) PRO/1000 ethernet card"),
- NETWORK("ex", "Intel EtherExpress Pro/10 ethernet card"),
- NETWORK("fe", "Fujitsu MB86960A/MB86965A ethernet card"),
- NETWORK("gem", "Apple/Sun GMAC ethernet adapter"),
- NETWORK("ie", "AT&T StarLAN 10 and EN100; 3Com 3C507; NI5210"),
- NETWORK("ix", "Intel Etherexpress ethernet card"),
- NETWORK("kue", "Kawasaki LSI USB ethernet adapter"),
- NETWORK("le", "DEC EtherWorks 2 or 3 ethernet card"),
- NETWORK("lnc", "Lance/PCnet (Isolan/Novell NE2100/NE32-VL) ethernet"),
- NETWORK("lge", "Level 1 LXT1001 gigabit ethernet card"),
- NETWORK("nge", "NatSemi PCI gigabit ethernet card"),
- NETWORK("pcn", "AMD Am79c79x PCI ethernet card"),
- NETWORK("ray", "Raytheon Raylink 802.11 wireless adaptor"),
- NETWORK("re", "RealTek 8139C+/8169/8169S/8110S PCI ethernet card"),
- NETWORK("rl", "RealTek 8129/8139 PCI ethernet card"),
- NETWORK("rue", "RealTek USB ethernet card"),
- NETWORK("sf", "Adaptec AIC-6915 PCI ethernet card"),
- NETWORK("sis", "SiS 900/SiS 7016 PCI ethernet card"),
-#ifdef PC98
- NETWORK("snc", "SONIC ethernet card"),
-#endif
- NETWORK("sn", "SMC/Megahertz ethernet card"),
- NETWORK("ste", "Sundance ST201 PCI ethernet card"),
- NETWORK("sk", "SysKonnect PCI gigabit ethernet card"),
- NETWORK("tx", "SMC 9432TX ethernet card"),
- NETWORK("txp", "3Com 3cR990 ethernet card"),
- NETWORK("ti", "Alteon Networks PCI gigabit ethernet card"),
- NETWORK("tl", "Texas Instruments ThunderLAN PCI ethernet card"),
- NETWORK("vge", "VIA VT612x PCI gigabit ethernet card"),
- NETWORK("vr", "VIA VT3043/VT86C100A Rhine PCI ethernet card"),
- NETWORK("vlan", "IEEE 802.1Q VLAN network interface"),
- NETWORK("vx", "3COM 3c590 / 3c595 ethernet card"),
- NETWORK("wb", "Winbond W89C840F PCI ethernet card"),
- NETWORK("wi", "Lucent WaveLAN/IEEE 802.11 wireless adapter"),
- NETWORK("wx", "Intel Gigabit Ethernet (82452) card"),
- NETWORK("xe", "Xircom/Intel EtherExpress Pro100/16 ethernet card"),
- NETWORK("xl", "3COM 3c90x / 3c90xB PCI ethernet card"),
- NETWORK("fwe", "FireWire Ethernet emulation"),
- NETWORK("plip", "Parallel Port IP (PLIP) peer connection"),
- NETWORK("lo", "Loop-back (local) network interface"),
- NETWORK("disc", "Software discard network interface"),
- { 0, NULL, NULL, 0 }
+ DISK("da%d", "SCSI disk device", 16),
+ DISK("ad%d", "ATA/IDE disk device", 16),
+ DISK("ar%d", "ATA/IDE RAID device", 16),
+ DISK("afd%d", "ATAPI/IDE floppy device", 4),
+ DISK("mlxd%d", "Mylex RAID disk", 4),
+ DISK("amrd%d", "AMI MegaRAID drive", 4),
+ DISK("idad%d", "Compaq RAID array", 4),
+ DISK("twed%d", "3ware ATA RAID array", 4),
+ DISK("aacd%d", "Adaptec FSA RAID array", 4),
+ DISK("ipsd%d", "IBM ServeRAID RAID array", 4),
+ DISK("mfid%d", "LSI MegaRAID SAS array", 4),
+ { 0, NULL, NULL, 0 },
};
Device *
@@ -189,6 +107,9 @@ deviceTry(struct _devname dev, char *try, int i)
{
int fd;
char unit[80];
+ mode_t m;
+ dev_t d;
+ int fail;
snprintf(unit, sizeof unit, dev.name, i);
snprintf(try, FILENAME_MAX, "/dev/%s", unit);
@@ -197,10 +118,7 @@ deviceTry(struct _devname dev, char *try, int i)
fd = open(try, O_RDONLY);
if (fd >= 0) {
if (isDebug())
- msgDebug("deviceTry: open of %s succeeded on first try.\n", try);
- } else {
- if (isDebug())
- msgDebug("deviceTry: open of %s failed.\n", try);
+ msgDebug("deviceTry: open of %s succeeded.\n", try);
}
return fd;
}
@@ -255,75 +173,10 @@ void
deviceGetAll(void)
{
int i, j, fd, s;
- struct ifconf ifc;
- struct ifreq *ifptr, *end;
- int ifflags;
- char buffer[INTERFACE_MAX * sizeof(struct ifreq)];
char **names;
msgNotify("Probing devices, please wait (this can take a while)...");
- /* First go for the network interfaces. Stolen shamelessly from ifconfig! */
- ifc.ifc_len = sizeof(buffer);
- ifc.ifc_buf = buffer;
-
- s = socket(AF_INET, SOCK_DGRAM, 0);
- if (s < 0)
- goto skipif; /* Jump over network iface probing */
-
- if (ioctl(s, SIOCGIFCONF, (char *) &ifc) < 0)
- goto skipif; /* Jump over network iface probing */
-
- close(s);
- ifflags = ifc.ifc_req->ifr_flags;
- end = (struct ifreq *) (ifc.ifc_buf + ifc.ifc_len);
- for (ifptr = ifc.ifc_req; ifptr < end; ifptr++) {
- char *descr;
-
- /* If it's not a link entry, forget it */
- if (ifptr->ifr_ifru.ifru_addr.sa_family != AF_LINK)
- goto loopend;
-
- /* Eliminate network devices that don't make sense */
- if (!strncmp(ifptr->ifr_name, "lo", 2))
- goto loopend;
-
- /* If we have a slip device, don't register it */
- if (!strncmp(ifptr->ifr_name, "sl", 2)) {
- goto loopend;
- }
- /* And the same for ppp */
- if (!strncmp(ifptr->ifr_name, "tun", 3) || !strncmp(ifptr->ifr_name, "ppp", 3)) {
- goto loopend;
- }
- /* Try and find its description */
- for (i = 0, descr = NULL; device_names[i].name; i++) {
- int len = strlen(device_names[i].name);
-
- if (!ifptr->ifr_name || !ifptr->ifr_name[0])
- continue;
- else if (!strncmp(ifptr->ifr_name, device_names[i].name, len)) {
- descr = device_names[i].description;
- break;
- }
- }
- if (!descr)
- descr = "<unknown network interface type>";
- deviceRegister(ifptr->ifr_name, descr, strdup(ifptr->ifr_name), DEVICE_TYPE_NETWORK, TRUE,
- mediaInitNetwork, NULL, mediaShutdownNetwork, NULL);
- if (isDebug())
- msgDebug("Found a network device named %s\n", ifptr->ifr_name);
- close(s);
- if ((s = socket(AF_INET, SOCK_DGRAM, 0)) < 0)
- continue;
-
-loopend:
- if (ifptr->ifr_addr.sa_len) /* I'm not sure why this is here - it's inherited */
- ifptr = (struct ifreq *)((caddr_t)ifptr + ifptr->ifr_addr.sa_len - sizeof(struct sockaddr));
- close(s);
- }
-
-skipif:
/* Next, try to find all the types of devices one might need
* during the second stage of the installation.
*/
@@ -332,75 +185,8 @@ skipif:
char try[FILENAME_MAX];
switch(device_names[i].type) {
- case DEVICE_TYPE_CDROM:
- fd = deviceTry(device_names[i], try, j);
- if (fd >= 0 || errno == EBUSY) { /* EBUSY if already mounted */
- char n[BUFSIZ];
-
- if (fd >= 0) close(fd);
- snprintf(n, sizeof n, device_names[i].name, j);
- deviceRegister(strdup(n), device_names[i].description, strdup(try),
- DEVICE_TYPE_CDROM, TRUE, mediaInitCDROM, mediaGetCDROM,
- mediaShutdownCDROM, NULL);
- if (isDebug())
- msgDebug("Found a CDROM device for %s\n", try);
- }
- break;
-
- case DEVICE_TYPE_TAPE:
- fd = deviceTry(device_names[i], try, j);
- if (fd >= 0) {
- char n[BUFSIZ];
-
- close(fd);
- snprintf(n, sizeof n, device_names[i].name, j);
- deviceRegister(strdup(n), device_names[i].description, strdup(try),
- DEVICE_TYPE_TAPE, TRUE, mediaInitTape, mediaGetTape, mediaShutdownTape, NULL);
- if (isDebug())
- msgDebug("Found a TAPE device for %s\n", try);
- }
- break;
-
case DEVICE_TYPE_DISK:
- /* nothing to do */
- break;
-
- case DEVICE_TYPE_FLOPPY:
fd = deviceTry(device_names[i], try, j);
- if (fd >= 0) {
- char n[BUFSIZ];
-
- close(fd);
- snprintf(n, sizeof n, device_names[i].name, j);
- deviceRegister(strdup(n), device_names[i].description, strdup(try),
- DEVICE_TYPE_FLOPPY, TRUE, mediaInitFloppy, mediaGetFloppy,
- mediaShutdownFloppy, NULL);
- if (isDebug())
- msgDebug("Found a floppy device for %s\n", try);
- }
- break;
-
- case DEVICE_TYPE_NETWORK:
- fd = deviceTry(device_names[i], try, j);
- /* The only network devices that you can open this way are serial ones */
- if (fd >= 0) {
- char *newdesc, *cp;
-
- close(fd);
- cp = device_names[i].description;
- /* Serial devices get a slip and ppp device each, if supported */
- newdesc = safe_malloc(strlen(cp) + 40);
- sprintf(newdesc, cp, "SLIP interface", try, j + 1);
- deviceRegister("sl0", newdesc, strdup(try), DEVICE_TYPE_NETWORK, TRUE, mediaInitNetwork,
- NULL, mediaShutdownNetwork, NULL);
- msgDebug("Add mapping for %s to sl0\n", try);
- newdesc = safe_malloc(strlen(cp) + 50);
- sprintf(newdesc, cp, "PPP interface", try, j + 1);
- deviceRegister("ppp0", newdesc, strdup(try), DEVICE_TYPE_NETWORK, TRUE, mediaInitNetwork,
- NULL, mediaShutdownNetwork, NULL);
- if (isDebug())
- msgDebug("Add mapping for %s to ppp0\n", try);
- }
break;
default:
@@ -446,6 +232,7 @@ skipif:
if (isDebug())
msgDebug("Found a disk device named %s\n", names[i]);
+#if 0
/* Look for existing DOS partitions to register as "DOS media devices" */
for (c1 = d->chunks->part; c1; c1 = c1->next) {
if (c1->type == fat || c1->type == efi || c1->type == extended) {
@@ -455,12 +242,13 @@ skipif:
/* Got one! */
snprintf(devname, sizeof devname, "/dev/%s", c1->name);
dev = deviceRegister(c1->name, c1->name, strdup(devname), DEVICE_TYPE_DOS, TRUE,
- mediaInitDOS, mediaGetDOS, mediaShutdownDOS, NULL);
+ mediaInitDOS, mediaGetDOS, mediaShutdownDOS, NULL);
dev->private = c1;
if (isDebug())
msgDebug("Found a DOS partition %s on drive %s\n", c1->name, d->name);
}
}
+#endif
}
free(names);
}
diff --git a/usr.sbin/sade/disks.c b/usr.sbin/sade/disks.c
index 68dd987..9b13725 100644
--- a/usr.sbin/sade/disks.c
+++ b/usr.sbin/sade/disks.c
@@ -1,9 +1,4 @@
/*
- * The new sysinstall program.
- *
- * This is probably the last program in the `sysinstall' line - the next
- * generation being essentially a complete rewrite.
- *
* $FreeBSD$
*
* Copyright (c) 1995
@@ -34,7 +29,7 @@
*
*/
-#include "sysinstall.h"
+#include "sade.h"
#include <ctype.h>
#include <fcntl.h>
#include <inttypes.h>
@@ -136,6 +131,8 @@ print_chunks(Disk *d, int u)
"using. Do NOT use a ``physical geometry''.",
d->bios_cyl, d->bios_hd, d->bios_sect, d->name);
Sanitize_Bios_Geom(d);
+ msgDebug("Sanitized geometry for %s is %lu/%lu/%lu.\n",
+ d->name, d->bios_cyl, d->bios_hd, d->bios_sect);
}
attrset(A_NORMAL);
mvaddstr(0, 0, "Disk name:\t");
@@ -186,8 +183,7 @@ print_command_summary(void)
mvprintw(16, 0, "A = Use Entire Disk G = set Drive Geometry C = Create Slice F = `DD' mode");
mvprintw(17, 0, "D = Delete Slice Z = Toggle Size Units S = Set Bootable | = Wizard m.");
mvprintw(18, 0, "T = Change Type U = Undo All Changes Q = Finish");
- if (!RunningAsInit)
- mvprintw(18, 47, "W = Write Changes");
+ mvprintw(18, 47, "W = Write Changes");
mvprintw(21, 0, "Use F1 or ? to get more help, arrow keys to select.");
move(0, 0);
}
diff --git a/usr.sbin/sade/dispatch.c b/usr.sbin/sade/dispatch.c
index b1d0099..ce693d8 100644
--- a/usr.sbin/sade/dispatch.c
+++ b/usr.sbin/sade/dispatch.c
@@ -1,9 +1,4 @@
/*
- * The new sysinstall program.
- *
- * This is probably the last program in the `sysinstall' line - the next
- * generation being essentially a complete rewrite.
- *
* $FreeBSD$
*
* Copyright (c) 1995
@@ -34,7 +29,7 @@
*
*/
-#include "sysinstall.h"
+#include "sade.h"
#include <ctype.h>
#include <errno.h>
#include <sys/signal.h>
@@ -42,80 +37,22 @@
#include "list.h"
-static int dispatch_shutdown(dialogMenuItem *unused);
static int dispatch_systemExecute(dialogMenuItem *unused);
static int dispatch_msgConfirm(dialogMenuItem *unused);
-static int dispatch_mediaOpen(dialogMenuItem *unused);
-static int dispatch_mediaClose(dialogMenuItem *unused);
static struct _word {
char *name;
int (*handler)(dialogMenuItem *self);
} resWords[] = {
- { "configAnonFTP", configAnonFTP },
- { "configRouter", configRouter },
- { "configInetd", configInetd },
- { "configNFSServer", configNFSServer },
- { "configNTP", configNTP },
- { "configPCNFSD", configPCNFSD },
- { "configPackages", configPackages },
- { "configUsers", configUsers },
#ifdef WITH_SLICES
{ "diskPartitionEditor", diskPartitionEditor },
#endif
{ "diskPartitionWrite", diskPartitionWrite },
{ "diskLabelEditor", diskLabelEditor },
{ "diskLabelCommit", diskLabelCommit },
- { "distReset", distReset },
- { "distSetCustom", distSetCustom },
- { "distUnsetCustom", distUnsetCustom },
- { "distSetDeveloper", distSetDeveloper },
- { "distSetXDeveloper", distSetXDeveloper },
- { "distSetKernDeveloper", distSetKernDeveloper },
- { "distSetUser", distSetUser },
- { "distSetXUser", distSetXUser },
- { "distSetMinimum", distSetMinimum },
- { "distSetEverything", distSetEverything },
- { "distSetSrc", distSetSrc },
- { "distExtractAll", distExtractAll },
- { "docBrowser", docBrowser },
- { "docShowDocument", docShowDocument },
- { "installCommit", installCommit },
- { "installExpress", installExpress },
- { "installStandard", installStandard },
- { "installUpgrade", installUpgrade },
- { "installFixupBase", installFixupBase },
- { "installFixitHoloShell", installFixitHoloShell },
- { "installFixitCDROM", installFixitCDROM },
- { "installFixitFloppy", installFixitFloppy },
- { "installFilesystems", installFilesystems },
- { "installVarDefaults", installVarDefaults },
- { "loadConfig", dispatch_load_file },
- { "loadFloppyConfig", dispatch_load_floppy },
- { "mediaOpen", dispatch_mediaOpen },
- { "mediaClose", dispatch_mediaClose },
- { "mediaSetCDROM", mediaSetCDROM },
- { "mediaSetFloppy", mediaSetFloppy },
- { "mediaSetDOS", mediaSetDOS },
- { "mediaSetTape", mediaSetTape },
- { "mediaSetFTP", mediaSetFTP },
- { "mediaSetFTPActive", mediaSetFTPActive },
- { "mediaSetFTPPassive", mediaSetFTPPassive },
- { "mediaSetHTTP", mediaSetHTTP },
- { "mediaSetUFS", mediaSetUFS },
- { "mediaSetNFS", mediaSetNFS },
- { "mediaSetFTPUserPass", mediaSetFTPUserPass },
- { "mediaSetCPIOVerbosity", mediaSetCPIOVerbosity },
- { "mediaGetType", mediaGetType },
{ "msgConfirm", dispatch_msgConfirm },
- { "optionsEditor", optionsEditor },
- { "packageAdd", packageAdd },
- { "addGroup", userAddGroup },
- { "addUser", userAddUser },
- { "shutdown", dispatch_shutdown },
{ "system", dispatch_systemExecute },
{ "dumpVariables", dump_variables },
- { "tcpMenuSelect", tcpMenuSelect },
{ NULL, NULL },
};
@@ -166,19 +103,11 @@ dispatch_add_command(qelement *head, char *string)
return new;
}
-
+
/*
* Command processing
*/
-/* Just convenience */
-static int
-dispatch_shutdown(dialogMenuItem *unused)
-{
- systemShutdown(0);
- return DITEM_FAILURE;
-}
-
static int
dispatch_systemExecute(dialogMenuItem *unused)
{
@@ -206,19 +135,6 @@ dispatch_msgConfirm(dialogMenuItem *unused)
}
static int
-dispatch_mediaOpen(dialogMenuItem *unused)
-{
- return mediaOpen();
-}
-
-static int
-dispatch_mediaClose(dialogMenuItem *unused)
-{
- mediaClose();
- return DITEM_SUCCESS;
-}
-
-static int
call_possible_resword(char *name, dialogMenuItem *value, int *status)
{
int i, rval;
@@ -350,99 +266,3 @@ dispatch_execute(qelement *head)
return result;
}
-
-int
-dispatch_load_file_int(int quiet)
-{
- FILE *fp;
- char *cp;
- int i;
- qelement *list;
-
- static const char *names[] = {
- "install.cfg",
- "/stand/install.cfg",
- "/tmp/install.cfg",
- NULL
- };
-
- fp = NULL;
- cp = variable_get(VAR_CONFIG_FILE);
- if (!cp) {
- for (i = 0; names[i]; i++)
- if ((fp = fopen(names[i], "r")) != NULL)
- break;
- } else
- fp = fopen(cp, "r");
-
- if (!fp) {
- if (!quiet)
- msgConfirm("Unable to open %s: %s", cp, strerror(errno));
- return DITEM_FAILURE;
- }
-
- list = dispatch_load_fp(fp);
- fclose(fp);
-
- return dispatch_execute(list);
-}
-
-int
-dispatch_load_file(dialogMenuItem *self)
-{
- return dispatch_load_file_int(FALSE);
-}
-
-int
-dispatch_load_floppy(dialogMenuItem *self)
-{
- int what = DITEM_SUCCESS;
- extern char *distWanted;
- char *cp;
- FILE *fp;
- qelement *list;
-
- mediaClose();
- cp = variable_get_value(VAR_INSTALL_CFG,
- "Specify the name of a configuration file\n"
- "residing on a MSDOS or UFS floppy.", 0);
- if (!cp || !*cp) {
- variable_unset(VAR_INSTALL_CFG);
- what |= DITEM_FAILURE;
- return what;
- }
-
- distWanted = cp;
- /* Try to open the floppy drive */
- if (DITEM_STATUS(mediaSetFloppy(NULL)) == DITEM_FAILURE) {
- msgConfirm("Unable to set media device to floppy.");
- what |= DITEM_FAILURE;
- mediaClose();
- return what;
- }
-
- if (!DEVICE_INIT(mediaDevice)) {
- msgConfirm("Unable to mount floppy filesystem.");
- what |= DITEM_FAILURE;
- mediaClose();
- return what;
- }
-
- fp = DEVICE_GET(mediaDevice, cp, TRUE);
- if (fp) {
- list = dispatch_load_fp(fp);
- fclose(fp);
- mediaClose();
-
- what |= dispatch_execute(list);
- }
- else {
- if (!variable_get(VAR_NO_ERROR))
- msgConfirm("Configuration file '%s' not found.", cp);
- variable_unset(VAR_INSTALL_CFG);
- what |= DITEM_FAILURE;
- mediaClose();
- }
- return what;
-}
-
diff --git a/usr.sbin/sade/dmenu.c b/usr.sbin/sade/dmenu.c
index a197188..1735135 100644
--- a/usr.sbin/sade/dmenu.c
+++ b/usr.sbin/sade/dmenu.c
@@ -1,9 +1,4 @@
/*
- * The new sysinstall program.
- *
- * This is probably the last attempt in the `sysinstall' line, the next
- * generation being slated for what's essentially a complete rewrite.
- *
* $FreeBSD$
*
* Copyright (c) 1995
@@ -34,8 +29,7 @@
*
*/
-#include "sysinstall.h"
-#include <sys/param.h>
+#include "sade.h"
#include <errno.h>
#define MAX_MENU 15
@@ -112,21 +106,6 @@ dmenuSetVariables(dialogMenuItem *tmp)
}
int
-dmenuSetCountryVariable(dialogMenuItem *tmp)
-{
- variable_set((char *)tmp->data, FALSE);
-#ifdef WITH_SYSCONS
- /* Don't prompt the user for a keymap if they're using the default locale. */
- if (!strcmp(variable_get(VAR_COUNTRY), DEFAULT_COUNTRY))
- return DITEM_SUCCESS;
-
- return keymapMenuSelect(tmp);
-#else
- return DITEM_SUCCESS;
-#endif
-}
-
-int
dmenuSetKmapVariable(dialogMenuItem *tmp)
{
char *lang;
@@ -261,7 +240,7 @@ dmenuVarsCheck(dialogMenuItem *item)
int
dmenuRadioCheck(dialogMenuItem *item)
{
- return (*((int *)item->data) == item->aux);
+ return (*((unsigned int *)item->data) == item->aux);
}
static int
@@ -280,60 +259,6 @@ menu_height(DMenu *menu, int n)
return n > max ? max : n;
}
-/* Find a menu item that matches any field. */
-int
-dmenuFindItem(DMenu *menu, const char *prompt, const char *title, void *data)
-{
- dialogMenuItem *items = menu->items;
- int i;
-
- for (i = 0; items[i].prompt; ++i)
- if ((prompt && !strcmp(items[i].prompt, prompt)) ||
- (title && !strcmp(items[i].title, title)) ||
- (data && items[i].data == data))
- return i;
-
- return -1;
-}
-
-/* Set the default item for a menu by index and scroll to it. */
-void
-dmenuSetDefaultIndex(DMenu *menu, int *choice, int *scroll, int *curr, int *max)
-{
- int nitem;
- int height;
-
- *curr = *max = 0;
-
- for (nitem = 0; menu->items[nitem].prompt; ++nitem);
-
- height = menu_height(menu, nitem);
- if (*choice > height)
- {
- *scroll = MIN(nitem - height, *choice);
- *choice = *choice - *scroll;
- }
- else
- *scroll = 0;
-}
-
-/* Set the default menu item that matches any field and scroll to it. */
-Boolean
-dmenuSetDefaultItem(DMenu *menu, const char *prompt, const char *title, void *data,
- int *choice, int *scroll, int *curr, int *max)
-{
- if ((*choice = dmenuFindItem(menu, prompt, title, data)) != -1)
- {
- dmenuSetDefaultIndex(menu, choice, scroll, curr, max);
- return TRUE;
- }
- else
- {
- *choice = *scroll = *curr = *max = 0;
- return FALSE;
- }
-}
-
/* Traverse over an internal menu */
Boolean
dmenuOpen(DMenu *menu, int *choice, int *scroll, int *curr, int *max, Boolean buttons)
diff --git a/usr.sbin/sade/globals.c b/usr.sbin/sade/globals.c
index 892d852..0b08da3 100644
--- a/usr.sbin/sade/globals.c
+++ b/usr.sbin/sade/globals.c
@@ -1,9 +1,4 @@
/*
- * The new sysinstall program.
- *
- * This is probably the last program in the `sysinstall' line - the next
- * generation being essentially a complete rewrite.
- *
* $FreeBSD$
*
* Copyright (c) 1995
@@ -34,7 +29,7 @@
*
*/
-#include "sysinstall.h"
+#include "sade.h"
/*
* Various global variables and an initialization hook to set them to
@@ -43,13 +38,11 @@
int DebugFD; /* Where diagnostic output goes */
Boolean Fake; /* Only pretend to be useful */
-Boolean RunningAsInit; /* Are we running as init? */
Boolean DialogActive; /* Is libdialog initialized? */
Boolean ColorDisplay; /* Are we on a color display? */
Boolean OnVTY; /* Are we on a VTY? */
Boolean Restarting; /* Are we restarting sysinstall? */
Variable *VarHead; /* The head of the variable chain */
-Device *mediaDevice; /* Where we're installing from */
int BootMgr; /* Which boot manager we're using */
int StatusLine; /* Where to stick our status messages */
jmp_buf BailOut; /* Beam me up, scotty! The natives are pissed! */
@@ -78,8 +71,6 @@ globalsInit(void)
OnVTY = FALSE;
DialogActive = FALSE;
VarHead = NULL;
- mediaDevice = NULL;
- RunningAsInit = FALSE;
HomeChunk = NULL;
RootChunk = NULL;
diff --git a/usr.sbin/sade/install.c b/usr.sbin/sade/install.c
index 3ff7d8e..ebb804e 100644
--- a/usr.sbin/sade/install.c
+++ b/usr.sbin/sade/install.c
@@ -1,9 +1,4 @@
/*
- * The new sysinstall program.
- *
- * This is probably the last program in the `sysinstall' line - the next
- * generation being essentially a complete rewrite.
- *
* $FreeBSD$
*
* Copyright (c) 1995
@@ -34,7 +29,7 @@
*
*/
-#include "sysinstall.h"
+#include "sade.h"
#include <ctype.h>
#include <sys/consio.h>
#include <sys/disklabel.h>
@@ -56,15 +51,7 @@
#include <unistd.h>
#include <termios.h>
-/* Hack for rsaref package add, which displays interactive license.
- * Used by package.c
- */
-int _interactiveHack;
-int FixItMode = 0;
-int NCpus;
-
static void create_termcap(void);
-static void fixit_common(void);
#define TERMCAP_FILE "/usr/share/misc/termcap"
@@ -92,833 +79,9 @@ checkLabels(Boolean whinge)
#endif
/* We don't need to worry about root/usr/swap if we're already multiuser */
- if (!RunningAsInit)
- return status;
-
- devs = deviceFind(NULL, DEVICE_TYPE_DISK);
- /* First verify that we have a root device */
- for (i = 0; devs[i]; i++) {
- if (!devs[i]->enabled)
- continue;
- disk = (Disk *)devs[i]->private;
- msgDebug("Scanning disk %s for root filesystem\n", disk->name);
- if (!disk->chunks)
- msgFatal("No chunk list found for %s!", disk->name);
- for (c1 = disk->chunks->part; c1; c1 = c1->next) {
-#ifdef __ia64__
- c2 = c1;
-#elif defined(__powerpc__)
- if (c1->type == apple) {
- for (c2 = c1->part; c2; c2 = c2->next) {
-#else
- if (c1->type == freebsd) {
- for (c2 = c1->part; c2; c2 = c2->next) {
-#endif
-
- pi = (PartInfo *)c2->private_data;
- if (c2->type == part && c2->subtype != FS_SWAP && pi != NULL) {
- if (!strcmp(pi->mountpoint, "/")) {
- if (RootChunk) {
- if (whinge)
- msgConfirm("WARNING: You have more than one root device set?!\n"
- "Using the first one found.");
- continue;
- }
- else {
- RootChunk = c2;
- if (isDebug())
- msgDebug("Found rootdev at %s!\n", RootChunk->name);
- }
- }
- else if (!strcmp(pi->mountpoint, "/usr")) {
- if (UsrChunk) {
- if (whinge)
- msgConfirm("WARNING: You have more than one /usr filesystem.\n"
- "Using the first one found.");
- continue;
- }
- else {
- UsrChunk = c2;
- if (isDebug())
- msgDebug("Found usrdev at %s!\n", UsrChunk->name);
- }
- }
- else if (!strcmp(pi->mountpoint, "/var")) {
- if (VarChunk) {
- if (whinge)
- msgConfirm("WARNING: You have more than one /var filesystem.\n"
- "Using the first one found.");
- continue;
- }
- else {
- VarChunk = c2;
- if (isDebug())
- msgDebug("Found vardev at %s!\n", VarChunk->name);
- }
- } else if (!strcmp(pi->mountpoint, "/tmp")) {
- if (TmpChunk) {
- if (whinge)
- msgConfirm("WARNING: You have more than one /tmp filesystem.\n"
- "Using the first one found.");
- continue;
- }
- else {
- TmpChunk = c2;
- if (isDebug())
- msgDebug("Found tmpdev at %s!\n", TmpChunk->name);
- }
- } else if (!strcmp(pi->mountpoint, "/home")) {
- if (HomeChunk) {
- if (whinge)
- msgConfirm("WARNING: You have more than one /home filesystem.\n"
- "Using the first one found.");
- continue;
- }
- else {
- HomeChunk = c2;
- if (isDebug())
- msgDebug("Found homedev at %s!\n", HomeChunk->name);
- }
- }
- }
-#ifndef __ia64__
- }
- }
-#endif
- }
- }
-
- /* Now check for swap devices */
- for (i = 0; devs[i]; i++) {
- if (!devs[i]->enabled)
- continue;
- disk = (Disk *)devs[i]->private;
- msgDebug("Scanning disk %s for swap partitions\n", disk->name);
- if (!disk->chunks)
- msgFatal("No chunk list found for %s!", disk->name);
- for (c1 = disk->chunks->part; c1; c1 = c1->next) {
-
-#ifdef __ia64__
- c2 = c1;
-#elif defined(__powerpc__)
- if (c1->type == apple) {
- for (c2 = c1->part; c2; c2 = c2->next) {
-#else
- if (c1->type == freebsd) {
- for (c2 = c1->part; c2; c2 = c2->next) {
-#endif
- if (c2->type == part && c2->subtype == FS_SWAP && !SwapChunk) {
- SwapChunk = c2;
- if (isDebug())
- msgDebug("Found swapdev at %s!\n", SwapChunk->name);
- break;
- }
-#ifndef __ia64__
- }
- }
-#endif
- }
- }
-
-#ifdef __ia64__
- for (i = 0; devs[i] != NULL; i++) {
- if (!devs[i]->enabled)
- continue;
- disk = (Disk *)devs[i]->private;
- for (c1 = disk->chunks->part; c1 != NULL; c1 = c1->next) {
- pi = (PartInfo *)c1->private_data;
- if (c1->type == efi && pi != NULL && pi->mountpoint[0] == '/')
- EfiChunk = c1;
- }
- }
-#endif
-
- if (!RootChunk && whinge) {
- msgConfirm("No root device found - you must label a partition as /\n"
- "in the label editor.");
- status = FALSE;
- }
- if (!SwapChunk && whinge) {
- if (msgYesNo("No swap devices found - you should create at least one\n"
- "swap partition. Without swap, the install will fail\n"
- "if you do not have enough RAM. Continue anyway?"))
- status = FALSE;
- }
-#ifdef __ia64__
- if (EfiChunk == NULL && whinge) {
- if (msgYesNo("No (mounted) EFI system partition found. Is this what you want?"))
- status = FALSE;
- }
-#endif
return status;
}
-static int
-installInitial(void)
-{
- static Boolean alreadyDone = FALSE;
- int status = DITEM_SUCCESS;
-
- if (alreadyDone)
- return DITEM_SUCCESS;
-
- if (!variable_get(DISK_LABELLED)) {
- msgConfirm("You need to assign disk labels before you can proceed with\n"
- "the installation.");
- return DITEM_FAILURE;
- }
- /* If it's labelled, assume it's also partitioned */
- if (!variable_get(DISK_PARTITIONED))
- variable_set2(DISK_PARTITIONED, "yes", 0);
-
- /* If we refuse to proceed, bail. */
- dialog_clear_norefresh();
- if (!variable_get(VAR_NO_WARN)) {
- if (msgYesNo(
- "Last Chance! Are you SURE you want continue the installation?\n\n"
- "If you're running this on a disk with data you wish to save\n"
- "then WE STRONGLY ENCOURAGE YOU TO MAKE PROPER BACKUPS before\n"
- "proceeding!\n\n"
- "We can take no responsibility for lost disk contents!") != 0)
- return DITEM_FAILURE;
- }
-
- if (DITEM_STATUS(diskLabelCommit(NULL)) != DITEM_SUCCESS) {
- msgConfirm("Couldn't make filesystems properly. Aborting.");
- return DITEM_FAILURE;
- }
-
- if (!copySelf()) {
- msgConfirm("installInitial: Couldn't clone the boot floppy onto the\n"
- "root file system. Aborting!");
- return DITEM_FAILURE;
- }
-
- if (!Restarting && chroot("/mnt") == -1) {
- msgConfirm("installInitial: Unable to chroot to %s - this is bad!",
- "/mnt");
- return DITEM_FAILURE;
- }
-
- chdir("/");
- variable_set2(RUNNING_ON_ROOT, "yes", 0);
-
- /* Configure various files in /etc */
- if (DITEM_STATUS(configResolv(NULL)) == DITEM_FAILURE)
- status = DITEM_FAILURE;
- if (DITEM_STATUS(configFstab(NULL)) == DITEM_FAILURE)
- status = DITEM_FAILURE;
-
- /* stick a helpful shell over on the 4th VTY */
- if (!variable_get(VAR_NO_HOLOSHELL))
- systemCreateHoloshell();
-
- alreadyDone = TRUE;
- return status;
-}
-
-int
-installFixitHoloShell(dialogMenuItem *self)
-{
- FixItMode = 1;
- systemCreateHoloshell();
- return DITEM_SUCCESS;
- FixItMode = 0;
-}
-
-int
-installFixitCDROM(dialogMenuItem *self)
-{
- struct stat sb;
- int need_eject;
-
- if (!RunningAsInit)
- return DITEM_SUCCESS;
-
- variable_set2(SYSTEM_STATE, "fixit", 0);
- (void)unlink("/mnt2");
- (void)rmdir("/mnt2");
-
- need_eject = 0;
- CDROMInitQuiet = 1;
- while (1) {
- if (need_eject)
- msgConfirm(
- "Please insert a FreeBSD live filesystem CD/DVD and press return");
- if (DITEM_STATUS(mediaSetCDROM(NULL)) != DITEM_SUCCESS
- || !DEVICE_INIT(mediaDevice)) {
- /* If we can't initialize it, it's probably not a FreeBSD CDROM so punt on it */
- mediaClose();
- if (need_eject && msgYesNo("Unable to mount the disc. Do you want to try again?") != 0)
- return DITEM_FAILURE;
- } else if (!file_readable("/dist/rescue/ldconfig")) {
- mediaClose();
- if (need_eject &&
- msgYesNo("Unable to find a FreeBSD live filesystem. Do you want to try again?") != 0)
- return DITEM_FAILURE;
- } else
- break;
- CDROMInitQuiet = 0;
- need_eject = 1;
- }
- CDROMInitQuiet = 0;
-
- /* Since the fixit code expects everything to be in /mnt2, and the CDROM mounting stuff /dist, do
- * a little kludge dance here..
- */
- if (symlink("/dist", "/mnt2")) {
- msgConfirm("Unable to symlink /mnt2 to the disc mount point. Please report this\n"
- "unexpected failure to freebsd-bugs@FreeBSD.org.");
- return DITEM_FAILURE;
- }
-
- /*
- * If /tmp points to /mnt2/tmp from a previous fixit floppy session, it's
- * not very good for us if we point it to the CDROM now. Rather make it
- * a directory in the root MFS then. Experienced admins will still be
- * able to mount their disk's /tmp over this if they need.
- */
- if (lstat("/tmp", &sb) == 0 && (sb.st_mode & S_IFMT) == S_IFLNK)
- (void)unlink("/tmp");
- Mkdir("/tmp");
-
- /*
- * Since setuid binaries ignore LD_LIBRARY_PATH, we indeed need the
- * ld.so.hints file. Fortunately, it's fairly small (~ 3 KB).
- */
- if (!file_readable("/var/run/ld.so.hints")) {
- Mkdir("/var/run");
- if (vsystem("/mnt2/rescue/ldconfig -s /mnt2/lib /mnt2/usr/lib")) {
- msgConfirm("Warning: ldconfig could not create the ld.so hints file.\n"
- "Dynamic executables from the disc likely won't work.");
- }
- }
-
- /* Yet more iggly hardcoded pathnames. */
- Mkdir("/libexec");
- if (!file_readable("/libexec/ld.so") && file_readable("/mnt2/libexec/ld.so")) {
- if (symlink("/mnt2/libexec/ld.so", "/libexec/ld.so"))
- msgDebug("Couldn't link to ld.so - not necessarily a problem for ELF\n");
- }
- if (!file_readable("/libexec/ld-elf.so.1")) {
- if (symlink("/mnt2/libexec/ld-elf.so.1", "/libexec/ld-elf.so.1")) {
- msgConfirm("Warning: could not create the symlink for ld-elf.so.1\n"
- "Dynamic executables from the disc likely won't work.");
- }
- }
- /* optional nicety */
- if (!file_readable("/usr/bin/vi"))
- symlink("/mnt2/usr/bin/vi", "/usr/bin/vi");
- fixit_common();
- mediaClose();
- if (need_eject)
- msgConfirm("Please remove the FreeBSD fixit CDROM/DVD now.");
- return DITEM_SUCCESS;
-}
-
-int
-installFixitFloppy(dialogMenuItem *self)
-{
- struct ufs_args args;
- extern char *distWanted;
-
- if (!RunningAsInit)
- return DITEM_SUCCESS;
-
- /* Try to open the floppy drive */
- if (DITEM_STATUS(mediaSetFloppy(NULL)) == DITEM_FAILURE || !mediaDevice) {
- msgConfirm("Unable to set media device to floppy.");
- mediaClose();
- return DITEM_FAILURE;
- }
-
- memset(&args, 0, sizeof(args));
- args.fspec = mediaDevice->devname;
- mediaDevice->private = "/mnt2";
- distWanted = NULL;
- Mkdir("/mnt2");
-
- variable_set2(SYSTEM_STATE, "fixit", 0);
-
- while (1) {
- if (!DEVICE_INIT(mediaDevice)) {
- if (msgYesNo("The attempt to mount the fixit floppy failed, bad floppy\n"
- "or unclean filesystem. Do you want to try again?"))
- return DITEM_FAILURE;
- }
- else
- break;
- }
- if (!directory_exists("/tmp"))
- (void)symlink("/mnt2/tmp", "/tmp");
- fixit_common();
- mediaClose();
- msgConfirm("Please remove the fixit floppy now.");
- return DITEM_SUCCESS;
-}
-
-/*
- * The common code for both fixit variants.
- */
-static void
-fixit_common(void)
-{
- pid_t child;
- int waitstatus;
-
- if (!directory_exists("/var/tmp/vi.recover")) {
- if (DITEM_STATUS(Mkdir("/var/tmp/vi.recover")) != DITEM_SUCCESS) {
- msgConfirm("Warning: Was unable to create a /var/tmp/vi.recover directory.\n"
- "vi will kvetch and moan about it as a result but should still\n"
- "be essentially usable.");
- }
- }
- if (!directory_exists("/bin"))
- (void)Mkdir("/bin");
- (void)symlink("/stand/sh", "/bin/sh");
- /* Link the /etc/ files */
- if (DITEM_STATUS(Mkdir("/etc")) != DITEM_SUCCESS)
- msgConfirm("Unable to create an /etc directory! Things are weird on this floppy..");
- else if ((symlink("/mnt2/etc/spwd.db", "/etc/spwd.db") == -1 && errno != EEXIST) ||
- (symlink("/mnt2/etc/protocols", "/etc/protocols") == -1 && errno != EEXIST) ||
- (symlink("/mnt2/etc/group", "/etc/group") == -1 && errno != EEXIST) ||
- (symlink("/mnt2/etc/services", "/etc/services") == -1 && errno != EEXIST))
- msgConfirm("Couldn't symlink the /etc/ files! I'm not sure I like this..");
- if (!file_readable(TERMCAP_FILE))
- create_termcap();
- if (strcmp(variable_get(VAR_FIXIT_TTY), "serial") == 0)
- systemSuspendDialog(); /* must be before the fork() */
- if (!(child = fork())) {
- int i, fd;
- struct termios foo;
- extern int login_tty(int);
-
- ioctl(0, TIOCNOTTY, NULL);
- for (i = getdtablesize(); i >= 0; --i)
- close(i);
-
- if (strcmp(variable_get(VAR_FIXIT_TTY), "serial") == 0)
- fd = open("/dev/console", O_RDWR);
- else
- fd = open("/dev/ttyv3", O_RDWR);
- ioctl(0, TIOCSCTTY, &fd);
- dup2(0, 1);
- dup2(0, 2);
- DebugFD = 2;
- if (login_tty(fd) == -1)
- msgDebug("fixit: I can't set the controlling terminal.\n");
-
- signal(SIGTTOU, SIG_IGN);
- if (tcgetattr(0, &foo) != -1) {
- foo.c_cc[VERASE] = '\010';
- if (tcsetattr(0, TCSANOW, &foo) == -1)
- msgDebug("fixit shell: Unable to set erase character.\n");
- }
- else
- msgDebug("fixit shell: Unable to get terminal attributes!\n");
- setenv("PATH", "/bin:/sbin:/usr/bin:/usr/sbin:/stand:"
- "/mnt2/stand:/mnt2/bin:/mnt2/sbin:/mnt2/usr/bin:/mnt2/usr/sbin", 1);
- if (strcmp(variable_get(VAR_FIXIT_TTY), "serial") == 0) {
- printf("Waiting for fixit shell to exit.\n"
- "When you are done, type ``exit'' to exit\n"
- "the fixit shell and be returned here.\n\n");
- fflush(stdout);
- } else {
- ioctl(fd, VT_ACTIVATE, 0);
- }
-
- /* use the .profile from the fixit medium */
- setenv("HOME", "/mnt2", 1);
- chdir("/mnt2");
- execlp("sh", "-sh", (char *)0);
- msgDebug("fixit shell: Failed to execute shell!\n");
- _exit(1);;
- }
- else {
- if (strcmp(variable_get(VAR_FIXIT_TTY), "standard") == 0) {
- dialog_clear_norefresh();
- msgNotify("Waiting for fixit shell to exit. Go to VTY4 now by\n"
- "typing ALT-F4. When you are done, type ``exit'' to exit\n"
- "the fixit shell and be returned here\n.");
- }
- (void)waitpid(child, &waitstatus, 0);
- if (strcmp(variable_get(VAR_FIXIT_TTY), "serial") == 0)
- systemResumeDialog();
- else if (OnVTY) {
- ioctl(0, VT_ACTIVATE, 0);
- msgInfo(NULL);
- }
- }
- dialog_clear();
-}
-
-
-int
-installExpress(dialogMenuItem *self)
-{
- int i;
-
- dialog_clear_norefresh();
- variable_set2(SYSTEM_STATE, "express", 0);
-#ifdef WITH_SLICES
- if (DITEM_STATUS((i = diskPartitionEditor(self))) == DITEM_FAILURE)
- return i;
-#endif
-
- if (DITEM_STATUS((i = diskLabelEditor(self))) == DITEM_FAILURE)
- return i;
-
- if (DITEM_STATUS((i = installCommit(self))) == DITEM_SUCCESS) {
- i |= DITEM_LEAVE_MENU;
-
- /* Give user the option of one last configuration spree */
- installConfigure();
- }
- return i;
-}
-
-/* Standard mode installation */
-int
-installStandard(dialogMenuItem *self)
-{
- int i, tries = 0;
- Device **devs;
-
- variable_set2(SYSTEM_STATE, "standard", 0);
- dialog_clear_norefresh();
-#ifdef WITH_SLICES
- msgConfirm("In the next menu, you will need to set up a DOS-style (\"fdisk\") partitioning\n"
- "scheme for your hard disk. If you simply wish to devote all disk space\n"
- "to FreeBSD (overwriting anything else that might be on the disk(s) selected)\n"
- "then use the (A)ll command to select the default partitioning scheme followed\n"
- "by a (Q)uit. If you wish to allocate only free space to FreeBSD, move to a\n"
- "partition marked \"unused\" and use the (C)reate command.");
-
-nodisks:
- if (DITEM_STATUS(diskPartitionEditor(self)) == DITEM_FAILURE)
- return DITEM_FAILURE;
-
- if (diskGetSelectCount(&devs) <= 0 && tries < 3) {
- msgConfirm("You need to select some disks to operate on! Be sure to use SPACE\n"
- "instead of RETURN in the disk selection menu when selecting a disk.");
- ++tries;
- goto nodisks;
- }
-
- msgConfirm("Now you need to create BSD partitions inside of the fdisk partition(s)\n"
- "just created. If you have a reasonable amount of disk space (1GB or more)\n"
- "and don't have any special requirements, simply use the (A)uto command to\n"
- "allocate space automatically. If you have more specific needs or just don't\n"
- "care for the layout chosen by (A)uto, press F1 for more information on\n"
- "manual layout.");
-#else
- msgConfirm("First you need to create BSD partitions on the disk which you are\n"
- "installing to. If you have a reasonable amount of disk space (1GB or more)\n"
- "and don't have any special requirements, simply use the (A)uto command to\n"
- "allocate space automatically. If you have more specific needs or just don't\n"
- "care for the layout chosen by (A)uto, press F1 for more information on\n"
- "manual layout.");
-#endif
-
- if (DITEM_STATUS(diskLabelEditor(self)) == DITEM_FAILURE)
- return DITEM_FAILURE;
-
- if (DITEM_STATUS((i = installCommit(self))) == DITEM_FAILURE) {
- dialog_clear();
- msgConfirm("Installation completed with some errors. You may wish to\n"
- "scroll through the debugging messages on VTY1 with the\n"
- "scroll-lock feature. You can also choose \"No\" at the next\n"
- "prompt and go back into the installation menus to retry\n"
- "whichever operations have failed.");
- return i;
-
- }
- else {
- dialog_clear();
- msgConfirm("Congratulations! You now have FreeBSD installed on your system.\n\n"
- "We will now move on to the final configuration questions.\n"
- "For any option you do not wish to configure, simply select\n"
- "No.\n\n"
- "If you wish to re-enter this utility after the system is up, you\n"
- "may do so by typing: /usr/sbin/sysinstall.");
- }
- if (mediaDevice->type != DEVICE_TYPE_FTP && mediaDevice->type != DEVICE_TYPE_NFS) {
- if (!msgYesNo("Would you like to configure any Ethernet or SLIP/PPP network devices?")) {
- Device *tmp = tcpDeviceSelect();
-
- if (tmp && !((DevInfo *)tmp->private)->use_dhcp && !msgYesNo("Would you like to bring the %s interface up right now?", tmp->name))
- if (!DEVICE_INIT(tmp))
- msgConfirm("Initialization of %s device failed.", tmp->name);
- }
- dialog_clear_norefresh();
- }
-
- if (!msgNoYes("Do you want this machine to function as a network gateway?"))
- variable_set2("gateway_enable", "YES", 1);
-
- dialog_clear_norefresh();
- if (!msgNoYes("Do you want to configure inetd and the network services that it provides?"))
- configInetd(self);
-
- dialog_clear_norefresh();
- if (!msgNoYes("Would you like to enable SSH login?"))
- variable_set2("sshd_enable", "YES", 1);
-
- dialog_clear_norefresh();
- if (!msgNoYes("Do you want to have anonymous FTP access to this machine?"))
- configAnonFTP(self);
-
- dialog_clear_norefresh();
- if (!msgNoYes("Do you want to configure this machine as an NFS server?"))
- configNFSServer(self);
-
- dialog_clear_norefresh();
- if (!msgNoYes("Do you want to configure this machine as an NFS client?"))
- variable_set2("nfs_client_enable", "YES", 1);
-
-#ifdef WITH_SYSCONS
- dialog_clear_norefresh();
- if (!msgNoYes("Would you like to customize your system console settings?"))
- dmenuOpenSimple(&MenuSyscons, FALSE);
-#endif
-
- dialog_clear_norefresh();
- if (!msgYesNo("Would you like to set this machine's time zone now?"))
- systemExecute("tzsetup");
-
-#ifdef WITH_LINUX
- dialog_clear_norefresh();
- if (!msgYesNo("Would you like to enable Linux binary compatibility?"))
- (void)configLinux(self);
-#endif
-
-#ifdef __alpha__
- dialog_clear_norefresh();
- if (!msgYesNo("Would you like to enable OSF/1 binary compatibility?"))
- (void)configOSF1(self);
-#endif
-
-#ifdef WITH_MICE
- dialog_clear_norefresh();
- if (!msgNoYes("Does this system have a PS/2, serial, or bus mouse?"))
- dmenuOpenSimple(&MenuMouse, FALSE);
-#endif
-
-#ifdef __i386__
- if (checkLoaderACPI() != 0) {
- dialog_clear_norefresh();
- if (!msgNoYes("ACPI was disabled during boot.\n"
- "Would you like to disable it permanently?"))
- (void)configLoaderACPI(1 /*disable*/);
- }
-#endif
-
- /* Now would be a good time to checkpoint the configuration data */
- configRC_conf();
- sync();
-
- dialog_clear_norefresh();
- if (!msgYesNo("The FreeBSD package collection is a collection of thousands of ready-to-run\n"
- "applications, from text editors to games to WEB servers and more. Would you\n"
- "like to browse the collection now?")) {
- (void)configPackages(self);
- }
-
- if (!msgYesNo("Would you like to add any initial user accounts to the system?\n"
- "Adding at least one account for yourself at this stage is suggested\n"
- "since working as the \"root\" user is dangerous (it is easy to do\n"
- "things which adversely affect the entire system)."))
- (void)configUsers(self);
-
- msgConfirm("Now you must set the system manager's password.\n"
- "This is the password you'll use to log in as \"root\".");
- if (!systemExecute("passwd root"))
- variable_set2("root_password", "YES", 0);
-
- /* XXX Put whatever other nice configuration questions you'd like to ask the user here XXX */
-
- /* Give user the option of one last configuration spree */
- dialog_clear_norefresh();
- installConfigure();
- return DITEM_LEAVE_MENU;
-}
-
-/* The version of commit we call from the Install Custom menu */
-int
-installCustomCommit(dialogMenuItem *self)
-{
- int i;
-
- i = installCommit(self);
- if (DITEM_STATUS(i) == DITEM_SUCCESS) {
- /* Give user the option of one last configuration spree */
- installConfigure();
- return i;
- }
- else
- msgConfirm("The commit operation completed with errors. Not\n"
- "updating /etc files.");
- return i;
-}
-
-/*
- * What happens when we finally decide to going ahead with the installation.
- *
- * This is broken into multiple stages so that the user can do a full
- * installation but come back here again to load more distributions,
- * perhaps from a different media type. This would allow, for
- * example, the user to load the majority of the system from CDROM and
- * then use ftp to load a different dist.
- */
-int
-installCommit(dialogMenuItem *self)
-{
- int i;
- char *str;
-
- dialog_clear_norefresh();
- if (!Dists)
- distConfig(NULL);
-
- if (!Dists) {
- (void)dmenuOpenSimple(&MenuDistributions, FALSE);
- /* select reasonable defaults if necessary */
- if (!Dists)
- Dists = _DIST_USER;
- }
-
- if (!mediaVerify())
- return DITEM_FAILURE;
-
- str = variable_get(SYSTEM_STATE);
- if (isDebug())
- msgDebug("installCommit: System state is `%s'\n", str);
-
- /* Installation stuff we wouldn't do to a running system */
- if (RunningAsInit && DITEM_STATUS((i = installInitial())) == DITEM_FAILURE)
- return i;
-
-try_media:
- if (!DEVICE_INIT(mediaDevice)) {
- if (!msgYesNo("Unable to initialize selected media. Would you like to\n"
- "adjust your media configuration and try again?")) {
- mediaDevice = NULL;
- if (!mediaVerify())
- return DITEM_FAILURE;
- else
- goto try_media;
- }
- else
- return DITEM_FAILURE;
- }
-
- /* Now go get it all */
- i = distExtractAll(self);
-
- /* When running as init, *now* it's safe to grab the rc.foo vars */
- installEnvironment();
-
- variable_set2(SYSTEM_STATE, DITEM_STATUS(i) == DITEM_FAILURE ? "error-install" : "full-install", 0);
-
- return i;
-}
-
-static void
-installConfigure(void)
-{
- /* Final menu of last resort */
- if (!msgNoYes("Visit the general configuration menu for a chance to set\n"
- "any last options?"))
- dmenuOpenSimple(&MenuConfigure, FALSE);
- configRC_conf();
- sync();
-}
-
-int
-installFixupBase(dialogMenuItem *self)
-{
- FILE *fp;
-#ifdef __ia64__
- const char *efi_mntpt;
-#endif
-
- /* All of this is done only as init, just to be safe */
- if (RunningAsInit) {
-#if defined(__i386__) || defined(__amd64__)
- if ((fp = fopen("/boot/loader.conf", "a")) != NULL) {
- if (!OnVTY) {
- fprintf(fp, "# -- sysinstall generated deltas -- #\n");
- fprintf(fp, "console=\"comconsole\"\n");
- }
- fclose(fp);
- }
-#endif
-
- /* BOGON #2: We leave /etc in a bad state */
- chmod("/etc", 0755);
-
- /* BOGON #3: No /var/db/mountdtab complains */
- Mkdir("/var/db");
- creat("/var/db/mountdtab", 0644);
-
- /* BOGON #4: /compat created by default in root fs */
- Mkdir("/usr/compat");
- vsystem("ln -s usr/compat /compat");
-
- /* BOGON #5: aliases database not build for bin */
- vsystem("newaliases");
-
- /* BOGON #6: Remove /stand (finally) */
- vsystem("rm -rf /stand");
-
- /* Now run all the mtree stuff to fix things up */
- vsystem("mtree -deU -f /etc/mtree/BSD.root.dist -p /");
- vsystem("mtree -deU -f /etc/mtree/BSD.var.dist -p /var");
- vsystem("mtree -deU -f /etc/mtree/BSD.usr.dist -p /usr");
-
-#ifdef __ia64__
- /* Move /boot to the the EFI partition and make /boot a link to it. */
- efi_mntpt = (EfiChunk != NULL) ? ((PartInfo *)EfiChunk->private_data)->mountpoint : NULL;
- if (efi_mntpt != NULL) {
- vsystem("if [ ! -L /boot ]; then mv /boot %s; fi", efi_mntpt);
- vsystem("if [ ! -e /boot ]; then ln -sf %s/boot /boot; fi",
- efi_mntpt + 1); /* Skip leading '/' */
- /* Make sure the kernel knows which partition is the root file system. */
- vsystem("echo 'vfs.root.mountfrom=\"ufs:/dev/%s\"' >> /boot/loader.conf", RootChunk->name);
- }
-#endif
-
- /* Do all the last ugly work-arounds here */
- }
- return DITEM_SUCCESS | DITEM_RESTORE;
-}
-
-int
-installFixupKernel(dialogMenuItem *self, int dists)
-{
-
- /* All of this is done only as init, just to be safe */
- if (RunningAsInit) {
- /*
- * Install something as /boot/kernel. Prefer SMP
- * over generic--this should handle the case where
- * both SMP and GENERIC are installed (otherwise we
- * select the one kernel that was installed).
- *
- * NB: we assume any existing kernel has been saved
- * already and the /boot/kernel we remove is empty.
- */
- vsystem("rm -rf /boot/kernel");
-#if WITH_SMP
- if (dists & DIST_KERNEL_SMP)
- vsystem("mv /boot/SMP /boot/kernel");
- else
-#endif
- vsystem("mv /boot/GENERIC /boot/kernel");
- }
- return DITEM_SUCCESS | DITEM_RESTORE;
-}
-
#define QUEUE_YES 1
#define QUEUE_NO 0
static int
@@ -980,107 +143,6 @@ installFilesystems(dialogMenuItem *self)
root = (RootChunk != NULL) ? (PartInfo *)RootChunk->private_data : NULL;
command_clear();
- if (SwapChunk && RunningAsInit) {
- /* As the very first thing, try to get ourselves some swap space */
- sprintf(dname, "/dev/%s", SwapChunk->name);
- if (!Fake && !file_readable(dname)) {
- msgConfirm("Unable to find device node for %s in /dev!\n"
- "The creation of filesystems will be aborted.", dname);
- return DITEM_FAILURE;
- }
-
- if (!Fake) {
- if (!swapon(dname)) {
- dialog_clear_norefresh();
- msgNotify("Added %s as initial swap device", dname);
- }
- else {
- msgConfirm("WARNING! Unable to swap to %s: %s\n"
- "This may cause the installation to fail at some point\n"
- "if you don't have a lot of memory.", dname, strerror(errno));
- }
- }
- }
-
- if (RootChunk && RunningAsInit) {
- /* Next, create and/or mount the root device */
- sprintf(dname, "/dev/%s", RootChunk->name);
- if (!Fake && !file_readable(dname)) {
- msgConfirm("Unable to make device node for %s in /dev!\n"
- "The creation of filesystems will be aborted.", dname);
- return DITEM_FAILURE | DITEM_RESTORE;
- }
- if (strcmp(root->mountpoint, "/"))
- msgConfirm("Warning: %s is marked as a root partition but is mounted on %s", RootChunk->name, root->mountpoint);
-
- if (root->do_newfs && (!upgrade ||
- !msgNoYes("You are upgrading - are you SURE you want to newfs "
- "the root partition?"))) {
- int i;
-
- dialog_clear_norefresh();
- msgNotify("Making a new root filesystem on %s", dname);
- i = performNewfs(root, dname, QUEUE_NO);
- if (i) {
- msgConfirm("Unable to make new root filesystem on %s!\n"
- "Command returned status %d", dname, i);
- return DITEM_FAILURE | DITEM_RESTORE;
- }
- }
- else {
- if (!upgrade) {
- msgConfirm("Warning: Using existing root partition. It will be assumed\n"
- "that you have the appropriate device entries already in /dev.");
- }
- dialog_clear_norefresh();
- msgNotify("Checking integrity of existing %s filesystem.", dname);
- i = vsystem("fsck_ffs -y %s", dname);
- if (i)
- msgConfirm("Warning: fsck returned status of %d for %s.\n"
- "This partition may be unsafe to use.", i, dname);
- }
-
- /*
- * If soft updates was enabled in the editor but we didn't newfs,
- * use tunefs to update the soft updates flag on the file system.
- */
- if (!root->do_newfs && root->newfs_type == NEWFS_UFS &&
- root->newfs_data.newfs_ufs.softupdates) {
- i = vsystem("tunefs -n enable %s", dname);
- if (i)
- msgConfirm("Warning: Unable to enable soft updates"
- " for root file system on %s", dname);
- }
-
- /* Switch to block device */
- sprintf(dname, "/dev/%s", RootChunk->name);
- if (Mount("/mnt", dname)) {
- msgConfirm("Unable to mount the root file system on %s! Giving up.", dname);
- return DITEM_FAILURE | DITEM_RESTORE;
- }
-
- /* Mount devfs for other partitions to mount */
- Mkdir("/mnt/dev");
- if (!Fake) {
- struct iovec iov[4];
-
- iov[0].iov_base = "fstype";
- iov[0].iov_len = strlen(iov[0].iov_base) + 1;
- iov[1].iov_base = "devfs";
- iov[1].iov_len = strlen(iov[1].iov_base) + 1;
- iov[2].iov_base = "fspath";
- iov[2].iov_len = strlen(iov[2].iov_base) + 1;
- iov[3].iov_base = "/mnt/dev";
- iov[3].iov_len = strlen(iov[3].iov_base) + 1;
- i = nmount(iov, 4, 0);
-
- if (i) {
- dialog_clear_norefresh();
- msgConfirm("Unable to mount DEVFS (error %d)", errno);
- return DITEM_FAILURE | DITEM_RESTORE;
- }
- }
- }
/* Now buzz through the rest of the partitions and mount them too */
devs = deviceFind(NULL, DEVICE_TYPE_DISK);
@@ -1112,8 +174,7 @@ installFilesystems(dialogMenuItem *self)
if (c2 == RootChunk)
continue;
- sprintf(dname, "%s/dev/%s",
- RunningAsInit ? "/mnt" : "", c2->name);
+ sprintf(dname, "%s/dev/%s", c2->name);
if (tmp->do_newfs && (!upgrade ||
!msgNoYes("You are upgrading - are you SURE you"
@@ -1121,8 +182,7 @@ installFilesystems(dialogMenuItem *self)
performNewfs(tmp, dname, QUEUE_YES);
else
command_shell_add(tmp->mountpoint,
- "fsck_ffs -y %s/dev/%s", RunningAsInit ?
- "/mnt" : "", c2->name);
+ "fsck_ffs -y %s/dev/%s", c2->name);
#if 0
if (tmp->soft)
command_shell_add(tmp->mountpoint,
@@ -1137,7 +197,7 @@ installFilesystems(dialogMenuItem *self)
if (c2 == SwapChunk)
continue;
- sprintf(fname, "%s/dev/%s", RunningAsInit ? "/mnt" : "", c2->name);
+ sprintf(fname, "%s/dev/%s", c2->name);
i = (Fake || swapon(fname));
if (!i) {
dialog_clear_norefresh();
@@ -1153,7 +213,7 @@ installFilesystems(dialogMenuItem *self)
(root->do_newfs || upgrade)) {
char name[FILENAME_MAX];
- sprintf(name, "%s/%s", RunningAsInit ? "/mnt" : "", ((PartInfo *)c1->private_data)->mountpoint);
+ sprintf(name, "%s/%s", ((PartInfo *)c1->private_data)->mountpoint);
Mkdir(name);
}
#if defined(__ia64__)
@@ -1162,8 +222,7 @@ installFilesystems(dialogMenuItem *self)
PartInfo *pi = (PartInfo *)c1->private_data;
char *p;
- sprintf(dname, "%s/dev/%s", RunningAsInit ? "/mnt" : "",
- c1->name);
+ sprintf(dname, "/dev/%s", c1->name);
if (pi->do_newfs && (!upgrade ||
!msgNoYes("You are upgrading - are you SURE you want to "
@@ -1200,47 +259,13 @@ getRelname(void)
int
installVarDefaults(dialogMenuItem *self)
{
- char *cp, ncpus[10];
+ char *cp;
/* Set default startup options */
variable_set2(VAR_RELNAME, getRelname(), 0);
- variable_set2(VAR_CPIO_VERBOSITY, "high", 0);
- variable_set2(VAR_TAPE_BLOCKSIZE, DEFAULT_TAPE_BLOCKSIZE, 0);
- variable_set2(VAR_INSTALL_ROOT, "/", 0);
- variable_set2(VAR_INSTALL_CFG, "install.cfg", 0);
- variable_set2(VAR_SKIP_PCCARD, "NO", 0);
- cp = getenv("EDITOR");
- if (!cp)
- cp = "/usr/bin/ee";
- variable_set2(VAR_EDITOR, cp, 0);
- variable_set2(VAR_FTP_USER, "ftp", 0);
- variable_set2(VAR_BROWSER_PACKAGE, "links", 0);
- variable_set2(VAR_BROWSER_BINARY, "/usr/local/bin/links", 0);
- variable_set2(VAR_FTP_STATE, "passive", 0);
- variable_set2(VAR_NFS_SECURE, "NO", -1);
- variable_set2(VAR_NFS_TCP, "NO", -1);
- variable_set2(VAR_NFS_V3, "YES", -1);
- if (OnVTY)
- variable_set2(VAR_FIXIT_TTY, "standard", 0);
- else
- variable_set2(VAR_FIXIT_TTY, "serial", 0);
- variable_set2(VAR_PKG_TMPDIR, "/var/tmp", 0);
- variable_set2(VAR_MEDIA_TIMEOUT, itoa(MEDIA_TIMEOUT), 0);
- if (getpid() != 1)
- variable_set2(SYSTEM_STATE, "update", 0);
- else
- variable_set2(SYSTEM_STATE, "init", 0);
+ variable_set2(SYSTEM_STATE, "update", 0);
variable_set2(VAR_NEWFS_ARGS, "-b 16384 -f 2048", 0);
variable_set2(VAR_CONSTERM, "NO", 0);
-#if (defined(__i386__) && !defined(PC98)) || defined(__amd64__)
- NCpus = acpi_detect();
- if (NCpus == -1)
- NCpus = biosmptable_detect();
-#endif
- if (NCpus <= 0)
- NCpus = 1;
- snprintf(ncpus, sizeof(ncpus), "%u", NCpus);
- variable_set2(VAR_NCPUS, ncpus, 0);
return DITEM_SUCCESS;
}
@@ -1248,56 +273,5 @@ installVarDefaults(dialogMenuItem *self)
void
installEnvironment(void)
{
- configEnvironmentRC_conf();
- if (file_readable("/etc/resolv.conf"))
- configEnvironmentResolv("/etc/resolv.conf");
-}
-
-/* Copy the boot floppy contents into /stand */
-Boolean
-copySelf(void)
-{
- int i;
-
- if (file_readable("/boot.help"))
- vsystem("cp /boot.help /mnt");
- msgWeHaveOutput("Copying the boot floppy to /stand on root filesystem");
- i = vsystem("find -x /stand | cpio %s -pdum /mnt", cpioVerbosity());
- if (i) {
- msgConfirm("Copy returned error status of %d!", i);
- return FALSE;
- }
-
- /* Copy the /etc files into their rightful place */
- if (vsystem("cd /mnt/stand; find etc | cpio %s -pdum /mnt", cpioVerbosity())) {
- msgConfirm("Couldn't copy up the /etc files!");
- return TRUE;
- }
- return TRUE;
}
-static void
-create_termcap(void)
-{
- FILE *fp;
-
- const char *caps[] = {
- termcap_vt100, termcap_cons25, termcap_cons25_m, termcap_cons25r,
- termcap_cons25r_m, termcap_cons25l1, termcap_cons25l1_m,
- termcap_xterm, NULL,
- };
- const char **cp;
-
- if (!file_readable(TERMCAP_FILE)) {
- Mkdir("/usr/share/misc");
- fp = fopen(TERMCAP_FILE, "w");
- if (!fp) {
- msgConfirm("Unable to initialize termcap file. Some screen-oriented\nutilities may not work.");
- return;
- }
- cp = caps;
- while (*cp)
- fprintf(fp, "%s\n", *(cp++));
- fclose(fp);
- }
-}
diff --git a/usr.sbin/sade/keymap.c b/usr.sbin/sade/keymap.c
index b8f015d..384f30e 100644
--- a/usr.sbin/sade/keymap.c
+++ b/usr.sbin/sade/keymap.c
@@ -25,7 +25,7 @@
*
*/
-#include "sysinstall.h"
+#include "sade.h"
#include <errno.h>
#include <stdlib.h>
#include <string.h>
@@ -50,79 +50,6 @@ struct keymapInfo {
* the language name only.
*/
-#ifdef WITH_SYSCONS
-static int
-keymapSetDefault(const char *prefix)
-{
- dialogMenuItem *items = MenuSysconsKeymap.items;
- int i;
- size_t plen = strlen(prefix);
-
- for (i = 0; items[i].data; ++i)
- if (!strncmp(prefix, items[i].data, plen))
- return i;
-
- return -1;
-}
-
-int
-keymapMenuSelect(dialogMenuItem *self)
-{
- static const struct {
- const char *country, *lang;
- } map[] = {
- {"dk", "danish"},
- {"ee", "estonian"},
- {"fi", "finnish"},
- {"de", "german"},
- {"is", "icelandic"},
- {"no", "norwegian"},
- {"pl", "pl_PL"},
- {"es", "spanish"},
- {"se", "swedish"},
- {"ch", "swiss"},
- {"gb", "uk"},
- {NULL, NULL}
- };
- const char *country, *lang;
- int i;
- int choice, scroll, curr, max;
- char prefix[16 + 1];
-
- if ((country = variable_get(VAR_COUNTRY)) != NULL)
- {
- lang = country;
- for (i = 0; map[i].country; ++i)
- if (!strcmp(country, map[i].country))
- {
- lang = map[i].lang;
- break;
- }
-
- snprintf(prefix, sizeof(prefix), "keymap=%s.iso", lang);
- if ((choice = keymapSetDefault(prefix)) == -1)
- {
- snprintf(prefix, sizeof(prefix), "keymap=%s", lang);
- if ((choice = keymapSetDefault(prefix)) == -1) {
-#ifdef PC98
- snprintf(prefix, sizeof(prefix), "keymap=jp.pc98");
-#else
- snprintf(prefix, sizeof(prefix), "keymap=us.iso");
-#endif
- if ((choice = keymapSetDefault(prefix)) == -1)
- choice = 0;
- }
- }
-
- dmenuSetDefaultIndex(&MenuSysconsKeymap, &choice, &scroll, &curr, &max);
- return dmenuOpen(&MenuSysconsKeymap, &choice, &scroll, &curr, &max, FALSE);
- }
- else
- return dmenuOpenSimple(&MenuSysconsKeymap, FALSE) ? DITEM_SUCCESS :
- DITEM_FAILURE;
-}
-#endif
-
/*
* Return values:
*
diff --git a/usr.sbin/sade/label.c b/usr.sbin/sade/label.c
index 21a9744..84d08aa 100644
--- a/usr.sbin/sade/label.c
+++ b/usr.sbin/sade/label.c
@@ -1,9 +1,4 @@
/*
- * The new sysinstall program.
- *
- * This is probably the last program in the `sysinstall' line - the next
- * generation being essentially a complete rewrite.
- *
* $FreeBSD$
*
* Copyright (c) 1995
@@ -34,7 +29,7 @@
*
*/
-#include "sysinstall.h"
+#include "sade.h"
#include <ctype.h>
#include <inttypes.h>
#include <libdisk.h>
@@ -826,8 +821,7 @@ print_command_summary(void)
{
mvprintw(17, 0, "The following commands are valid here (upper or lower case):");
mvprintw(18, 0, "C = Create D = Delete M = Mount pt.");
- if (!RunningAsInit)
- mvprintw(18, 56, "W = Write");
+ mvprintw(18, 56, "W = Write");
mvprintw(19, 0, "N = Newfs Opts Q = Finish S = Toggle SoftUpdates Z = Custom Newfs");
mvprintw(20, 0, "T = Toggle Newfs U = Undo A = Auto Defaults R = Delete+Merge");
mvprintw(22, 0, "Use F1 or ? to get more help, arrow keys to select.");
@@ -837,6 +831,7 @@ print_command_summary(void)
static void
clear_wins(void)
{
+ extern void print_label_chunks();
clear();
print_label_chunks();
}
diff --git a/usr.sbin/sade/list.h b/usr.sbin/sade/list.h
index 8300173..8c5cf2a 100644
--- a/usr.sbin/sade/list.h
+++ b/usr.sbin/sade/list.h
@@ -1,9 +1,4 @@
/*
- * The new sysinstall program.
- *
- * This is probably the last attempt in the `sysinstall' line, the next
- * generation being slated for what's essentially a complete rewrite.
- *
* $FreeBSD$
*
* Copyright (c) 1997 FreeBSD, Inc.
diff --git a/usr.sbin/sade/main.c b/usr.sbin/sade/main.c
index ca31125..86dd16b 100644
--- a/usr.sbin/sade/main.c
+++ b/usr.sbin/sade/main.c
@@ -1,13 +1,8 @@
/*
- * The new sysinstall program.
- *
- * This is probably the last attempt in the `sysinstall' line, the next
- * generation being slated for what's essentially a complete rewrite.
- *
* $FreeBSD$
*
* Copyright (c) 1995
- * Jordan Hubbard. All rights reserved.
+ * Jordan Hubbard. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -34,7 +29,7 @@
*
*/
-#include "sysinstall.h"
+#include "sade.h"
#include <sys/signal.h>
#include <sys/fcntl.h>
@@ -55,11 +50,6 @@ main(int argc, char **argv)
/* Record name to be able to restart */
StartName = argv[0];
- /* Catch fatal signals and complain about them if running as init */
- if (getpid() == 1) {
- signal(SIGBUS, screech);
- signal(SIGSEGV, screech);
- }
signal(SIGPIPE, SIG_IGN);
/* We don't work too well when running as non-root anymore */
@@ -82,9 +72,6 @@ main(int argc, char **argv)
/* Set default flag and variable values */
installVarDefaults(NULL);
- /* only when multi-user is it reasonable to do this here */
- if (!RunningAsInit)
- installEnvironment();
if (argc > 1 && !strcmp(argv[1], "-fake")) {
variable_set2(VAR_DEBUG, "YES", 0);
@@ -106,48 +93,13 @@ main(int argc, char **argv)
/* Initialize driver modules, if we haven't already done so (ie,
the user hit Ctrl-C -> Restart. */
if (!pvariable_get("modulesInitialize")) {
- moduleInitialize();
pvariable_set("modulesInitialize=1");
}
- /* Initialize PC Card, if we haven't already done so. */
-#ifdef PCCARD_ARCH
- if (!variable_cmp(VAR_SKIP_PCCARD, "YES") &&
- variable_get(VAR_SKIP_PCCARD)!=1 &&
- !pvariable_get("pccardInitialize")) {
- pccardInitialize();
- pvariable_set("pccardInitialize=1");
- }
-#endif
-
/* Probe for all relevant devices on the system */
deviceGetAll();
- /* Prompt for the driver floppy if appropriate. */
- if (!pvariable_get("driverFloppyCheck")) {
- driverFloppyCheck();
- pvariable_set("driverFloppyCheck=1");
- }
-
/* First, see if we have any arguments to process (and argv[0] counts if it's not "sysinstall") */
- if (!RunningAsInit) {
- int i, start_arg;
-
- if (!strstr(argv[0], "sysinstall"))
- start_arg = 0;
- else if (Fake || Restarting)
- start_arg = 2;
- else
- start_arg = 1;
- for (i = start_arg; i < argc; i++) {
- if (DITEM_STATUS(dispatchCommand(argv[i])) != DITEM_SUCCESS)
- systemShutdown(1);
- }
- if (argc > start_arg)
- systemShutdown(0);
- }
- else
- dispatch_load_file_int(TRUE);
status = setjmp(BailOut);
if (status) {
@@ -155,31 +107,19 @@ main(int argc, char **argv)
"down. If you can reproduce the problem, please turn Debug on\n"
"in the Options menu for the extra information it provides\n"
"in debugging problems like this.", status);
- systemShutdown(status);
+ ;
}
- /* Get user's country and keymap */
- if (RunningAsInit)
- configCountry(NULL);
-
/* Begin user dialog at outer menu */
dialog_clear();
while (1) {
choice = scroll = curr = max = 0;
- dmenuOpen(&MenuInitial, &choice, &scroll, &curr, &max, TRUE);
+ dmenuOpen(&MenuMain, &choice, &scroll, &curr, &max, FALSE);
if (getpid() != 1
-#if defined(__alpha__) || defined(__sparc64__)
- || !msgNoYes("Are you sure you wish to exit? The system will halt.")
-#else
- || !msgNoYes("Are you sure you wish to exit? The system will reboot\n"
- "(be sure to remove any floppies/CDs/DVDs from the drives).")
-#endif
+ || !msgNoYes("Are you sure you wish to exit?")
)
break;
}
- /* Say goodnight, Gracie */
- systemShutdown(0);
-
return 0; /* We should never get here */
}
diff --git a/usr.sbin/sade/menus.c b/usr.sbin/sade/menus.c
index 308ca76..8714ca2 100644
--- a/usr.sbin/sade/menus.c
+++ b/usr.sbin/sade/menus.c
@@ -1,9 +1,4 @@
/*
- * The new sysinstall program.
- *
- * This is probably the last program in the `sysinstall' line - the next
- * generation being essentially a complete rewrite.
- *
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
*
@@ -37,171 +32,9 @@ static const char rcsid[] =
"$FreeBSD$";
#endif
-#include "sysinstall.h"
+#include "sade.h"
/* Miscellaneous work routines for menus */
-static int
-setSrc(dialogMenuItem *self)
-{
- Dists |= DIST_SRC;
- SrcDists = DIST_SRC_ALL;
- return DITEM_SUCCESS | DITEM_REDRAW;
-}
-
-static int
-clearSrc(dialogMenuItem *self)
-{
- Dists &= ~DIST_SRC;
- SrcDists = 0;
- return DITEM_SUCCESS | DITEM_REDRAW;
-}
-
-static int
-setKernel(dialogMenuItem *self)
-{
- Dists |= DIST_KERNEL;
- KernelDists = DIST_KERNEL_ALL;
- return DITEM_SUCCESS | DITEM_REDRAW;
-}
-
-static int
-clearKernel(dialogMenuItem *self)
-{
- Dists &= ~DIST_KERNEL;
- KernelDists = 0;
- return DITEM_SUCCESS | DITEM_REDRAW;
-}
-
-static int
-setX11Misc(dialogMenuItem *self)
-{
- XOrgDists |= DIST_XORG_MISC_ALL;
- Dists |= DIST_XORG;
- return DITEM_SUCCESS | DITEM_REDRAW;
-}
-
-static int
-clearX11Misc(dialogMenuItem *self)
-{
- XOrgDists &= ~DIST_XORG_MISC_ALL;
- if (!XOrgDists)
- Dists &= ~DIST_XORG;
- return DITEM_SUCCESS | DITEM_REDRAW;
-}
-
-static int
-setX11Servers(dialogMenuItem *self)
-{
- XOrgDists |= DIST_XORG_SERVER_ALL;
- return DITEM_SUCCESS | DITEM_REDRAW;
-}
-
-static int
-clearX11Servers(dialogMenuItem *self)
-{
- XOrgDists &= ~DIST_XORG_SERVER_ALL;
- if (!XOrgDists)
- Dists &= ~DIST_XORG;
- return DITEM_SUCCESS | DITEM_REDRAW;
-}
-
-static int
-setX11Fonts(dialogMenuItem *self)
-{
- XOrgDists |= DIST_XORG_FONTS_ALL;
- return DITEM_SUCCESS | DITEM_REDRAW;
-}
-
-static int
-clearX11Fonts(dialogMenuItem *self)
-{
- XOrgDists &= ~DIST_XORG_FONTS_ALL;
- if (!XOrgDists)
- Dists &= ~DIST_XORG;
- return DITEM_SUCCESS | DITEM_REDRAW;
-}
-
-#define _IS_SET(dist, set) (((dist) & (set)) == (set))
-
-#define IS_DEVELOPER(dist, extra) (_IS_SET(dist, _DIST_DEVELOPER | extra) || \
- _IS_SET(dist, _DIST_DEVELOPER | extra))
-
-#define IS_USER(dist, extra) (_IS_SET(dist, _DIST_USER | extra) || \
- _IS_SET(dist, _DIST_USER | extra))
-
-static int
-checkDistDeveloper(dialogMenuItem *self)
-{
- return IS_DEVELOPER(Dists, 0) && _IS_SET(SrcDists, DIST_SRC_ALL);
-}
-
-static int
-checkDistXDeveloper(dialogMenuItem *self)
-{
- return IS_DEVELOPER(Dists, DIST_XORG) && _IS_SET(SrcDists, DIST_SRC_ALL);
-}
-
-static int
-checkDistKernDeveloper(dialogMenuItem *self)
-{
- return IS_DEVELOPER(Dists, 0) && _IS_SET(SrcDists, DIST_SRC_SYS);
-}
-
-static int
-checkDistXKernDeveloper(dialogMenuItem *self)
-{
- return IS_DEVELOPER(Dists, DIST_XORG) && _IS_SET(SrcDists, DIST_SRC_SYS);
-}
-
-static int
-checkDistUser(dialogMenuItem *self)
-{
- return IS_USER(Dists, 0);
-}
-
-static int
-checkDistXUser(dialogMenuItem *self)
-{
- return IS_USER(Dists, DIST_XORG);
-}
-
-static int
-checkDistMinimum(dialogMenuItem *self)
-{
- return Dists == (DIST_BASE | DIST_KERNEL);
-}
-
-static int
-checkDistEverything(dialogMenuItem *self)
-{
- return Dists == DIST_ALL &&
- _IS_SET(SrcDists, DIST_SRC_ALL) &&
- _IS_SET(XOrgDists, DIST_XORG_ALL) &&
- _IS_SET(KernelDists, DIST_KERNEL_ALL);
-}
-
-static int
-srcFlagCheck(dialogMenuItem *item)
-{
- return SrcDists;
-}
-
-static int
-x11FlagCheck(dialogMenuItem *item)
-{
- if (XOrgDists != 0)
- Dists |= DIST_XORG;
- else
- Dists &= ~DIST_XORG;
-
- return Dists & DIST_XORG;
-}
-
-static int
-kernelFlagCheck(dialogMenuItem *item)
-{
- return KernelDists;
-}
static int
checkTrue(dialogMenuItem *item)
@@ -216,1035 +49,6 @@ checkTrue(dialogMenuItem *item)
* expansion.
*/
-DMenu MenuIndex = {
- DMENU_NORMAL_TYPE,
- "Glossary of functions",
- "This menu contains an alphabetized index of the top level functions in\n"
- "this program (sysinstall). Invoke an option by pressing [SPACE] or\n"
- "[ENTER]. To exit, use [TAB] to move to the Cancel button.",
- "Use PageUp or PageDown to move through this menu faster!",
- NULL,
- { { " Anon FTP", "Configure anonymous FTP logins.", dmenuVarCheck, configAnonFTP, NULL, "anon_ftp" },
- { " Commit", "Commit any pending actions (dangerous!)", NULL, installCustomCommit },
- { " Country", "Set the system's country", NULL, configCountry },
-#ifdef WITH_SYSCONS
- { " Console settings", "Customize system console behavior.", NULL, dmenuSubmenu, NULL, &MenuSyscons },
-#endif
- { " Configure", "The system configuration menu.", NULL, dmenuSubmenu, NULL, &MenuConfigure },
- { " Defaults, Load", "Load default settings.", NULL, dispatch_load_floppy },
-#ifdef WITH_MICE
- { " Device, Mouse", "The mouse configuration menu.", NULL, dmenuSubmenu, NULL, &MenuMouse },
-#endif
- { " Disklabel", "The disk Label editor", NULL, diskLabelEditor },
- { " Dists, All", "Root of the distribution tree.", NULL, dmenuSubmenu, NULL, &MenuDistributions },
- { " Dists, Basic", "Basic FreeBSD distribution menu.", NULL, dmenuSubmenu, NULL, &MenuSubDistributions },
- { " Dists, Developer", "Select developer's distribution.", checkDistDeveloper, distSetDeveloper },
- { " Dists, Src", "Src distribution menu.", NULL, dmenuSubmenu, NULL, &MenuSrcDistributions },
- { " Dists, X Developer", "Select X developer's distribution.", checkDistXDeveloper, distSetXDeveloper },
- { " Dists, Kern Developer", "Select kernel developer's distribution.", checkDistKernDeveloper, distSetKernDeveloper },
- { " Dists, User", "Select average user distribution.", checkDistUser, distSetUser },
- { " Dists, X User", "Select average X user distribution.", checkDistXUser, distSetXUser },
- { " Distributions, Adding", "Installing additional distribution sets", NULL, distExtractAll },
- { " Distributions, X.Org","X.Org distribution menu.", NULL, distSetXOrg },
- { " Documentation", "Installation instructions, README, etc.", NULL, dmenuSubmenu, NULL, &MenuDocumentation },
- { " Doc, README", "The distribution README file.", NULL, dmenuDisplayFile, NULL, "README" },
- { " Doc, Errata", "The distribution errata.", NULL, dmenuDisplayFile, NULL, "ERRATA" },
- { " Doc, Hardware", "The distribution hardware guide.", NULL, dmenuDisplayFile, NULL, "HARDWARE" },
- { " Doc, Install", "The distribution installation guide.", NULL, dmenuDisplayFile, NULL, "INSTALL" },
- { " Doc, Copyright", "The distribution copyright notices.", NULL, dmenuDisplayFile, NULL, "COPYRIGHT" },
- { " Doc, Release", "The distribution release notes.", NULL, dmenuDisplayFile, NULL, "RELNOTES" },
- { " Doc, HTML", "The HTML documentation menu.", NULL, docBrowser },
- { " Dump Vars", "(debugging) dump out internal variables.", NULL, dump_variables },
- { " Emergency shell", "Start an Emergency Holographic shell.", NULL, installFixitHoloShell },
-#ifdef WITH_SLICES
- { " Fdisk", "The disk Partition Editor", NULL, diskPartitionEditor },
-#endif
- { " Fixit", "Repair mode with CDROM or fixit floppy.", NULL, dmenuSubmenu, NULL, &MenuFixit },
- { " FTP sites", "The FTP mirror site listing.", NULL, dmenuSubmenu, NULL, &MenuMediaFTP },
- { " Gateway", "Set flag to route packets between interfaces.", dmenuVarCheck, dmenuToggleVariable, NULL, "gateway=YES" },
- { " HTML Docs", "The HTML documentation menu", NULL, docBrowser },
- { " inetd Configuration", "Configure inetd and simple internet services.", dmenuVarCheck, configInetd, NULL, "inetd_enable=YES" },
- { " Install, Standard", "A standard system installation.", NULL, installStandard },
- { " Install, Express", "An express system installation.", NULL, installExpress },
- { " Install, Custom", "The custom installation menu", NULL, dmenuSubmenu, NULL, &MenuInstallCustom },
- { " Label", "The disk Label editor", NULL, diskLabelEditor },
- { " Media", "Top level media selection menu.", NULL, dmenuSubmenu, NULL, &MenuMedia },
- { " Media, Tape", "Select tape installation media.", NULL, mediaSetTape },
- { " Media, NFS", "Select NFS installation media.", NULL, mediaSetNFS },
- { " Media, Floppy", "Select floppy installation media.", NULL, mediaSetFloppy },
- { " Media, CDROM/DVD", "Select CDROM/DVD installation media.", NULL, mediaSetCDROM },
- { " Media, DOS", "Select DOS installation media.", NULL, mediaSetDOS },
- { " Media, UFS", "Select UFS installation media.", NULL, mediaSetUFS },
- { " Media, FTP", "Select FTP installation media.", NULL, mediaSetFTP },
- { " Media, FTP Passive", "Select passive FTP installation media.", NULL, mediaSetFTPPassive },
- { " Media, HTTP", "Select FTP via HTTP proxy installation media.", NULL, mediaSetHTTP },
- { " Network Interfaces", "Configure network interfaces", NULL, tcpMenuSelect },
- { " Networking Services", "The network services menu.", NULL, dmenuSubmenu, NULL, &MenuNetworking },
- { " NFS, client", "Set NFS client flag.", dmenuVarCheck, dmenuToggleVariable, NULL, "nfs_client_enable=YES" },
- { " NFS, server", "Set NFS server flag.", dmenuVarCheck, configNFSServer, NULL, "nfs_server_enable=YES" },
- { " NTP Menu", "The NTP configuration menu.", NULL, dmenuSubmenu, NULL, &MenuNTP },
- { " Options", "The options editor.", NULL, optionsEditor },
- { " Packages", "The packages collection", NULL, configPackages },
-#ifdef WITH_SLICES
- { " Partition", "The disk Slice (PC-style partition) Editor", NULL, diskPartitionEditor },
-#endif
- { " PCNFSD", "Run authentication server for PC-NFS.", dmenuVarCheck, configPCNFSD, NULL, "pcnfsd" },
- { " Root Password", "Set the system manager's password.", NULL, dmenuSystemCommand, NULL, "passwd root" },
- { " Router", "Select routing daemon (default: routed)", NULL, configRouter, NULL, "router_enable" },
- { " Security", "Configure system security options", NULL, dmenuSubmenu, NULL, &MenuSecurity },
-#ifdef WITH_SYSCONS
- { " Syscons", "The system console configuration menu.", NULL, dmenuSubmenu, NULL, &MenuSyscons },
-#ifndef PC98
- { " Syscons, Font", "The console screen font.", NULL, dmenuSubmenu, NULL, &MenuSysconsFont },
-#endif
- { " Syscons, Keymap", "The console keymap configuration menu.", NULL, keymapMenuSelect },
- { " Syscons, Keyrate", "The console key rate configuration menu.", NULL, dmenuSubmenu, NULL, &MenuSysconsKeyrate },
- { " Syscons, Saver", "The console screen saver configuration menu.", NULL, dmenuSubmenu, NULL, &MenuSysconsSaver },
-#ifndef PC98
- { " Syscons, Screenmap", "The console screenmap configuration menu.", NULL, dmenuSubmenu, NULL, &MenuSysconsScrnmap },
- { " Syscons, Ttys", "The console terminal type menu.", NULL, dmenuSubmenu, NULL, &MenuSysconsTtys },
-#endif
-#endif /* WITH_SYSCONS */
- { " Time Zone", "Set the system's time zone.", NULL, dmenuSystemCommand, NULL, "tzsetup" },
- { " TTYs", "Configure system ttys.", NULL, configEtcTtys, NULL, "ttys" },
- { " Upgrade", "Upgrade an existing system.", NULL, installUpgrade },
- { " Usage", "Quick start - How to use this menu system.", NULL, dmenuDisplayFile, NULL, "usage" },
- { " User Management", "Add user and group information.", NULL, dmenuSubmenu, NULL, &MenuUsermgmt },
- { " X.Org, Fonts", "X.Org Font selection menu.", NULL, dmenuSubmenu, NULL, &MenuXOrgSelectFonts },
- { " X.Org, Server", "X.Org Server selection menu.", NULL, dmenuSubmenu, NULL, &MenuXOrgSelectServer },
- { NULL } },
-};
-
-/* The country menu */
-#include "countries.h"
-
-/* The initial installation menu */
-DMenu MenuInitial = {
- DMENU_NORMAL_TYPE,
- "sysinstall Main Menu", /* title */
- "Welcome to the FreeBSD installation and configuration tool. Please\n" /* prompt */
- "select one of the options below by using the arrow keys or typing the\n"
- "first character of the option name you're interested in. Invoke an\n"
- "option with [SPACE] or [ENTER]. To exit, use [TAB] to move to Exit.",
- "Press F1 for Installation Guide", /* help line */
- "INSTALL", /* help file */
- { { " Select " },
- { "X Exit Install", NULL, NULL, dmenuExit },
- { " Usage", "Quick start - How to use this menu system", NULL, dmenuDisplayFile, NULL, "usage" },
- { "Standard", "Begin a standard installation (recommended)", NULL, installStandard },
- { "Express", "Begin a quick installation (for experts)", NULL, installExpress },
- { " Custom", "Begin a custom installation (for experts)", NULL, dmenuSubmenu, NULL, &MenuInstallCustom },
- { "Configure", "Do post-install configuration of FreeBSD", NULL, dmenuSubmenu, NULL, &MenuConfigure },
- { "Doc", "Installation instructions, README, etc.", NULL, dmenuSubmenu, NULL, &MenuDocumentation },
-#ifdef WITH_SYSCONS
- { "Keymap", "Select keyboard type", NULL, keymapMenuSelect },
-#endif
- { "Options", "View/Set various installation options", NULL, optionsEditor },
- { "Fixit", "Repair mode with CDROM/DVD/floppy or start shell", NULL, dmenuSubmenu, NULL, &MenuFixit },
- { "Upgrade", "Upgrade an existing system", NULL, installUpgrade },
- { "Load Config","Load default install configuration", NULL, dispatch_load_floppy },
- { "Index", "Glossary of functions", NULL, dmenuSubmenu, NULL, &MenuIndex },
- { NULL } },
-};
-
-/* The main documentation menu */
-DMenu MenuDocumentation = {
- DMENU_NORMAL_TYPE,
- "FreeBSD Documentation Menu",
- "If you are at all unsure about the configuration of your hardware\n"
- "or are looking to build a system specifically for FreeBSD, read the\n"
- "Hardware guide! New users should also read the Install document for\n"
- "a step-by-step tutorial on installing FreeBSD. For general information,\n"
- "consult the README file.",
- "Confused? Press F1 for help.",
- "usage",
- { { "X Exit", "Exit this menu (returning to previous)", NULL, dmenuExit },
- { "1 README", "A general description of FreeBSD. Read this!", NULL, dmenuDisplayFile, NULL, "README" },
- { "2 Errata", "Late-breaking, post-release news.", NULL, dmenuDisplayFile, NULL, "ERRATA" },
- { "3 Hardware", "The FreeBSD survival guide for PC hardware.", NULL, dmenuDisplayFile, NULL, "HARDWARE" },
- { "4 Install", "A step-by-step guide to installing FreeBSD.", NULL, dmenuDisplayFile, NULL, "INSTALL" },
- { "5 Copyright", "The FreeBSD Copyright notices.", NULL, dmenuDisplayFile, NULL, "COPYRIGHT" },
- { "6 Release" ,"The release notes for this version of FreeBSD.", NULL, dmenuDisplayFile, NULL, "RELNOTES" },
- { "7 Shortcuts", "Creating shortcuts to sysinstall.", NULL, dmenuDisplayFile, NULL, "shortcuts" },
- { "8 HTML Docs", "Go to the HTML documentation menu (post-install).", NULL, docBrowser },
- { NULL } },
-};
-
-#ifdef WITH_MICE
-DMenu MenuMouseType = {
- DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
-#ifdef PC98
- "Select a protocol type for your mouse",
- "If your mouse is attached to the bus mouse port, you should always choose\n"
- "\"Auto\", regardless of the model and the brand of the mouse. All other\n"
- "protocol types are for serial mice and should not be used with the bus\n"
- "mouse. If you have a serial mouse and are not sure about its protocol,\n"
- "you should also try \"Auto\". It may not work for the serial mouse if the\n"
- "mouse does not support the PnP standard. But, it won't hurt. Many\n"
- "2-button serial mice are compatible with \"Microsoft\" or \"MouseMan\".\n"
- "3-button serial mice may be compatible with \"MouseSystems\" or \"MouseMan\".\n"
- "If the serial mouse has a wheel, it may be compatible with \"IntelliMouse\".",
- NULL,
- NULL,
- { { "1 Auto", "Bus mouse or PnP serial mouse",
- dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_TYPE "=auto" },
-#else
- "Select a protocol type for your mouse",
- "If your mouse is attached to the PS/2 mouse port or the bus mouse port,\n"
- "you should always choose \"Auto\", regardless of the model and the brand\n"
- "of the mouse. All other protocol types are for serial mice and should\n"
- "not be used with the PS/2 port mouse or the bus mouse. If you have\n"
- "a serial mouse and are not sure about its protocol, you should also try\n"
- "\"Auto\". It may not work for the serial mouse if the mouse does not\n"
- "support the PnP standard. But, it won't hurt. Many 2-button serial mice\n"
- "are compatible with \"Microsoft\" or \"MouseMan\". 3-button serial mice\n"
- "may be compatible with \"MouseSystems\" or \"MouseMan\". If the serial\n"
- "mouse has a wheel, it may be compatible with \"IntelliMouse\".",
- NULL,
- NULL,
- { { "1 Auto", "Bus mouse, PS/2 style mouse or PnP serial mouse",
- dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_TYPE "=auto" },
-#endif /* PC98 */
- { "2 GlidePoint", "ALPS GlidePoint pad (serial)",
- dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_TYPE "=glidepoint" },
- { "3 Hitachi","Hitachi tablet (serial)",
- dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_TYPE "=mmhittab" },
- { "4 IntelliMouse", "Microsoft IntelliMouse (serial)",
- dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_TYPE "=intellimouse" },
- { "5 Logitech", "Logitech protocol (old models) (serial)",
- dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_TYPE "=logitech" },
- { "6 Microsoft", "Microsoft protocol (serial)",
- dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_TYPE "=microsoft" },
- { "7 MM Series","MM Series protocol (serial)",
- dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_TYPE "=mmseries" },
- { "8 MouseMan", "Logitech MouseMan/TrackMan models (serial)",
- dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_TYPE "=mouseman" },
- { "9 MouseSystems", "MouseSystems protocol (serial)",
- dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_TYPE "=mousesystems" },
- { "A ThinkingMouse","Kensington ThinkingMouse (serial)",
- dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_TYPE "=thinkingmouse" },
- { NULL } },
-};
-
-#ifdef PC98
-DMenu MenuMousePort = {
- DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
- "Select your mouse port from the following menu",
- "The built-in pointing device of laptop/notebook computers is usually\n"
- "a BusMouse style device.",
- NULL,
- NULL,
- {
- { "1 BusMouse", "PC-98x1 bus mouse (/dev/mse0)",
- dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_PORT "=/dev/mse0" },
- { "2 COM1", "Serial mouse on COM1 (/dev/cuad0)",
- dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_PORT "=/dev/cuad0" },
- { "3 COM2", "Serial mouse on COM2 (/dev/cuad1)",
- dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_PORT "=/dev/cuad1" },
- { NULL } },
-};
-#else
-DMenu MenuMousePort = {
- DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
- "Select your mouse port from the following menu",
- "The built-in pointing device of laptop/notebook computers is usually\n"
- "a PS/2 style device.",
- NULL,
- NULL,
- { { "1 PS/2", "PS/2 style mouse (/dev/psm0)",
- dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_PORT "=/dev/psm0" },
- { "2 COM1", "Serial mouse on COM1 (/dev/cuad0)",
- dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_PORT "=/dev/cuad0" },
- { "3 COM2", "Serial mouse on COM2 (/dev/cuad1)",
- dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_PORT "=/dev/cuad1" },
- { "4 COM3", "Serial mouse on COM3 (/dev/cuad2)",
- dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_PORT "=/dev/cuad2" },
- { "5 COM4", "Serial mouse on COM4 (/dev/cuad3)",
- dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_PORT "=/dev/cuad3" },
- { "6 BusMouse", "Logitech, ATI or MS bus mouse (/dev/mse0)",
- dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_PORT "=/dev/mse0" },
- { NULL } },
-};
-#endif /* PC98 */
-
-DMenu MenuMouse = {
- DMENU_NORMAL_TYPE,
- "Please configure your mouse",
- "You can cut and paste text in the text console by running the mouse\n"
- "daemon. Specify a port and a protocol type of your mouse and enable\n"
- "the mouse daemon. If you don't want this feature, select 6 to disable\n"
- "the daemon.\n"
- "Once you've enabled the mouse daemon, you can specify \"/dev/sysmouse\"\n"
- "as your mouse device and \"SysMouse\" or \"MouseSystems\" as mouse\n"
- "protocol when running the X configuration utility (see Configuration\n"
- "menu).",
- NULL,
- NULL,
- { { "X Exit", "Exit this menu (returning to previous)", NULL, dmenuExit },
- { "2 Enable", "Test and run the mouse daemon", NULL, mousedTest, NULL, NULL },
- { "3 Type", "Select mouse protocol type", NULL, dmenuSubmenu, NULL, &MenuMouseType },
- { "4 Port", "Select mouse port", NULL, dmenuSubmenu, NULL, &MenuMousePort },
- { "5 Flags", "Set additional flags", dmenuVarCheck, setMouseFlags,
- NULL, VAR_MOUSED_FLAGS "=" },
- { "6 Disable", "Disable the mouse daemon", NULL, mousedDisable, NULL, NULL },
- { NULL } },
-};
-#endif /* WITH_MICE */
-
-DMenu MenuMediaCDROM = {
- DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
- "Choose a CD/DVD type",
- "FreeBSD can be installed directly from a CD/DVD containing a valid\n"
- "FreeBSD distribution. If you are seeing this menu it is because\n"
- "more than one CD/DVD drive was found on your system. Please select one\n"
- "of the following CD/DVD drives as your installation drive.",
- "Press F1 to read the installation guide",
- "INSTALL",
- { { NULL } },
-};
-
-DMenu MenuMediaFloppy = {
- DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
- "Choose a Floppy drive",
- "You have more than one floppy drive. Please choose which drive\n"
- "you would like to use.",
- NULL,
- NULL,
- { { NULL } },
-};
-
-DMenu MenuMediaDOS = {
- DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
- "Choose a DOS partition",
- "FreeBSD can be installed directly from a DOS partition\n"
- "assuming, of course, that you have copied the relevant\n"
- "distributions into your DOS partition before starting this\n"
- "installation. If this is not the case then you should reboot\n"
- "DOS at this time and copy the distributions you wish to install\n"
- "into a \"FREEBSD\" subdirectory on one of your DOS partitions.\n"
- "Otherwise, please select the DOS partition containing the FreeBSD\n"
- "distribution files.",
- "Press F1 to read the installation guide",
- "INSTALL",
- { { NULL } },
-};
-
-DMenu MenuMediaFTP = {
- DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
- "Please select a FreeBSD FTP distribution site",
- "Please select the site closest to you or \"other\" if you'd like to\n"
- "specify a different choice. Also note that not every site listed here\n"
- "carries more than the base distribution kits. Only Primary sites are\n"
- "guaranteed to carry the full range of possible distributions.",
- "Select a site that's close!",
- "INSTALL",
- { { "Main Site", "ftp.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp.freebsd.org" },
- { "URL", "Specify some other ftp site by URL", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=other" },
- { "Snapshots Server Japan", "snapshots.jp.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://snapshots.jp.freebsd.org" },
- { "Snapshots Server Sweden", "snapshots.se.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://snapshots.se.freebsd.org" },
-
- { "IPv6 Ireland", "ftp3.ie.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp3.ie.freebsd.org" },
- { " IPv6 Japan", "ftp2.jp.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp2.jp.freebsd.org" },
- { " IPv6 USA", "ftp4.us.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp4.us.freebsd.org" },
-
- { "Primary", "ftp1.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp1.freebsd.org" },
- { " Primary #2", "ftp2.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp2.freebsd.org" },
- { " Primary #3", "ftp3.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp3.freebsd.org" },
- { " Primary #4", "ftp4.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp4.freebsd.org" },
- { " Primary #5", "ftp5.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp5.freebsd.org" },
- { " Primary #6", "ftp6.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp6.freebsd.org" },
- { " Primary #7", "ftp7.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp7.freebsd.org" },
- { " Primary #8", "ftp8.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp8.freebsd.org" },
- { " Primary #9", "ftp9.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp9.freebsd.org" },
- { " Primary #10", "ftp10.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp10.freebsd.org" },
- { " Primary #11", "ftp11.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp11.freebsd.org" },
- { " Primary #12", "ftp12.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp12.freebsd.org" },
- { " Primary #13", "ftp13.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp13.freebsd.org" },
- { " Primary #14", "ftp14.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp14.freebsd.org" },
-
- { "Argentina", "ftp.ar.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp.ar.freebsd.org" },
-
- { "Australia", "ftp.au.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp.au.freebsd.org" },
- { " Australia #2","ftp2.au.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp2.au.freebsd.org" },
- { " Australia #3","ftp3.au.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp3.au.freebsd.org" },
-
- { "Austria","ftp.at.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp.at.freebsd.org" },
- { " Austria #2","ftp2.at.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp2.at.freebsd.org" },
-
- { "Brazil", "ftp.br.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp.br.freebsd.org" },
- { " Brazil #2", "ftp2.br.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp2.br.freebsd.org" },
- { " Brazil #3", "ftp3.br.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp3.br.freebsd.org" },
- { " Brazil #4", "ftp4.br.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp4.br.freebsd.org" },
- { " Brazil #5", "ftp5.br.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp5.br.freebsd.org" },
- { " Brazil #6", "ftp6.br.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp6.br.freebsd.org" },
- { " Brazil #7", "ftp7.br.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp7.br.freebsd.org" },
-
- { "Canada", "ftp.ca.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp.ca.freebsd.org" },
-
- { "China", "ftp.cn.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp.cn.freebsd.org" },
- { " China #2", "ftp2.cn.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp2.cn.freebsd.org" },
-
- { "Croatia", "ftp.hr.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp.hr.freebsd.org" },
-
- { "Czech Republic", "ftp.cz.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp.cz.freebsd.org" },
-
- { "Denmark", "ftp.dk.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp.dk.freebsd.org" },
- { " Denmark #2", "ftp2.dk.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp2.dk.freebsd.org" },
-
- { "Estonia", "ftp.ee.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp.ee.freebsd.org" },
-
- { "Finland", "ftp.fi.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp.fi.freebsd.org" },
-
- { "France", "ftp.fr.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp.fr.freebsd.org" },
- { " France #2", "ftp2.fr.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp2.fr.freebsd.org" },
- { " France #3", "ftp3.fr.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp3.fr.freebsd.org" },
- { " France #5", "ftp5.fr.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp5.fr.freebsd.org" },
- { " France #6", "ftp6.fr.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp6.fr.freebsd.org" },
- { " France #8", "ftp8.fr.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp8.fr.freebsd.org" },
-
- { "Germany", "ftp.de.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp.de.freebsd.org" },
- { " Germany #2", "ftp2.de.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp2.de.freebsd.org" },
- { " Germany #3", "ftp3.de.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp3.de.freebsd.org" },
- { " Germany #4", "ftp4.de.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp4.de.freebsd.org" },
- { " Germany #5", "ftp5.de.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp5.de.freebsd.org" },
- { " Germany #6", "ftp6.de.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp6.de.freebsd.org" },
- { " Germany #7", "ftp7.de.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp7.de.freebsd.org" },
- { " Germany #8", "ftp8.de.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp8.de.freebsd.org" },
-
- { "Greece", "ftp.gr.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp.gr.freebsd.org" },
- { " Greece #2", "ftp2.gr.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp2.gr.freebsd.org" },
-
- { "Hong Kong", "ftp.hk.super.net", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp.hk.super.net" },
-
- { "Hungary", "ftp.hu.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp.hu.freebsd.org" },
-
- { "Iceland", "ftp.is.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp.is.freebsd.org" },
-
- { "Ireland", "ftp.ie.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp.ie.freebsd.org" },
- { " Ireland #2", "ftp2.ie.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp2.ie.freebsd.org" },
- { " Ireland #3", "ftp3.ie.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp3.ie.freebsd.org" },
-
- { "Italy", "ftp.it.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp.it.freebsd.org" },
-
- { "Japan", "ftp.jp.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp.jp.freebsd.org" },
- { " Japan #2", "ftp2.jp.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp2.jp.freebsd.org" },
- { " Japan #3", "ftp3.jp.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp3.jp.freebsd.org" },
- { " Japan #4", "ftp4.jp.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp4.jp.freebsd.org" },
- { " Japan #5", "ftp5.jp.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp5.jp.freebsd.org" },
- { " Japan #6", "ftp6.jp.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp6.jp.freebsd.org" },
- { " Japan #7", "ftp7.jp.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp7.jp.freebsd.org" },
- { " Japan #8", "ftp8.jp.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp8.jp.freebsd.org" },
- { " Japan #9", "ftp9.jp.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp9.jp.freebsd.org" },
-
- { "Korea", "ftp.kr.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp.kr.freebsd.org" },
- { " Korea #2", "ftp2.kr.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp2.kr.freebsd.org" },
-
- { "Lithuania", "ftp.lt.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp.lt.freebsd.org" },
-
- { "Netherlands", "ftp.nl.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp.nl.freebsd.org" },
- { " Netherlands #2", "ftp2.nl.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp2.nl.freebsd.org" },
-
- { "Norway", "ftp.no.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp.no.freebsd.org" },
- { " Norway #3", "ftp3.no.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp3.no.freebsd.org" },
-
- { "Poland", "ftp.pl.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp.pl.freebsd.org" },
- { " Poland #2", "ftp2.pl.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp2.pl.freebsd.org" },
- { " Poland #5", "ftp5.pl.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp5.pl.freebsd.org" },
-
- { "Portugal", "ftp.pt.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp.pt.freebsd.org" },
- { " Portugal #2", "ftp2.pt.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp2.pt.freebsd.org" },
- { " Portugal #4", "ftp4.pt.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp4.pt.freebsd.org" },
-
- { "Romania", "ftp.ro.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp.ro.freebsd.org" },
-
- { "Russia", "ftp.ru.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp.ru.freebsd.org" },
- { " Russia #2", "ftp2.ru.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp2.ru.freebsd.org" },
- { " Russia #3", "ftp3.ru.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp3.ru.freebsd.org" },
- { " Russia #4", "ftp4.ru.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp4.ru.freebsd.org" },
-
- { "Singapore", "ftp.sg.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp.sg.freebsd.org" },
-
- { "Slovak Republic", "ftp.sk.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp.sk.freebsd.org" },
-
- { "Slovenia", "ftp.si.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp.si.freebsd.org" },
- { " Slovenia #2", "ftp2.si.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp2.si.freebsd.org" },
-
- { "South Africa", "ftp.za.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp.za.freebsd.org" },
- { " South Africa #2", "ftp2.za.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp2.za.freebsd.org" },
- { " South Africa #3", "ftp3.za.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp3.za.freebsd.org" },
- { " South Africa #4", "ftp4.za.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp4.za.freebsd.org" },
-
- { "Spain", "ftp.es.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp.es.freebsd.org" },
- { " Spain #2", "ftp2.es.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp2.es.freebsd.org" },
- { " Spain #3", "ftp3.es.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp3.es.freebsd.org" },
-
- { "Sweden", "ftp.se.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp.se.freebsd.org" },
- { " Sweden #2", "ftp2.se.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp2.se.freebsd.org" },
- { " Sweden #3", "ftp3.se.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp3.se.freebsd.org" },
- { " Sweden #5", "ftp5.se.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp5.se.freebsd.org" },
-
- { "Switzerland", "ftp.ch.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp.ch.freebsd.org" },
- { " Switzerland #2", "ftp2.ch.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp2.ch.freebsd.org" },
-
- { "Taiwan", "ftp.tw.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp.tw.freebsd.org" },
- { " Taiwan #2", "ftp2.tw.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp2.tw.freebsd.org" },
- { " Taiwan #3", "ftp3.tw.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp3.tw.freebsd.org" },
- { " Taiwan #4", "ftp4.tw.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp4.tw.freebsd.org" },
- { " Taiwan #6", "ftp6.tw.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp6.tw.freebsd.org" },
- { " Taiwan #11", "ftp11.tw.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp11.tw.freebsd.org" },
-
- { "Turkey", "ftp.tr.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp.tr.freebsd.org" },
-
- { "UK", "ftp.uk.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp.uk.freebsd.org" },
- { " UK #2", "ftp2.uk.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp2.uk.freebsd.org" },
- { " UK #3", "ftp3.uk.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp3.uk.freebsd.org" },
- { " UK #4", "ftp4.uk.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp4.uk.freebsd.org" },
- { " UK #5", "ftp5.uk.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp5.uk.freebsd.org" },
- { " UK #6", "ftp6.uk.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp6.uk.freebsd.org" },
-
- { "Ukraine", "ftp.ua.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp.ua.freebsd.org" },
- { " Ukraine #2", "ftp2.ua.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp2.ua.freebsd.org" },
- { " Ukraine #5", "ftp5.ua.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp5.ua.freebsd.org" },
- { " Ukraine #6", "ftp6.ua.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp6.ua.freebsd.org" },
- { " Ukraine #7", "ftp7.ua.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp7.ua.freebsd.org" },
- { " Ukraine #8", "ftp8.ua.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp8.ua.freebsd.org" },
-
- { "USA #1", "ftp1.us.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp1.us.freebsd.org" },
- { " USA #2", "ftp2.us.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp2.us.freebsd.org" },
- { " USA #3", "ftp3.us.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp3.us.freebsd.org" },
- { " USA #4", "ftp4.us.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp4.us.freebsd.org" },
- { " USA #5", "ftp5.us.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp5.us.freebsd.org" },
- { " USA #6", "ftp6.us.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp6.us.freebsd.org" },
- { " USA #7", "ftp7.us.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp7.us.freebsd.org" },
- { " USA #8", "ftp8.us.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp8.us.freebsd.org" },
- { " USA #9", "ftp9.us.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp9.us.freebsd.org" },
- { " USA #10", "ftp10.us.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp10.us.freebsd.org" },
- { " USA #11", "ftp11.us.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp11.us.freebsd.org" },
- { " USA #12", "ftp12.us.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp12.us.freebsd.org" },
- { " USA #13", "ftp13.us.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp13.us.freebsd.org" },
- { " USA #14", "ftp14.us.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp14.us.freebsd.org" },
- { " USA #15", "ftp15.us.freebsd.org", NULL, dmenuSetVariable, NULL,
- VAR_FTP_PATH "=ftp://ftp15.us.freebsd.org" },
-
- { NULL } }
-};
-
-DMenu MenuMediaTape = {
- DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
- "Choose a tape drive type",
- "FreeBSD can be installed from tape drive, though this installation\n"
- "method requires a certain amount of temporary storage in addition\n"
- "to the space required by the distribution itself (tape drives make\n"
- "poor random-access devices, so we extract _everything_ on the tape\n"
- "in one pass). If you have sufficient space for this, then you should\n"
- "select one of the following tape devices detected on your system.",
- "Press F1 to read the installation guide",
- "INSTALL",
- { { NULL } },
-};
-
-DMenu MenuNetworkDevice = {
- DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
- "Network interface information required",
- "If you are using PPP over a serial device, as opposed to a direct\n"
- "ethernet connection, then you may first need to dial your Internet\n"
- "Service Provider using the ppp utility we provide for that purpose.\n"
- "If you're using SLIP over a serial device then the expectation is\n"
- "that you have a HARDWIRED connection.\n\n"
- "You can also install over a parallel port using a special \"laplink\"\n"
- "cable to another machine running FreeBSD.",
- "Press F1 to read network configuration manual",
- "network_device",
- { { NULL } },
-};
-
-/* Prototype KLD load menu */
-DMenu MenuKLD = {
- DMENU_NORMAL_TYPE,
- "KLD Menu",
- "Load a KLD from a floppy\n",
- NULL,
- NULL,
- { { NULL } },
-};
-
-/* The media selection menu */
-DMenu MenuMedia = {
- DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
- "Choose Installation Media",
- "FreeBSD can be installed from a variety of different installation\n"
- "media, ranging from floppies to an Internet FTP server. If you're\n"
- "installing FreeBSD from a supported CD/DVD drive then this is generally\n"
- "the best media to use if you have no overriding reason for using other\n"
- "media.",
- "Press F1 for more information on the various media types",
- "media",
- { { "1 CD/DVD", "Install from a FreeBSD CD/DVD", NULL, mediaSetCDROM },
- { "2 FTP", "Install from an FTP server", NULL, mediaSetFTPActive },
- { "3 FTP Passive", "Install from an FTP server through a firewall", NULL, mediaSetFTPPassive },
- { "4 HTTP", "Install from an FTP server through a http proxy", NULL, mediaSetHTTP },
- { "5 DOS", "Install from a DOS partition", NULL, mediaSetDOS },
- { "6 NFS", "Install over NFS", NULL, mediaSetNFS },
- { "7 File System", "Install from an existing filesystem", NULL, mediaSetUFS },
- { "8 Floppy", "Install from a floppy disk set", NULL, mediaSetFloppy },
- { "9 Tape", "Install from SCSI or QIC tape", NULL, mediaSetTape },
- { "X Options", "Go to the Options screen", NULL, optionsEditor },
- { NULL } },
-};
-
-/* The distributions menu */
-DMenu MenuDistributions = {
- DMENU_CHECKLIST_TYPE | DMENU_SELECTION_RETURNS,
- "Choose Distributions",
- "As a convenience, we provide several \"canned\" distribution sets.\n"
- "These select what we consider to be the most reasonable defaults for the\n"
- "type of system in question. If you would prefer to pick and choose the\n"
- "list of distributions yourself, simply select \"Custom\". You can also\n"
- "pick a canned distribution set and then fine-tune it with the Custom item.\n\n"
- "Choose an item by pressing [SPACE] or [ENTER]. When finished, choose the\n"
- "Exit item or move to the OK button with [TAB].",
- "Press F1 for more information on these options.",
- "distributions",
- { { "X Exit", "Exit this menu (returning to previous)",
- checkTrue, dmenuExit, NULL, NULL, '<', '<', '<' },
- { "All", "All system sources, binaries and X Window System",
- checkDistEverything, distSetEverything, NULL, NULL, ' ', ' ', ' ' },
- { "Reset", "Reset selected distribution list to nothing",
- NULL, distReset, NULL, NULL, ' ', ' ', ' ' },
- { "4 Developer", "Full sources, binaries and doc but no games",
- checkDistDeveloper, distSetDeveloper },
- { "5 X-Developer", "Same as above + X Window System",
- checkDistXDeveloper, distSetXDeveloper },
- { "6 Kern-Developer", "Full binaries and doc, kernel sources only",
- checkDistKernDeveloper, distSetKernDeveloper },
- { "7 X-Kern-Developer", "Same as above + X Window System",
- checkDistXKernDeveloper, distSetXKernDeveloper },
- { "8 User", "Average user - binaries and doc only",
- checkDistUser, distSetUser },
- { "9 X-User", "Same as above + X Window System",
- checkDistXUser, distSetXUser },
- { "A Minimal", "The smallest configuration possible",
- checkDistMinimum, distSetMinimum },
- { "B Custom", "Specify your own distribution set",
- NULL, dmenuSubmenu, NULL, &MenuSubDistributions, '>', '>', '>' },
- { NULL } },
-};
-
-DMenu MenuSubDistributions = {
- DMENU_CHECKLIST_TYPE | DMENU_SELECTION_RETURNS,
- "Select the distributions you wish to install.",
- "Please check off the distributions you wish to install. At the\n"
- "very minimum, this should be \"base\".",
- NULL,
- NULL,
- { { "X Exit", "Exit this menu (returning to previous)",
- checkTrue, dmenuExit, NULL, NULL, '<', '<', '<' },
- { "All", "All system sources, binaries and X Window System",
- NULL, distSetEverything, NULL, NULL, ' ', ' ', ' ' },
- { "Reset", "Reset all of the below",
- NULL, distReset, NULL, NULL, ' ', ' ', ' ' },
- { " base", "Binary base distribution (required)",
- dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_BASE },
- { " kernels", "Binary kernel distributions (required)",
- kernelFlagCheck,distSetKernel },
- { " dict", "Spelling checker dictionary files",
- dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_DICT },
- { " doc", "Miscellaneous FreeBSD online docs",
- dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_DOC },
- { " games", "Games (non-commercial)",
- dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_GAMES },
- { " info", "GNU info files",
- dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_INFO },
-#ifdef __amd64__
- { " lib32", "32-bit runtime compatibility libraries",
- dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_LIB32 },
-#endif
- { " man", "System manual pages - recommended",
- dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_MANPAGES },
- { " catman", "Preformatted system manual pages",
- dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_CATPAGES },
- { " proflibs", "Profiled versions of the libraries",
- dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_PROFLIBS },
- { " src", "Sources for everything",
- srcFlagCheck, distSetSrc },
- { " ports", "The FreeBSD Ports collection",
- dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_PORTS },
- { " local", "Local additions collection",
- dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_LOCAL},
- { " X.Org", "The X.Org distribution",
- x11FlagCheck, distSetXOrg },
- { NULL } },
-};
-
-DMenu MenuKernelDistributions = {
- DMENU_CHECKLIST_TYPE | DMENU_SELECTION_RETURNS,
- "Select the operating system kernels you wish to install.",
- "Please check off those kernels you wish to install.\n",
- NULL,
- NULL,
- { { "X Exit", "Exit this menu (returning to previous)",
- checkTrue, dmenuExit, NULL, NULL, '<', '<', '<' },
- { "All", "Select all of the below",
- NULL, setKernel, NULL, NULL, ' ', ' ', ' ' },
- { "Reset", "Reset all of the below",
- NULL, clearKernel, NULL, NULL, ' ', ' ', ' ' },
- { " GENERIC", "GENERIC kernel configuration",
- dmenuFlagCheck, dmenuSetFlag, NULL, &KernelDists, '[', 'X', ']', DIST_KERNEL_GENERIC },
-#ifdef WITH_SMP
- { " SMP", "GENERIC symmetric multiprocessor kernel configuration",
- dmenuFlagCheck, dmenuSetFlag, NULL, &KernelDists, '[', 'X', ']', DIST_KERNEL_SMP },
-#endif
- { NULL } },
-};
-
-DMenu MenuSrcDistributions = {
- DMENU_CHECKLIST_TYPE | DMENU_SELECTION_RETURNS,
- "Select the sub-components of src you wish to install.",
- "Please check off those portions of the FreeBSD source tree\n"
- "you wish to install.",
- NULL,
- NULL,
- { { "X Exit", "Exit this menu (returning to previous)",
- checkTrue, dmenuExit, NULL, NULL, '<', '<', '<' },
- { "All", "Select all of the below",
- NULL, setSrc, NULL, NULL, ' ', ' ', ' ' },
- { "Reset", "Reset all of the below",
- NULL, clearSrc, NULL, NULL, ' ', ' ', ' ' },
- { " base", "top-level files in /usr/src",
- dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_BASE },
- { " contrib", "/usr/src/contrib (contributed software)",
- dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_CONTRIB },
- { " crypto", "/usr/src/crypto (contrib encryption sources)",
- dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_SCRYPTO },
- { " gnu", "/usr/src/gnu (software from the GNU Project)",
- dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_GNU },
- { " etc", "/usr/src/etc (miscellaneous system files)",
- dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_ETC },
- { " games", "/usr/src/games (the obvious!)",
- dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_GAMES },
- { " include", "/usr/src/include (header files)",
- dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_INCLUDE },
- { " krb5", "/usr/src/kerberos5 (sources for Kerberos5)",
- dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_SKERBEROS5 },
- { " lib", "/usr/src/lib (system libraries)",
- dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_LIB },
- { " libexec", "/usr/src/libexec (system programs)",
- dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_LIBEXEC },
- { " release", "/usr/src/release (release-generation tools)",
- dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_RELEASE },
- { " rescue", "/usr/src/rescue (static rescue tools)",
- dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_RESCUE },
- { " bin", "/usr/src/bin (system binaries)",
- dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_BIN },
- { " sbin", "/usr/src/sbin (system binaries)",
- dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_SBIN },
- { " secure", "/usr/src/secure (BSD encryption sources)",
- dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_SSECURE },
- { " share", "/usr/src/share (documents and shared files)",
- dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_SHARE },
- { " sys", "/usr/src/sys (FreeBSD kernel)",
- dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_SYS },
- { " tools", "/usr/src/tools (miscellaneous tools)",
- dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_TOOLS },
- { " ubin", "/usr/src/usr.bin (user binaries)",
- dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_UBIN },
- { " usbin", "/usr/src/usr.sbin (aux system binaries)",
- dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_USBIN },
- { NULL } },
-};
-
-DMenu MenuXOrgConfig = {
- DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
- "Please select the X.Org configuration tool you want to use.",
- "The first option, xorgcfg, is fully graphical.\n"
- "The second option provides a menu-based interface similar to\n"
- "what you are currently using. "
- "The third option, xorgconfig, is\n"
- "a more simplistic shell-script based tool and less friendly to\n"
- "new users, but it may work in situations where the other options\n"
- "do not.",
- NULL,
- NULL,
- { { "X Exit", "Exit this menu (returning to previous)",
- NULL, dmenuExit },
- { "2 xorgcfg", "Fully graphical X.Org configuration tool.",
- NULL, dmenuSetVariable, NULL, VAR_XORG_CONFIG "=xorgcfg" },
- { "3 xorgcfg -textmode", "ncurses-based X.Org configuration tool.",
- NULL, dmenuSetVariable, NULL, VAR_XORG_CONFIG "=xorgcfg -textmode" },
- { "4 xorgconfig", "Shell-script based X.Org configuration tool.",
- NULL, dmenuSetVariable, NULL, VAR_XORG_CONFIG "=xorgconfig" },
- { "D XDesktop", "X already set up, just do desktop configuration.",
- NULL, dmenuSubmenu, NULL, &MenuXDesktops },
- { NULL } },
-};
-
-DMenu MenuXDesktops = {
- DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
- "Please select the default X desktop to use.",
- "By default, X.Org comes with a fairly vanilla desktop which\n"
- "is based around the twm(1) window manager and does not offer\n"
- "much in the way of features. It does have the advantage of\n"
- "being a standard part of X so you don't need to load anything\n"
- "extra in order to use it. If, however, you have access to a\n"
- "reasonably full packages collection on your installation media,\n"
- "you can choose any one of the following desktops as alternatives.",
- NULL,
- NULL,
- { { "X Exit", "Exit this menu (returning to previous)",
- NULL, dmenuExit },
- { "2 KDE", "The K Desktop Environment (Lite Edition)",
- NULL, dmenuSetVariable, NULL, VAR_DESKSTYLE "=kde" },
- { "3 GNOME 2", "The GNOME 2 Desktop Environment (Lite Edition)",
- NULL, dmenuSetVariable, NULL, VAR_DESKSTYLE "=gnome2" },
- { "4 Afterstep", "The Afterstep window manager",
- NULL, dmenuSetVariable, NULL, VAR_DESKSTYLE "=afterstep" },
- { "5 Windowmaker", "The Windowmaker window manager",
- NULL, dmenuSetVariable, NULL, VAR_DESKSTYLE "=windowmaker" },
- { "6 fvwm", "The fvwm window manager",
- NULL, dmenuSetVariable, NULL, VAR_DESKSTYLE "=fvwm2" },
- { NULL } },
-};
-
-DMenu MenuXOrgSelect = {
- DMENU_NORMAL_TYPE,
- "X.Org Distribution",
- "Please select the components you need from the X.Org\n"
- "distribution sets.",
- NULL,
- NULL,
- { { "X Exit", "Exit this menu (returning to previous)", NULL, dmenuExit },
- { "Basic", "Basic component menu (required)", NULL, dmenuSubmenu, NULL, &MenuXOrgSelectCore },
- { "Server", "X server menu", NULL, dmenuSubmenu, NULL, &MenuXOrgSelectServer },
- { "Fonts", "Font set menu", NULL, dmenuSubmenu, NULL, &MenuXOrgSelectFonts },
- { NULL } },
-};
-
-DMenu MenuXOrgSelectCore = {
- DMENU_CHECKLIST_TYPE | DMENU_SELECTION_RETURNS,
- "X.Org base distribution types",
- "Please check off the basic X.Org components you wish to install.\n"
- "Bin, lib, and set are recommended for a minimum installaion.",
- NULL,
- NULL,
- { { "X Exit", "Exit this menu (returning to previous)",
- checkTrue, dmenuExit, NULL, NULL, '<', '<', '<' },
- { "All", "Select all below",
- NULL, setX11Misc, NULL, NULL, ' ', ' ', ' ' },
- { "Reset", "Reset all below",
- NULL, clearX11Misc, NULL, NULL, ' ', ' ', ' ' },
- { " lib", "Shared libraries and data files needed at runtime",
- dmenuFlagCheck, dmenuSetFlag, NULL, &XOrgDists, '[', 'X', ']', DIST_XORG_LIB },
- { " bin", "Client applications",
- dmenuFlagCheck, dmenuSetFlag, NULL, &XOrgDists, '[', 'X', ']', DIST_XORG_CLIENTS },
- { " man", "Manual pages",
- dmenuFlagCheck, dmenuSetFlag, NULL, &XOrgDists, '[', 'X', ']', DIST_XORG_MAN },
- { " doc", "Documentation",
- dmenuFlagCheck, dmenuSetFlag, NULL, &XOrgDists, '[', 'X', ']', DIST_XORG_DOC },
- { " prog", "Programming tools",
- dmenuFlagCheck, dmenuSetFlag, NULL, &XOrgDists, '[', 'X', ']', DIST_XORG_IMAKE },
- { NULL } },
-};
-
-DMenu MenuXOrgSelectFonts = {
- DMENU_CHECKLIST_TYPE | DMENU_SELECTION_RETURNS,
- "X.Org Font distribution selection.",
- "Please check off the individual font distributions you wish to\n\
-install. At the minimum, you should install the standard\n\
-75 DPI and misc fonts if you're also installing an X server\n\
-(these are selected by default). The TrueType set is also \n\
-highly recommended. The font server is unnecessary in most\n\
-configurations.",
- NULL,
- NULL,
- { { "X Exit", "Exit this menu (returning to previous)",
- checkTrue, dmenuExit, NULL, NULL, '<', '<', '<' },
- { "All", "All fonts",
- NULL, setX11Fonts, NULL, NULL, ' ', ' ', ' ' },
- { "Reset", "Reset font selections",
- NULL, clearX11Fonts, NULL, NULL, ' ', ' ', ' ' },
- { " fmsc", "Standard miscellaneous fonts",
- dmenuFlagCheck, dmenuSetFlag, NULL, &XOrgDists, '[', 'X', ']', DIST_XORG_FONTS_MISC },
- { " f75", "75 DPI fonts",
- dmenuFlagCheck, dmenuSetFlag, NULL, &XOrgDists, '[', 'X', ']', DIST_XORG_FONTS_75 },
- { " f100", "100 DPI fonts",
- dmenuFlagCheck, dmenuSetFlag, NULL, &XOrgDists, '[', 'X', ']', DIST_XORG_FONTS_100 },
- { " fcyr", "Cyrillic Fonts",
- dmenuFlagCheck, dmenuSetFlag, NULL, &XOrgDists, '[', 'X', ']', DIST_XORG_FONTS_CYR },
- { " ft1", "Type1 scalable fonts",
- dmenuFlagCheck, dmenuSetFlag, NULL, &XOrgDists, '[', 'X', ']', DIST_XORG_FONTS_T1 },
- { " ftt", "TrueType scalable fonts",
- dmenuFlagCheck, dmenuSetFlag, NULL, &XOrgDists, '[', 'X', ']', DIST_XORG_FONTS_TT },
- { " fs", "Font server",
- dmenuFlagCheck, dmenuSetFlag, NULL, &XOrgDists, '[', 'X', ']', DIST_XORG_FONTSERVER },
- { NULL } },
-};
-
-DMenu MenuXOrgSelectServer = {
- DMENU_CHECKLIST_TYPE | DMENU_SELECTION_RETURNS,
- "X.Org X Server selection.",
- "Please check off the types of X servers you wish to install.\n",
- NULL,
- NULL,
- { { "X Exit", "Exit this menu (returning to previous)",
- checkTrue, dmenuExit, NULL, NULL, '<', '<', '<' },
- { "All", "Select all of the above",
- NULL, setX11Servers, NULL, NULL, ' ', ' ', ' ' },
- { "Reset", "Reset all of the above",
- NULL, clearX11Servers, NULL, NULL, ' ', ' ', ' ' },
- { " srv", "Standard Graphics Framebuffer",
- dmenuFlagCheck, dmenuSetFlag, NULL, &XOrgDists, '[', 'X', ']', DIST_XORG_SERVER },
- { " nest", "Nested X Server",
- dmenuFlagCheck, dmenuSetFlag, NULL, &XOrgDists, '[', 'X', ']', DIST_XORG_NESTSERVER },
- { " prt", "X Print Server",
- dmenuFlagCheck, dmenuSetFlag, NULL, &XOrgDists, '[', 'X', ']', DIST_XORG_PRINTSERVER },
- { " vfb", "Virtual Framebuffer",
- dmenuFlagCheck, dmenuSetFlag, NULL, &XOrgDists, '[', 'X', ']', DIST_XORG_VFBSERVER },
- { NULL } },
-};
-
DMenu MenuDiskDevices = {
DMENU_CHECKLIST_TYPE | DMENU_SELECTION_RETURNS,
"Select Drive(s)",
@@ -1260,45 +64,15 @@ DMenu MenuDiskDevices = {
{ { NULL } },
};
-DMenu MenuHTMLDoc = {
+DMenu MenuMain = {
DMENU_NORMAL_TYPE,
- "Select HTML Documentation pointer",
- "Please select the body of documentation you're interested in, the main\n"
- "ones right now being the FAQ and the Handbook. You can also choose \"other\"\n"
- "to enter an arbitrary URL for browsing.",
- "Press F1 for more help on what you see here.",
- "html",
- { { "X Exit", "Exit this menu (returning to previous)", NULL, dmenuExit },
- { "2 Handbook", "The FreeBSD Handbook.", NULL, docShowDocument },
- { "3 FAQ", "The Frequently Asked Questions guide.", NULL, docShowDocument },
- { "4 Home", "The Home Pages for the FreeBSD Project (requires net)", NULL, docShowDocument },
- { "5 Other", "Enter a URL.", NULL, docShowDocument },
- { NULL } },
-};
-
-/* The main installation menu */
-DMenu MenuInstallCustom = {
- DMENU_NORMAL_TYPE,
- "Choose Custom Installation Options",
- "This is the custom installation menu. You may use this menu to specify\n"
- "details on the type of distribution you wish to have, where you wish\n"
- "to install it from and how you wish to allocate disk storage to FreeBSD.",
- "Press F1 to read the installation guide",
- "INSTALL",
- { { "X Exit", "Exit this menu (returning to previous)", NULL, dmenuExit },
- { "2 Options", "View/Set various installation options", NULL, optionsEditor },
-#ifndef WITH_SLICES
- { "3 Label", "Label disk partitions", NULL, diskLabelEditor },
- { "4 Distributions", "Select distribution(s) to extract", NULL, dmenuSubmenu, NULL, &MenuDistributions },
- { "5 Media", "Choose the installation media type", NULL, dmenuSubmenu, NULL, &MenuMedia },
- { "6 Commit", "Perform any pending Partition/Label/Extract actions", NULL, installCustomCommit },
-#else
- { "3 Partition", "Allocate disk space for FreeBSD", NULL, diskPartitionEditor },
- { "4 Label", "Label allocated disk partitions", NULL, diskLabelEditor },
- { "5 Distributions", "Select distribution(s) to extract", NULL, dmenuSubmenu, NULL, &MenuDistributions },
- { "6 Media", "Choose the installation media type", NULL, dmenuSubmenu, NULL, &MenuMedia },
- { "7 Commit", "Perform any pending Partition/Label/Extract actions", NULL, installCustomCommit },
-#endif
+ "Disklabel and partitioning utility",
+ "This is a utility for partitioning and/or labelling your disks.",
+ "DISKUTIL",
+ "main",
+ {
+ { "1 Partition", "Managing disk partitions", NULL, diskPartitionEditor },
+ { "2 Label", "Label allocated disk partitions", NULL, diskLabelEditor },
{ NULL } },
};
@@ -1345,992 +119,4 @@ DMenu MenuMBRType = {
#endif /* PC98 */
#endif /* __i386__ */
-/* Final configuration menu */
-DMenu MenuConfigure = {
- DMENU_NORMAL_TYPE,
- "FreeBSD Configuration Menu", /* title */
- "If you've already installed FreeBSD, you may use this menu to customize\n"
- "it somewhat to suit your particular configuration. Most importantly,\n"
- "you can use the Packages utility to load extra \"3rd party\"\n"
- "software not provided in the base distributions.",
- "Press F1 for more information on these options",
- "configure",
- { { "X Exit", "Exit this menu (returning to previous)",
- NULL, dmenuExit },
- { " Distributions", "Install additional distribution sets",
- NULL, distExtractAll },
- { " Packages", "Install pre-packaged software for FreeBSD",
- NULL, configPackages },
- { " Root Password", "Set the system manager's password",
- NULL, dmenuSystemCommand, NULL, "passwd root" },
-#ifdef WITH_SLICES
- { " Fdisk", "The disk Slice (PC-style partition) Editor",
- NULL, diskPartitionEditor },
-#endif
- { " Label", "The disk Label editor",
- NULL, diskLabelEditor },
- { " User Management", "Add user and group information",
- NULL, dmenuSubmenu, NULL, &MenuUsermgmt },
-#ifdef WITH_SYSCONS
- { " Console", "Customize system console behavior",
- NULL, dmenuSubmenu, NULL, &MenuSyscons },
-#endif
- { " Time Zone", "Set which time zone you're in",
- NULL, dmenuSystemCommand, NULL, "tzsetup" },
- { " Media", "Change the installation media type",
- NULL, dmenuSubmenu, NULL, &MenuMedia },
-#ifdef WITH_MICE
- { " Mouse", "Configure your mouse",
- NULL, dmenuSubmenu, NULL, &MenuMouse },
-#endif
- { " Networking", "Configure additional network services",
- NULL, dmenuSubmenu, NULL, &MenuNetworking },
- { " Security", "Configure system security options",
- NULL, dmenuSubmenu, NULL, &MenuSecurity },
- { " Startup", "Configure system startup options",
- NULL, dmenuSubmenu, NULL, &MenuStartup },
- { " TTYs", "Configure system ttys.",
- NULL, configEtcTtys, NULL, "ttys" },
- { " Options", "View/Set various installation options",
- NULL, optionsEditor },
- { " HTML Docs", "Go to the HTML documentation menu (post-install)",
- NULL, docBrowser },
- { " Load KLD", "Load a KLD from a floppy",
- NULL, kldBrowser },
- { NULL } },
-};
-
-DMenu MenuStartup = {
- DMENU_CHECKLIST_TYPE | DMENU_SELECTION_RETURNS,
- "Startup Services Menu",
- "This menu allows you to configure various aspects of your system's\n"
- "startup configuration. Use [SPACE] or [ENTER] to select items, and\n"
- "[TAB] to move to the buttons. Select Exit to leave this menu.",
- NULL,
- NULL,
- { { "X Exit", "Exit this menu (returning to previous)",
- checkTrue, dmenuExit, NULL, NULL, '<', '<', '<' },
-#ifdef __i386__
- { " APM", "Auto-power management services (typically laptops)",
- dmenuVarCheck, dmenuToggleVariable, NULL, "apm_enable=YES" },
-#endif
-#ifdef PCCARD_ARCH
- { " pccard", "Enable PCCARD (AKA PCMCIA) services (also laptops)",
- dmenuVarCheck, dmenuToggleVariable, NULL, "pccard_enable=YES" },
- { " pccard mem", "Set PCCARD memory address (if enabled)",
- dmenuVarCheck, dmenuISetVariable, NULL, "pccard_mem" },
- { " pccard ifconfig", "List of PCCARD ethernet devices to configure",
- dmenuVarCheck, dmenuISetVariable, NULL, "pccard_ifconfig" },
-#endif
- { " ", " -- ", NULL, NULL, NULL, NULL, ' ', ' ', ' ' },
- { " Startup dirs", "Set the list of dirs to look for startup scripts",
- dmenuVarCheck, dmenuISetVariable, NULL, "local_startup" },
- { " named", "Run a local name server on this host",
- dmenuVarCheck, dmenuToggleVariable, NULL, "named_enable=YES" },
- { " named flags", "Set default flags to named (if enabled)",
- dmenuVarCheck, dmenuISetVariable, NULL, "named_flags" },
- { " NIS client", "This host wishes to be an NIS client.",
- dmenuVarCheck, configRpcBind, NULL, "nis_client_enable=YES" },
- { " NIS domainname", "Set NIS domainname (if enabled)",
- dmenuVarCheck, dmenuISetVariable, NULL, "nisdomainname" },
- { " NIS server", "This host wishes to be an NIS server.",
- dmenuVarCheck, configRpcBind, NULL, "nis_server_enable=YES" },
- { " ", " -- ", NULL, NULL, NULL, NULL, ' ', ' ', ' ' },
- { " Accounting", "This host wishes to run process accounting.",
- dmenuVarCheck, dmenuToggleVariable, NULL, "accounting_enable=YES" },
- { " lpd", "This host has a printer and wants to run lpd.",
- dmenuVarCheck, dmenuToggleVariable, NULL, "lpd_enable=YES" },
-#ifdef WITH_LINUX
- { " Linux", "This host wants to be able to run Linux binaries.",
- dmenuVarCheck, configLinux, NULL, VAR_LINUX_ENABLE "=YES" },
-#endif
-#ifdef __i386__
- { " SCO", "This host wants to be able to run IBCS2 binaries.",
- dmenuVarCheck, dmenuToggleVariable, NULL, "ibcs2_enable=YES" },
- { " SVR4", "This host wants to be able to run SVR4 binaries.",
- dmenuVarCheck, dmenuToggleVariable, NULL, "svr4_enable=YES" },
-#endif
-#ifdef __alpha__
- { " OSF/1", "This host wants to be able to run DEC OSF/1 binaries.",
- dmenuVarCheck, configOSF1, NULL, VAR_OSF1_ENABLE "=YES" },
-#endif
- { " quotas", "This host wishes to check quotas on startup.",
- dmenuVarCheck, dmenuToggleVariable, NULL, "check_quotas=YES" },
- { NULL } },
-};
-
-DMenu MenuNetworking = {
- DMENU_CHECKLIST_TYPE | DMENU_SELECTION_RETURNS,
- "Network Services Menu",
- "You may have already configured one network device (and the other\n"
- "various hostname/gateway/name server parameters) in the process\n"
- "of installing FreeBSD. This menu allows you to configure other\n"
- "aspects of your system's network configuration.",
- NULL,
- NULL,
- { { "X Exit", "Exit this menu (returning to previous)",
- checkTrue, dmenuExit, NULL, NULL, '<', '<', '<' },
- { " Interfaces", "Configure additional network interfaces",
- NULL, tcpMenuSelect },
- { " AMD", "This machine wants to run the auto-mounter service",
- dmenuVarCheck, configRpcBind, NULL, "amd_enable=YES" },
- { " AMD Flags", "Set flags to AMD service (if enabled)",
- dmenuVarCheck, dmenuISetVariable, NULL, "amd_flags" },
- { " Anon FTP", "This machine wishes to allow anonymous FTP.",
- dmenuVarCheck, configAnonFTP, NULL, "anon_ftp" },
- { " Gateway", "This machine will route packets between interfaces",
- dmenuVarCheck, dmenuToggleVariable, NULL, "gateway_enable=YES" },
- { " inetd", "This machine wants to run the inet daemon",
- dmenuVarCheck, configInetd, NULL, "inetd_enable=YES" },
- { " Mail", "This machine wants to run a Mail Transfer Agent",
- NULL, dmenuSubmenu, NULL, &MenuMTA },
- { " NFS client", "This machine will be an NFS client",
- dmenuVarCheck, dmenuToggleVariable, NULL, "nfs_client_enable=YES" },
- { " NFS server", "This machine will be an NFS server",
- dmenuVarCheck, configNFSServer, NULL, "nfs_server_enable=YES" },
- { " Ntpdate", "Select a clock-synchronization server",
- dmenuVarCheck, dmenuSubmenu, NULL, &MenuNTP, '[', 'X', ']',
- (uintptr_t)"ntpdate_enable=YES" },
- { " PCNFSD", "Run authentication server for clients with PC-NFS.",
- dmenuVarCheck, configPCNFSD, NULL, "pcnfsd" },
- { " rpcbind", "RPC port mapping daemon (formerly portmapper)",
- dmenuVarCheck, dmenuToggleVariable, NULL, "rpcbind_enable=YES" },
- { " rpc.statd", "NFS status monitoring daemon",
- dmenuVarCheck, configRpcBind, NULL, "rpc_statd_enable=YES" },
- { " rpc.lockd", "NFS file locking daemon",
- dmenuVarCheck, configRpcBind, NULL, "rpc_lockd_enable=YES" },
- { " Routed", "Select routing daemon (default: routed)",
- dmenuVarCheck, configRouter, NULL, "router_enable=YES" },
- { " Rwhod", "This machine wants to run the rwho daemon",
- dmenuVarCheck, dmenuToggleVariable, NULL, "rwhod_enable=YES" },
- { " sshd", "This machine wants to run the SSH daemon",
- dmenuVarCheck, dmenuToggleVariable, NULL, "sshd_enable=YES" },
- { " TCP Extensions", "Allow RFC1323 and RFC1644 TCP extensions?",
- dmenuVarCheck, dmenuToggleVariable, NULL, "tcp_extensions=YES" },
- { NULL } },
-};
-
-DMenu MenuMTA = {
- DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
- "Mail Transfer Agent Selection",
- "You can choose which Mail Transfer Agent (MTA) you wish to install and run.\n"
- "Selecting Sendmail local disables sendmail's network socket for\n"
- "incoming mail, but still enables sendmail for local and outbound mail.\n"
- "The Postfix option will install the Postfix MTA from the ports\n"
- "collection. The Exim option will install the Exim MTA from the ports\n"
- "collection. To return to the previous menu, select Exit.",
- NULL,
- NULL,
- {
- { "Sendmail", "Use sendmail",
- dmenuVarCheck, dmenuSetVariable, NULL, "sendmail_enable=YES" },
- { "Sendmail local", "Use sendmail, but do not listen on the network",
- dmenuVarCheck, dmenuSetVariable, NULL, "sendmail_enable=NO" },
- { "Postfix", "Use the Postfix MTA",
- NULL, configMTAPostfix, NULL, NULL },
- { "Exim", "Use the Exim MTA",
- NULL, configMTAExim, NULL, NULL },
- { "None", "Do not install an MTA",
- dmenuVarCheck, dmenuSetVariable, NULL, "sendmail_enable=NONE" },
- { "X Exit", "Exit this menu (returning to previous)",
- checkTrue, dmenuExit, NULL, NULL, '<', '<', '<' },
- { NULL } },
-};
-
-DMenu MenuNTP = {
- DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
- "NTPDATE Server Selection",
- "There are a number of time synchronization servers available\n"
- "for public use around the Internet. Please select one reasonably\n"
- "close to you to have your system time synchronized accordingly.",
- "These are the primary open-access NTP servers",
- NULL,
- { { "None", "No NTP server",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=NO,ntpdate_flags=none" },
- { "Other", "Select a site not on this list",
- dmenuVarsCheck, configNTP, NULL, NULL },
- { "Worldwide", "pool.ntp.org",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=pool.ntp.org" },
- { "Asia", "asia.pool.ntp.org",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=asia.pool.ntp.org" },
- { "Europe", "europe.pool.ntp.org",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=europe.pool.ntp.org" },
- { "Oceania", "oceania.pool.ntp.org",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=oceania.pool.ntp.org" },
- { "North America", "north-america.pool.ntp.org",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=north-america.pool.ntp.org" },
- { "Argentina", "tick.nap.com.ar",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=tick.nap.com.ar" },
- { "Argentina #2", "time.sinectis.com.ar",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=time.sinectis.com.ar" },
- { "Argentina #3", "tock.nap.com.ar",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=tock.nap.com.ar" },
- { "Australia", "au.pool.ntp.org",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=au.pool.ntp.org" },
- { "Australia #2", "augean.eleceng.adelaide.edu.au",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=augean.eleceng.adelaide.edu.au" },
- { "Australia #3", "ntp.adelaide.edu.au",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=ntp.adelaide.edu.au" },
- { "Australia #4", "ntp.saard.net",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=ntp.saard.net" },
- { "Australia #5", "time.deakin.edu.au",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=time.deakin.edu.au" },
- { "Belgium", "ntp1.belbone.be",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=ntp1.belbone.be" },
- { "Belgium #2", "ntp2.belbone.be",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=ntp2.belbone.be" },
- { "Brazil", "ntp.cais.rnp.br",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=ntp.cais.rnp.br" },
- { "Brazil #2", "ntp.pop-df.rnp.br",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=ntp.pop-df.rnp.br" },
- { "Brazil #3", "ntp.ufes.br",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=ntp.ufes.br" },
- { "Brazil #4", "ntp1.pucpr.br",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=ntp1.pucpr.br" },
- { "Canada", "ca.pool.ntp.org",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=ca.pool.ntp.org" },
- { "Canada #2", "ntp.cpsc.ucalgary.ca",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=ntp.cpsc.ucalgary.ca" },
- { "Canada #3", "ntp1.cmc.ec.gc.ca",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=ntp1.cmc.ec.gc.ca" },
- { "Canada #4", "ntp2.cmc.ec.gc.ca",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=ntp2.cmc.ec.gc.ca" },
- { "Canada #5", "tick.utoronto.ca",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=tick.utoronto.ca" },
- { "Canada #6", "time.chu.nrc.ca",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=time.chu.nrc.ca" },
- { "Canada #7", "time.nrc.ca",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=time.nrc.ca" },
- { "Canada #8", "timelord.uregina.ca",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=timelord.uregina.ca" },
- { "Canada #9", "tock.utoronto.ca",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=tock.utoronto.ca" },
- { "Czech", "ntp.karpo.cz",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=ntp.karpo.cz" },
- { "Czech #2", "ntp.cgi.cz",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=ntp.cgi.cz" },
- { "Denmark", "clock.netcetera.dk",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=clock.netcetera.dk" },
- { "Denmark", "clock2.netcetera.dk",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=clock2.netcetera.dk" },
- { "Spain", "slug.ctv.es",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=slug.ctv.es" },
- { "Finland", "tick.keso.fi",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=tick.keso.fi" },
- { "Finland #2", "tock.keso.fi",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=tock.keso.fi" },
- { "France", "ntp.obspm.fr",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=ntp.obspm.fr" },
- { "France #2", "ntp.univ-lyon1.fr",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=ntp.univ-lyon1.fr" },
- { "France #3", "ntp.via.ecp.fr",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=ntp.via.ecp.fr" },
- { "Croatia", "zg1.ntp.carnet.hr",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=zg1.ntp.carnet.hr" },
- { "Croatia #2", "zg2.ntp.carnet.hr",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=zg2.ntp.carnet.hr" },
- { "Croatia #3", "st.ntp.carnet.hr",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=st.ntp.carnet.hr" },
- { "Croatia #4", "ri.ntp.carnet.hr",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=ri.ntp.carnet.hr" },
- { "Croatia #5", "os.ntp.carnet.hr",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=os.ntp.carnet.hr" },
- { "Hungary", "time.kfki.hu",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=time.kfki.hu" },
- { "Indonesia", "ntp.kim.lipi.go.id",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=ntp.kim.lipi.go.id" },
- { "Ireland", "ntp.maths.tcd.ie",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=ntp.maths.tcd.ie" },
- { "Italy", "it.pool.ntp.org",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=it.pool.ntp.org" },
- { "Japan", "ntp.jst.mfeed.ad.jp",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=ntp.jst.mfeed.ad.jp" },
- { "Japan IPv6", "ntp1.v6.mfeed.ad.jp",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=ntp1.v6.mfeed.ad.jp" },
- { "Korea", "time.nuri.net",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=time.nuri.net" },
- { "Mexico", "mx.pool.ntp.org",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=mx.pool.ntp.org" },
- { "Netherlands", "ntp0.nl.net",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=ntp0.nl.net" },
- { "Netherlands #2", "ntp1.nl.net",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=ntp1.nl.net" },
- { "Netherlands #3", "ntp2.nl.net",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=ntp2.nl.net" },
- { "Norway", "fartein.ifi.uio.no",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=fartein.ifi.uio.no" },
- { "Norway #2", "time.alcanet.no",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=time.alcanet.no" },
- { "New Zealand", "ntp.massey.ac.nz",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=ntp.massey.ac.nz" },
- { "New Zealand #2", "ntp.public.otago.ac.nz",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=ntp.public.otago.ac.nz" },
- { "New Zealand #3", "tk1.ihug.co.nz",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=tk1.ihug.co.nz" },
- { "New Zealand #4", "ntp.waikato.ac.nz",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=ntp.waikato.ac.nz" },
- { "Poland", "info.cyf-kr.edu.pl",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=info.cyf-kr.edu.pl" },
- { "Romania", "ticks.roedu.net",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=ticks.roedu.net" },
- { "Russia", "ru.pool.ntp.org",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=ru.pool.ntp.org" },
- { "Russia #2", "ntp.psn.ru",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=ntp.psn.ru" },
- { "Sweden", "se.pool.ntp.org",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=se.pool.ntp.org" },
- { "Sweden #2", "ntp.lth.se",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=ntp.lth.se" },
- { "Sweden #3", "ntp1.sp.se",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=ntp1.sp.se" },
- { "Sweden #4", "ntp2.sp.se",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=ntp2.sp.se" },
- { "Sweden #5", "ntp.kth.se",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=ntp.kth.se" },
- { "Singapore", "sg.pool.ntp.org",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=sg.pool.ntp.org" },
- { "Slovenia", "si.pool.ntp.org",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=si.pool.ntp.org" },
- { "Slovenia #2", "sizif.mf.uni-lj.si",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=sizif.mf.uni-lj.si" },
- { "Slovenia #3", "ntp1.arnes.si",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=ntp1.arnes.si" },
- { "Slovenia #4", "ntp2.arnes.si",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=ntp2.arnes.si" },
- { "Slovenia #5", "time.ijs.si",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=time.ijs.si" },
- { "Scotland", "ntp.cs.strath.ac.uk",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=ntp.cs.strath.ac.uk" },
- { "Taiwan", "time.stdtime.gov.tw",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=time.stdtime.gov.tw" },
- { "Taiwan #2", "clock.stdtime.gov.tw",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=clock.stdtime.gov.tw" },
- { "Taiwan #3", "tick.stdtime.gov.tw",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=tick.stdtime.gov.tw" },
- { "Taiwan #4", "tock.stdtime.gov.tw",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=tock.stdtime.gov.tw" },
- { "Taiwan #5", "watch.stdtime.gov.tw",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=watch.stdtime.gov.tw" },
- { "United Kingdom", "uk.pool.ntp.org",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=uk.pool.ntp.org" },
- { "United Kingdom #2", "ntp.exnet.com",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=ntp.exnet.com" },
- { "United Kingdom #3", "ntp0.uk.uu.net",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=ntp0.uk.uu.net" },
- { "United Kingdom #4", "ntp1.uk.uu.net",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=ntp1.uk.uu.net" },
- { "United Kingdom #5", "ntp2.uk.uu.net",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=ntp2.uk.uu.net" },
- { "United Kingdom #6", "ntp2a.mcc.ac.uk",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=ntp2a.mcc.ac.uk" },
- { "United Kingdom #7", "ntp2b.mcc.ac.uk",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=ntp2b.mcc.ac.uk" },
- { "United Kingdom #8", "ntp2c.mcc.ac.uk",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=ntp2c.mcc.ac.uk" },
- { "United Kingdom #9", "ntp2d.mcc.ac.uk",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=ntp2d.mcc.ac.uk" },
- { "U.S.", "us.pool.ntp.org",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=us.pool.ntp.org" },
- { "U.S. AR", "sushi.lyon.edu",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=sushi.compsci.lyon.edu" },
- { "U.S. AZ", "ntp.drydog.com",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=ntp.drydog.com" },
- { "U.S. CA", "ntp.ucsd.edu",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=ntp.ucsd.edu" },
- { "U.S. CA #2", "ntp1.mainecoon.com",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=ntp1.mainecoon.com" },
- { "U.S. CA #3", "ntp2.mainecoon.com",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=ntp2.mainecoon.com" },
- { "U.S. CA #4", "reloj.kjsl.com",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=reloj.kjsl.com" },
- { "U.S. CA #5", "time.five-ten-sg.com",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=time.five-ten-sg.com" },
- { "U.S. DE", "louie.udel.edu",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=louie.udel.edu" },
- { "U.S. GA", "ntp.shorty.com",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=ntp.shorty.com" },
- { "U.S. GA #2", "rolex.usg.edu",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=rolex.usg.edu" },
- { "U.S. GA #3", "timex.usg.edu",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=timex.usg.edu" },
- { "U.S. IL", "ntp-0.cso.uiuc.edu",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=ntp-0.cso.uiuc.edu" },
- { "U.S. IL #2", "ntp-1.cso.uiuc.edu",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=ntp-1.cso.uiuc.edu" },
- { "U.S. IL #3", "ntp-1.mcs.anl.gov",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=ntp-1.mcs.anl.gov" },
- { "U.S. IL #4", "ntp-2.cso.uiuc.edu",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=ntp-2.cso.uiuc.edu" },
- { "U.S. IL #5", "ntp-2.mcs.anl.gov",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=ntp-2.mcs.anl.gov" },
- { "U.S. IN", "gilbreth.ecn.purdue.edu",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=gilbreth.ecn.purdue.edu" },
- { "U.S. IN #2", "harbor.ecn.purdue.edu",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=harbor.ecn.purdue.edu" },
- { "U.S. IN #3", "molecule.ecn.purdue.edu",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=molecule.ecn.purdue.edu" },
- { "U.S. KS", "ntp1.kansas.net",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=ntp1.kansas.net" },
- { "U.S. KS #2", "ntp2.kansas.net",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=ntp2.kansas.net" },
- { "U.S. MA", "ntp.ourconcord.net",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=ntp.ourconcord.net" },
- { "U.S. MA #2", "timeserver.cs.umb.edu",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=timeserver.cs.umb.edu" },
- { "U.S. MN", "ns.nts.umn.edu",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=ns.nts.umn.edu" },
- { "U.S. MN #2", "nss.nts.umn.edu",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=nss.nts.umn.edu" },
- { "U.S. MO", "time-ext.missouri.edu",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=time-ext.missouri.edu" },
- { "U.S. MT", "chronos1.umt.edu",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=chronos1.umt.edu" },
- { "U.S. MT #2", "chronos2.umt.edu",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=chronos2.umt.edu" },
- { "U.S. MT #3", "chronos3.umt.edu",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=chronos3.umt.edu" },
- { "U.S. NC", "clock1.unc.edu",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=clock1.unc.edu" },
- { "U.S. NV", "cuckoo.nevada.edu",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=cuckoo.nevada.edu" },
- { "U.S. NV #2", "tick.cs.unlv.edu",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=tick.cs.unlv.edu" },
- { "U.S. NV #3", "tock.cs.unlv.edu",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=tock.cs.unlv.edu" },
- { "U.S. NY", "ntp0.cornell.edu",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=ntp0.cornell.edu" },
- { "U.S. NY #2", "sundial.columbia.edu",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=sundial.columbia.edu" },
- { "U.S. NY #3", "timex.cs.columbia.edu",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=timex.cs.columbia.edu" },
- { "U.S. PA", "clock-1.cs.cmu.edu",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=clock-1.cs.cmu.edu" },
- { "U.S. PA #2", "clock-2.cs.cmu.edu",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=clock-2.cs.cmu.edu" },
- { "U.S. PA #3", "clock.psu.edu",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=clock.psu.edu" },
- { "U.S. PA #4", "fuzz.psc.edu",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=fuzz.psc.edu" },
- { "U.S. PA #5", "ntp-1.ece.cmu.edu",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=ntp-1.ece.cmu.edu" },
- { "U.S. PA #6", "ntp-2.ece.cmu.edu",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=ntp-2.ece.cmu.edu" },
- { "U.S. TX", "ntp.fnbhs.com",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=ntp.fnbhs.com" },
- { "U.S. TX #2", "ntp.tmc.edu",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=ntp.tmc.edu" },
- { "U.S. TX #3", "ntp5.tamu.edu",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=ntp5.tamu.edu" },
- { "U.S. TX #4", "tick.greyware.com",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=tick.greyware.com" },
- { "U.S. TX #5", "tock.greyware.com",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=tock.greyware.com" },
- { "U.S. VA", "ntp-1.vt.edu",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=ntp-1.vt.edu" },
- { "U.S. VA #2", "ntp-2.vt.edu",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=ntp-2.vt.edu" },
- { "U.S. VA #3", "ntp.cmr.gov",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=ntp.cmr.gov" },
- { "U.S. VT", "ntp0.state.vt.us",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=ntp0.state.vt.us" },
- { "U.S. VT #2", "ntp1.state.vt.us",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=ntp1.state.vt.us" },
- { "U.S. VT #3", "ntp2.state.vt.us",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=ntp2.state.vt.us" },
- { "U.S. WA", "ntp.tcp-udp.net",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=ntp.tcp-udp.net" },
- { "U.S. WI", "ntp1.cs.wisc.edu",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=ntp1.cs.wisc.edu" },
- { "U.S. WI #2", "ntp3.cs.wisc.edu",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=ntp3.cs.wisc.edu" },
- { "South Africa", "ntp.cs.unp.ac.za",
- dmenuVarsCheck, dmenuSetVariables, NULL,
- "ntpdate_enable=YES,ntpdate_flags=ntp.cs.unp.ac.za" },
- { NULL } },
-};
-
-#ifdef WITH_SYSCONS
-DMenu MenuSyscons = {
- DMENU_NORMAL_TYPE,
- "System Console Configuration",
- "The default system console driver for FreeBSD (syscons) has a\n"
- "number of configuration options which may be set according to\n"
- "your preference.\n\n"
- "When you are done setting configuration options, select Cancel.",
- "Configure your system console settings",
- NULL,
- { { "X Exit", "Exit this menu (returning to previous)", NULL, dmenuExit },
-#ifdef PC98
- { "2 Keymap", "Choose an alternate keyboard map", NULL, dmenuSubmenu, NULL, &MenuSysconsKeymap },
- { "3 Repeat", "Set the rate at which keys repeat", NULL, dmenuSubmenu, NULL, &MenuSysconsKeyrate },
- { "4 Saver", "Configure the screen saver", NULL, dmenuSubmenu, NULL, &MenuSysconsSaver },
-#else
- { "2 Font", "Choose an alternate screen font", NULL, dmenuSubmenu, NULL, &MenuSysconsFont },
- { "3 Keymap", "Choose an alternate keyboard map", NULL, dmenuSubmenu, NULL, &MenuSysconsKeymap },
- { "4 Repeat", "Set the rate at which keys repeat", NULL, dmenuSubmenu, NULL, &MenuSysconsKeyrate },
- { "5 Saver", "Configure the screen saver", NULL, dmenuSubmenu, NULL, &MenuSysconsSaver },
- { "6 Screenmap", "Choose an alternate screenmap", NULL, dmenuSubmenu, NULL, &MenuSysconsScrnmap },
- { "7 Ttys", "Choose console terminal type", NULL, dmenuSubmenu, NULL, &MenuSysconsTtys },
-#endif
- { NULL } },
-};
-
-#ifdef PC98
-DMenu MenuSysconsKeymap = {
- DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
- "System Console Keymap",
- "The default system console driver for FreeBSD (syscons) defaults\n"
- "to a standard \"PC-98x1\" keyboard map. Users may wish to choose\n"
- "one of the other keymaps below.\n"
- "Note that sysinstall itself only uses the part of the keyboard map\n"
- "which is required to generate the ANSI character subset, but your\n"
- "choice of keymap will also be saved for later (fuller) use.",
- "Choose a keyboard map",
- NULL,
- { { "Japanese PC-98x1", "Japanese PC-98x1 keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=jp.pc98" },
- { " Japanese PC-98x1 (ISO)", "Japanese PC-98x1 (ISO) keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=jp.pc98.iso" },
- { NULL } },
-};
-#else
-DMenu MenuSysconsKeymap = {
- DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
- "System Console Keymap",
- "The default system console driver for FreeBSD (syscons) defaults\n"
- "to a standard \"American\" keyboard map. Users in other countries\n"
- "(or with different keyboard preferences) may wish to choose one of\n"
- "the other keymaps below.\n"
- "Note that sysinstall itself only uses the part of the keyboard map\n"
- "which is required to generate the ANSI character subset, but your\n"
- "choice of keymap will also be saved for later (fuller) use.",
- "Choose a keyboard map",
- NULL,
- { { "Belgian", "Belgian ISO keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=be.iso" },
- { " Brazil CP850", "Brazil CP850 keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=br275.cp850" },
- { " Brazil ISO (accent)", "Brazil ISO keymap (accent keys)", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=br275.iso.acc" },
- { " Brazil ISO", "Brazil ISO keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=br275.iso" },
- { " Bulgarian BDS", "Bulgarian BDS keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=bg.bds.ctrlcaps" },
- { " Bulgarian Phonetic", "Bulgarian Phonetic keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=bg.phonetic.ctrlcaps" },
- { "Central European ISO", "Central European ISO keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=ce.iso2" },
- { " Croatian ISO", "Croatian ISO keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=hr.iso" },
- { " Czech ISO (accent)", "Czech ISO keymap (accent keys)", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=cs.latin2.qwertz" },
- { "Danish CP865", "Danish Code Page 865 keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=danish.cp865" },
- { " Danish ISO", "Danish ISO keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=danish.iso" },
- { "Estonian ISO", "Estonian ISO keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=estonian.iso" },
- { " Estonian ISO 15", "Estonian ISO 8859-15 keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=estonian.iso15" },
- { " Estonian CP850", "Estonian Code Page 850 keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=estonian.cp850" },
- { "Finnish CP850","Finnish Code Page 850 keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=finnish.cp850" },
- { " Finnish ISO", "Finnish ISO keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=finnish.iso" },
- { " French ISO (accent)", "French ISO keymap (accent keys)", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=fr.iso.acc" },
- { " French ISO", "French ISO keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=fr.iso" },
- { "German CP850", "German Code Page 850 keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=german.cp850" },
- { " German ISO", "German ISO keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=german.iso" },
- { " Greek 101", "Greek ISO keymap (101 keys)", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=gr.us101.acc" },
- { " Greek 104", "Greek ISO keymap (104 keys)", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=el.iso07" },
- { " Greek ELOT", "Greek ISO keymap (ELOT 1000)", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=gr.elot.acc" },
- { "Hungarian 101", "Hungarian ISO keymap (101 key)", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=hu.iso2.101keys" },
- { " Hungarian 102", "Hungarian ISO keymap (102 key)", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=hu.iso2.102keys" },
- { "Icelandic (accent)", "Icelandic ISO keymap (accent keys)", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=icelandic.iso.acc" },
- { " Icelandic", "Icelandic ISO keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=icelandic.iso" },
- { " Italian", "Italian ISO keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=it.iso" },
- { "Japanese 106", "Japanese 106 keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=jp.106" },
- { "Latin American (accent)", "Latin American ISO keymap (accent keys)", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=latinamerican.iso.acc" },
- { " Latin American", "Latin American ISO keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=latinamerican" },
- { "Norway ISO", "Norwegian ISO keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=norwegian.iso" },
- { "Polish ISO", "Polish ISO keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=pl_PL.ISO8859-2" },
- { " Portuguese (accent)", "Portuguese ISO keymap (accent keys)", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=pt.iso.acc" },
- { " Portuguese", "Portuguese ISO keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=pt.iso" },
- { "Russia KOI8-R", "Russian KOI8-R keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=ru.koi8-r" },
- { "Slovak", "Slovak ISO keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=sk.iso2" },
- { "Slovenian", "Slovenian ISO keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=si.iso" },
- { " Spanish (accent)", "Spanish ISO keymap (accent keys)", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=spanish.iso.acc" },
- { " Spanish", "Spanish ISO keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=spanish.iso" },
- { " Swedish CP850", "Swedish Code Page 850 keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=swedish.cp850" },
- { " Swedish ISO", "Swedish ISO keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=swedish.iso" },
- { " Swiss French ISO (accent)", "Swiss French ISO keymap (accent keys)", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=swissfrench.iso.acc" },
- { " Swiss French ISO", "Swiss French ISO keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=swissfrench.iso" },
- { " Swiss French CP850", "Swiss French Code Page 850 keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=swissfrench.cp850" },
- { " Swiss German ISO (accent)", "Swiss German ISO keymap (accent keys)", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=swissgerman.iso.acc" },
- { " Swiss German ISO", "Swiss German ISO keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=swissgerman.iso" },
- { " Swiss German CP850", "Swiss German Code Page 850 keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=swissgerman.cp850" },
- { "UK CP850", "UK Code Page 850 keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=uk.cp850" },
- { " UK ISO", "UK ISO keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=uk.iso" },
- { " Ukrainian KOI8-U", "Ukrainian KOI8-U keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=ua.koi8-u" },
- { " Ukrainian KOI8-U+KOI8-R", "Ukrainian KOI8-U+KOI8-R keymap (alter)", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=ua.koi8-u.shift.alt" },
- { " USA CapsLock->Ctrl", "US standard (Caps as L-Control)", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=us.pc-ctrl" },
- { " USA Dvorak", "US Dvorak keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=us.dvorak" },
- { " USA Dvorak (left)", "US left handed Dvorak keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=us.dvorakl" },
- { " USA Dvorak (right)", "US right handed Dvorak keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=us.dvorakr" },
- { " USA Emacs", "US standard optimized for EMACS", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=us.emacs" },
- { " USA ISO", "US ISO keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=us.iso" },
- { " USA UNIX", "US traditional UNIX-workstation", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=us.unix" },
- { NULL } },
-};
-#endif /* PC98 */
-
-DMenu MenuSysconsKeyrate = {
- DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
- "System Console Keyboard Repeat Rate",
- "This menu allows you to set the speed at which keys repeat\n"
- "when held down.",
- "Choose a keyboard repeat rate",
- NULL,
- { { "Slow", "Slow keyboard repeat rate", dmenuVarCheck, dmenuSetVariable, NULL, "keyrate=slow" },
- { "Normal", "\"Normal\" keyboard repeat rate", dmenuVarCheck, dmenuSetVariable, NULL, "keyrate=normal" },
- { "Fast", "Fast keyboard repeat rate", dmenuVarCheck, dmenuSetVariable, NULL, "keyrate=fast" },
- { "Default", "Use default keyboard repeat rate", dmenuVarCheck, dmenuSetVariable, NULL, "keyrate=NO" },
- { NULL } },
-};
-DMenu MenuSysconsSaver = {
- DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
- "System Console Screen Saver",
- "By default, the console driver will not attempt to do anything\n"
- "special with your screen when it's idle. If you expect to leave your\n"
- "monitor switched on and idle for long periods of time then you should\n"
- "probably enable one of these screen savers to prevent phosphor burn-in.",
- "Choose a nifty-looking screen saver",
- NULL,
- { { "1 Blank", "Simply blank the screen",
- dmenuVarCheck, configSaver, NULL, "saver=blank" },
- { "2 Daemon", "\"BSD Daemon\" animated screen saver (text)",
- dmenuVarCheck, configSaver, NULL, "saver=daemon" },
- { "3 Fade", "Fade out effect screen saver",
- dmenuVarCheck, configSaver, NULL, "saver=fade" },
- { "4 Fire", "Flames effect screen saver",
- dmenuVarCheck, configSaver, NULL, "saver=fire" },
- { "5 Green", "\"Green\" power saving mode (if supported by monitor)",
- dmenuVarCheck, configSaver, NULL, "saver=green" },
- { "6 Logo", "\"BSD Daemon\" animated screen saver (graphics)",
- dmenuVarCheck, configSaver, NULL, "saver=logo" },
- { "7 Rain", "Rain drops screen saver",
- dmenuVarCheck, configSaver, NULL, "saver=rain" },
- { "8 Snake", "Draw a FreeBSD \"snake\" on your screen",
- dmenuVarCheck, configSaver, NULL, "saver=snake" },
- { "9 Star", "A \"twinkling stars\" effect",
- dmenuVarCheck, configSaver, NULL, "saver=star" },
- { "Warp", "A \"stars warping\" effect",
- dmenuVarCheck, configSaver, NULL, "saver=warp" },
- { "Dragon", "Dragon screensaver (graphics)",
- dmenuVarCheck, configSaver, NULL, "saver=dragon" },
- { "Timeout", "Set the screen saver timeout interval",
- NULL, configSaverTimeout, NULL, NULL, ' ', ' ', ' ' },
- { NULL } },
-};
-
-#ifndef PC98
-DMenu MenuSysconsScrnmap = {
- DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
- "System Console Screenmap",
- "Unless you load a specific font, most PC hardware defaults to\n"
- "displaying characters in the IBM 437 character set. However,\n"
- "in the Unix world, this character set is very rarely used. Most\n"
- "Western European countries, for example, prefer ISO 8859-1.\n"
- "American users won't notice the difference since the bottom half\n"
- "of all these character sets is ANSI anyway.\n"
- "If your hardware is capable of downloading a new display font,\n"
- "you should probably choose that option. However, for hardware\n"
- "where this is not possible (e.g. monochrome adapters), a screen\n"
- "map will give you the best approximation that your hardware can\n"
- "display at all.",
- "Choose a screen map",
- NULL,
- { { "1 None", "No screenmap, don't touch font", dmenuVarCheck, dmenuSetVariable, NULL, "scrnmap=NO" },
- { "2 ISO 8859-1 to IBM437", "W-Europe ISO 8859-1 to IBM 437 screenmap", dmenuVarCheck, dmenuSetVariable, NULL, "scrnmap=iso-8859-1_to_cp437" },
- { "3 ISO 8859-7 to IBM437", "Greek ISO 8859-7 to IBM 437 screenmap", dmenuVarCheck, dmenuSetVariable, NULL, "scrnmap=iso-8859-7_to_cp437" },
- { "4 US-ASCII to IBM437", "US-ASCII to IBM 437 screenmap", dmenuVarCheck, dmenuSetVariable, NULL, "scrnmap=us-ascii_to_cp437" },
- { "5 KOI8-R to IBM866", "Russian KOI8-R to IBM 866 screenmap", dmenuVarCheck, dmenuSetVariable, NULL, "scrnmap=koi8-r2cp866" },
- { "6 KOI8-U to IBM866u", "Ukrainian KOI8-U to IBM 866u screenmap", dmenuVarCheck, dmenuSetVariable, NULL, "scrnmap=koi8-u2cp866u" },
- { NULL } },
-};
-
-DMenu MenuSysconsTtys = {
- DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
- "System Console Terminal Type",
- "For various console encodings, a corresponding terminal type\n"
- "must be chosen in /etc/ttys.\n\n"
- "WARNING: For compatibility reasons, only entries starting with\n"
- "ttyv and terminal types starting with cons[0-9] can be changed\n"
- "via this menu.\n",
- "Choose a terminal type",
- NULL,
- { { "1 None", "Don't touch anything", dmenuVarCheck, dmenuSetVariable, NULL, VAR_CONSTERM "=NO" },
- { "2 IBM437 (VGA default)", "cons25", dmenuVarCheck, dmenuSetVariable, NULL, VAR_CONSTERM "=cons25" },
- { "3 ISO 8859-1", "cons25l1", dmenuVarCheck, dmenuSetVariable, NULL, VAR_CONSTERM "=cons25l1" },
- { "4 ISO 8859-2", "cons25l2", dmenuVarCheck, dmenuSetVariable, NULL, VAR_CONSTERM "=cons25l2" },
- { "5 ISO 8859-7", "cons25l7", dmenuVarCheck, dmenuSetVariable, NULL, VAR_CONSTERM "=cons25l7" },
- { "6 KOI8-R", "cons25r", dmenuVarCheck, dmenuSetVariable, NULL, VAR_CONSTERM "=cons25r" },
- { "7 KOI8-U", "cons25u", dmenuVarCheck, dmenuSetVariable, NULL, VAR_CONSTERM "=cons25u" },
- { "8 US-ASCII", "cons25w", dmenuVarCheck, dmenuSetVariable, NULL, VAR_CONSTERM "=cons25w" },
- { NULL } },
-};
-
-DMenu MenuSysconsFont = {
- DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
- "System Console Font",
- "Most PC hardware defaults to displaying characters in the\n"
- "IBM 437 character set. However, in the Unix world, this\n"
- "character set is very rarely used. Most Western European\n"
- "countries, for example, prefer ISO 8859-1.\n"
- "American users won't notice the difference since the bottom half\n"
- "of all these charactersets is ANSI anyway. However, they might\n"
- "want to load a font anyway to use the 30- or 50-line displays.\n"
- "If your hardware is capable of downloading a new display font,\n"
- "you can select the appropriate font below.",
- "Choose a font",
- NULL,
- { { "1 None", "Use hardware default font", dmenuVarCheck, dmenuSetVariables, NULL,
- "font8x8=NO,font8x14=NO,font8x16=NO" },
- { "2 IBM 437", "English and others, VGA default", dmenuVarCheck, dmenuSetVariables, NULL,
- "font8x8=cp437-8x8,font8x14=cp437-8x14,font8x16=cp437-8x16" },
- { "3 IBM 850", "Western Europe, IBM encoding", dmenuVarCheck, dmenuSetVariables, NULL,
- "font8x8=cp850-8x8,font8x14=cp850-8x14,font8x16=cp850-8x16" },
- { "4 IBM 865", "Norwegian, IBM encoding", dmenuVarCheck, dmenuSetVariables, NULL,
- "font8x8=cp865-8x8,font8x14=cp865-8x14,font8x16=cp865-8x16" },
- { "5 IBM 866", "Russian, IBM encoding (use with KOI8-R screenmap)", dmenuVarCheck, dmenuSetVariables, NULL,
- "font8x8=cp866-8x8,font8x14=cp866-8x14,font8x16=cp866b-8x16,mousechar_start=3" },
- { "6 IBM 866u", "Ukrainian, IBM encoding (use with KOI8-U screenmap)", dmenuVarCheck, dmenuSetVariables, NULL,
- "font8x8=cp866u-8x8,font8x14=cp866u-8x14,font8x16=cp866u-8x16,mousechar_start=3" },
- { "7 IBM 1251", "Cyrillic, MS Windows encoding", dmenuVarCheck, dmenuSetVariables, NULL,
- "font8x8=cp1251-8x8,font8x14=cp1251-8x14,font8x16=cp1251-8x16,mousechar_start=3" },
- { "8 ISO 8859-1", "Western Europe, ISO encoding", dmenuVarCheck, dmenuSetVariables, NULL,
- "font8x8=iso-8x8,font8x14=iso-8x14,font8x16=iso-8x16" },
- { "9 ISO 8859-2", "Eastern Europe, ISO encoding", dmenuVarCheck, dmenuSetVariables, NULL,
- "font8x8=iso02-8x8,font8x14=iso02-8x14,font8x16=iso02-8x16" },
- { "a ISO 8859-4", "Baltic, ISO encoding", dmenuVarCheck, dmenuSetVariables, NULL,
- "font8x8=iso04-8x8,font8x14=iso04-8x14,font8x16=iso04-8x16" },
- { "b ISO 8859-7", "Greek, ISO encoding", dmenuVarCheck, dmenuSetVariables, NULL,
- "font8x8=iso07-8x8,font8x14=iso07-8x14,font8x16=iso07-8x16" },
- { "c ISO 8859-8", "Hebrew, ISO encoding", dmenuVarCheck, dmenuSetVariables, NULL,
- "font8x8=iso08-8x8,font8x14=iso08-8x14,font8x16=iso08-8x16" },
- { "d ISO 8859-15", "Europe, ISO encoding", dmenuVarCheck, dmenuSetVariables, NULL,
- "font8x8=iso15-8x8,font8x14=iso15-8x14,font8x16=iso15-8x16" },
- { "e SWISS", "English, better resolution", dmenuVarCheck, dmenuSetVariables, NULL,
- "font8x8=swiss-8x8,font8x14=NO,font8x16=swiss-8x16" },
- { NULL } },
-};
-#endif /* PC98 */
-#endif /* WITH_SYSCONS */
-
-DMenu MenuUsermgmt = {
- DMENU_NORMAL_TYPE,
- "User and group management",
- "The submenus here allow to manipulate user groups and\n"
- "login accounts.\n",
- "Configure your user groups and users",
- NULL,
- { { "X Exit", "Exit this menu (returning to previous)", NULL, dmenuExit },
- { "User", "Add a new user to the system.", NULL, userAddUser },
- { "Group", "Add a new user group to the system.", NULL, userAddGroup },
- { NULL } },
-};
-
-DMenu MenuSecurity = {
- DMENU_CHECKLIST_TYPE | DMENU_SELECTION_RETURNS,
- "System Security Options Menu",
- "This menu allows you to configure aspects of the operating system security\n"
- "policy. Please read the system documentation carefully before modifying\n"
- "these settings, as they may cause service disruption if used improperly.\n"
- "\n"
- "Most settings will take affect only following a system reboot.",
- "Configure system security options",
- NULL,
- { { "X Exit", "Exit this menu (returning to previous)",
- checkTrue, dmenuExit, NULL, NULL, '<', '<', '<' },
- { " Securelevel", "Configure securelevels for the system",
- NULL, configSecurelevel },
-#if 0
- { " LOMAC", "Use Low Watermark Mandatory Access Control at boot",
- dmenuVarCheck, dmenuToggleVariable, NULL, "lomac_enable=YES" },
-#endif
- { " NFS port", "Require that the NFS clients use reserved ports",
- dmenuVarCheck, dmenuToggleVariable, NULL, "nfs_reserved_port_only=YES" },
- { NULL } },
-};
-
-DMenu MenuSecurelevel = {
- DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
- "Securelevel Configuration Menu",
- "This menu allows you to select the securelevel your system runs with.\n"
- "When operating at a securelevel, certain root privileges are disabled,\n"
- "which may increase resistance to exploits and protect system integrity.\n"
- "In secure mode system flags may not be overriden by the root user,\n"
- "access to direct kernel memory is limited, and kernel modules may not\n"
- "be changed. In highly secure mode, mounted file systems may not be\n"
- "modified on-disk, tampering with the system clock is prohibited. In\n"
- "network secure mode configuration changes to firwalling are prohibited.\n",
- "Select a securelevel to operate at - F1 for help",
- "securelevel",
- { { "X Exit", "Exit this menu (returning to previous)",
- checkTrue, dmenuExit, NULL, NULL, '<', '<', '<' },
- { "Disabled", "Disable securelevels", NULL, configSecurelevelDisabled, },
- { "Secure", "Secure mode", NULL, configSecurelevelSecure },
- { "Highly Secure", "Highly secure mode", NULL, configSecurelevelHighlySecure },
- { "Network Secure", "Network secure mode", NULL, configSecurelevelNetworkSecure },
- { NULL } }
-};
-
-DMenu MenuFixit = {
- DMENU_NORMAL_TYPE,
- "Please choose a fixit option",
- "There are three ways of going into \"fixit\" mode:\n"
- "- you can use the live filesystem CDROM/DVD, in which case there will be\n"
- " full access to the complete set of FreeBSD commands and utilities,\n"
- "- you can use the more limited (but perhaps customized) fixit floppy,\n"
- "- or you can start an Emergency Holographic Shell now, which is\n"
- " limited to the subset of commands that is already available right now.",
- "Press F1 for more detailed repair instructions",
- "fixit",
-{ { "X Exit", "Exit this menu (returning to previous)", NULL, dmenuExit },
- { "2 CDROM/DVD", "Use the \"live\" filesystem CDROM/DVD", NULL, installFixitCDROM },
- { "3 Floppy", "Use a floppy generated from the fixit image", NULL, installFixitFloppy },
- { "4 Shell", "Start an Emergency Holographic Shell", NULL, installFixitHoloShell },
- { NULL } },
-};
diff --git a/usr.sbin/sade/misc.c b/usr.sbin/sade/misc.c
index 07cbc81..0eb7363 100644
--- a/usr.sbin/sade/misc.c
+++ b/usr.sbin/sade/misc.c
@@ -31,7 +31,7 @@
*
*/
-#include "sysinstall.h"
+#include "sade.h"
#include <ctype.h>
#include <unistd.h>
#include <sys/stat.h>
@@ -327,8 +327,8 @@ Mount(char *mountp, void *dev)
return DITEM_SUCCESS;
if (*((char *)dev) != '/') {
- sprintf(device, "%s/dev/%s", RunningAsInit ? "/mnt" : "", (char *)dev);
- sprintf(mountpoint, "%s%s", RunningAsInit ? "/mnt" : "", mountp);
+ sprintf(device, "/dev/%s", (char *)dev);
+ sprintf(mountpoint, "%s", mountp);
}
else {
strcpy(device, dev);
@@ -344,7 +344,7 @@ Mount(char *mountp, void *dev)
msgDebug("mount %s %s\n", device, mountpoint);
ufsargs.fspec = device;
- if (mount("ufs", mountpoint, RunningAsInit ? MNT_ASYNC | MNT_NOATIME : 0,
+ if (mount("ufs", mountpoint, 0,
(caddr_t)&ufsargs) == -1) {
msgConfirm("Error mounting %s on %s : %s", device, mountpoint, strerror(errno));
return DITEM_FAILURE;
@@ -352,6 +352,7 @@ Mount(char *mountp, void *dev)
return DITEM_SUCCESS;
}
+#if 0
int
Mount_msdosfs(char *mountp, void *dev)
{
@@ -363,8 +364,8 @@ Mount_msdosfs(char *mountp, void *dev)
return DITEM_SUCCESS;
if (*((char *)dev) != '/') {
- sprintf(device, "%s/dev/%s", RunningAsInit ? "/mnt" : "", (char *)dev);
- sprintf(mountpoint, "%s%s", RunningAsInit ? "/mnt" : "", mountp);
+ sprintf(device, "/dev/%s", (char *)dev);
+ sprintf(mountpoint, "%s", mountp);
}
else {
strcpy(device, dev);
@@ -382,13 +383,14 @@ Mount_msdosfs(char *mountp, void *dev)
mount_args.fspec = device;
mount_args.magic = MSDOSFS_ARGSMAGIC;
mount_args.mask = S_IRWXU | S_IRWXG | S_IRWXO;
- if (mount("msdosfs", mountpoint, RunningAsInit ? MNT_ASYNC|MNT_NOATIME : 0,
+ if (mount("msdosfs", mountpoint, 0,
(caddr_t)&mount_args) == -1) {
msgConfirm("Error mounting %s on %s : %s", device, mountpoint, strerror(errno));
return DITEM_FAILURE;
}
return DITEM_SUCCESS;
}
+#endif
WINDOW *
openLayoutDialog(char *helpfile, char *title, int x, int y, int width, int height)
diff --git a/usr.sbin/sade/msg.c b/usr.sbin/sade/msg.c
index 4625ce2..c355f09 100644
--- a/usr.sbin/sade/msg.c
+++ b/usr.sbin/sade/msg.c
@@ -1,9 +1,4 @@
/*
- * The new sysinstall program.
- *
- * This is probably the last program in the `sysinstall' line - the next
- * generation being essentially a complete rewrite.
- *
* $FreeBSD$
*
* Copyright (c) 1995
@@ -34,7 +29,7 @@
*
*/
-#include "sysinstall.h"
+#include "sade.h"
#include <stdarg.h>
#include <sys/ioctl.h>
#include <sys/consio.h>
@@ -175,7 +170,6 @@ msgFatal(char *fmt, ...)
if (OnVTY)
msgDebug("Fatal error `%s'!\n", errstr);
getch();
- systemShutdown(1);
}
/* Put up a message in a popup confirmation box */
diff --git a/usr.sbin/sade/sade.8 b/usr.sbin/sade/sade.8
index 2fca752..25881b8 100644
--- a/usr.sbin/sade/sade.8
+++ b/usr.sbin/sade/sade.8
@@ -24,913 +24,44 @@
.\"
.\" $FreeBSD$
.\"
-.Dd July 17, 2005
-.Dt SYSINSTALL 8
+.Dd August 08, 2006
+.Dt SADE 8
.Os
.Sh NAME
-.Nm sysinstall
-.Nd system installation and configuration tool
+.Nm sade
+.Nd sysadmins disk editor
.Sh SYNOPSIS
.Nm
-.Op Ar var=value
-.Op Ar function
-.Op Ar ...
.Sh DESCRIPTION
The
.Nm
-utility is used for installing and configuring
+utility is used for various disk administration tasks on
.Fx
systems.
-It is the first utility invoked by the
-.Fx
-installation boot
-floppy and is also available as
-.Pa /usr/sbin/sysinstall
-on newly installed
-.Fx
-systems for use in later configuring the system.
.Pp
-The
-.Nm
-utility is generally invoked without arguments for the default
-behavior, where the main installation/configuration menu is presented.
-.Pp
-On those occasions where it is deemed necessary to invoke a subsystem
-of sysinstall directly, however, it is also possible to do so by
-naming the appropriate function entry points on the command line.
-Since this action is essentially identical to running an installation
-script, each command-line argument corresponding to a line of script,
-the reader is encouraged to read the section on scripting for more
-information on this feature.
+It is generally invoked without arguments for the default
+behavior, where the main menu is presented.
.Sh NOTES
The
.Nm
-utility is essentially nothing more than a monolithic C program with
-the ability to write MBRs and disk labels (through the services
-of the
-.Xr libdisk 3
-library) and install distributions or packages onto new and
-existing
-.Fx
-systems.
-It also contains some extra intelligence
-for running as a replacement for
-.Xr init 8
-when it is invoked by the
-.Fx
-installation boot procedure.
-It
-assumes very little in the way of additional utility support and
-performs most file system operations by calling the relevant syscalls
-(such as
-.Xr mount 2 )
-directly.
-.Pp
-The
-.Nm
-utility currently uses the
-.Xr dialog 3
-library to do user interaction with simple ANSI line graphics, color
-support for which is enabled by either running on a syscons VTY or some
-other color-capable terminal emulator (newer versions of xterm will support
-color when using the
-.Dq xterm-color
-termcap entry).
-.Pp
-This product is currently at the end of its life cycle and will
-eventually be replaced.
-.Sh RUNNING SCRIPTS
-The
-.Nm
-utility may be either driven interactively through its various internal menus
-or run in batch mode, driven by an external script.
-Such a script may
-be loaded and executed in one of 3 ways:
-.Bl -tag -width Ds
-.It Sy "LOAD_CONFIG_FILE"
-If
-.Nm
-is compiled with LOAD_CONFIG_FILE set in the environment
-(or in the Makefile) to some value, then that value will
-be used as the filename to automatically look for and load
-when
-.Nm
-starts up and with no user interaction required.
-This option is aimed primarily at large sites who wish to create a
-single prototype install for multiple machines with largely identical
-configurations and/or installation options.
-.It Sy "MAIN MENU"
-If
-.Nm
-is run interactively, that is to say in the default manner, it will
-bring up a main menu which contains a "load config file" option.
-Selecting this option will prompt for the name of a script file which
-it then will attempt to load from a DOS or UFS formatted floppy.
-.It Sy "COMMAND LINE"
-Each command line argument is treated as a script directive
-when
-.Nm
-is run in multi-user mode.
-Execution ends either by explicit request
-(e.g.\& calling the
-.Ar shutdown
-directive), upon reaching the end of the argument list or on error.
-.Pp
-For example:
-.Bd -literal
-/usr/sbin/sysinstall _ftpPath=ftp://ziggy/pub/ mediaSetFTP configPackages
-.Ed
-.Pp
-Would initialize
-.Nm
-for FTP installation media (using the server `ziggy') and then
-bring up the package installation editor, exiting when finished.
-.El
-.Sh SCRIPT SYNTAX
-A script is a list of one or more directives, each directive taking
-the form of:
-.Pp
-.Ar var=value
-.Pp
-.Ar function
-.Pp
-or
-.Ar #somecomment
-.Pp
-Where
-.Ar var=value
-is the assignment of some internal
-.Nm
-variable, e.g.\& "ftpPass=FuNkYChiKn", and
-.Ar function
-is the name of an internal
-.Nm
-function, e.g.\& "mediaSetFTP", and
-.Ar #comment
-is a single-line comment for documentation purposes (ignored by
-sysinstall).
-Each directive must be by itself on a single line,
-functions taking their arguments by examining known variable names.
-This requires that you be sure to assign the relevant variables before
-calling a function which requires them.
-.Pp
-The
-.Ar noError
-variable can be assigned before each directive: this will cause any error
-detected while processing the directive itself to be ignored.
-The value of
-.Ar noError
-will automatically reset to the default "unassigned" every time a directive is
-processed.
-.Pp
-When and where a function depends on the settings of one or more variables
-will be noted in the following table:
-.Pp
-.Sy "Function Glossary" :
-.Pp
-.Bl -tag -width indent
-.It configAnonFTP
-Invoke the Anonymous FTP configuration menu.
-.Pp
-.Sy Variables :
-None
-.It configRouter
-Select which routing daemon you wish to use, potentially
-loading any required 3rd-party routing daemons as necessary.
-.Pp
-.Sy Variables :
-.Bl -tag -width indent
-.It router
-can be set to the name of the desired routing daemon,
-e.g.\&
-.Dq routed
-or
-.Dq gated ,
-otherwise it is prompted for.
-.El
-.It configNFSServer
-Configure host as an NFS server.
-.Pp
-.Sy Variables :
-None
-.It configNTP
-Configure host as a user of the Network Time Protocol.
-.Pp
-.Sy Variables :
-.Bl -tag -width indent
-.It ntpdate_flags
-The flags to
-.Xr ntpdate 8 ,
-that is to say the name of the server to sync from.
-.El
-.It configPCNFSD
-Configure host to support PC NFS.
-.Pp
-.Sy Variables :
-.Bl -tag -width indent
-.It pcnfsd_pkg
-The name of the PCNFSD package to load if necessary (defaults to hard coded
-version).
-.El
-.It configPackages
-Bring up the interactive package management menu.
-.Pp
-.Sy Variables :
-None
-.It configUsers
-Add users and/or groups to the system.
-.Pp
-.Sy Variables :
-None
-.It diskPartitionEditor
-Invokes the disk partition (MBR) editor.
-.Pp
-.Sy Variables :
-.Bl -tag -width findx
-.It geometry
-The disk geometry, as a cyls/heads/sectors formatted string.
-Default: no
-change to geometry.
-.It partition
-Set to disk partitioning type or size, its value being
-.Ar free
-in order to use only remaining free space for
-.Fx ,
-.Ar all
-to use the entire disk for
-.Fx
-but maintain a proper partition
-table,
-.Ar existing
-to use an existing
-.Fx
-partition (first found),
-.Ar exclusive
-to use the disk in
-.Dq dangerously dedicated
-mode or, finally,
-.Ar somenumber
-to allocate
-.Ar somenumber
-blocks of available free space to a new
-.Fx
-partition.
-Default: Interactive mode.
-.It bootManager
-is set to one of
-.Ar boot
-to signify the installation of a boot manager,
-.Ar standard
-to signify installation of a "standard" non-boot MGR DOS
-MBR or
-.Ar none
-to indicate that no change to the boot manager is desired.
-Default: none.
-.It diskInteractive
-If set, bring up the interactive disk partition editor.
-.El
-.Pp
-Note: Nothing is actually written to disk by this function, an explicit call to
-.Ar diskPartitionWrite
-being required for that to happen.
-.It diskPartitionWrite
-Causes any pending MBR changes (typically from the
-.Ar diskPartitionEditor
-function) to be written out.
-.Pp
-.Sy Variables :
-None
-.It diskLabelEditor
-Invokes the disk label editor.
-This is a bit trickier from a script
-since you need to essentially label everything inside each
-.Fx
-(type 0xA5) partition created by the
-.Ar diskPartitionEditor
-function, and that requires knowing a few rules about how things are
-laid out.
-When creating a script to automatically allocate disk space
-and partition it up, it is suggested that you first perform the
-installation interactively at least once and take careful notes as to
-what the slice names will be, then and only then hardwiring them into
-the script.
-.Pp
-For example, let's say you have a SCSI disk on which you have created a new
-.Fx
-partition in slice 2 (your DOS partition residing in slice 1).
-The slice name would be
-.Ar da0s2
-for the whole
-.Fx
-partition
-.Ar ( da0s1
-being your DOS primary
-partition).
-Now let's further assume that you have 500MB in this
-partition and you want to sub-partition that space into root, swap,
-var and usr file systems for
-.Fx .
-Your invocation of the
-.Ar diskLabelEditor
-function might involve setting the following variables:
-.Bl -tag -width findx
-.It Li "da0s2-1=ufs 40960 /"
-A 20MB root file system (all sizes are in 512 byte blocks).
-.It Li "da0s2-2=swap 131072 /"
-A 64MB swap partition.
-.It Li "da0s2-3=ufs 204800 /var"
-A 100MB /var file system.
-.It Li "da0s2-4=ufs 0 /usr 1"
-With the balance of free space (around 316MB) going to the /usr
-file system and with soft-updates enabled (the argument following
-the mount point, if non-zero, means to set the soft updates flag).
-.El
-.Pp
-One can also use the
-.Ar diskLabelEditor
-for mounting or erasing existing partitions as well as creating new
-ones.
-Using the previous example again, let's say that we also wanted
-to mount our DOS partition and make sure that an
-.Pa /etc/fstab
-entry is created for it in the new installation.
-Before calling the
-.Ar diskLabelEditor
-function, we simply add an additional line:
-.Pp
-.Dl "da0s1=/dos_c N"
-.Pp
-before the call.
-This tells the label editor that you want to mount
-the first slice on
-.Pa /dos_c
-and not to attempt to newfs it (not that
-.Nm
-would attempt this for a DOS partition in any case, but it could just
-as easily be an existing UFS partition being named here and the 2nd
-field is non-optional).
-.Pp
-You can also set the
-.Ar diskInteractive
-variable to request that the disk label editor use an interactive dialog
-to partition the disk instead of using variables to explicitly layout the
-disk as described above.
-.Pp
-Note: No file system data is actually written to disk until an
-explicit call to
-.Ar diskLabelCommit
-is made.
-.It diskLabelCommit
-Writes out all pending disklabel information and creates and/or mounts any
-file systems which have requests pending from the
-.Ar diskLabelEditor
-function.
-.Pp
-.Sy Variables :
-None
-.It distReset
-Resets all selected distributions to the empty set (no distributions selected).
-.Pp
-.Sy Variables :
-None
-.It distSetCustom
-Allows the selection of a custom distribution set (e.g.\& not just one of the
-existing "canned" sets) with no user interaction.
-.Pp
-.Sy Variables :
-.Bl -tag -width indent
-.It dists
-List of distributions to load.
-Possible distribution values are:
-.Bl -tag -width indentxx
-.It Li base
-The base binary distribution.
-.It Li doc
-Miscellaneous documentation
-.It Li games
-Games
-.It Li manpages
-Manual pages (unformatted)
-.It Li catpages
-Pre-formatted manual pages
-.It Li proflibs
-Profiled libraries for developers.
-.It Li dict
-Dictionary information (for tools like spell).
-.It Li info
-GNU info files and other extra docs.
-.It Li lib32
-(amd64 only)
-32-bit runtime compatibility libraries.
-.It Li ports
-The ports collection.
-.It Li ssecure
-/usr/src/secure
-.It Li sbase
-/usr/src/[top level files]
-.It Li scontrib
-/usr/src/contrib
-.It Li sgnu
-/usr/src/gnu
-.It Li setc
-/usr/src/etc
-.It Li sgames
-/usr/src/games
-.It Li sinclude
-/usr/src/include
-.It Li skrb5
-/usr/src/kerberos5
-.It Li slib
-/usr/src/lib
-.It Li slibexec
-/usr/src/libexec
-.It Li srelease
-/usr/src/release
-.It Li srescue
-/usr/src/rescue
-.It Li sbin
-/usr/src/bin
-.It Li ssbin
-/usr/src/sbin
-.It Li sshare
-/usr/src/share
-.It Li ssys
-/usr/src/sys
-.It Li subin
-/usr/src/usr.bin
-.It Li susbin
-/usr/src/usr.sbin
-.It Li ssmailcf
-/usr/src/usr.sbin/sendmail/cf
-.It Li Xbin
-X.Org client applications.
-.It Li Xlib
-X.Org libraries.
-.It Li Xman
-X.Org manual pages.
-.It Li Xdoc
-X.Org protocol and library documentation.
-.It Li Xprog
-X.Org imake distribution.
-.It Li Xsrv
-X.Org X server.
-.It Li Xnest
-X.Org nested X server.
-.It Li Xprt
-X.Org print server.
-.It Li Xvfb
-X.Org virtual frame-buffer X server.
-.It Li Xfmsc
-X.Org miscellaneous font set.
-.It Li Xf75
-X.Org 75DPI font set.
-.It Li Xf100
-X.Org 100DPI font set.
-.It Li Xfcyr
-X.Org Cyrillic font set.
-.It Li Xft1
-X.Org Type 1 font set.
-.It Li Xftt
-X.Org TrueType font set.
-.It Li Xfs
-X.Org font server.
-.El
-.El
-.It distSetDeveloper
-Selects the standard Developer's distribution set.
-.Pp
-.Sy Variables :
-None
-.It distSetXDeveloper
-Selects the standard X Developer's distribution set.
-.Pp
-.Sy Variables :
-None
-.It distSetKernDeveloper
-Selects the standard kernel Developer's distribution set.
-.Pp
-.Sy Variables :
-None
-.It distSetUser
-Selects the standard user distribution set.
-.Pp
-.Sy Variables :
-None
-.It distSetXUser
-Selects the standard X user's distribution set.
-.Pp
-.Sy Variables :
-None
-.It distSetMinimum
-Selects the very minimum distribution set.
-.Pp
-.Sy Variables :
-None
-.It distSetEverything
-Selects the full whack - all available distributions.
-.Pp
-.Sy Variables :
-None
-.It distSetSrc
-Interactively select source subcomponents.
-.Pp
-.Sy Variables :
-None
-.It distSetXOrg
-Interactively select X.Org subcomponents.
-.Pp
-.Sy Variables :
-None
-.It distExtractAll
-Install all currently selected distributions (requires that
-media device also be selected).
-.Pp
-.Sy Variables :
-None
-.It docBrowser
-Install (if necessary) an HTML documentation browser and go to the
-HTML documentation submenu.
-.Pp
-.Sy Variables :
-.Bl -tag -width indent
-.It browserPackage
-The name of the browser package to try and install as necessary.
-Defaults to latest links package.
-.It browserBinary
-The name of the browser binary itself (if overriding the
-.Ar browserPackage
-variable).
-Defaults to links.
-.El
-.It installCommit
-Commit any and all pending changes to disk.
-This function
-is essentially shorthand for a number of more granular "commit"
-functions.
-.Pp
-.Sy Variables :
-None
-.It installExpress
-Start an "express" installation, asking few questions of
-the user.
-.Pp
-.Sy Variables :
-None
-.It installStandard
-Start a "standard" installation, the most user-friendly
-installation type available.
-.Pp
-.Sy Variables :
-None
-.It installUpgrade
-Start an upgrade installation.
-.Pp
-.Sy Variables :
-None
-.It installFixitHoloShell
-Start up the "emergency holographic shell" over on VTY4
-if running as init.
-This will also happen automatically
-as part of the installation process unless
-.Ar noHoloShell
-is set.
-.Pp
-.Sy Variables :
-None
-.It installFixitCDROM
-Go into "fixit" mode, assuming a live file system CDROM
-currently in the drive.
-.Pp
-.Sy Variables :
-None
-.It installFixitFloppy
-Go into "fixit" mode, assuming an available fixit floppy
-disk (user will be prompted for it).
-.Pp
-.Sy Variables :
-None
-.It installFilesystems
-Do just the file system initialization part of an install.
-.Pp
-.Sy Variables :
-None
-.It installVarDefaults
-Initialize all variables to their defaults, overriding any
-previous settings.
-.Pp
-.Sy Variables :
-None
-.It loadConfig
-Sort of like an #include statement, it allows you to load one
-configuration file from another.
-.Pp
-.Sy Variables :
-.Bl -tag -width indent
-.It configFile
-The fully qualified pathname of the file to load.
-.El
-.It mediaOpen
-If a media device is set, mount it.
-.Pp
-.Sy Variables :
-None
-.It mediaClose
-If a media device is open, close it.
-.Pp
-.Sy Variables :
-None
-.It mediaSetCDROM
-Select a
-.Fx
-CDROM as the installation media.
-.Pp
-.Sy Variables :
-None
-.It mediaSetFloppy
-Select a pre-made floppy installation set as the installation media.
-.Pp
-.Sy Variables :
-None
-.It mediaSetDOS
-Select an existing DOS primary partition as the installation media.
-The first primary partition found is used (e.g.\& C:).
-.Pp
-.Sy Variables :
-None
-.It mediaSetTape
-Select a tape device as the installation media.
-.Pp
-.Sy Variables :
-None
-.It mediaSetFTP
-Select an FTP site as the installation media.
-.Pp
-.Sy Variables :
-.Bl -tag -width indent
-.It hostname
-The name of the host being installed (non-optional).
-.It domainname
-The domain name of the host being installed (optional).
-.It defaultrouter
-The default router for this host (non-optional).
-.It netDev
-Which host interface to use
-.Ar ( ed0
-or
-.Ar ep0 ,
-for example.
-Non-optional).
-.It netInteractive
-If set, bring up the interactive network setup form even
-if all relevant configuration variables are already set (optional).
-.It ipaddr
-The IP address for the selected host interface (non-optional).
-.It netmask
-The netmask for the selected host interface (non-optional).
-.It _ftpPath
-The fully qualified URL of the FTP site containing the
-.Fx
-distribution you are interested in, e.g.\&
-.Ar ftp://ftp.FreeBSD.org/pub/FreeBSD/ .
-.El
-.It mediaSetFTPActive
-Alias for
-.Ar mediaSetFTP
-using "active" FTP transfer mode.
-.Pp
-.Sy Variables :
-Same as for
-.Ar mediaSetFTP .
-.It mediaSetFTPPassive
-Alias for
-.Ar mediaSetFTP
-using "passive" FTP transfer mode.
-.Pp
-.Sy Variables :
-Same as for
-.Ar mediaSetFTP .
-.It mediaSetHTTP
-Alias for
-.Ar mediaSetFTP
-using an HTTP proxy.
-.Pp
-.Sy Variables :
-See
-.Ar mediaSetFTP ,
-plus
-.Bl -tag -width indent
-.It _httpPath
-The proxy to use (host:port) (non-optional).
-.El
-.It mediaSetUFS
-Select an existing UFS partition (mounted with the label editor) as
-the installation media.
-.Pp
-.Sy Variables :
-.Bl -tag -width indent
-.It ufs
-full /path to directory containing the
-.Fx
-distribution you are
-interested in.
-.El
-.It mediaSetNFS
-.Pp
-.Sy Variables :
-.Bl -tag -width indent
-.It hostname
-The name of the host being installed (non-optional).
-.It domainname
-The domain name of the host being installed (optional).
-.It defaultrouter
-The default router for this host (non-optional).
-.It netDev
-Which host interface to use
-.Ar ( ed0
-or
-.Ar ep0 ,
-for example.
-Non-optional).
-.It netInteractive
-If set, bring up the interactive network setup form even
-if all relevant configuration variables are already set (optional).
-.It ipaddr
-The IP address for the selected host interface (non-optional).
-.It netmask
-The netmask for the selected host interface (non-optional).
-.It nfs
-full hostname:/path specification for directory containing
-the
-.Fx
-distribution you are interested in.
-.El
-.It mediaSetFTPUserPass
-.Pp
-.Sy Variables :
-.Bl -tag -width indent
-.It ftpUser
-The username to log in as on the ftp server site.
-Default: ftp
-.It ftpPass
-The password to use for this username on the ftp
-server site.
-Default: user@host
-.El
-.It mediaSetCPIOVerbosity
-.Pp
-.Sy Variables :
-.Bl -tag -width indent
-.It cpioVerbose
-Can be used to set the verbosity of cpio extractions to low, medium or
-high.
-.El
-.It mediaGetType
-Interactively get the user to specify some type of media.
-.Pp
-.Sy Variables :
-None
-.It optionsEditor
-Invoke the interactive options editor.
-.Pp
-.Sy Variables :
-None
-.It packageAdd
-Try to fetch and add a package to the system (requires
-that a media type be set),
-.Pp
-.Sy Variables :
-.Bl -tag -width indent
-.It package
-The name of the package to add, e.g.\& bash-1.14.7 or ncftp-2.4.2.
-.El
-.It addGroup
-Invoke the interactive group editor.
-.Pp
-.Sy Variables :
-None
-.It addUser
-Invoke the interactive user editor.
-.Pp
-.Sy Variables :
-None
-.It shutdown
-Stop the script and terminate sysinstall.
-.Pp
-.Sy Variables :
-None
-.It system
-Execute an arbitrary command with
-.Xr system 3
-.Pp
-.Sy Variables :
-.Bl -tag -width indent
-.It command
-The name of the command to execute.
-When running
-from a boot floppy, very minimal expectations should
-be made as to what is available until/unless a relatively
-full system installation has just been done.
-.El
-.It tcpMenuSelect
-Configure a network device.
-.Pp
-.Sy Variables :
-Same as for
-.Ar mediaSetFTP
-except that
-.Ar _ftpPath
-is not used.
-.El
-.Sh DISTRIBUTION MEDIA
-The following files can be used to affect the operation of
-.Nm
-when used during initial system installation.
-.Bl -tag -width ".Pa packages/INDEX"
-.It Pa cdrom.inf
-A text file of properties, listed one per line, that describe the
-contents of the media in use.
-The syntax for each line is simply
-.Dq Ar property No = Ar value .
-Currently, only the following properties are recognized.
-.Bl -tag -width ".Va CD_MACHINE_ARCH"
-.It Va CD_VERSION
-This property should be set to the
-.Fx
-version on the current
-media volume.
-For example,
-.Dq Li "CD_VERSION = 5.3" .
-.It Va CD_MACHINE_ARCH
-This property should be set to the architecture of the contents on
-this volume.
-This property is normally only used with
-.Fx
-products that contain
-CDs for different architectures, to provide better error messages if
-users try to install Alpha packages on an i386 machine.
-For example,
-.Dq Li "CD_MACHINE_ARCH = alpha" .
-.It Va CD_VOLUME
-In a multi-volume collection (such as the
-.Fx
-4-CD set), the
-.Pa ports/INDEX
-file on each disc should contain the full package index for the set.
-The last field of the
-.Pa INDEX
-file denotes which volume the package
-appears on, and the
-.Va CD_VOLUME
-property here defines the volume ID of the current disc.
-.El
-.It Pa packages/INDEX
-The package index file.
-Each package is listed on a separate line with additional meta-data
-such as the required dependencies.
-This index is generated by
-.Dq Li "make index"
-from the
-.Xr ports 7
-collection.
-When multi-volume support is enabled, an additional field should be
-added to each line indicating which media volume contains the given
-package.
-.El
-.Pp
-For information about building a full release of
-.Fx ,
-please see
-.Xr release 7 .
-.Sh FILES
-This utility may edit the contents of
-.Pa /etc/rc.conf ,
-.Pa /etc/hosts ,
-and
-.Pa /etc/resolv.conf
-as necessary to reflect changes in the network configuration.
+utility aims to provide a handy tool for disk management
+tasks on an already installed system. The goal is to save
+some of the useful functionality of the old sysinstall, which
+will be removed from the system in favour of the new installer.
+.\".Sh FILES
.Sh SEE ALSO
-If you have a reasonably complete source tree online, take
-a look at
-.Pa /usr/src/usr.sbin/sysinstall/install.cfg
-for a sample installation script.
+sysinstall(8)
.Sh HISTORY
This version of
.Nm
first appeared in
-.Fx 2.0 .
+.Fx 7.0 . The code is extracted from the
+sysinstall
+utility.
.Sh AUTHORS
.An Jordan K. Hubbard Aq jkh@FreeBSD.org
.Sh BUGS
-Editing slice and partition tables on disks which are currently mounted by
-the system is not allowed.
-This is generally only a problem when
-.Nm
-is run on a system that is already installed.
-Use
-.Xr fdisk 8
-and
-.Xr bsdlabel 8
-for these tasks.
-.Pp
-This utility is a prototype which lasted several years past
-its expiration date and is greatly in need of death.
+The utility misses a lot of nice features, such as tools for
+manipulating gmirror or gvinum stuff. These will be added
+later.
+
diff --git a/usr.sbin/sade/sade.h b/usr.sbin/sade/sade.h
index afc1ab5..5f39323 100644
--- a/usr.sbin/sade/sade.h
+++ b/usr.sbin/sade/sade.h
@@ -1,9 +1,4 @@
/*
- * The new sysinstall program.
- *
- * This is probably the last attempt in the `sysinstall' line, the next
- * generation being slated to essentially a complete rewrite.
- *
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
*
@@ -33,8 +28,8 @@
* $FreeBSD$
*/
-#ifndef _SYSINSTALL_H_INCLUDE
-#define _SYSINSTALL_H_INCLUDE
+#ifndef _SADE_H_INCLUDE
+#define _SADE_H_INCLUDE
#include <sys/types.h>
#include <sys/wait.h>
@@ -48,11 +43,10 @@
#include "ui_objects.h"
#include "dir.h"
#include "colors.h"
-#include "dist.h"
/*** Defines ***/
-#if defined(__i386__) || defined(__alpha__) || defined(__amd64__)
+#if defined(__i386__) || defined(__amd64__)
#define WITH_SYSCONS
#define WITH_MICE
#endif
@@ -68,12 +62,8 @@
/* device limits */
#define DEV_NAME_MAX 128 /* The maximum length of a device name */
#define DEV_MAX 100 /* The maximum number of devices we'll deal with */
-#define INTERFACE_MAX 50 /* Maximum number of network interfaces we'll deal with */
#define IO_ERROR -2 /* Status code for I/O error rather than normal EOF */
-/* Number of seconds to wait for data to come off even the slowest media */
-#define MEDIA_TIMEOUT 300
-
/*
* I make some pretty gross assumptions about having a max of 50 chunks
* total - 8 slices and 42 partitions. I can't easily display many more
@@ -90,122 +80,42 @@
#define DISK_SELECTED "_diskSelected"
#define SYSTEM_STATE "_systemState"
#define RUNNING_ON_ROOT "_runningOnRoot"
-#define TCP_CONFIGURED "_tcpConfigured"
/* Ones that can be tweaked from config files */
#define VAR_BLANKTIME "blanktime"
#define VAR_BOOTMGR "bootManager"
-#define VAR_BROWSER_BINARY "browserBinary"
-#define VAR_BROWSER_PACKAGE "browserPackage"
-#define VAR_COUNTRY "country"
-#define VAR_CPIO_VERBOSITY "cpioVerbose"
#define VAR_DEBUG "debug"
-#define VAR_DESKSTYLE "_deskStyle"
#define VAR_DISK "disk"
#define VAR_DISKINTERACTIVE "diskInteractive"
-#define VAR_DISTS "dists"
-#define VAR_DIST_MAIN "distMain"
-#define VAR_DIST_SRC "distSRC"
-#define VAR_DIST_X11 "distX11"
-#define VAR_DIST_KERNEL "distKernel"
#define VAR_DEDICATE_DISK "dedicateDisk"
-#define VAR_DOMAINNAME "domainname"
-#define VAR_EDITOR "editor"
-#define VAR_EXTRAS "ifconfig_"
#define VAR_COMMAND "command"
#define VAR_CONFIG_FILE "configFile"
-#define VAR_FIXIT_TTY "fixitTty"
-#define VAR_FTP_DIR "ftpDirectory"
-#define VAR_FTP_PASS "ftpPass"
-#define VAR_FTP_PATH "_ftpPath"
-#define VAR_FTP_PORT "ftpPort"
-#define VAR_FTP_STATE "ftpState"
-#define VAR_FTP_USER "ftpUser"
-#define VAR_FTP_HOST "ftpHost"
-#define VAR_HTTP_PATH "_httpPath"
-#define VAR_HTTP_PROXY "httpProxy"
-#define VAR_HTTP_PORT "httpPort"
-#define VAR_HTTP_HOST "httpHost"
-#define VAR_HTTP_FTP_MODE "httpFtpMode"
-#define VAR_GATEWAY "defaultrouter"
#define VAR_GEOMETRY "geometry"
-#define VAR_HOSTNAME "hostname"
-#define VAR_IFCONFIG "ifconfig_"
#define VAR_INSTALL_CFG "installConfig"
#define VAR_INSTALL_ROOT "installRoot"
-#define VAR_IPADDR "ipaddr"
-#define VAR_IPV6_ENABLE "ipv6_enable"
-#define VAR_IPV6ADDR "ipv6addr"
-#define VAR_KERN_SECURELEVEL "kern_securelevel"
#define VAR_KEYMAP "keymap"
#define VAR_LABEL "label"
#define VAR_LABEL_COUNT "labelCount"
-#define VAR_LINUX_ENABLE "linux_enable"
-#define VAR_MEDIA_TYPE "mediaType"
-#define VAR_MEDIA_TIMEOUT "MEDIA_TIMEOUT"
-#define VAR_MOUSED "moused_enable"
-#define VAR_MOUSED_FLAGS "moused_flags"
-#define VAR_MOUSED_PORT "moused_port"
-#define VAR_MOUSED_TYPE "moused_type"
-#define VAR_NAMESERVER "nameserver"
-#define VAR_NCPUS "ncpus"
-#define VAR_NETINTERACTIVE "netInteractive"
-#define VAR_NETMASK "netmask"
-#define VAR_NETWORK_DEVICE "netDev"
#define VAR_NEWFS_ARGS "newfsArgs"
-#define VAR_NFS_PATH "nfs"
-#define VAR_NFS_HOST "nfsHost"
-#define VAR_NFS_V3 "nfs_use_v3"
-#define VAR_NFS_TCP "nfs_use_tcp"
-#define VAR_NFS_SECURE "nfs_reserved_port_only"
-#define VAR_NFS_SERVER "nfs_server_enable"
#define VAR_NO_CONFIRM "noConfirm"
#define VAR_NO_ERROR "noError"
-#define VAR_NO_HOLOSHELL "noHoloShell"
-#define VAR_NO_INET6 "noInet6"
#define VAR_NO_WARN "noWarn"
#define VAR_NO_USR "noUsr"
#define VAR_NO_TMP "noTmp"
#define VAR_NO_HOME "noHome"
#define VAR_NONINTERACTIVE "nonInteractive"
-#define VAR_NOVELL "novell"
-#define VAR_OSF1_ENABLE "osf1_enable"
-#define VAR_RPCBIND_ENABLE "rpcbind_enable"
-#define VAR_NTPDATE_FLAGS "ntpdate_flags"
-#define VAR_PACKAGE "package"
#define VAR_PARTITION "partition"
-#define VAR_PCNFSD "pcnfsd"
-#define VAR_PKG_TMPDIR "PKG_TMPDIR"
-#define VAR_PORTS_PATH "ports"
-#define VAR_PPP_ENABLE "ppp_enable"
-#define VAR_PPP_PROFILE "ppp_profile"
#define VAR_RELNAME "releaseName"
#define VAR_ROOT_SIZE "rootSize"
-#define VAR_ROUTER "router"
-#define VAR_ROUTER_ENABLE "router_enable"
-#define VAR_ROUTERFLAGS "router_flags"
-#define VAR_SENDMAIL_ENABLE "sendmail_enable"
-#define VAR_SERIAL_SPEED "serialSpeed"
-#define VAR_SLOW_ETHER "slowEthernetCard"
#define VAR_SWAP_SIZE "swapSize"
#define VAR_TAPE_BLOCKSIZE "tapeBlocksize"
-#define VAR_TRY_DHCP "tryDHCP"
-#define VAR_TRY_RTSOL "tryRTSOL"
-#define VAR_SKIP_PCCARD "skipPCCARD"
#define VAR_UFS_PATH "ufs"
#define VAR_USR_SIZE "usrSize"
#define VAR_VAR_SIZE "varSize"
#define VAR_TMP_SIZE "tmpSize"
-#define VAR_HOME_SIZE "homeSize"
-#define VAR_XORG_CONFIG "_xorgconfig"
#define VAR_TERM "TERM"
#define VAR_CONSTERM "_consterm"
-#ifdef PC98
-#define DEFAULT_COUNTRY "jp"
-#else
-#define DEFAULT_COUNTRY "us"
-#endif
#define DEFAULT_TAPE_BLOCKSIZE "20"
/* One MB worth of blocks */
@@ -270,30 +180,15 @@ typedef struct _layout {
void *obj; /* The obj pointer returned by libdialog */
} Layout;
-/* Layout array terminator. */
-#define LAYOUT_END { 0, 0, 0, 0, NULL, NULL, NULL, 0, NULL }
-
typedef enum {
DEVICE_TYPE_NONE,
DEVICE_TYPE_DISK,
- DEVICE_TYPE_FLOPPY,
- DEVICE_TYPE_FTP,
- DEVICE_TYPE_NETWORK,
- DEVICE_TYPE_CDROM,
- DEVICE_TYPE_TAPE,
DEVICE_TYPE_DOS,
DEVICE_TYPE_UFS,
- DEVICE_TYPE_NFS,
DEVICE_TYPE_ANY,
- DEVICE_TYPE_HTTP,
} DeviceType;
-/* CDROM mount codes */
-#define CD_UNMOUNTED 0
-#define CD_ALREADY_MOUNTED 1
-#define CD_WE_MOUNTED_IT 2
-
-/* A "device" from sysinstall's point of view */
+/* A "device" from sade's point of view */
typedef struct _device {
char name[DEV_NAME_MAX];
char *description;
@@ -360,56 +255,15 @@ typedef struct _opt {
enum { OPT_IS_STRING, OPT_IS_INT, OPT_IS_FUNC, OPT_IS_VAR } type;
void *data;
void *aux;
- char *(*check)(struct _opt *);
+ char *(*check)();
} Option;
-/* Weird index nodey things we use for keeping track of package information */
-typedef enum { PACKAGE, PLACE } node_type; /* Types of nodes */
-
-typedef struct _pkgnode { /* A node in the reconstructed hierarchy */
- struct _pkgnode *next; /* My next sibling */
- node_type type; /* What am I? */
- char *name; /* My name */
- char *desc; /* My description (Hook) */
- struct _pkgnode *kids; /* My little children */
- void *data; /* A place to hang my data */
-} PkgNode;
-typedef PkgNode *PkgNodePtr;
-
-/* A single package */
-typedef struct _indexEntry { /* A single entry in an INDEX file */
- char *name; /* name */
- char *path; /* full path to port */
- char *prefix; /* port prefix */
- char *comment; /* one line description */
- char *descrfile; /* path to description file */
- char *deps; /* packages this depends on */
- int depc; /* how many depend on me */
- int installed; /* indicates if it is installed */
- char *maintainer; /* maintainer */
- unsigned int volume; /* Volume of package */
-} IndexEntry;
-typedef IndexEntry *IndexEntryPtr;
-
typedef int (*commandFunc)(char *key, void *data);
-#define HOSTNAME_FIELD_LEN 128
-#define IPADDR_FIELD_LEN 16
#define EXTRAS_FIELD_LEN 128
-/* This is the structure that Network devices carry around in their private, erm, structures */
-typedef struct _devPriv {
- int use_rtsol;
- int use_dhcp;
- char ipaddr[IPADDR_FIELD_LEN];
- char netmask[IPADDR_FIELD_LEN];
- char extras[EXTRAS_FIELD_LEN];
-} DevInfo;
-
-
/*** Externs ***/
extern jmp_buf BailOut; /* Used to get the heck out */
-extern int CDROMInitQuiet; /* Don't whine if mount(2) fails */
extern int DebugFD; /* Where diagnostic output goes */
extern Boolean Fake; /* Don't actually modify anything - testing */
extern Boolean Restarting; /* Are we restarting sysinstall? */
@@ -419,16 +273,8 @@ extern Boolean DialogActive; /* Is the dialog() stuff up? */
extern Boolean ColorDisplay; /* Are we on a color display? */
extern Boolean OnVTY; /* On a syscons VTY? */
extern Variable *VarHead; /* The head of the variable chain */
-extern Device *mediaDevice; /* Where we're getting our distribution from */
-extern unsigned int Dists; /* Which distributions we want */
-extern unsigned int SrcDists; /* Which src distributions we want */
-extern unsigned int XOrgDists; /* Which X.Org dists we want */
-extern unsigned int KernelDists; /* Which kernel dists we want */
extern int BootMgr; /* Which boot manager to use */
extern int StatusLine; /* Where to print our status messages */
-extern DMenu MenuCountry; /* Country menu */
-extern DMenu MenuInitial; /* Initial installation menu */
-extern DMenu MenuFixit; /* Fixit repair menu */
#if defined(__i386__) || defined(__amd64__)
#ifdef PC98
extern DMenu MenuIPLType; /* Type of IPL to write on the disk */
@@ -436,57 +282,9 @@ extern DMenu MenuIPLType; /* Type of IPL to write on the disk */
extern DMenu MenuMBRType; /* Type of MBR to write on the disk */
#endif
#endif
-extern DMenu MenuConfigure; /* Final configuration menu */
-extern DMenu MenuDocumentation; /* Documentation menu */
-extern DMenu MenuFTPOptions; /* FTP Installation options */
-extern DMenu MenuIndex; /* Index menu */
-extern DMenu MenuOptions; /* Installation options */
-extern DMenu MenuOptionsLanguage; /* Language options menu */
-extern DMenu MenuKLD; /* Prototype KLD menu */
-extern DMenu MenuMedia; /* Media type menu */
-#ifdef WITH_MICE
-extern DMenu MenuMouse; /* Mouse type menu */
-#endif
-extern DMenu MenuMediaCDROM; /* CDROM media menu */
-extern DMenu MenuMediaDOS; /* DOS media menu */
-extern DMenu MenuMediaFloppy; /* Floppy media menu */
-extern DMenu MenuMediaFTP; /* FTP media menu */
-extern DMenu MenuMediaTape; /* Tape media menu */
-extern DMenu MenuNetworkDevice; /* Network device menu */
-extern DMenu MenuNTP; /* NTP time server menu */
-extern DMenu MenuSecurity; /* System security options menu */
-extern DMenu MenuSecurelevel; /* Securelevel menu */
-extern DMenu MenuStartup; /* Startup services menu */
-#ifdef WITH_SYSCONS
-extern DMenu MenuSyscons; /* System console configuration menu */
-extern DMenu MenuSysconsFont; /* System console font configuration menu */
-extern DMenu MenuSysconsKeymap; /* System console keymap configuration menu */
-extern DMenu MenuSysconsKeyrate; /* System console keyrate configuration menu */
-extern DMenu MenuSysconsSaver; /* System console saver configuration menu */
-extern DMenu MenuSysconsScrnmap; /* System console screenmap configuration menu */
-extern DMenu MenuSysconsTtys; /* System console terminal type menu */
-#endif
-extern DMenu MenuNetworking; /* Network configuration menu */
-extern DMenu MenuMTA; /* MTA selection menu */
-extern DMenu MenuInstallCustom; /* Custom Installation menu */
-extern DMenu MenuDistributions; /* Distribution menu */
-extern DMenu MenuDiskDevices; /* Disk type devices */
-extern DMenu MenuSubDistributions; /* Custom distribution menu */
-extern DMenu MenuSrcDistributions; /* Source distribution menu */
-extern DMenu MenuKernelDistributions;/* Kernel distribution menu */
-extern DMenu MenuXOrg; /* X.Org main menu */
-extern DMenu MenuXOrgSelect; /* X.Org distribution selection menu */
-extern DMenu MenuXOrgSelectCore; /* X.Org core distribution menu */
-extern DMenu MenuXOrgSelectServer; /* X.Org server distribution menu */
-extern DMenu MenuXOrgSelectFonts; /* X.Org font selection menu */
-extern DMenu MenuXDesktops; /* X Desktops menu */
-extern DMenu MenuHTMLDoc; /* HTML Documentation menu */
-extern DMenu MenuUsermgmt; /* User management menu */
-extern DMenu MenuFixit; /* Fixit floppy/CDROM/shell menu */
-extern DMenu MenuXOrgConfig; /* Select X.Org configuration tool */
-extern int FixItMode; /* FixItMode starts shell onc urrent device (ie Serial port) */
+extern DMenu MenuMain; /* New main menu */
+extern DMenu MenuDiskDevices; /* Disk type devices */
extern const char * StartName; /* Which name we were started as */
-extern int NCpus; /* # cpus on machine */
/* Important chunks. */
extern Chunk *HomeChunk;
@@ -505,17 +303,6 @@ extern void display_helpline(WINDOW *w, int y, int width);
/*** Prototypes ***/
-/* acpi.c */
-extern int acpi_detect(void);
-
-/* anonFTP.c */
-extern int configAnonFTP(dialogMenuItem *self);
-
-/* cdrom.c */
-extern Boolean mediaInitCDROM(Device *dev);
-extern FILE *mediaGetCDROM(Device *dev, char *file, Boolean probe);
-extern void mediaShutdownCDROM(Device *dev);
-
/* command.c */
extern void command_clear(void);
extern void command_sort(void);
@@ -525,41 +312,10 @@ extern void command_func_add(char *key, commandFunc func, void *data);
/* config.c */
extern void configEnvironmentRC_conf(void);
-extern void configEnvironmentResolv(char *config);
extern void configRC_conf(void);
extern int configFstab(dialogMenuItem *self);
extern int configRC(dialogMenuItem *self);
-extern int configResolv(dialogMenuItem *self);
-extern int configPackages(dialogMenuItem *self);
-extern int configSaver(dialogMenuItem *self);
-extern int configSaverTimeout(dialogMenuItem *self);
-#ifdef WITH_LINUX
-extern int configLinux(dialogMenuItem *self);
-#endif
-extern int configNTP(dialogMenuItem *self);
-#ifdef __alpha__
-extern int configOSF1(dialogMenuItem *self);
-#endif
-extern int configCountry(dialogMenuItem *self);
-extern int configUsers(dialogMenuItem *self);
-extern int configRouter(dialogMenuItem *self);
-extern int configPCNFSD(dialogMenuItem *self);
-extern int configInetd(dialogMenuItem *self);
-extern int configNFSServer(dialogMenuItem *self);
-extern int configMTAPostfix(dialogMenuItem *self);
-extern int configMTAExim(dialogMenuItem *self);
-extern int configRpcBind(dialogMenuItem *self);
extern int configWriteRC_conf(dialogMenuItem *self);
-extern int configSecurelevel(dialogMenuItem *self);
-extern int configSecurelevelDisabled(dialogMenuItem *self);
-extern int configSecurelevelSecure(dialogMenuItem *self);
-extern int configSecurelevelHighlySecure(dialogMenuItem *self);
-extern int configSecurelevelNetworkSecure(dialogMenuItem *self);
-extern int configEtcTtys(dialogMenuItem *self);
-#ifdef __i386__
-extern int checkLoaderACPI(void);
-extern int configLoaderACPI(int);
-#endif
/* devices.c */
extern DMenu *deviceCreateMenu(DMenu *menu, DeviceType type, int (*hook)(dialogMenuItem *d),
@@ -580,10 +336,6 @@ extern Boolean dummyInit(Device *dev);
extern FILE *dummyGet(Device *dev, char *dist, Boolean probe);
extern void dummyShutdown(Device *dev);
-/* dhcp.c */
-extern int dhcpParseLeases(char *file, char *hostname, char *domain, char *nameserver,
- char *ipaddr, char *gateway, char *netmask);
-
/* disks.c */
#ifdef WITH_SLICES
extern void diskPartition(Device *dev);
@@ -598,25 +350,6 @@ extern int dispatch_load_floppy(dialogMenuItem *self);
extern int dispatch_load_file_int(int);
extern int dispatch_load_file(dialogMenuItem *self);
-
-/* dist.c */
-extern int distReset(dialogMenuItem *self);
-extern int distConfig(dialogMenuItem *self);
-extern int distSetCustom(dialogMenuItem *self);
-extern int distUnsetCustom(dialogMenuItem *self);
-extern int distSetDeveloper(dialogMenuItem *self);
-extern int distSetXDeveloper(dialogMenuItem *self);
-extern int distSetKernDeveloper(dialogMenuItem *self);
-extern int distSetXKernDeveloper(dialogMenuItem *self);
-extern int distSetUser(dialogMenuItem *self);
-extern int distSetXUser(dialogMenuItem *self);
-extern int distSetMinimum(dialogMenuItem *self);
-extern int distSetEverything(dialogMenuItem *self);
-extern int distSetSrc(dialogMenuItem *self);
-extern int distSetXOrg(dialogMenuItem *self);
-extern int distSetKernel(dialogMenuItem *self);
-extern int distExtractAll(dialogMenuItem *self);
-
/* dmenu.c */
extern int dmenuDisplayFile(dialogMenuItem *tmp);
extern int dmenuSubmenu(dialogMenuItem *tmp);
@@ -625,16 +358,11 @@ extern int dmenuSystemCommandBox(dialogMenuItem *tmp);
extern int dmenuExit(dialogMenuItem *tmp);
extern int dmenuISetVariable(dialogMenuItem *tmp);
extern int dmenuSetVariable(dialogMenuItem *tmp);
-extern int dmenuSetCountryVariable(dialogMenuItem *tmp);
extern int dmenuSetKmapVariable(dialogMenuItem *tmp);
extern int dmenuSetVariables(dialogMenuItem *tmp);
extern int dmenuToggleVariable(dialogMenuItem *tmp);
extern int dmenuSetFlag(dialogMenuItem *tmp);
extern int dmenuSetValue(dialogMenuItem *tmp);
-extern int dmenuFindItem(DMenu *menu, const char *prompt, const char *title, void *data);
-extern void dmenuSetDefaultIndex(DMenu *menu, int *choice, int *scroll, int *curr, int *max);
-extern int dmenuSetDefaultItem(DMenu *menu, const char *prompt, const char *title, void *data,
- int *choice, int *scroll, int *curr, int *max);
extern Boolean dmenuOpen(DMenu *menu, int *choice, int *scroll, int *curr, int *max, Boolean buttons);
extern Boolean dmenuOpenSimple(DMenu *menu, Boolean buttons);
extern int dmenuVarCheck(dialogMenuItem *item);
@@ -642,58 +370,19 @@ extern int dmenuVarsCheck(dialogMenuItem *item);
extern int dmenuFlagCheck(dialogMenuItem *item);
extern int dmenuRadioCheck(dialogMenuItem *item);
-/* doc.c */
-extern int docBrowser(dialogMenuItem *self);
-extern int docShowDocument(dialogMenuItem *self);
-
/* dos.c */
-extern Boolean mediaCloseDOS(Device *dev, FILE *fp);
-extern Boolean mediaInitDOS(Device *dev);
-extern FILE *mediaGetDOS(Device *dev, char *file, Boolean probe);
-extern void mediaShutdownDOS(Device *dev);
-
-/* floppy.c */
-extern int getRootFloppy(void);
-extern Boolean mediaInitFloppy(Device *dev);
-extern FILE *mediaGetFloppy(Device *dev, char *file, Boolean probe);
-extern void mediaShutdownFloppy(Device *dev);
-
-/* ftp_strat.c */
-extern Boolean mediaCloseFTP(Device *dev, FILE *fp);
-extern Boolean mediaInitFTP(Device *dev);
-extern FILE *mediaGetFTP(Device *dev, char *file, Boolean probe);
-extern void mediaShutdownFTP(Device *dev);
-
-/* http.c */
-extern Boolean mediaInitHTTP(Device *dev);
-extern FILE *mediaGetHTTP(Device *dev, char *file, Boolean probe);
+extern Boolean mediaCloseDOS(Device *dev, FILE *fp);
+extern Boolean mediaInitDOS(Device *dev);
+extern FILE *mediaGetDOS(Device *dev, char *file, Boolean probe);
+extern void mediaShutdownDOS(Device *dev);
/* globals.c */
extern void globalsInit(void);
-/* index.c */
-int index_read(FILE *fp, PkgNodePtr papa);
-int index_menu(PkgNodePtr root, PkgNodePtr top, PkgNodePtr plist, int *pos, int *scroll);
-void index_init(PkgNodePtr top, PkgNodePtr plist);
-void index_node_free(PkgNodePtr top, PkgNodePtr plist);
-void index_sort(PkgNodePtr top);
-void index_print(PkgNodePtr top, int level);
-int index_extract(Device *dev, PkgNodePtr top, PkgNodePtr who, Boolean depended);
-int index_initialize(char *path);
-PkgNodePtr index_search(PkgNodePtr top, char *str, PkgNodePtr *tp);
-
/* install.c */
extern Boolean checkLabels(Boolean whinge);
extern int installCommit(dialogMenuItem *self);
extern int installCustomCommit(dialogMenuItem *self);
-extern int installExpress(dialogMenuItem *self);
-extern int installStandard(dialogMenuItem *self);
-extern int installFixitHoloShell(dialogMenuItem *self);
-extern int installFixitCDROM(dialogMenuItem *self);
-extern int installFixitFloppy(dialogMenuItem *self);
-extern int installFixupBase(dialogMenuItem *self);
-extern int installFixupKernel(dialogMenuItem *self, int dists);
-extern int installUpgrade(dialogMenuItem *self);
extern int installFilesystems(dialogMenuItem *self);
extern int installVarDefaults(dialogMenuItem *self);
extern void installEnvironment(void);
@@ -703,7 +392,6 @@ extern Boolean copySelf(void);
extern int kget(char *out);
/* keymap.c */
-extern int keymapMenuSelect(dialogMenuItem *self);
extern int loadKeymap(const char *lang);
/* label.c */
@@ -727,30 +415,6 @@ extern const u_char font_cp866_8x16[];
extern const u_char koi8_r2cp866[];
extern u_char default_scrnmap[];
-/* media.c */
-extern char *cpioVerbosity(void);
-extern int mediaOpen(void);
-extern void mediaClose(void);
-extern int mediaTimeout(void);
-extern int mediaSetCDROM(dialogMenuItem *self);
-extern int mediaSetFloppy(dialogMenuItem *self);
-extern int mediaSetDOS(dialogMenuItem *self);
-extern int mediaSetTape(dialogMenuItem *self);
-extern int mediaSetFTP(dialogMenuItem *self);
-extern int mediaSetFTPActive(dialogMenuItem *self);
-extern int mediaSetFTPPassive(dialogMenuItem *self);
-extern int mediaSetHTTP(dialogMenuItem *self);
-extern int mediaSetUFS(dialogMenuItem *self);
-extern int mediaSetNFS(dialogMenuItem *self);
-extern int mediaSetFTPUserPass(dialogMenuItem *self);
-extern int mediaSetCPIOVerbosity(dialogMenuItem *self);
-extern int mediaGetType(dialogMenuItem *self);
-extern Boolean mediaExtractDist(char *dir, char *dist, FILE *fp);
-extern Boolean mediaExtractDistBegin(char *dir, int *fd, int *zpid, int *cpic);
-extern Boolean mediaExtractDistEnd(int zpid, int cpid);
-extern Boolean mediaVerify(void);
-extern FILE *mediaGenericGet(char *base, const char *file);
-
/* misc.c */
extern Boolean file_readable(char *fname);
extern Boolean file_executable(char *fname);
@@ -785,19 +449,6 @@ extern WINDOW *savescr(void);
extern void restorescr(WINDOW *w);
extern char *sstrncpy(char *dst, const char *src, int size);
-/* modules.c */
-extern void driverFloppyCheck(void);
-extern void moduleInitialize(void);
-extern int kldBrowser(dialogMenuItem *self);
-
-/* mouse.c */
-extern int mousedTest(dialogMenuItem *self);
-extern int mousedDisable(dialogMenuItem *self);
-extern int setMouseFlags(dialogMenuItem *self);
-
-/* mptable.c */
-extern int biosmptable_detect(void);
-
/* msg.c */
extern Boolean isDebug(void);
extern void msgInfo(char *fmt, ...) __printf0like(1, 2);
@@ -815,24 +466,6 @@ extern char *msgGetInput(char *buf, char *fmt, ...) __printflike(2, 3);
extern int msgSimpleConfirm(char *);
extern int msgSimpleNotify(char *);
-/* network.c */
-extern Boolean mediaInitNetwork(Device *dev);
-extern void mediaShutdownNetwork(Device *dev);
-
-/* nfs.c */
-extern Boolean mediaInitNFS(Device *dev);
-extern FILE *mediaGetNFS(Device *dev, char *file, Boolean probe);
-extern void mediaShutdownNFS(Device *dev);
-
-/* options.c */
-extern int optionsEditor(dialogMenuItem *self);
-
-/* package.c */
-extern int packageAdd(dialogMenuItem *self);
-extern int package_add(char *name);
-extern int package_extract(Device *dev, char *name, Boolean depended);
-extern Boolean package_installed(char *name);
-
/* pccard.c */
extern void pccardInitialize(void);
@@ -849,35 +482,11 @@ extern void systemChangeFont(const u_char font[]);
extern void systemChangeLang(char *lang);
extern void systemChangeTerminal(char *color, const u_char c_termcap[], char *mono, const u_char m_termcap[]);
extern void systemChangeScreenmap(const u_char newmap[]);
-extern void systemCreateHoloshell(void);
extern int vsystem(char *fmt, ...) __printflike(1, 2);
-/* tape.c */
-extern char *mediaTapeBlocksize(void);
-extern Boolean mediaInitTape(Device *dev);
-extern FILE *mediaGetTape(Device *dev, char *file, Boolean probe);
-extern void mediaShutdownTape(Device *dev);
-
-/* tcpip.c */
-extern int tcpOpenDialog(Device *dev);
-extern int tcpMenuSelect(dialogMenuItem *self);
-extern Device *tcpDeviceSelect(void);
-
/* termcap.c */
extern int set_termcap(void);
-/* ttys.c */
-extern void configTtys(void);
-
-/* ufs.c */
-extern void mediaShutdownUFS(Device *dev);
-extern Boolean mediaInitUFS(Device *dev);
-extern FILE *mediaGetUFS(Device *dev, char *file, Boolean probe);
-
-/* user.c */
-extern int userAddGroup(dialogMenuItem *self);
-extern int userAddUser(dialogMenuItem *self);
-
/* variable.c */
extern void variable_set(char *var, int dirty);
extern void variable_set2(char *name, char *value, int dirty);
diff --git a/usr.sbin/sade/system.c b/usr.sbin/sade/system.c
index 406877d..9337b05 100644
--- a/usr.sbin/sade/system.c
+++ b/usr.sbin/sade/system.c
@@ -1,22 +1,17 @@
/*
- * The new sysinstall program.
- *
- * This is probably the last program in the `sysinstall' line - the next
- * generation being essentially a complete rewrite.
- *
* $FreeBSD$
*
* Jordan Hubbard
*
* My contributions are in the public domain.
*
- * Parts of this file are also blatantly stolen from Poul-Henning Kamp's
+ * Parts of this file are also blatently stolen from Poul-Henning Kamp's
* previous version of sysinstall, and as such fall under his "BEERWARE license"
* so buy him a beer if you like it! Buy him a beer for me, too!
* Heck, get him completely drunk and send me pictures! :-)
*/
-#include "sysinstall.h"
+#include "sade.h"
#include <signal.h>
#include <termios.h>
#include <sys/param.h>
@@ -48,19 +43,10 @@ intr_continue(dialogMenuItem *self)
}
static int
-intr_reboot(dialogMenuItem *self)
-{
- systemShutdown(-1);
- /* NOTREACHED */
- return 0;
-}
-
-static int
intr_restart(dialogMenuItem *self)
{
int ret, fd, fdmax;
- mediaClose();
free_variables();
fdmax = getdtablesize();
for (fd = 3; fd < fdmax; fd++)
@@ -72,9 +58,8 @@ intr_restart(dialogMenuItem *self)
}
static dialogMenuItem intrmenu[] = {
- { "Abort", "Abort the installation", NULL, intr_reboot },
- { "Restart", "Restart the installation program", NULL, intr_restart },
- { "Continue", "Continue the installation", NULL, intr_continue },
+ { "Restart", "Restart the program", NULL, intr_restart },
+ { "Continue", "Continue without restarting", NULL, intr_continue },
};
@@ -91,30 +76,15 @@ handle_intr(int sig)
}
(void)dialog_menu("Installation interrupt",
"Do you want to abort the installation?",
- -1, -1, 3, -3, intrmenu, NULL, NULL, NULL);
+ -1, -1, 2, -2, intrmenu, NULL, NULL, NULL);
restorescr(save);
}
-#if 0
-/*
- * Harvest children if we are init.
- */
-static void
-reap_children(int sig)
-{
- int errbak = errno;
-
- while (waitpid(-1, NULL, WNOHANG) > 0)
- ;
- errno = errbak;
-}
-#endif
-
/* Expand a file into a convenient location, nuking it each time */
static char *
expand(char *fname)
{
- char *gunzip = RunningAsInit ? "/stand/gunzip" : "/usr/bin/gunzip";
+ char *gunzip = "/usr/bin/gunzip";
if (!directory_exists(DOC_TMP_DIR)) {
Mkdir(DOC_TMP_DIR);
@@ -146,67 +116,8 @@ systemInitialize(int argc, char **argv)
(i == sizeof(boothowto)) && (boothowto & RB_VERBOSE))
variable_set2(VAR_DEBUG, "YES", 0);
- /* Are we running as init? */
- if (getpid() == 1) {
- struct ufs_args ufs_args;
- int fd;
-
- RunningAsInit = 1;
- setsid();
- close(0);
- fd = open("/dev/ttyv0", O_RDWR);
- if (fd == -1) {
- fd = open("/dev/console", O_RDWR); /* fallback */
- variable_set2(VAR_FIXIT_TTY, "serial", 0); /* give fixit a hint */
- } else
- OnVTY = TRUE;
- /*
- * To make _sure_ we're on a VTY and don't have /dev/console switched
- * away to a serial port or something, attempt to set the cursor appearance.
- */
- if (OnVTY) {
- int fd2, type;
-
- type = 0; /* normal */
- if ((fd2 = open("/dev/console", O_RDWR)) != -1) {
- if (ioctl(fd2, CONS_CURSORTYPE, &type) == -1) {
- OnVTY = FALSE;
- variable_set2(VAR_FIXIT_TTY, "serial", 0); /* Tell Fixit
- the console
- type */
- close(fd); close(fd2);
- open("/dev/console", O_RDWR);
- }
- else
- close(fd2);
- }
- }
- close(1); dup(0);
- close(2); dup(0);
- printf("%s running as init on %s\n", argv[0], OnVTY ? "vty0" : "serial console");
- ioctl(0, TIOCSCTTY, (char *)NULL);
- setlogin("root");
- setenv("PATH", "/stand:/bin:/sbin:/usr/sbin:/usr/bin:/mnt/bin:/mnt/sbin:/mnt/usr/sbin:/mnt/usr/bin:/usr/X11R6/bin", 1);
- setbuf(stdin, 0);
- setbuf(stderr, 0);
-#ifdef __alpha__
- i = 0;
- sysctlbyname("machdep.unaligned_print", NULL, 0, &i, sizeof(i));
-#endif
-#if 0
- signal(SIGCHLD, reap_children);
-#endif
- memset(&ufs_args, 0, sizeof(ufs_args));
- mount("ufs", "/", MNT_UPDATE, &ufs_args);
- }
- else {
char hname[256];
- /* Initalize various things for a multi-user environment */
- if (!gethostname(hname, sizeof hname))
- variable_set2(VAR_HOSTNAME, hname, 0);
- }
-
if (set_termcap() == -1) {
printf("Can't find terminal entry\n");
exit(-1);
@@ -219,8 +130,6 @@ systemInitialize(int argc, char **argv)
DialogActive = TRUE;
/* Make sure HOME is set for those utilities that need it */
- if (!getenv("HOME"))
- setenv("HOME", "/", 1);
signal(SIGINT, handle_intr);
/*
* Make sure we can be interrupted even if we were re-executed
@@ -233,43 +142,6 @@ systemInitialize(int argc, char **argv)
(void)vsystem("rm -rf %s", DOC_TMP_DIR);
}
-/* Close down and prepare to exit */
-void
-systemShutdown(int status)
-{
- /* If some media is open, close it down */
- if (status >=0)
- mediaClose();
-
- /* write out any changes to rc.conf .. */
- configRC_conf();
-
- /* Shut down the dialog library */
- if (DialogActive) {
- end_dialog();
- DialogActive = FALSE;
- }
-
- /* Shut down curses */
- endwin();
-
- /* If we have a temporary doc dir lying around, nuke it */
- (void)vsystem("rm -rf %s", DOC_TMP_DIR);
-
- /* REALLY exit! */
- if (RunningAsInit) {
- /* Put the console back */
- ioctl(0, VT_ACTIVATE, 2);
-#if defined(__alpha__) || defined(__sparc64__)
- reboot(RB_HALT);
-#else
- reboot(0);
-#endif
- }
- else
- exit(status);
-}
-
/* Run some general command */
int
systemExecute(char *command)
@@ -328,6 +200,7 @@ systemDisplayHelp(char *file)
int ret = 0;
WINDOW *w = savescr();
+ printf("zzz");
fname = systemHelpFile(file, buf);
if (!fname) {
snprintf(buf, FILENAME_MAX, "The %s file is not provided on this particular floppy image.", file);
@@ -364,10 +237,10 @@ systemHelpFile(char *file, char *buf)
snprintf(buf, FILENAME_MAX, "/stand/help/%s.TXT", file);
if (file_readable(buf))
return expand(buf);
- snprintf(buf, FILENAME_MAX, "/usr/src/usr.sbin/sysinstall/help/%s.hlp", file);
+ snprintf(buf, FILENAME_MAX, "/usr/src/usr.sbin/sade/help/%s.hlp", file);
if (file_readable(buf))
return buf;
- snprintf(buf, FILENAME_MAX, "/usr/src/usr.sbin/sysinstall/help/%s.TXT", file);
+ snprintf(buf, FILENAME_MAX, "/usr/src/usr.sbin/sade/help/%s.TXT", file);
if (file_readable(buf))
return buf;
return NULL;
@@ -461,85 +334,3 @@ vsystem(char *fmt, ...)
return i;
}
-void
-systemCreateHoloshell(void)
-{
- int waitstatus;
-
- if ((FixItMode || OnVTY) && RunningAsInit) {
-
- if (ehs_pid != 0) {
- int pstat;
-
- if (kill(ehs_pid, 0) == 0) {
-
- if (msgNoYes("There seems to be an emergency holographic shell\n"
- "already running on VTY 4.\n\n"
- "Kill it and start a new one?"))
- return;
-
- /* try cleaning up as much as possible */
- (void) kill(ehs_pid, SIGHUP);
- sleep(1);
- (void) kill(ehs_pid, SIGKILL);
- }
-
- /* avoid too many zombies */
- (void) waitpid(ehs_pid, &pstat, WNOHANG);
- }
-
- if (strcmp(variable_get(VAR_FIXIT_TTY), "serial") == 0)
- systemSuspendDialog(); /* must be before the fork() */
- if ((ehs_pid = fork()) == 0) {
- int i, fd;
- struct termios foo;
- extern int login_tty(int);
-
- ioctl(0, TIOCNOTTY, NULL);
- for (i = getdtablesize(); i >= 0; --i)
- close(i);
- if (strcmp(variable_get(VAR_FIXIT_TTY), "serial") == 0)
- fd = open("/dev/console", O_RDWR);
- else
- fd = open("/dev/ttyv3", O_RDWR);
- ioctl(0, TIOCSCTTY, &fd);
- dup2(0, 1);
- dup2(0, 2);
- DebugFD = 2;
- if (login_tty(fd) == -1)
- msgDebug("Doctor: I can't set the controlling terminal.\n");
- signal(SIGTTOU, SIG_IGN);
- if (tcgetattr(fd, &foo) != -1) {
- foo.c_cc[VERASE] = '\010';
- if (tcsetattr(fd, TCSANOW, &foo) == -1)
- msgDebug("Doctor: I'm unable to set the erase character.\n");
- }
- else
- msgDebug("Doctor: I'm unable to get the terminal attributes!\n");
- if (strcmp(variable_get(VAR_FIXIT_TTY), "serial") == 0) {
- printf("Type ``exit'' in this fixit shell to resume sysinstall.\n\n");
- fflush(stdout);
- }
- execlp("sh", "-sh", 0);
- msgDebug("Was unable to execute sh for Holographic shell!\n");
- exit(1);
- }
- else {
- if (strcmp(variable_get(VAR_FIXIT_TTY), "standard") == 0) {
- WINDOW *w = savescr();
-
- msgNotify("Starting an emergency holographic shell on VTY4");
- sleep(2);
- restorescr(w);
- }
- else {
- (void)waitpid(ehs_pid, &waitstatus, 0); /* we only wait for
- shell to finish
- it serial mode
- since there is no
- virtual console */
- systemResumeDialog();
- }
- }
- }
-}
diff --git a/usr.sbin/sade/termcap.c b/usr.sbin/sade/termcap.c
index 1d8e047..977b26c 100644
--- a/usr.sbin/sade/termcap.c
+++ b/usr.sbin/sade/termcap.c
@@ -13,7 +13,7 @@
* $FreeBSD$
*/
-#include "sysinstall.h"
+#include "sade.h"
#include <stdarg.h>
#include <fcntl.h>
#include <sys/errno.h>
@@ -36,38 +36,11 @@ prompt_term(char **termp, char **termcapp)
{ "xterm", termcap_xterm },
{ "cons25w", termcap_cons25w } }; /* must be last */
- if (RunningAsInit) {
- while (1) {
- int i;
-
- printf("\nThese are the predefined terminal types available to\n");
- printf("sysinstall when running stand-alone. Please choose the\n");
- printf("closest match for your particular terminal.\n\n");
- printf("1 ...................... Standard ANSI terminal.\n");
- printf("2 ...................... VT100 or compatible terminal.\n");
- printf("3 ...................... FreeBSD system console (color).\n");
- printf("4 ...................... FreeBSD system console (monochrome).\n\n");
- printf("5 ...................... xterm terminal emulator.\n\n");
- printf("Your choice: (1-5) ");
- fflush(stdout);
- fgets(str, 80, stdin);
- i = str[0] - '0';
- if (i > 0 && i < 6) {
- *termp = (char *)lookup[i - 1].term;
- *termcapp = (char *)lookup[i - 1].termcap;
- break;
- }
- else
- printf("\007Invalid choice, please try again.\n\n");
- }
- }
- else {
printf("\nPlease set your TERM variable before running this program.\n");
printf("Defaulting to an ANSI compatible terminal - please press RETURN\n");
fgets(str, 80, stdin); /* Just to make it interactive */
*termp = (char *)"ansi";
*termcapp = (char *)termcap_ansi;
- }
}
int
@@ -80,14 +53,12 @@ set_termcap(void)
term = getenv("TERM");
stat = ioctl(STDERR_FILENO, GIO_COLOR, &ColorDisplay);
- if (!RunningAsInit) {
if (isDebug())
DebugFD = open("sysinstall.debug", O_WRONLY|O_CREAT|O_TRUNC, 0644);
else
DebugFD = -1;
if (DebugFD < 0)
DebugFD = open("/dev/null", O_RDWR, 0);
- }
if (!OnVTY || (stat < 0)) {
if (!term) {
diff --git a/usr.sbin/sade/usb.c b/usr.sbin/sade/usb.c
deleted file mode 100644
index 4eedbd5..0000000
--- a/usr.sbin/sade/usb.c
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * USB support for sysinstall
- *
- * $FreeBSD$
- *
- * Copyright (c) 2000 John Baldwin <jhb@FreeBSD.org>. All rights reserved.
- *
- * This software may be used, modified, copied, and distributed, in
- * both source and binary form provided that the above copyright and
- * these terms are retained. Under no circumstances is the author
- * responsible for the proper functioning of this software, nor does
- * the author assume any responsibility for damages incurred with its
- * use.
- */
-
-#include "sysinstall.h"
-#include <sys/fcntl.h>
-#include <sys/time.h>
-
-void
-usbInitialize(void)
-{
- int fd;
- WINDOW *w;
-
- if (!RunningAsInit && !Fake) {
- /* It's not my job... */
- return;
- }
-
- if ((fd = open("/dev/usb", O_RDONLY)) < 0) {
- msgDebug("Can't open USB controller.\n");
- return;
- }
- close(fd);
-
- w = savescr();
- msgNotify("Initializing USB controller....");
-
- variable_set2("usbd_enable", "YES", 1);
-
- vsystem("/stand/usbd");
- restorescr(w);
-}
diff --git a/usr.sbin/sade/variable.c b/usr.sbin/sade/variable.c
index e86104f..bbbc2d2 100644
--- a/usr.sbin/sade/variable.c
+++ b/usr.sbin/sade/variable.c
@@ -1,9 +1,4 @@
/*
- * The new sysinstall program.
- *
- * This is probably the last program in the `sysinstall' line - the next
- * generation being essentially a complete rewrite.
- *
* $FreeBSD$
*
* Copyright (c) 1995
@@ -36,7 +31,7 @@
*
*/
-#include "sysinstall.h"
+#include "sade.h"
/* Routines for dealing with variable lists */
diff --git a/usr.sbin/sade/wizard.c b/usr.sbin/sade/wizard.c
index c221e55..5edd872 100644
--- a/usr.sbin/sade/wizard.c
+++ b/usr.sbin/sade/wizard.c
@@ -7,10 +7,9 @@
* ----------------------------------------------------------------------------
*
* $FreeBSD$
- *
*/
-#include "sysinstall.h"
+#include "sade.h"
#include <fcntl.h>
#include <err.h>
#include <libdisk.h>
OpenPOWER on IntegriCloud