Index: head/usr.sbin/sysinstall/Makefile =================================================================== --- head/usr.sbin/sysinstall/Makefile (revision 186201) +++ head/usr.sbin/sysinstall/Makefile (revision 186202) @@ -1,154 +1,154 @@ # $FreeBSD$ .if ${MACHINE_ARCH} != "ia64" _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 \ + system.c tcpip.c termcap.c ttys.c ufs.c user.c \ variable.c ${_wizard} keymap.h countries.h CFLAGS+= -DUSE_GZIP=1 .if ${MACHINE} == "pc98" CFLAGS+= -DPC98 .endif 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 .if exists(${.CURDIR}/../../share/termcap/termcap.src) RTERMCAP= TERMCAP=${.CURDIR}/../../share/termcap/termcap.src ./rtermcap .else RTERMCAP= ./rtermcap .endif makedevs.c: Makefile rtermcap echo '#include ' > makedevs.c ${RTERMCAP} ansi | \ file2c 'const char termcap_ansi[] = {' ',0};' \ >> makedevs.c ${RTERMCAP} cons25w | \ file2c 'const char termcap_cons25w[] = {' ',0};' \ >> makedevs.c ${RTERMCAP} cons25 | \ file2c 'const char termcap_cons25[] = {' ',0};' \ >> makedevs.c ${RTERMCAP} cons25-m | \ file2c 'const char termcap_cons25_m[] = {' ',0};' \ >> makedevs.c ${RTERMCAP} cons25r | \ file2c 'const char termcap_cons25r[] = {' ',0};' \ >> makedevs.c ${RTERMCAP} cons25r-m | \ file2c 'const char termcap_cons25r_m[] = {' ',0};' \ >> makedevs.c ${RTERMCAP} cons25l1 | \ file2c 'const char termcap_cons25l1[] = {' ',0};' \ >> makedevs.c ${RTERMCAP} cons25l1-m | \ file2c 'const char termcap_cons25l1_m[] = {' ',0};' \ >> makedevs.c ${RTERMCAP} vt100 | \ file2c 'const char termcap_vt100[] = {' ',0};' \ >> makedevs.c ${RTERMCAP} xterm | \ file2c 'const char termcap_xterm[] = {' ',0};' \ >> makedevs.c build-tools: rtermcap rtermcap: rtermcap.c ${CC} -o ${.TARGET} ${.ALLSRC} -ltermcap .if ${MACHINE} == "pc98" KEYMAPS= jp.pc98 jp.pc98.iso .else KEYMAPS= be.iso bg.bds.ctrlcaps bg.phonetic.ctrlcaps br275.iso \ ce.iso2 cs.latin2.qwertz danish.iso el.iso07 \ estonian.cp850 estonian.iso estonian.iso15 finnish.iso fr.iso \ german.iso gr.elot.acc gr.us101.acc hr.iso hu.iso2.101keys \ it.iso icelandic.iso jp.106 norwegian.iso pl_PL.ISO8859-2 \ pt.iso ru.koi8-r si.iso sk.iso2 spanish.iso swedish.iso \ swissfrench.iso \ swissgerman.iso ua.koi8-u ua.koi8-u.shift.alt uk.iso us.dvorak \ us.iso us.pc-ctrl us.unix .endif keymap.h: rm -f keymap.tmp for map in ${KEYMAPS} ; do \ KEYMAP_PATH=${.CURDIR}/../../share/syscons/keymaps \ kbdcontrol -L $$map | \ sed -e '/^static accentmap_t/,$$d' >> keymap.tmp ; \ done echo "static struct keymapInfo keymapInfos[] = {" >> keymap.tmp for map in ${KEYMAPS} ; do \ echo -n ' { "'$$map'", ' >> keymap.tmp ; \ echo "&keymap_$$map }," | tr '[-.]' '_' >> keymap.tmp ; \ done ( 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 Index: head/usr.sbin/sysinstall/devices.c =================================================================== --- head/usr.sbin/sysinstall/devices.c (revision 186201) +++ head/usr.sbin/sysinstall/devices.c (revision 186202) @@ -1,581 +1,563 @@ /* * 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 * Jordan Hubbard. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer, * verbatim and that no modifications are made prior to this * point in the file. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY JORDAN HUBBARD ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL JORDAN HUBBARD OR HIS PETS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, LIFE OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * */ #include "sysinstall.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include static Device *Devices[DEV_MAX]; static int numDevs; #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) \ 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; char *name; 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("ae", "Attansic/Atheros L2 FastEthernet"), NETWORK("age", "Attansic/Atheros L1 Gigabit Ethernet"), NETWORK("ale", "Atheros AR8121/AR8113/AR8114 PCIe Ethernet"), NETWORK("an", "Aironet 4500/4800 802.11 wireless adapter"), NETWORK("ath", "Atheros IEEE 802.11 wireless adapter"), NETWORK("aue", "ADMtek USB Ethernet adapter"), NETWORK("axe", "ASIX Electronics USB Ethernet adapter"), NETWORK("bce", "Broadcom NetXtreme II Gigabit Ethernet card"), NETWORK("bfe", "Broadcom BCM440x PCI Ethernet card"), NETWORK("bge", "Broadcom BCM570x PCI Gigabit Ethernet card"), NETWORK("cue", "CATC USB Ethernet adapter"), NETWORK("cxgb", "Chelsio T3 10Gb Ethernet card"), 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("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 GMAC or Sun ERI/GEM Ethernet adapter"), NETWORK("hme", "Sun HME (Happy Meal Ethernet) Ethernet adapter"), NETWORK("ie", "AT&T StarLAN 10 and EN100; 3Com 3C507; NI5210"), NETWORK("ipw", "Intel PRO/Wireless 2100 IEEE 802.11 adapter"), NETWORK("iwi", "Intel PRO/Wireless 2200BG/2225BG/2915ABG adapter"), NETWORK("ixgb", "Intel(R) PRO/10Gb Ethernet card"), NETWORK("jme", "JMicron JMC250 Gigabit/JMC260 Fast Ethernet"), NETWORK("kue", "Kawasaki LSI USB Ethernet adapter"), NETWORK("le", "AMD Am7900 LANCE or Am79C9xx PCnet Ethernet adapter"), NETWORK("lge", "Level 1 LXT1001 Gigabit Ethernet card"), NETWORK("malo", "Marvell Libertas 88W8335 802.11 wireless adapter"), NETWORK("msk", "Marvell/SysKonnect Yukon II Gigabit Ethernet"), NETWORK("mxge", "Myricom Myri10GE 10Gb Ethernet card"), NETWORK("nfe", "NVIDIA nForce MCP Ethernet"), NETWORK("nge", "NatSemi PCI Gigabit Ethernet card"), NETWORK("nve", "NVIDIA nForce MCP Ethernet"), NETWORK("pcn", "AMD Am79c79x PCI Ethernet card"), NETWORK("ral", "Ralink Technology IEEE 802.11 wireless adapter"), NETWORK("ray", "Raytheon Raylink 802.11 wireless adapter"), 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("rum", "Ralink Technology USB IEEE 802.11 wireless adapter"), 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("stge", "Sundance/Tamarack TC9021 Gigabit Ethernet"), 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("upgt", "Conexant/Intersil PrismGT USB wireless adapter"), NETWORK("ural", "Ralink Technology RT2500USB 802.11 wireless adapter"), 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("wpi", "Intel 3945ABG IEEE 802.11 wireless adapter"), NETWORK("xe", "Xircom/Intel EtherExpress Pro100/16 Ethernet card"), NETWORK("xl", "3COM 3c90x / 3c90xB PCI Ethernet card"), NETWORK("zyd", "ZyDAS ZD1211/ZD1211B USB 802.11 wireless adapter"), NETWORK("fwe", "FireWire Ethernet emulation"), NETWORK("fwip", "IP over FireWire"), 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 } }; Device * new_device(char *name) { Device *dev; dev = safe_malloc(sizeof(Device)); bzero(dev, sizeof(Device)); if (name) SAFE_STRCPY(dev->name, name); return dev; } /* Stubs for unimplemented strategy routines */ Boolean dummyInit(Device *dev) { return TRUE; } FILE * dummyGet(Device *dev, char *dist, Boolean probe) { return NULL; } void dummyShutdown(Device *dev) { return; } static int deviceTry(struct _devname dev, char *try, int i) { int fd; char unit[80]; snprintf(unit, sizeof unit, dev.name, i); snprintf(try, FILENAME_MAX, "/dev/%s", unit); if (isDebug()) msgDebug("deviceTry: attempting to open %s\n", try); 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); } return fd; } /* Register a new device in the devices array */ Device * deviceRegister(char *name, char *desc, char *devname, DeviceType type, Boolean enabled, Boolean (*init)(Device *), FILE * (*get)(Device *, char *, Boolean), void (*shutdown)(Device *), void *private) { Device *newdev = NULL; if (numDevs == DEV_MAX) msgFatal("Too many devices found!"); else { newdev = new_device(name); newdev->description = desc; newdev->devname = devname; newdev->type = type; newdev->enabled = enabled; newdev->init = init ? init : dummyInit; newdev->get = get ? get : dummyGet; newdev->shutdown = shutdown ? shutdown : dummyShutdown; newdev->private = private; Devices[numDevs] = newdev; Devices[++numDevs] = NULL; } return newdev; } /* Reset the registered device chain */ void deviceReset(void) { int i; for (i = 0; i < numDevs; i++) { DEVICE_SHUTDOWN(Devices[i]); /* XXX this potentially leaks Devices[i]->private if it's being * used to point to something dynamic, but you're not supposed * to call this routine at such times that some open instance * has its private ptr pointing somewhere anyway. XXX */ free(Devices[i]); } Devices[numDevs = 0] = NULL; } /* Get all device information for devices we have attached */ 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 = ""; 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. */ for (i = 0; device_names[i].name; i++) { for (j = 0; j < device_names[i].max; j++) { 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: break; } } } /* Finally, go get the disks and look for DOS partitions to register */ if ((names = Disk_Names()) != NULL) { int i; for (i = 0; names[i]; i++) { Chunk *c1; Disk *d; /* Ignore memory disks */ if (!strncmp(names[i], "md", 2)) continue; /* * XXX * Due to unknown reasons, Disk_Names() returns SCSI CDROM as a * valid disk. This is main reason why sysinstall presents SCSI * CDROM to available disks in Fdisk/Label menu. In addition, * adding a blank SCSI CDROM to the menu generates floating point * exception in sparc64. Disk_Names() just extracts sysctl * "kern.disks". Why GEOM treats SCSI CDROM as a disk is beyond * me and that should be investigated. * For temporary workaround, ignore SCSI CDROM device. */ if (!strncmp(names[i], "cd", 2)) continue; d = Open_Disk(names[i]); if (!d) { msgDebug("Unable to open disk %s\n", names[i]); continue; } deviceRegister(names[i], names[i], d->name, DEVICE_TYPE_DISK, FALSE, dummyInit, dummyGet, dummyShutdown, d); if (isDebug()) msgDebug("Found a disk device named %s\n", names[i]); /* 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) { Device *dev; char devname[80]; /* 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); dev->private = c1; if (isDebug()) msgDebug("Found a DOS partition %s on drive %s\n", c1->name, d->name); } } } free(names); } dialog_clear_norefresh(); } /* Rescan all devices, after closing previous set - convenience function */ void deviceRescan(void) { deviceReset(); deviceGetAll(); } /* * Find all devices that match the criteria, allowing "wildcarding" as well * by allowing NULL or ANY values to match all. The array returned is static * and may be used until the next invocation of deviceFind(). */ Device ** deviceFind(char *name, DeviceType class) { static Device *found[DEV_MAX]; int i, j; j = 0; for (i = 0; i < numDevs; i++) { if ((!name || !strcmp(Devices[i]->name, name)) && (class == DEVICE_TYPE_ANY || class == Devices[i]->type)) found[j++] = Devices[i]; } found[j] = NULL; return j ? found : NULL; } Device ** deviceFindDescr(char *name, char *desc, DeviceType class) { static Device *found[DEV_MAX]; int i, j; j = 0; for (i = 0; i < numDevs; i++) { if ((!name || !strcmp(Devices[i]->name, name)) && (!desc || !strcmp(Devices[i]->description, desc)) && (class == DEVICE_TYPE_ANY || class == Devices[i]->type)) found[j++] = Devices[i]; } found[j] = NULL; return j ? found : NULL; } int deviceCount(Device **devs) { int i; if (!devs) return 0; for (i = 0; devs[i]; i++); return i; } /* * Create a menu listing all the devices of a certain type in the system. * The passed-in menu is expected to be a "prototype" from which the new * menu is cloned. */ DMenu * deviceCreateMenu(DMenu *menu, DeviceType type, int (*hook)(dialogMenuItem *d), int (*check)(dialogMenuItem *d)) { Device **devs; int numdevs; DMenu *tmp = NULL; int i, j; devs = deviceFind(NULL, type); numdevs = deviceCount(devs); if (!numdevs) return NULL; tmp = (DMenu *)safe_malloc(sizeof(DMenu) + (sizeof(dialogMenuItem) * (numdevs + 1))); bcopy(menu, tmp, sizeof(DMenu)); for (i = 0; devs[i]; i++) { tmp->items[i].prompt = devs[i]->name; for (j = 0; j < numDevs; j++) { if (devs[i] == Devices[j]) { tmp->items[i].title = Devices[j]->description; break; } } if (j == numDevs) tmp->items[i].title = ""; tmp->items[i].fire = hook; tmp->items[i].checked = check; } tmp->items[i].title = NULL; return tmp; } Index: head/usr.sbin/sysinstall/dispatch.c =================================================================== --- head/usr.sbin/sysinstall/dispatch.c (revision 186201) +++ head/usr.sbin/sysinstall/dispatch.c (revision 186202) @@ -1,446 +1,445 @@ /* * 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 * Jordan Hubbard. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer, * verbatim and that no modifications are made prior to this * point in the file. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY JORDAN HUBBARD ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL JORDAN HUBBARD OR HIS PETS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, LIFE OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * */ #include "sysinstall.h" #include #include #include #include #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 }, { "distSetKernDeveloper", distSetKernDeveloper }, { "distSetUser", distSetUser }, { "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 }, }; /* * Helper routines for buffering data. * * We read an entire configuration into memory before executing it * so that we are truely standalone and can do things like nuke the * file or disk we're working on. */ typedef struct command_buffer_ { qelement queue; char * string; } command_buffer; static void dispatch_free_command(command_buffer *item) { REMQUE(item); free(item->string); free(item); } static void dispatch_free_all(qelement *head) { command_buffer *item; while (!EMPTYQUE(*head)) { item = (command_buffer *) head->q_forw; dispatch_free_command(item); } } static command_buffer * dispatch_add_command(qelement *head, char *string) { command_buffer *new; new = malloc(sizeof(command_buffer)); if (!new) return NULL; new->string = strdup(string); INSQUEUE(new, head->q_back); return new; } /* * Command processing */ /* Just convenience */ static int dispatch_shutdown(dialogMenuItem *unused) { systemShutdown(0); return DITEM_FAILURE; } static int dispatch_systemExecute(dialogMenuItem *unused) { char *cmd = variable_get(VAR_COMMAND); if (cmd) return systemExecute(cmd) ? DITEM_FAILURE : DITEM_SUCCESS; else msgDebug("_systemExecute: No command passed in `command' variable.\n"); return DITEM_FAILURE; } static int dispatch_msgConfirm(dialogMenuItem *unused) { char *msg = variable_get(VAR_COMMAND); if (msg) { msgConfirm("%s", msg); return DITEM_SUCCESS; } msgDebug("_msgConfirm: No message passed in `command' variable.\n"); return DITEM_FAILURE; } 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; rval = 0; for (i = 0; resWords[i].name; i++) { if (!strcmp(name, resWords[i].name)) { *status = resWords[i].handler(value); rval = 1; break; } } return rval; } /* For a given string, call it or spit out an undefined command diagnostic */ int dispatchCommand(char *str) { int i; char *cp; if (!str || !*str) { msgConfirm("Null or zero-length string passed to dispatchCommand"); return DITEM_FAILURE; } /* If it's got a newline, trim it */ if ((cp = index(str, '\n')) != NULL) *cp = '\0'; /* If it's got a `=' sign in there, assume it's a variable setting */ if (index(str, '=')) { if (isDebug()) msgDebug("dispatch: setting variable `%s'\n", str); variable_set(str, 0); i = DITEM_SUCCESS; } else { /* A command might be a pathname if it's encoded in argv[0], which we also support */ if ((cp = rindex(str, '/')) != NULL) str = cp + 1; if (isDebug()) msgDebug("dispatch: calling resword `%s'\n", str); if (!call_possible_resword(str, NULL, &i)) { msgNotify("Warning: No such command ``%s''", str); i = DITEM_FAILURE; } /* * Allow a user to prefix a command with "noError" to cause * us to ignore any errors for that one command. */ if (i != DITEM_SUCCESS && variable_get(VAR_NO_ERROR)) i = DITEM_SUCCESS; variable_unset(VAR_NO_ERROR); } return i; } /* * File processing */ static qelement * dispatch_load_fp(FILE *fp) { qelement *head; char buf[BUFSIZ], *cp; head = malloc(sizeof(qelement)); if (!head) return NULL; INITQUE(*head); while (fgets(buf, sizeof buf, fp)) { if ((cp = strchr(buf, '\n')) != NULL) *cp = '\0'; if (*buf == '\0' || *buf == '#') continue; if (!dispatch_add_command(head, buf)) return NULL; } return head; } static int dispatch_execute(qelement *head) { int result = DITEM_SUCCESS; command_buffer *item; char *old_interactive; if (!head) return result | DITEM_FAILURE; old_interactive = variable_get(VAR_NONINTERACTIVE); if (old_interactive) old_interactive = strdup(old_interactive); /* save copy */ /* Hint to others that we're running from a script, should they care */ variable_set2(VAR_NONINTERACTIVE, "yes", 0); while (!EMPTYQUE(*head)) { item = (command_buffer *) head->q_forw; if (DITEM_STATUS(dispatchCommand(item->string)) != DITEM_SUCCESS) { msgConfirm("Command `%s' failed - rest of script aborted.\n", item->string); result |= DITEM_FAILURE; break; } dispatch_free_command(item); } dispatch_free_all(head); if (!old_interactive) variable_unset(VAR_NONINTERACTIVE); else { variable_set2(VAR_NONINTERACTIVE, old_interactive, 0); free(old_interactive); } 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; } Index: head/usr.sbin/sysinstall/media.c =================================================================== --- head/usr.sbin/sysinstall/media.c (revision 186201) +++ head/usr.sbin/sysinstall/media.c (revision 186202) @@ -1,889 +1,834 @@ /* * The new sysinstall program. * * This is probably the last attempt in the `sysinstall' line, the next * generation being slated to essentially a complete rewrite. * * $FreeBSD$ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer, * verbatim and that no modifications are made prior to this * point in the file. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY JORDAN HUBBARD ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL JORDAN HUBBARD OR HIS PETS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, LIFE OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * */ #include "sysinstall.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include static Boolean got_intr = FALSE; static Boolean ftp_skip_resolve = FALSE; /* timeout handler */ static void handle_intr(int sig) { msgDebug("User generated interrupt.\n"); got_intr = TRUE; } static int check_for_interrupt(void) { if (got_intr) { got_intr = FALSE; return TRUE; } return FALSE; } static int genericHook(dialogMenuItem *self, DeviceType type) { Device **devs; devs = deviceFind(self->prompt, type); if (devs) mediaDevice = devs[0]; return (devs ? DITEM_LEAVE_MENU : DITEM_FAILURE); } static int cdromHook(dialogMenuItem *self) { return genericHook(self, DEVICE_TYPE_CDROM); } static void kickstart_dns(void) { static Boolean initted = FALSE; int time; char *cp; cp = variable_get(VAR_MEDIA_TIMEOUT); if (!cp) time = MEDIA_TIMEOUT; else time = atoi(cp); if (!time) time = 100; if (!initted) { res_init(); _res.retry = 2; /* 2 times seems a reasonable number to me */ _res.retrans = time / 2; /* so spend half our alloted time on each try */ initted = TRUE; } } char * cpioVerbosity() { char *cp = variable_get(VAR_CPIO_VERBOSITY); if (cp && !strcmp(cp, "high")) return "-v"; else if (cp && !strcmp(cp, "medium")) return "-V"; return ""; } int mediaOpen(void) { if (!mediaDevice || !mediaVerify() || !DEVICE_INIT(mediaDevice)) return DITEM_FAILURE; return DITEM_SUCCESS; } void mediaClose(void) { if (mediaDevice) DEVICE_SHUTDOWN(mediaDevice); mediaDevice = NULL; } /* * Return 1 if we successfully found and set the installation type to * be a CD. */ int mediaSetCDROM(dialogMenuItem *self) { Device **devs; int cnt; mediaClose(); devs = deviceFind(NULL, DEVICE_TYPE_CDROM); cnt = deviceCount(devs); if (!cnt) { if (self) /* Interactive? */ msgConfirm("No CD/DVD devices found! Please check that your system's\n" "configuration is correct and that the CD/DVD drive is of a supported\n" "type. For more information, consult the hardware guide\n" "in the Doc menu."); return DITEM_FAILURE | DITEM_CONTINUE; } else if (cnt > 1) { DMenu *menu; int status; menu = deviceCreateMenu(&MenuMediaCDROM, DEVICE_TYPE_CDROM, cdromHook, NULL); if (!menu) msgFatal("Unable to create CDROM menu! Something is seriously wrong."); status = dmenuOpenSimple(menu, FALSE); free(menu); if (!status) return DITEM_FAILURE; } else mediaDevice = devs[0]; return (mediaDevice ? DITEM_SUCCESS | DITEM_LEAVE_MENU : DITEM_FAILURE); } static int floppyHook(dialogMenuItem *self) { return genericHook(self, DEVICE_TYPE_FLOPPY); } /* * Return 1 if we successfully found and set the installation type to * be a floppy */ int mediaSetFloppy(dialogMenuItem *self) { Device **devs; int cnt; mediaClose(); devs = deviceFind(NULL, DEVICE_TYPE_FLOPPY); cnt = deviceCount(devs); if (!cnt) { msgConfirm("No floppy devices found! Please check that your system's configuration\n" "is correct. For more information, consult the hardware guide in the Doc\n" "menu."); return DITEM_FAILURE | DITEM_CONTINUE; } else if (cnt > 1) { DMenu *menu; int status; menu = deviceCreateMenu(&MenuMediaFloppy, DEVICE_TYPE_FLOPPY, floppyHook, NULL); if (!menu) msgFatal("Unable to create Floppy menu! Something is seriously wrong."); status = dmenuOpenSimple(menu, FALSE); free(menu); if (!status) return DITEM_FAILURE; } else mediaDevice = devs[0]; if (mediaDevice) mediaDevice->private = NULL; return (mediaDevice ? DITEM_LEAVE_MENU : DITEM_FAILURE); } static int DOSHook(dialogMenuItem *self) { return genericHook(self, DEVICE_TYPE_DOS); } /* * Return 1 if we successfully found and set the installation type to * be a DOS partition. */ int mediaSetDOS(dialogMenuItem *self) { Device **devs; int cnt; mediaClose(); devs = deviceFind(NULL, DEVICE_TYPE_DOS); cnt = deviceCount(devs); if (!cnt) { msgConfirm("No DOS primary partitions found! This installation method is unavailable"); return DITEM_FAILURE | DITEM_CONTINUE; } else if (cnt > 1) { DMenu *menu; int status; menu = deviceCreateMenu(&MenuMediaDOS, DEVICE_TYPE_DOS, DOSHook, NULL); if (!menu) msgFatal("Unable to create DOS menu! Something is seriously wrong."); status = dmenuOpenSimple(menu, FALSE); free(menu); if (!status) return DITEM_FAILURE; } else mediaDevice = devs[0]; return (mediaDevice ? DITEM_LEAVE_MENU : DITEM_FAILURE); } -static int -tapeHook(dialogMenuItem *self) -{ - return genericHook(self, DEVICE_TYPE_TAPE); -} - -/* - * Return 1 if we successfully found and set the installation type to - * be a tape drive. - */ -int -mediaSetTape(dialogMenuItem *self) -{ - Device **devs; - int cnt; - - mediaClose(); - devs = deviceFind(NULL, DEVICE_TYPE_TAPE); - cnt = deviceCount(devs); - if (!cnt) { - msgConfirm("No tape drive devices found! Please check that your system's configuration\n" - "is correct. For more information, consult the hardware guide in the Doc\n" - "menu."); - return DITEM_FAILURE | DITEM_CONTINUE; - } - else if (cnt > 1) { - DMenu *menu; - int status; - - menu = deviceCreateMenu(&MenuMediaTape, DEVICE_TYPE_TAPE, tapeHook, NULL); - if (!menu) - msgFatal("Unable to create tape drive menu! Something is seriously wrong."); - status = dmenuOpenSimple(menu, FALSE); - free(menu); - if (!status) - return DITEM_FAILURE; - } - else - mediaDevice = devs[0]; - if (mediaDevice) { - char *val; - - val = msgGetInput("/var/tmp", "Please enter the name of a temporary directory containing\n" - "sufficient space for holding the contents of this tape (or\n" - "tapes). The contents of this directory will be removed\n" - "after installation, so be sure to specify a directory that\n" - "can be erased afterwards!\n"); - if (!val) - mediaDevice = NULL; - else - mediaDevice->private = strdup(val); - } - return (mediaDevice ? DITEM_LEAVE_MENU : DITEM_FAILURE); -} - /* * Return 0 if we successfully found and set the installation type to * be an ftp server */ int mediaSetFTP(dialogMenuItem *self) { static Device ftpDevice; char *cp, hbuf[MAXHOSTNAMELEN], *hostname, *dir; struct addrinfo hints, *res; int af; size_t urllen; extern int FtpPort; static Device *networkDev = NULL; mediaClose(); cp = variable_get(VAR_FTP_PATH); /* If we've been through here before ... */ if (networkDev && cp && msgYesNo("Re-use old FTP site selection values?")) cp = NULL; if (!cp) { if (!dmenuOpenSimple(&MenuMediaFTP, FALSE)) return DITEM_FAILURE; else cp = variable_get(VAR_FTP_PATH); } if (!cp) return DITEM_FAILURE; else if (!strcmp(cp, "other")) { variable_set2(VAR_FTP_PATH, "ftp://", 0); cp = variable_get_value(VAR_FTP_PATH, "Please specify the URL of a FreeBSD distribution on a\n" "remote ftp site. This site must accept either anonymous\n" "ftp or you should have set an ftp username and password\n" "in the Options screen.\n\n" "A URL looks like this: ftp:///\n" "Where is relative to the anonymous ftp directory or the\n" "home directory of the user being logged in as.", 0); if (!cp || !*cp || !strcmp(cp, "ftp://")) { variable_unset(VAR_FTP_PATH); return DITEM_FAILURE; } urllen = strlen(cp); if (urllen >= sizeof(ftpDevice.name)) { msgConfirm("Length of specified URL is %d characters. Allowable maximum is %d.", urllen,sizeof(ftpDevice.name)-1); variable_unset(VAR_FTP_PATH); return DITEM_FAILURE; } } if (strncmp("ftp://", cp, 6)) { msgConfirm("Sorry, %s is an invalid URL!", cp); variable_unset(VAR_FTP_PATH); return DITEM_FAILURE; } SAFE_STRCPY(ftpDevice.name, cp); SAFE_STRCPY(hbuf, cp + 6); hostname = hbuf; if (!networkDev || msgYesNo("You've already done the network configuration once,\n" "would you like to skip over it now?") != 0) { if (networkDev) DEVICE_SHUTDOWN(networkDev); if (!(networkDev = tcpDeviceSelect())) { variable_unset(VAR_FTP_PATH); return DITEM_FAILURE; } } if (!DEVICE_INIT(networkDev)) { if (isDebug()) msgDebug("mediaSetFTP: Net device init failed.\n"); variable_unset(VAR_FTP_PATH); return DITEM_FAILURE; } if (*hostname == '[' && (cp = index(hostname + 1, ']')) != NULL && (*++cp == '\0' || *cp == '/' || *cp == ':')) { ++hostname; *(cp - 1) = '\0'; } else cp = index(hostname, ':'); if (cp != NULL && *cp == ':') { *(cp++) = '\0'; FtpPort = strtol(cp, 0, 0); } else FtpPort = 21; if ((dir = index(cp ? cp : hostname, '/')) != NULL) *(dir++) = '\0'; if (isDebug()) { msgDebug("hostname = `%s'\n", hostname); msgDebug("dir = `%s'\n", dir ? dir : "/"); msgDebug("port # = `%d'\n", FtpPort); } if (!ftp_skip_resolve && variable_get(VAR_NAMESERVER)) { msgNotify("Looking up host %s.", hostname); if (isDebug()) msgDebug("Starting DNS.\n"); kickstart_dns(); if (isDebug()) msgDebug("Looking up hostname, %s, using getaddrinfo(AI_NUMERICHOST).\n", hostname); af = variable_cmp(VAR_IPV6_ENABLE, "YES") ? AF_INET : AF_UNSPEC; memset(&hints, 0, sizeof(hints)); hints.ai_family = af; hints.ai_socktype = SOCK_STREAM; hints.ai_flags = AI_PASSIVE | AI_NUMERICHOST; if (getaddrinfo(hostname, NULL, &hints, &res) != 0) { if (isDebug()) msgDebug("Looking up hostname, %s, using getaddrinfo().\n", hostname); hints.ai_flags = AI_PASSIVE; if (getaddrinfo(hostname, NULL, &hints, &res) != 0) { msgConfirm("Cannot resolve hostname `%s'! Are you sure that" " your\nname server, gateway and network interface are" " correctly configured?", hostname); if (networkDev) DEVICE_SHUTDOWN(networkDev); networkDev = NULL; variable_unset(VAR_FTP_PATH); return DITEM_FAILURE; } } freeaddrinfo(res); if (isDebug()) msgDebug("Found DNS entry for %s successfully..\n", hostname); } variable_set2(VAR_FTP_HOST, hostname, 0); variable_set2(VAR_FTP_DIR, dir ? dir : "/", 0); variable_set2(VAR_FTP_PORT, itoa(FtpPort), 0); ftpDevice.type = DEVICE_TYPE_FTP; ftpDevice.init = mediaInitFTP; ftpDevice.get = mediaGetFTP; ftpDevice.shutdown = mediaShutdownFTP; ftpDevice.private = networkDev; mediaDevice = &ftpDevice; return DITEM_SUCCESS | DITEM_LEAVE_MENU | DITEM_RESTORE; } int mediaSetFTPActive(dialogMenuItem *self) { variable_set2(VAR_FTP_STATE, "active", 0); return mediaSetFTP(self); } int mediaSetFTPPassive(dialogMenuItem *self) { variable_set2(VAR_FTP_STATE, "passive", 0); return mediaSetFTP(self); } int mediaSetHTTP(dialogMenuItem *self) { Boolean tmp; int result; char *cp, *idx, hbuf[MAXHOSTNAMELEN], *hostname; int HttpPort; int what = DITEM_RESTORE; tmp = ftp_skip_resolve; ftp_skip_resolve = TRUE; result = mediaSetFTP(self); ftp_skip_resolve = tmp; if (DITEM_STATUS(result) != DITEM_SUCCESS) return result; cp = variable_get_value(VAR_HTTP_PROXY, "Please enter the address of the HTTP proxy in this format:\n" " hostname:port (the ':port' is optional, default is 3128)",0); if (!cp) return DITEM_FAILURE; SAFE_STRCPY(hbuf, cp); hostname = hbuf; if (*hostname == '[' && (idx = index(hostname + 1, ']')) != NULL && (*++idx == '\0' || *idx == ':')) { ++hostname; *(idx - 1) = '\0'; } else idx = index(hostname, ':'); if (idx == NULL || *idx != ':') HttpPort = 3128; /* try this as default */ else { *(idx++) = '\0'; HttpPort = strtol(idx, 0, 0); } variable_set2(VAR_HTTP_HOST, hostname, 0); variable_set2(VAR_HTTP_PORT, itoa(HttpPort), 0); if (isDebug()) { msgDebug("VAR_FTP_PATH : %s\n",variable_get(VAR_FTP_PATH)); msgDebug("VAR_HTTP_HOST, _PORT: %s:%s\n",variable_get(VAR_HTTP_HOST), variable_get(VAR_HTTP_PORT)); } /* mediaDevice has been set by mediaSetFTP(), overwrite partly: */ mediaDevice->type = DEVICE_TYPE_HTTP; mediaDevice->init = mediaInitHTTP; mediaDevice->get = mediaGetHTTP; mediaDevice->shutdown = dummyShutdown; return DITEM_SUCCESS | DITEM_LEAVE_MENU | what; } int mediaSetUFS(dialogMenuItem *self) { static Device ufsDevice; struct statfs st; char *cp; mediaClose(); cp = variable_get_value(VAR_UFS_PATH, "Enter a fully qualified pathname for the directory\n" "containing the FreeBSD distribution files:", 0); if (!cp) return DITEM_FAILURE; /* If they gave us a CDROM or something, try and pick a better name */ if (statfs(cp, &st)) strcpy(ufsDevice.name, "ufs"); else strcpy(ufsDevice.name, st.f_fstypename); ufsDevice.type = DEVICE_TYPE_UFS; ufsDevice.init = dummyInit; ufsDevice.get = mediaGetUFS; ufsDevice.shutdown = dummyShutdown; ufsDevice.private = strdup(cp); mediaDevice = &ufsDevice; return DITEM_LEAVE_MENU; } int mediaSetNFS(dialogMenuItem *self) { static Device nfsDevice; static Device *networkDev = NULL; char *cp, *idx; char hostname[MAXPATHLEN]; size_t pathlen; mediaClose(); cp = variable_get_value(VAR_NFS_PATH, "Please enter the full NFS file specification for the remote\n" "host and directory containing the FreeBSD distribution files.\n" "This should be in the format: hostname:/some/freebsd/dir", 0); if (!cp) return DITEM_FAILURE; SAFE_STRCPY(hostname, cp); if (!(idx = index(hostname, ':'))) { msgConfirm("Invalid NFS path specification. Must be of the form:\n" "host:/full/pathname/to/FreeBSD/distdir"); return DITEM_FAILURE; } pathlen = strlen(hostname); if (pathlen >= sizeof(nfsDevice.name)) { msgConfirm("Length of specified NFS path is %d characters. Allowable maximum is %d.", pathlen,sizeof(nfsDevice.name)-1); variable_unset(VAR_NFS_PATH); return DITEM_FAILURE; } SAFE_STRCPY(nfsDevice.name, hostname); *idx = '\0'; if (!networkDev || msgYesNo("You've already done the network configuration once,\n" "would you like to skip over it now?") != 0) { if (networkDev) DEVICE_SHUTDOWN(networkDev); if (!(networkDev = tcpDeviceSelect())) return DITEM_FAILURE; } if (!DEVICE_INIT(networkDev)) { if (isDebug()) msgDebug("mediaSetNFS: Net device init failed\n"); } if (variable_get(VAR_NAMESERVER)) { kickstart_dns(); if ((inet_addr(hostname) == INADDR_NONE) && (gethostbyname(hostname) == NULL)) { msgConfirm("Cannot resolve hostname `%s'! Are you sure that your\n" "name server, gateway and network interface are correctly configured?", hostname); if (networkDev) DEVICE_SHUTDOWN(networkDev); networkDev = NULL; variable_unset(VAR_NFS_PATH); return DITEM_FAILURE; } else { if (isDebug()) msgDebug("Found DNS entry for %s successfully..\n", hostname); } } variable_set2(VAR_NFS_HOST, hostname, 0); nfsDevice.type = DEVICE_TYPE_NFS; nfsDevice.init = mediaInitNFS; nfsDevice.get = mediaGetNFS; nfsDevice.shutdown = mediaShutdownNFS; nfsDevice.private = networkDev; mediaDevice = &nfsDevice; return DITEM_LEAVE_MENU; } Boolean mediaExtractDistBegin(char *dir, int *fd, int *zpid, int *cpid) { int i, pfd[2],qfd[2]; if (!dir) dir = "/"; Mkdir(dir); chdir(dir); pipe(pfd); pipe(qfd); *zpid = fork(); if (!*zpid) { char *unzipper = RunningAsInit ? "/stand/" UNZIPPER : "/usr/bin/" UNZIPPER; dup2(qfd[0], 0); close(qfd[0]); dup2(pfd[1], 1); close(pfd[1]); if (DebugFD != -1) dup2(DebugFD, 2); else { close(2); open("/dev/null", O_WRONLY); } close(qfd[1]); close(pfd[0]); i = execl(unzipper, unzipper, (char *)0); if (isDebug()) msgDebug("%s command returns %d status\n", unzipper, i); exit(i); } *fd = qfd[1]; close(qfd[0]); *cpid = fork(); if (!*cpid) { char *cpio = RunningAsInit ? "/stand/cpio" : "/usr/bin/cpio"; dup2(pfd[0], 0); close(pfd[0]); close(pfd[1]); close(qfd[1]); if (DebugFD != -1) { dup2(DebugFD, 1); dup2(DebugFD, 2); } else { close(1); open("/dev/null", O_WRONLY); dup2(1, 2); } if (strlen(cpioVerbosity())) i = execl(cpio, cpio, "-idum", cpioVerbosity(), (char *)0); else i = execl(cpio, cpio, "-idum", (char *)0); if (isDebug()) msgDebug("%s command returns %d status\n", cpio, i); exit(i); } close(pfd[0]); close(pfd[1]); return TRUE; } Boolean mediaExtractDistEnd(int zpid, int cpid) { int i,j; i = waitpid(zpid, &j, 0); /* Don't check exit status - gunzip seems to return a bogus one! */ if (i < 0) { if (isDebug()) msgDebug("wait for %s returned status of %d!\n", UNZIPPER, i); return FALSE; } i = waitpid(cpid, &j, 0); if (i < 0 || WEXITSTATUS(j)) { if (isDebug()) msgDebug("cpio returned error status of %d!\n", WEXITSTATUS(j)); return FALSE; } return TRUE; } Boolean mediaExtractDist(char *dir, char *dist, FILE *fp) { int i, j, total, seconds, zpid, cpid, pfd[2], qfd[2]; char buf[BUFSIZ]; struct timeval start, stop; struct sigaction new, old; if (!dir) dir = "/"; Mkdir(dir); chdir(dir); pipe(pfd); /* read end */ pipe(qfd); /* write end */ zpid = fork(); if (!zpid) { char *unzipper = RunningAsInit ? "/stand/" UNZIPPER : "/usr/bin/" UNZIPPER; fclose(fp); close(qfd[1]); dup2(qfd[0], 0); close(qfd[0]); close(pfd[0]); dup2(pfd[1], 1); close(pfd[1]); if (DebugFD != -1) dup2(DebugFD, 2); else { close(2); open("/dev/null", O_WRONLY); } i = execl(unzipper, unzipper, (char *)0); if (isDebug()) msgDebug("%s command returns %d status\n", unzipper, i); exit(i); } cpid = fork(); if (!cpid) { char *cpio = RunningAsInit ? "/stand/cpio" : "/usr/bin/cpio"; close(pfd[1]); dup2(pfd[0], 0); close(pfd[0]); close (qfd[0]); close(qfd[1]); fclose(fp); if (DebugFD != -1) { dup2(DebugFD, 1); dup2(DebugFD, 2); } else { dup2(open("/dev/null", O_WRONLY), 1); dup2(1, 2); } if (strlen(cpioVerbosity())) i = execl(cpio, cpio, "-idum", cpioVerbosity(), (char *)0); else i = execl(cpio, cpio, "-idum", "--block-size", (char *)0); if (isDebug()) msgDebug("%s command returns %d status\n", cpio, i); exit(i); } close(pfd[0]); close(pfd[1]); close(qfd[0]); total = 0; (void)gettimeofday(&start, (struct timezone *)0); /* Make ^C abort the current transfer rather than the whole show */ new.sa_handler = handle_intr; new.sa_flags = 0; (void)sigemptyset(&new.sa_mask); sigaction(SIGINT, &new, &old); while ((i = fread(buf, 1, BUFSIZ, fp)) > 0) { if (check_for_interrupt()) { msgConfirm("Failure to read from media: User interrupt."); break; } if (write(qfd[1], buf, i) != i) { msgConfirm("Write error on transfer to cpio process, try of %d bytes.", i); break; } else { (void)gettimeofday(&stop, (struct timezone *)0); stop.tv_sec = stop.tv_sec - start.tv_sec; stop.tv_usec = stop.tv_usec - start.tv_usec; if (stop.tv_usec < 0) stop.tv_sec--, stop.tv_usec += 1000000; seconds = stop.tv_sec + (stop.tv_usec / 1000000.0); if (!seconds) seconds = 1; total += i; msgInfo("%10d bytes read from %s dist @ %.1f KB/sec.", total, dist, (total / seconds) / 1024.0); } } sigaction(SIGINT, &old, NULL); /* restore sigint */ close(qfd[1]); i = waitpid(zpid, &j, 0); /* Don't check exit status - gunzip seems to return a bogus one! */ if (i < 0) { if (isDebug()) msgDebug("wait for %s returned status of %d!\n", UNZIPPER, i); return FALSE; } i = waitpid(cpid, &j, 0); if (i < 0 || WEXITSTATUS(j)) { if (isDebug()) msgDebug("cpio returned error status of %d!\n", WEXITSTATUS(j)); return FALSE; } return TRUE; } int mediaGetType(dialogMenuItem *self) { return ((dmenuOpenSimple(&MenuMedia, FALSE) && mediaDevice) ? DITEM_SUCCESS : DITEM_FAILURE); } /* Return TRUE if all the media variables are set up correctly */ Boolean mediaVerify(void) { if (!mediaDevice) return (DITEM_STATUS(mediaGetType(NULL)) == DITEM_SUCCESS); return TRUE; } /* Set the FTP username and password fields */ int mediaSetFTPUserPass(dialogMenuItem *self) { char *pass; if (variable_get_value(VAR_FTP_USER, "Please enter the username you wish to login as:", 0)) { DialogInputAttrs |= DITEM_NO_ECHO; pass = variable_get_value(VAR_FTP_PASS, "Please enter the password for this user:", 0); DialogInputAttrs &= ~DITEM_NO_ECHO; } else pass = NULL; return (pass ? DITEM_SUCCESS : DITEM_FAILURE); } /* Set CPIO verbosity level */ int mediaSetCPIOVerbosity(dialogMenuItem *self) { char *cp = variable_get(VAR_CPIO_VERBOSITY); if (!cp) { msgConfirm("CPIO Verbosity is not set to anything!"); return DITEM_FAILURE; } else { if (!strcmp(cp, "low")) variable_set2(VAR_CPIO_VERBOSITY, "medium", 0); else if (!strcmp(cp, "medium")) variable_set2(VAR_CPIO_VERBOSITY, "high", 0); else /* must be "high" - wrap around */ variable_set2(VAR_CPIO_VERBOSITY, "low", 0); } return DITEM_SUCCESS; } /* A generic open which follows a well-known "path" of places to look */ FILE * mediaGenericGet(char *base, const char *file) { char buf[PATH_MAX]; snprintf(buf, PATH_MAX, "%s/%s", base, file); if (file_readable(buf)) return fopen(buf, "r"); snprintf(buf, PATH_MAX, "%s/FreeBSD/%s", base, file); if (file_readable(buf)) return fopen(buf, "r"); snprintf(buf, PATH_MAX, "%s/releases/%s", base, file); if (file_readable(buf)) return fopen(buf, "r"); snprintf(buf, PATH_MAX, "%s/%s/%s", base, variable_get(VAR_RELNAME), file); if (file_readable(buf)) return fopen(buf, "r"); snprintf(buf, PATH_MAX, "%s/releases/%s/%s", base, variable_get(VAR_RELNAME), file); return fopen(buf, "r"); } Index: head/usr.sbin/sysinstall/menus.c =================================================================== --- head/usr.sbin/sysinstall/menus.c (revision 186201) +++ head/usr.sbin/sysinstall/menus.c (revision 186202) @@ -1,2098 +1,2082 @@ /* * 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. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer, * verbatim and that no modifications are made prior to this * point in the file. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY JORDAN HUBBARD ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL JORDAN HUBBARD OR HIS PETS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, LIFE OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * */ #ifndef lint static const char rcsid[] = "$FreeBSD$"; #endif #include "sysinstall.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; } #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 checkDistKernDeveloper(dialogMenuItem *self) { return IS_DEVELOPER(Dists, 0) && _IS_SET(SrcDists, DIST_SRC_SYS); } static int checkDistUser(dialogMenuItem *self) { return IS_USER(Dists, 0); } 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(KernelDists, DIST_KERNEL_ALL); } static int srcFlagCheck(dialogMenuItem *item) { return SrcDists; } static int kernelFlagCheck(dialogMenuItem *item) { return KernelDists; } static int checkTrue(dialogMenuItem *item) { return TRUE; } /* All the system menus go here. * * Hardcoded things like version number strings will disappear from * these menus just as soon as I add the code for doing inline variable * 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, Kern Developer", "Select kernel developer's distribution.", checkDistKernDeveloper, distSetKernDeveloper }, { " Dists, User", "Select average user distribution.", checkDistUser, distSetUser }, { " Distributions, Adding", "Installing additional distribution sets", NULL, distExtractAll }, { " 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, 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 }, { 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.", NULL, NULL, { { " 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 Copyright", "The FreeBSD Copyright notices.", NULL, dmenuDisplayFile, NULL, "COPYRIGHT" }, { "5 Release" ,"The release notes for this version of FreeBSD.", NULL, dmenuDisplayFile, NULL, "RELNOTES" }, { "6 Shortcuts", "Creating shortcuts to sysinstall.", NULL, dmenuDisplayFile, NULL, "shortcuts" }, { "7 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.", NULL, NULL, { { 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.", NULL, NULL, { { 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!", NULL, { { "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 Main Site", "ftp.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH "=ftp://ftp.freebsd.org" }, { " IPv6 Ireland", "ftp3.ie.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH "=ftp://ftp3.ie.freebsd.org" }, { " IPv6 Israel", "ftp.il.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH "=ftp://ftp.il.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" }, { " IPv6 Turkey", "ftp2.tr.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH "=ftp://ftp2.tr.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" }, { "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" }, { "Isreal", "ftp.il.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH "=ftp://ftp.il.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" }, { " Turkey #2", "ftp2.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.", - NULL, - NULL, - { { 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 and binaries", 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 Kern-Developer", "Full binaries and doc, kernel sources only", checkDistKernDeveloper, distSetKernDeveloper }, { "6 User", "Average user - binaries and doc only", checkDistUser, distSetUser }, { "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 and binaries", 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}, { 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 }, { " cddl", "/usr/src/cddl (software from Sun)", dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_CDDL }, { " 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 MenuDiskDevices = { DMENU_CHECKLIST_TYPE | DMENU_SELECTION_RETURNS, "Select Drive(s)", "Please select the drive, or drives, on which you wish to perform\n" "this operation. If you are attempting to install a boot partition\n" "on a drive other than the first one or have multiple operating\n" "systems on your machine, you will have the option to install a boot\n" "manager later. To select a drive, use the arrow keys to move to it\n" "and press [SPACE] or [ENTER]. To de-select it, press it again.\n\n" "Use [TAB] to get to the buttons and leave this menu.", "Press F1 for important information regarding disk geometry!", "drives", { { NULL } }, }; DMenu MenuHTMLDoc = { 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.", NULL, NULL, { { "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 { NULL } }, }; #if defined(__i386__) || defined(__amd64__) #ifdef PC98 /* IPL type menu */ DMenu MenuIPLType = { DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS, "overwrite me", /* will be disk specific label */ "If you want a FreeBSD Boot Manager, select \"BootMgr\". If you would\n" "prefer your Boot Manager to remain untouched then select \"None\".\n\n", "Press F1 to read about drive setup", "drives", { { "BootMgr", "Install the FreeBSD Boot Manager", dmenuRadioCheck, dmenuSetValue, NULL, &BootMgr }, { "None", "Leave the IPL untouched", dmenuRadioCheck, dmenuSetValue, NULL, &BootMgr, '(', '*', ')', 1 }, { NULL } }, }; #else /* MBR type menu */ DMenu MenuMBRType = { DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS, "overwrite me", /* will be disk specific label */ "FreeBSD comes with a boot selector that allows you to easily\n" "select between FreeBSD and any other operating systems on your machine\n" "at boot time. If you have more than one drive and want to boot\n" "from the second one, the boot selector will also make it possible\n" "to do so (limitations in the PC BIOS usually prevent this otherwise).\n" "If you do not want a boot selector, or wish to replace an existing\n" "one, select \"standard\". If you would prefer your Master Boot\n" "Record to remain untouched then select \"None\".\n\n" " NOTE: PC-DOS users will almost certainly require \"None\"!", "Press F1 to read about drive setup", "drives", { { "BootMgr", "Install the FreeBSD Boot Manager", dmenuRadioCheck, dmenuSetValue, NULL, &BootMgr }, { "Standard", "Install a standard MBR (no boot manager)", dmenuRadioCheck, dmenuSetValue, NULL, &BootMgr, '(', '*', ')', 1 }, { "None", "Leave the Master Boot Record untouched", dmenuRadioCheck, dmenuSetValue, NULL, &BootMgr, '(', '*', ')', 2 }, { NULL } }, }; #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 __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 { " 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", "a.ntp.br", dmenuVarsCheck, dmenuSetVariables, NULL, "ntpdate_enable=YES,ntpdate_flags=a.ntp.br" }, { "Brazil #2", "b.ntp.br", dmenuVarsCheck, dmenuSetVariables, NULL, "ntpdate_enable=YES,ntpdate_flags=b.ntp.br" }, { "Brazil #3", "c.ntp.br", dmenuVarsCheck, dmenuSetVariables, NULL, "ntpdate_enable=YES,ntpdate_flags=c.ntp.br" }, { "Brazil #4", "ntp.cais.rnp.br", dmenuVarsCheck, dmenuSetVariables, NULL, "ntpdate_enable=YES,ntpdate_flags=ntp.cais.rnp.br" }, { "Brazil #5", "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 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 firewalling 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 } }, }; Index: head/usr.sbin/sysinstall/options.c =================================================================== --- head/usr.sbin/sysinstall/options.c (revision 186201) +++ head/usr.sbin/sysinstall/options.c (revision 186202) @@ -1,338 +1,335 @@ /* * 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. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer, * verbatim and that no modifications are made prior to this * point in the file. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY JORDAN HUBBARD ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL JORDAN HUBBARD OR HIS PETS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, LIFE OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * */ #include "sysinstall.h" #include #include #include int fixitTtyWhich(dialogMenuItem *); static char * varCheck(Option *opt) { char *cp = NULL; if (opt->aux) cp = variable_get((char *)opt->aux); if (!cp) return "NO"; return cp; } /* Show our little logo */ static char * resetLogo(Option *opt) { return "[RESET!]"; } static char * mediaCheck(Option *opt) { if (mediaDevice) { switch(mediaDevice->type) { case DEVICE_TYPE_UFS: case DEVICE_TYPE_DISK: return "File system"; case DEVICE_TYPE_FLOPPY: return "Floppy"; case DEVICE_TYPE_FTP: return "FTP"; case DEVICE_TYPE_CDROM: return "CDROM"; - case DEVICE_TYPE_TAPE: - return "Tape"; - case DEVICE_TYPE_DOS: return "DOS"; case DEVICE_TYPE_NFS: return "NFS"; case DEVICE_TYPE_NONE: case DEVICE_TYPE_NETWORK: case DEVICE_TYPE_ANY: default: return ""; } } return ""; } #define NEWFS_PROMPT "Please enter newfs(8) parameters:" #define RELNAME_PROMPT "Please specify the release you wish to load or\n\"any\" for a generic release install:" #define BPKG_PROMPT "Please specify the name of the HTML browser package:" #define BBIN_PROMPT "Please specify a full pathname to the HTML browser binary:" #define EDITOR_PROMPT "Please specify the name of the text editor you wish to use:" #define PKG_PROMPT "Please specify a temporary directory with lots of free space:" #define INSTROOT_PROMPT "Please specify a root directory if installing somewhere other than /" #define TIMEOUT_PROMPT "Please specify the number of seconds to wait for slow media:" static Option Options[] = { { "NFS Secure", "NFS server talks only on a secure port", OPT_IS_VAR, NULL, VAR_NFS_SECURE, varCheck }, { "NFS Slow", "User is using a slow PC or ethernet card", OPT_IS_VAR, NULL, VAR_SLOW_ETHER, varCheck }, { "NFS TCP", "Use TCP protocol for NFS", OPT_IS_VAR, NULL, VAR_NFS_TCP, varCheck }, { "NFS version 3", "Use NFS version 3", OPT_IS_VAR, NULL, VAR_NFS_V3, varCheck }, { "Debugging", "Emit extra debugging output on VTY2 (ALT-F2)", OPT_IS_VAR, NULL, VAR_DEBUG, varCheck }, { "No Warnings", "Don't Warn the user when a setting seems incorrect", OPT_IS_VAR, NULL, VAR_NO_WARN, varCheck }, { "Yes to All", "Assume \"Yes\" answers to all non-critical dialogs", OPT_IS_VAR, NULL, VAR_NO_CONFIRM, varCheck }, { "DHCP", "Attempt automatic DHCP configuration of interfaces", OPT_IS_VAR, NULL, VAR_TRY_DHCP, varCheck }, { "IPv6", "Attempt IPv6 configuration of interfaces", OPT_IS_VAR, NULL, VAR_TRY_RTSOL, varCheck }, { "Skip PCCARD", "Skip PC Card probing, do not use PC Card devices for installation", OPT_IS_VAR, NULL, VAR_SKIP_PCCARD, varCheck }, { "FTP username", "Username and password to use instead of anonymous", OPT_IS_FUNC, mediaSetFTPUserPass, VAR_FTP_USER, varCheck }, { "Editor", "Which text editor to use during installation", OPT_IS_VAR, EDITOR_PROMPT, VAR_EDITOR, varCheck }, { "Extract Detail", "How verbosely to display file name information during extractions", OPT_IS_FUNC, mediaSetCPIOVerbosity, VAR_CPIO_VERBOSITY, varCheck }, { "Release Name", "Which release to attempt to load from installation media", OPT_IS_VAR, RELNAME_PROMPT, VAR_RELNAME, varCheck }, { "Install Root", "Which directory to unpack distributions or packages relative to", OPT_IS_VAR, INSTROOT_PROMPT, VAR_INSTALL_ROOT, varCheck }, { "Browser package", "This is the browser package that will be used for viewing HTML docs", OPT_IS_VAR, BPKG_PROMPT, VAR_BROWSER_PACKAGE, varCheck }, { "Browser Exec", "This is the path to the main binary of the browser package", OPT_IS_VAR, BBIN_PROMPT, VAR_BROWSER_BINARY, varCheck }, { "Media Type", "The current installation media type.", OPT_IS_FUNC, mediaGetType, VAR_MEDIA_TYPE, mediaCheck }, { "Media Timeout", "Timeout value in seconds for slow media.", OPT_IS_VAR, TIMEOUT_PROMPT, VAR_MEDIA_TIMEOUT, varCheck }, { "Package Temp", "The directory where package temporary files should go", OPT_IS_VAR, PKG_PROMPT, VAR_PKG_TMPDIR, varCheck }, { "Newfs Args", "Default parameters for newfs(8)", OPT_IS_VAR, NEWFS_PROMPT, VAR_NEWFS_ARGS, varCheck }, { "Fixit Console", "Which tty to use for the Fixit action.", OPT_IS_FUNC, fixitTtyWhich, VAR_FIXIT_TTY, varCheck }, { "Re-scan Devices", "Re-run sysinstall's initial device probe", OPT_IS_FUNC, deviceRescan, NULL, NULL }, { "Use Defaults", "Reset all values to startup defaults", OPT_IS_FUNC, installVarDefaults, NULL, resetLogo }, { NULL, NULL, 0, NULL, NULL, NULL }, }; #define OPT_START_ROW 4 #define OPT_END_ROW 19 #define OPT_NAME_COL 0 #define OPT_VALUE_COL 16 #define GROUP_OFFSET 40 static char * value_of(Option opt) { static char ival[40]; switch (opt.type) { case OPT_IS_STRING: return (char *)opt.data; case OPT_IS_INT: sprintf(ival, "%lu", (long)opt.data); return ival; case OPT_IS_FUNC: case OPT_IS_VAR: if (opt.check) return opt.check(&opt); else return "<*>"; } return ""; } static int fire(Option opt) { int status = 0; if (opt.type == OPT_IS_FUNC) { int (*cp)(char *) = opt.data, rcode; rcode = cp(NULL); status = 1; } else if (opt.type == OPT_IS_VAR) { if (opt.data) { (void)variable_get_value(opt.aux, opt.data, -1); status = 1; } else if (variable_get(opt.aux)) { if (!variable_cmp(opt.aux, "YES")) variable_set2(opt.aux, "NO", -1); else variable_set2(opt.aux, "YES", -1); } else variable_set2(opt.aux, "YES", 0); } if (opt.check) opt.check(&opt); refresh(); return status; } int optionsEditor(dialogMenuItem *self) { int i, optcol, optrow, key; static int currOpt = 0; WINDOW *w = savescr(); dialog_clear(); clear(); while (1) { /* Whap up the header */ attrset(A_REVERSE); mvaddstr(0, 0, "Options Editor"); attrset(A_NORMAL); for (i = 0; i < 2; i++) { mvaddstr(OPT_START_ROW - 2, OPT_NAME_COL + (i * GROUP_OFFSET), "Name"); mvaddstr(OPT_START_ROW - 1, OPT_NAME_COL + (i * GROUP_OFFSET), "----"); mvaddstr(OPT_START_ROW - 2, OPT_VALUE_COL + (i * GROUP_OFFSET), "Value"); mvaddstr(OPT_START_ROW - 1, OPT_VALUE_COL + (i * GROUP_OFFSET), "-----"); } /* And the footer */ mvprintw(OPT_END_ROW + 1, 0, "Use SPACE to select/toggle an option, arrow keys to move,"); mvprintw(OPT_END_ROW + 2, 0, "? or F1 for more help. When you're done, type Q to Quit."); optrow = OPT_START_ROW; optcol = OPT_NAME_COL; for (i = 0; Options[i].name; i++) { /* Names are painted somewhat gratuitously each time, but it's easier this way */ mvprintw(optrow, OPT_NAME_COL + optcol, Options[i].name); if (currOpt == i) attrset(ATTR_SELECTED); mvprintw(optrow++, OPT_VALUE_COL + optcol, value_of(Options[i])); if (currOpt == i) attrset(A_NORMAL); if (optrow == OPT_END_ROW) { optrow = OPT_START_ROW; optcol += GROUP_OFFSET; } clrtoeol(); } attrset(ATTR_TITLE); mvaddstr(OPT_END_ROW + 4, 0, Options[currOpt].desc); attrset(A_NORMAL); clrtoeol(); move(0, 14); refresh(); /* Start the edit loop */ key = toupper(getch()); switch (key) { case KEY_F(1): case '?': systemDisplayHelp("options"); clear(); break; case '\020': /* ^P */ case KEY_UP: if (currOpt) --currOpt; else for (currOpt = 0; Options[currOpt + 1].name; currOpt++); continue; case '\016': /* ^N */ case KEY_DOWN: if (Options[currOpt + 1].name) ++currOpt; else currOpt = 0; continue; case KEY_HOME: currOpt = 0; continue; case KEY_END: while (Options[currOpt + 1].name) ++currOpt; continue; case ' ': if (fire(Options[currOpt])) clear(); continue; case '\033': /* ESC */ case 'Q': clear(); dialog_clear(); restorescr(w); return DITEM_SUCCESS | DITEM_CONTINUE; default: beep(); } } /* NOTREACHED */ return DITEM_SUCCESS; } int fixitTtyWhich(dialogMenuItem *self) { char *cp = variable_get(VAR_FIXIT_TTY); if (!cp) { msgConfirm("The Fix-it TTY setting is not set to anything!"); return DITEM_FAILURE; } else { if (!strcmp(cp, "standard")) variable_set2(VAR_FIXIT_TTY, "serial", 0); else /* must be "serial" - wrap around */ variable_set2(VAR_FIXIT_TTY, "standard", 0); } return DITEM_SUCCESS; } Index: head/usr.sbin/sysinstall/sysinstall.8 =================================================================== --- head/usr.sbin/sysinstall/sysinstall.8 (revision 186201) +++ head/usr.sbin/sysinstall/sysinstall.8 (revision 186202) @@ -1,895 +1,890 @@ .\" Copyright (c) 1997 .\" Jordan Hubbard . All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" .\" THIS SOFTWARE IS PROVIDED BY Jordan Hubbard AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL Jordan Hubbard OR CONTRIBUTORS BE LIABLE .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" .\" $FreeBSD$ .\" .Dd February 18, 2007 .Dt SYSINSTALL 8 .Os .Sh NAME .Nm sysinstall .Nd system installation and configuration tool .Sh SYNOPSIS .Nm .Op Ar var=value .Op Ar function .Op Ar ... .Sh DESCRIPTION The .Nm utility is used for installing and configuring .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. .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 4GB 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 2097152 /" A 1GB root file system (all sizes are in 512 byte blocks). .It Li "da0s2-2=swap 1048576 /" A 512MB swap partition. .It Li "da0s2-3=ufs 524288 /var" A 256MB /var file system. .It Li "da0s2-4=ufs 0 /usr 1" With the balance of free space (around 2.25GB) 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 generic The GENERIC kernel. .It Li smp A kernel suitable for multiple processor systems. .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 scrypto /usr/src/crypto .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 stools /usr/src/tools .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 stools /usr/src/tools .It Li subin /usr/src/usr.bin .It Li susbin /usr/src/usr.sbin .It Li local Local additions collection. .El .El .It distSetDeveloper Selects the standard Developer's distribution set. .Pp .Sy Variables : None .It distSetUser Selects the standard user 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 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, terminate sysinstall and reboot the system. On the sparc64 platform, the system is halted rather than rebooted. .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 packages built for the wrong architecture. For example, .Dq Li "CD_MACHINE_ARCH = amd64" . .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. .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. .Sh HISTORY This version of .Nm first appeared in .Fx 2.0 . .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. Index: head/usr.sbin/sysinstall/sysinstall.h =================================================================== --- head/usr.sbin/sysinstall/sysinstall.h (revision 186201) +++ head/usr.sbin/sysinstall/sysinstall.h (revision 186202) @@ -1,894 +1,886 @@ /* * 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. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer, * verbatim and that no modifications are made prior to this * point in the file. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY JORDAN HUBBARD ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL JORDAN HUBBARD OR HIS PETS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, LIFE OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * $FreeBSD$ */ #ifndef _SYSINSTALL_H_INCLUDE #define _SYSINSTALL_H_INCLUDE #include #include #include #include #include #include #include #include #include #include "ui_objects.h" #include "dir.h" #include "colors.h" #include "dist.h" /*** Defines ***/ #if defined(__i386__) || defined(__amd64__) #define WITH_SYSCONS #define WITH_MICE #endif #if defined(__i386__) || defined(__amd64__) #define WITH_SLICES #endif /* 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 * than that on the screen at once! * * For 2.1 I'll revisit this and try to make it more dynamic, but since * this will catch 99.99% of all possible cases, I'm not too worried. */ #define MAX_CHUNKS 40 /* Internal environment variable names */ #define DISK_PARTITIONED "_diskPartitioned" #define DISK_LABELLED "_diskLabelled" #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_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_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_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_TERM "TERM" #define VAR_CONSTERM "_consterm" #ifdef PC98 #define DEFAULT_COUNTRY "jp" #else #define DEFAULT_COUNTRY "us" #endif /* One MB worth of blocks */ #define ONE_MEG 2048 #define ONE_GIG (ONE_MEG * 1024) /* Which selection attributes to use */ #define ATTR_SELECTED (ColorDisplay ? item_selected_attr : item_attr) #define ATTR_TITLE button_active_attr /* Handy strncpy() macro */ #define SAFE_STRCPY(to, from) sstrncpy((to), (from), sizeof (to) - 1) /*** Types ***/ typedef int Boolean; typedef struct disk Disk; typedef struct chunk Chunk; /* Bitfields for menu options */ #define DMENU_NORMAL_TYPE 0x1 /* Normal dialog menu */ #define DMENU_RADIO_TYPE 0x2 /* Radio dialog menu */ #define DMENU_CHECKLIST_TYPE 0x4 /* Multiple choice menu */ #define DMENU_SELECTION_RETURNS 0x8 /* Immediate return on item selection */ typedef struct _dmenu { int type; /* What sort of menu we are */ char *title; /* Our title */ char *prompt; /* Our prompt */ char *helpline; /* Line of help at bottom */ char *helpfile; /* Help file for "F1" */ #if (__STDC_VERSION__ >= 199901L) || (__GNUC__ >= 3) dialogMenuItem items[]; /* Array of menu items */ #elif __GNUC__ dialogMenuItem items[0]; /* Array of menu items */ #else #error "Create hack for C89 and K&R compilers." #endif } DMenu; /* An rc.conf variable */ typedef struct _variable { struct _variable *next; char *name; char *value; int dirty; } Variable; #define NO_ECHO_OBJ(type) ((type) | (DITEM_NO_ECHO << 16)) #define TYPE_OF_OBJ(type) ((type) & 0xff) #define ATTR_OF_OBJ(type) ((type) >> 16) /* A screen layout structure */ typedef struct _layout { int y; /* x & Y co-ordinates */ int x; int len; /* The size of the dialog on the screen */ int maxlen; /* How much the user can type in ... */ char *prompt; /* The string for the prompt */ char *help; /* The display for the help line */ void *var; /* The var to set when this changes */ int type; /* The type of the dialog to create */ 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 */ typedef struct _device { char name[DEV_NAME_MAX]; char *description; char *devname; DeviceType type; Boolean enabled; Boolean (*init)(struct _device *dev); FILE * (*get)(struct _device *dev, char *file, Boolean probe); void (*shutdown)(struct _device *dev); void *private; unsigned int flags; unsigned int volume; } Device; /* Some internal representations of partitions */ typedef enum { PART_NONE, PART_SLICE, PART_SWAP, PART_FILESYSTEM, PART_FAT, PART_EFI } PartType; #define NEWFS_UFS_CMD "newfs" #define NEWFS_MSDOS_CMD "newfs_msdos" enum newfs_type { NEWFS_UFS, NEWFS_MSDOS, NEWFS_CUSTOM }; #define NEWFS_UFS_STRING "UFS" #define NEWFS_MSDOS_STRING "FAT" #define NEWFS_CUSTOM_STRING "CST" /* The longest set of custom command line arguments we'll pass. */ #define NEWFS_CMD_ARGS_MAX 256 typedef struct _part_info { char mountpoint[FILENAME_MAX]; /* Is invocation of newfs desired? */ Boolean do_newfs; enum newfs_type newfs_type; union { struct { char user_options[NEWFS_CMD_ARGS_MAX]; Boolean acls; /* unused */ Boolean multilabel; /* unused */ Boolean softupdates; Boolean ufs1; } newfs_ufs; struct { /* unused */ } newfs_msdos; struct { char command[NEWFS_CMD_ARGS_MAX]; } newfs_custom; } newfs_data; } PartInfo; /* An option */ typedef struct _opt { char *name; char *desc; enum { OPT_IS_STRING, OPT_IS_INT, OPT_IS_FUNC, OPT_IS_VAR } type; void *data; void *aux; char *(*check)(struct _opt *); } 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 */ int vol_checked; /* disc volume last checked for */ 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? */ extern Boolean SystemWasInstalled; /* Did we install it? */ extern Boolean RunningAsInit; /* Are we running stand-alone? */ 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 Boolean have_volumes; /* Media has multiple volumes */ 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 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 */ #else 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 MenuHTMLDoc; /* HTML Documentation menu */ extern DMenu MenuUsermgmt; /* User management menu */ extern DMenu MenuFixit; /* Fixit floppy/CDROM/shell menu */ extern int FixItMode; /* FixItMode starts shell on current device (ie Serial port) */ extern const char * StartName; /* Which name we were started as */ extern const char * ProgName; /* Program's proper name */ extern int NCpus; /* # cpus on machine */ extern int low_volume; /* Lowest volume number */ extern int high_volume; /* Highest volume number */ /* Important chunks. */ extern Chunk *HomeChunk; extern Chunk *RootChunk; extern Chunk *SwapChunk; extern Chunk *TmpChunk; extern Chunk *UsrChunk; extern Chunk *VarChunk; #ifdef __ia64__ extern Chunk *EfiChunk; #endif /* Stuff from libdialog which isn't properly declared outside */ extern void display_helpfile(void); 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); extern void command_execute(void); extern void command_shell_add(char *key, char *fmt, ...) __printflike(2, 3); 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); 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), int (*check)(dialogMenuItem *d)); extern void deviceGetAll(void); extern void deviceReset(void); extern void deviceRescan(void); extern Device **deviceFind(char *name, DeviceType type); extern Device **deviceFindDescr(char *name, char *desc, DeviceType class); extern int deviceCount(Device **devs); extern Device *new_device(char *name); extern Device *deviceRegister(char *name, char *desc, char *devname, DeviceType type, Boolean enabled, Boolean (*init)(Device *mediadev), FILE * (*get)(Device *dev, char *file, Boolean probe), void (*shutDown)(Device *mediadev), void *private); 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); extern int diskPartitionEditor(dialogMenuItem *self); #endif extern int diskPartitionWrite(dialogMenuItem *self); extern int diskGetSelectCount(Device ***devs); /* dispatch.c */ extern int dispatchCommand(char *command); 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 distSetKernDeveloper(dialogMenuItem *self); extern int distSetUser(dialogMenuItem *self); extern int distSetMinimum(dialogMenuItem *self); extern int distSetEverything(dialogMenuItem *self); extern int distSetSrc(dialogMenuItem *self); extern int distSetKernel(dialogMenuItem *self); extern int distExtractAll(dialogMenuItem *self); extern int selectKernel(void); /* dmenu.c */ extern int dmenuDisplayFile(dialogMenuItem *tmp); extern int dmenuSubmenu(dialogMenuItem *tmp); extern int dmenuSystemCommand(dialogMenuItem *tmp); 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); 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); /* 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 current_volume); 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); extern Boolean copySelf(void); /* kget.c */ extern int kget(char *out); /* keymap.c */ extern int keymapMenuSelect(dialogMenuItem *self); extern int loadKeymap(const char *lang); /* label.c */ extern int diskLabelEditor(dialogMenuItem *self); extern int diskLabelCommit(dialogMenuItem *self); /* makedevs.c (auto-generated) */ extern const char termcap_ansi[]; extern const char termcap_vt100[]; extern const char termcap_cons25w[]; extern const char termcap_cons25[]; extern const char termcap_cons25_m[]; extern const char termcap_cons25r[]; extern const char termcap_cons25r_m[]; extern const char termcap_cons25l1[]; extern const char termcap_cons25l1_m[]; extern const char termcap_xterm[]; extern const u_char font_iso_8x16[]; extern const u_char font_cp850_8x16[]; 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); extern Boolean directory_exists(const char *dirname); extern char *root_bias(char *path); extern char *itoa(int value); extern char *string_concat(char *p1, char *p2); extern char *string_concat3(char *p1, char *p2, char *p3); extern char *string_prune(char *str); extern char *string_skipwhite(char *str); extern char *string_copy(char *s1, char *s2); extern char *pathBaseName(const char *path); extern void safe_free(void *ptr); extern void *safe_malloc(size_t size); extern void *safe_realloc(void *orig, size_t size); extern dialogMenuItem *item_add(dialogMenuItem *list, char *prompt, char *title, int (*checked)(dialogMenuItem *self), int (*fire)(dialogMenuItem *self), void (*selected)(dialogMenuItem *self, int is_selected), void *data, int *aux, int *curr, int *max); extern void items_free(dialogMenuItem *list, int *curr, int *max); extern int Mkdir(char *); extern int Mkdir_command(char *key, void *data); extern int Mount(char *, void *data); extern int Mount_msdosfs(char *mountp, void *devname); extern WINDOW *openLayoutDialog(char *helpfile, char *title, int x, int y, int width, int height); extern ComposeObj *initLayoutDialog(WINDOW *win, Layout *layout, int x, int y, int *max); extern int layoutDialogLoop(WINDOW *win, Layout *layout, ComposeObj **obj, int *n, int max, int *cbutton, int *cancel); extern WINDOW *savescr(void); extern void restorescr(WINDOW *w); extern char *sstrncpy(char *dst, const char *src, int size); extern char *getsysctlbyname(const char *sysctlname); /* 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); extern void msgYap(char *fmt, ...) __printflike(1, 2); extern void msgWarn(char *fmt, ...) __printflike(1, 2); extern void msgDebug(char *fmt, ...) __printflike(1, 2); extern void msgError(char *fmt, ...) __printflike(1, 2); extern void msgFatal(char *fmt, ...) __printflike(1, 2); extern void msgConfirm(char *fmt, ...) __printflike(1, 2); extern void msgNotify(char *fmt, ...) __printflike(1, 2); extern void msgWeHaveOutput(char *fmt, ...) __printflike(1, 2); extern int msgYesNo(char *fmt, ...) __printflike(1, 2); extern int msgNoYes(char *fmt, ...) __printflike(1, 2); 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); /* system.c */ extern void systemInitialize(int argc, char **argv); extern void systemShutdown(int status); extern int execExecute(char *cmd, char *name); extern int systemExecute(char *cmd); extern void systemSuspendDialog(void); extern void systemResumeDialog(void); extern int systemDisplayHelp(char *file); extern char *systemHelpFile(char *file, char *buf); 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 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); extern char *variable_get(char *var); extern int variable_cmp(char *var, char *value); extern void variable_unset(char *var); extern char *variable_get_value(char *var, char *prompt, int dirty); extern int variable_check(char *data); extern int variable_check2(char *data); extern int dump_variables(dialogMenuItem *self); extern void free_variables(void); extern void pvariable_set(char *var); extern char *pvariable_get(char *var); /* wizard.c */ extern void slice_wizard(Disk *d); /* * Macros. Please find a better place for us! */ #define DEVICE_INIT(d) ((d) != NULL ? (d)->init((d)) : (Boolean)0) #define DEVICE_GET(d, b, f) ((d) != NULL ? (d)->get((d), (b), (f)) : NULL) #define DEVICE_SHUTDOWN(d) ((d) != NULL ? (d)->shutdown((d)) : (void)0) #ifdef USE_GZIP #define UNZIPPER "gunzip" #else #define UNZIPPER "bunzip2" #endif #endif /* _SYSINSTALL_H_INCLUDE */