Index: stable/2.2/release/sysinstall/Makefile =================================================================== --- stable/2.2/release/sysinstall/Makefile (revision 40694) +++ stable/2.2/release/sysinstall/Makefile (revision 40695) @@ -1,81 +1,81 @@ PROG= sysinstall MAN8= sysinstall.8 BINDIR=/stand NOSHARED=YES CLEANFILES+= makedevs.c rtermcap rtermcap.tmp dumpnlist CLEANFILES+= keymap.tmp keymap.h .PATH: ${.CURDIR}/../disklabel ${.CURDIR}/../../usr.bin/cksum SRCS= anonFTP.c attr.c cdrom.c command.c config.c devices.c \ disks.c dispatch.c dist.c dmenu.c doc.c dos.c floppy.c \ ftp.c globals.c index.c install.c installUpgrade.c keymap.c \ label.c lndir.c main.c makedevs.c media.c menus.c misc.c mouse.c \ msg.c network.c nfs.c options.c package.c register.c system.c \ tape.c tcpip.c termcap.c ufs.c user.c variable.c wizard.c \ uc_eisa.c uc_isa.c uc_kmem.c uc_list.c uc_main.c uc_pci.c \ uc_scsi.c keymap.h CFLAGS+= -Wall -I${.CURDIR}/../../gnu/lib/libdialog -I${.OBJDIR} CFLAGS+= -I${.CURDIR}/../../sys -CFLAGS+= -DUC_PRIVATE -DKERN_NO_SYMBOLS -DSAVE_USERCONFIG +CFLAGS+= -DUC_PRIVATE -DKERN_NO_SYMBOLS -DSAVE_USERCONFIG # -DDO_SCSI DPADD= ${LIBDIALOG} ${LIBNCURSES} ${LIBMYTINFO} ${LIBUTIL} ${LIBDISK} ${LIBFTPIO} LDADD= -ldialog -lncurses -lmytinfo -lutil -ldisk -lftpio makedevs.c: Makefile rtermcap keymap.h rm -f makedevs.tmp echo '#include ' > makedevs.tmp ./rtermcap ansi | \ file2c 'const char termcap_ansi[] = {' ',0};' \ >> makedevs.tmp ./rtermcap cons25 | \ file2c 'const char termcap_cons25[] = {' ',0};' \ >> makedevs.tmp ./rtermcap cons25-m | \ file2c 'const char termcap_cons25_m[] = {' ',0};' \ >> makedevs.tmp ./rtermcap cons25r | \ file2c 'const char termcap_cons25r[] = {' ',0};' \ >> makedevs.tmp ./rtermcap cons25r-m | \ file2c 'const char termcap_cons25r_m[] = {' ',0};' \ >> makedevs.tmp ./rtermcap cons25l1 | \ file2c 'const char termcap_cons25l1[] = {' ',0};' \ >> makedevs.tmp ./rtermcap cons25l1-m | \ file2c 'const char termcap_cons25l1_m[] = {' ',0};' \ >> makedevs.tmp ./rtermcap vt100 | \ file2c 'const char termcap_vt100[] = {' ',0};' \ >> makedevs.tmp mv makedevs.tmp makedevs.c rtermcap: ${.CURDIR}/rtermcap.c ${CC} -o rtermcap ${.CURDIR}/rtermcap.c -ltermcap KEYMAPS= be.iso br275.iso danish.iso fr.iso german.iso it.iso \ icelandic.iso jp.106 norwegian.iso ru.koi8-r si.iso spanish.iso \ swedish.iso swissgerman.iso uk.iso us.dvorak us.iso keymap.h: rm -f keymap.tmp for map in ${KEYMAPS} ; do \ 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 " { 0 }"; echo "};" ; echo "" ) >> keymap.tmp mv keymap.tmp keymap.h .include Index: stable/2.2/release/sysinstall/config.c =================================================================== --- stable/2.2/release/sysinstall/config.c (revision 40694) +++ stable/2.2/release/sysinstall/config.c (revision 40695) @@ -1,802 +1,783 @@ /* * The new sysinstall program. * * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: config.c,v 1.51.2.63 1998/03/23 09:18:30 jkh Exp $ + * $Id: config.c,v 1.51.2.64 1998/07/23 19:21:37 jkh Exp $ * * 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 static Chunk *chunk_list[MAX_CHUNKS]; static int nchunks; static int rootdev_is_od; /* arg to sort */ static int chunk_compare(Chunk *c1, Chunk *c2) { if (!c1 && !c2) return 0; else if (!c1 && c2) return 1; else if (c1 && !c2) return -1; else if (!c1->private_data && !c2->private_data) return 0; else if (c1->private_data && !c2->private_data) return 1; else if (!c1->private_data && c2->private_data) return -1; else return strcmp(((PartInfo *)(c1->private_data))->mountpoint, ((PartInfo *)(c2->private_data))->mountpoint); } static void chunk_sort(void) { int i, j; for (i = 0; i < nchunks; i++) { for (j = 0; j < nchunks; j++) { if (chunk_compare(chunk_list[j], chunk_list[j + 1]) > 0) { Chunk *tmp = chunk_list[j]; chunk_list[j] = chunk_list[j + 1]; chunk_list[j + 1] = tmp; } } } } static void check_rootdev(Chunk **list, int n) { int i; Chunk *c; rootdev_is_od = 0; for (i = 0; i < n; i++) { c = *list++; if (c->type == part && (c->flags & CHUNK_IS_ROOT) && strncmp(c->disk->name, "od", 2) == 0) rootdev_is_od = 1; } } static char * name_of(Chunk *c1) { return c1->name; } static char * mount_point(Chunk *c1) { if (c1->type == part && c1->subtype == FS_SWAP) return "none"; else if (c1->type == part || c1->type == fat) return ((PartInfo *)c1->private_data)->mountpoint; return "/bogus"; } static char * fstype(Chunk *c1) { if (c1->type == fat) return "msdos"; else if (c1->type == part) { if (c1->subtype != FS_SWAP) return "ufs"; else return "swap"; } return "bogus"; } static char * fstype_short(Chunk *c1) { if (c1->type == part) { if (c1->subtype != FS_SWAP) { if (rootdev_is_od == 0 && strncmp(c1->name, "od", 2) == 0) return "rw,noauto"; else return "rw"; } else return "sw"; } else if (c1->type == fat) { if (strncmp(c1->name, "od", 2) == 0) return "ro,noauto"; else return "ro"; } return "bog"; } static int seq_num(Chunk *c1) { if (c1->type == part && c1->subtype != FS_SWAP) { if (rootdev_is_od == 0 && strncmp(c1->name, "od", 2) == 0) return 0; else if (c1->flags & CHUNK_IS_ROOT) return 1; else return 2; } return 0; } int configFstab(void) { Device **devs; Disk *disk; FILE *fstab; int i, cnt; Chunk *c1, *c2; if (!RunningAsInit) { if (file_readable("/etc/fstab")) return DITEM_SUCCESS; else { msgConfirm("Attempting to rebuild your /etc/fstab file. Warning: If you had\n" "any CD devices in use before running sysinstall then they may NOT\n" "be found by this run!"); } } devs = deviceFind(NULL, DEVICE_TYPE_DISK); if (!devs) { msgConfirm("No disks found!"); return DITEM_FAILURE; } /* Record all the chunks */ nchunks = 0; for (i = 0; devs[i]; i++) { if (!devs[i]->enabled) continue; disk = (Disk *)devs[i]->private; if (!disk->chunks) msgFatal("No chunk list found for %s!", disk->name); for (c1 = disk->chunks->part; c1; c1 = c1->next) { if (c1->type == freebsd) { for (c2 = c1->part; c2; c2 = c2->next) { if (c2->type == part && (c2->subtype == FS_SWAP || c2->private_data)) chunk_list[nchunks++] = c2; } } else if (c1->type == fat && c1->private_data) chunk_list[nchunks++] = c1; } } chunk_list[nchunks] = 0; chunk_sort(); fstab = fopen("/etc/fstab", "w"); if (!fstab) { msgConfirm("Unable to create a new /etc/fstab file! Manual intervention\n" "will be required."); return DITEM_FAILURE; } check_rootdev(chunk_list, nchunks); /* Go for the burn */ msgDebug("Generating /etc/fstab file\n"); fprintf(fstab, "# Device\t\tMountpoint\tFStype\tOptions\t\tDump\tPass#\n"); for (i = 0; i < nchunks; i++) fprintf(fstab, "/dev/%s\t\t%s\t\t%s\t%s\t\t%d\t%d\n", name_of(chunk_list[i]), mount_point(chunk_list[i]), fstype(chunk_list[i]), fstype_short(chunk_list[i]), seq_num(chunk_list[i]), seq_num(chunk_list[i])); Mkdir("/proc"); fprintf(fstab, "proc\t\t\t/proc\t\tprocfs\trw\t\t0\t0\n"); /* Now look for the CDROMs */ devs = deviceFind(NULL, DEVICE_TYPE_CDROM); cnt = deviceCount(devs); /* Write the first one out as /cdrom */ if (cnt) { if (Mkdir("/cdrom")) { msgConfirm("Unable to make mount point for: /cdrom"); } else fprintf(fstab, "/dev/%s\t\t/cdrom\t\tcd9660\tro,noauto\t0\t0\n", devs[0]->name); } /* Write the others out as /cdrom */ for (i = 1; i < cnt; i++) { char cdname[10]; sprintf(cdname, "/cdrom%d", i); if (Mkdir(cdname)) { msgConfirm("Unable to make mount point for: %s", cdname); } else fprintf(fstab, "/dev/%s\t\t%s\tcd9660\tro,noauto\t0\t0\n", devs[i]->name, cdname); } fclose(fstab); if (isDebug()) msgDebug("Wrote out /etc/fstab file\n"); return DITEM_SUCCESS; } /* Do the work of sucking in a config file. * config is the filename to read in. * lines is a fixed (max) sized array of char *. * returns number of lines read. line contents * are malloc'd and must be freed by the caller. */ int readConfig(char *config, char **lines, int max) { FILE *fp; char line[256]; int i, nlines; fp = fopen(config, "r"); if (!fp) return -1; nlines = 0; /* Read in the entire file */ for (i = 0; i < max; i++) { if (!fgets(line, sizeof line, fp)) break; lines[nlines++] = strdup(line); } fclose(fp); if (isDebug()) msgDebug("readConfig: Read %d lines from %s.\n", nlines, config); return nlines; } #define MAX_LINES 2000 /* Some big number we're not likely to ever reach - I'm being really lazy here, I know */ /* Load the environment from an rc.conf file */ void configEnvironmentRC_conf(char *config) { char *lines[MAX_LINES], *cp, *cp2; int i, nlines; nlines = readConfig(config, lines, MAX_LINES); if (nlines == -1) return; for (i = 0; i < nlines; i++) { /* Skip the comments & non-variable settings */ if (lines[i][0] == '#' || !(cp = index(lines[i], '='))) { free(lines[i]); continue; } *cp++ = '\0'; /* Find quotes */ if ((cp2 = index(cp, '"')) || (cp2 = index(cp, '\047'))) { cp = cp2 + 1; cp2 = index(cp, *cp2); } /* If valid quotes, use it */ if (cp2) { *cp2 = '\0'; /* If we have a legit value and it's not already set, set it */ if (strlen(cp) && !variable_get(lines[i])) variable_set2(lines[i], cp); } free(lines[i]); } } /* Load the environment from a resolv.conf file */ void configEnvironmentResolv(char *config) { char *lines[MAX_LINES]; int i, nlines; nlines = readConfig(config, lines, MAX_LINES); if (nlines == -1) return; for (i = 0; i < nlines; i++) { Boolean name_set = (Boolean)variable_get(VAR_NAMESERVER); if (!strncmp(lines[i], "domain", 6) && !variable_get(VAR_DOMAINNAME)) variable_set2(VAR_DOMAINNAME, string_skipwhite(string_prune(lines[i] + 6))); else if (!name_set && !strncmp(lines[i], "nameserver", 10)) { /* Only take the first nameserver setting - we're lame */ variable_set2(VAR_NAMESERVER, string_skipwhite(string_prune(lines[i] + 10))); } free(lines[i]); } } /* Version of below for dispatch routines */ int configRC(dialogMenuItem *unused) { configRC_conf("/etc/rc.conf"); return DITEM_SUCCESS; } /* * This sucks in /etc/rc.conf, substitutes anything needing substitution, then * writes it all back out. It's pretty gross and needs re-writing at some point. */ void configRC_conf(char *config) { FILE *fp; char *lines[MAX_LINES], *cp; Variable *v; int i, nlines, len; nlines = readConfig(config, lines, MAX_LINES); if (nlines == -1) return; /* Now do variable substitutions */ for (v = VarHead; v; v = v->next) { for (i = 0; i < nlines; i++) { /* Skip the comments & non-variable settings */ if (lines[i][0] == '#' || !(cp = index(lines[i], '='))) continue; len = strlen(v->name); if (!strncmp(lines[i], v->name, cp - lines[i]) && (cp - lines[i]) == len) { char *cp2, *comment = NULL; /* If trailing comment, try and preserve it */ if ((index(lines[i], '#')) != NULL) { /* Find quotes */ if ((cp2 = index(cp, '"')) || (cp2 = index(cp, '\047'))) cp2 = index(cp2 + 1, *cp2); if (cp2 && strlen(cp2 + 1)) { comment = alloca(strlen(cp2)); strcpy(comment, cp2 + 1); } } free(lines[i]); lines[i] = (char *)malloc(strlen(v->name) + strlen(v->value) + (comment ? strlen(comment) : 0) + 10); if (comment) sprintf(lines[i], "%s=\"%s\"%s", v->name, v->value, comment); else sprintf(lines[i], "%s=\"%s\"\n", v->name, v->value); } } } /* Now write it all back out again */ if (isDebug()) msgDebug("Writing configuration changes to %s file..", config); if (Fake) fp = fdopen(DebugFD, "w"); else { (void)vsystem("cp %s %s.previous", config, config); fp = fopen(config, "w"); } for (i = 0; i < nlines; i++) { fprintf(fp, lines[i]); /* Stand by for bogus special case handling - we try to dump the interface specs here */ if (!strncmp(lines[i], VAR_INTERFACES, strlen(VAR_INTERFACES))) { Device **devp; int j, cnt; devp = deviceFind(NULL, DEVICE_TYPE_NETWORK); cnt = deviceCount(devp); for (j = 0; j < cnt; j++) { char iname[255], toadd[512]; int k, addit = TRUE; if (!strncmp(devp[j]->name, "ppp", 3) || !strncmp(devp[j]->name, "tun", 3)) continue; snprintf(iname, 255, "%s%s", VAR_IFCONFIG, devp[j]->name); if ((cp = variable_get(iname))) { snprintf(toadd, sizeof toadd, "%s=\"%s\"\n", iname, cp); for (k = 0; k < nlines; k++) { if (!strcmp(lines[k], toadd)) { addit = FALSE; break; } } if (addit) fprintf(fp, toadd); } } } free(lines[i]); } fclose(fp); } int configSaver(dialogMenuItem *self) { variable_set((char *)self->data); if (!variable_get(VAR_BLANKTIME)) variable_set2(VAR_BLANKTIME, "300"); return DITEM_SUCCESS; } int configSaverTimeout(dialogMenuItem *self) { return (variable_get_value(VAR_BLANKTIME, "Enter time-out period in seconds for screen saver") ? DITEM_SUCCESS : DITEM_FAILURE) | DITEM_RESTORE; } int configRegister(dialogMenuItem *self) { return DITEM_STATUS(registerOpenDialog()) | DITEM_RESTORE; } int configNTP(dialogMenuItem *self) { int status; status = variable_get_value(VAR_NTPDATE_FLAGS, "Enter the name of an NTP server") ? DITEM_SUCCESS : DITEM_FAILURE; if (status == DITEM_SUCCESS) { static char tmp[255]; snprintf(tmp, sizeof(tmp), "ntpdate_enable=YES,ntpdate_flags=%s", variable_get(VAR_NTPDATE_FLAGS)); self->data = tmp; dmenuSetVariables(self); } return status | DITEM_RESTORE; } int configUsers(dialogMenuItem *self) { dialog_clear_norefresh(); dmenuOpenSimple(&MenuUsermgmt, FALSE); dialog_clear(); return DITEM_SUCCESS | DITEM_RESTORE; } int configXEnvironment(dialogMenuItem *self) { char *config, *execfile; char *moused; dialog_clear_norefresh(); if (!dmenuOpenSimple(&MenuXF86Config, FALSE)) return DITEM_FAILURE | DITEM_RESTORE; if (file_readable("/var/run/ld.so.hints")) systemExecute("/sbin/ldconfig -m /usr/lib /usr/X11R6/lib /usr/local/lib /usr/lib/compat"); else systemExecute("/sbin/ldconfig /usr/lib /usr/X11R6/lib /usr/local/lib /usr/lib/compat"); config = variable_get(VAR_XF86_CONFIG); if (!config) return DITEM_FAILURE | DITEM_RESTORE; execfile = string_concat("/usr/X11R6/bin/", config); if (file_executable(execfile)) { dialog_clear_norefresh(); moused = variable_get(VAR_MOUSED); while (!moused || strcmp(moused, "YES")) { if (msgYesNo("The X server may access the mouse in two ways: direct access\n" "or indirect access via the mouse daemon. You have not\n" "configured the mouse daemon. Would you like to configure it\n" "now? If you intend to let the X server access the mouse\n" "directly, choose \"No\" at this time.")) break; dmenuOpenSimple(&MenuMouse, FALSE); dialog_clear(); moused = variable_get(VAR_MOUSED); } if (moused && !strcmp(moused, "YES")) - msgConfirm("You have configured and been running the mouse daemon.\n" + msgConfirm("You have configured and are now running the mouse daemon.\n" "Choose \"/dev/sysmouse\" as the mouse port and \"SysMouse\" or\n" "\"MouseSystems\" as the mouse protocol in the X configuration\n" "utility."); dialog_clear(); systemExecute(execfile); return DITEM_SUCCESS | DITEM_RESTORE; } else { dialog_clear_norefresh(); msgConfirm("The XFree86 setup utility you chose does not appear to be installed!\n" "Please install this before attempting to configure XFree86."); return DITEM_FAILURE | DITEM_RESTORE; } } void configResolv(void) { FILE *fp; char *cp, *dp, *hp; cp = variable_get(VAR_NAMESERVER); if (!cp || !*cp) goto skip; Mkdir("/etc"); fp = fopen("/etc/resolv.conf", "w"); if (!fp) return; if (variable_get(VAR_DOMAINNAME)) fprintf(fp, "domain\t%s\n", variable_get(VAR_DOMAINNAME)); fprintf(fp, "nameserver\t%s\n", cp); fclose(fp); if (isDebug()) msgDebug("Wrote out /etc/resolv.conf\n"); skip: dp = variable_get(VAR_DOMAINNAME); cp = variable_get(VAR_IPADDR); hp = variable_get(VAR_HOSTNAME); /* Tack ourselves into /etc/hosts */ fp = fopen("/etc/hosts", "w"); if (!fp) return; /* Add an entry for localhost */ - fprintf(fp, "127.0.0.1\t\tlocalhost.%s localhost\n", dp ? dp : "my.domain"); + if (dp) + fprintf(fp, "127.0.0.1\t\tlocalhost.%s localhost\n", dp); + else + fprintf(fp, "127.0.0.1\t\tlocalhost\n"); /* Now the host entries, if applicable */ if (cp && cp[0] != '0' && hp) { char cp2[255]; if (!index(hp, '.')) cp2[0] = '\0'; else { SAFE_STRCPY(cp2, hp); *(index(cp2, '.')) = '\0'; } fprintf(fp, "%s\t\t%s %s\n", cp, hp, cp2); fprintf(fp, "%s\t\t%s.\n", cp, hp); } fclose(fp); if (isDebug()) msgDebug("Wrote out /etc/hosts\n"); } int configRouter(dialogMenuItem *self) { int ret; ret = variable_get_value(VAR_ROUTER, "Please specify the router you wish to use. Routed is\n" "provided with the stock system and gated is provided\n" "as an optional package which this installation system\n" "will attempt to load if you select gated. Any other\n" "choice of routing daemon will be assumed to be something\n" "the user intends to install themselves before rebooting\n" "the system. If you don't want any routing daemon, choose NO") ? DITEM_SUCCESS : DITEM_FAILURE; if (ret == DITEM_SUCCESS) { char *cp = variable_get(VAR_ROUTER); if (cp && strcmp(cp, "NO")) { variable_set2(VAR_ROUTER_ENABLE, "YES"); if (!strcmp(cp, "gated")) { if (package_add(variable_get(VAR_GATED_PKG)) != DITEM_SUCCESS) { msgConfirm("Unable to load gated package. Falling back to no router."); variable_unset(VAR_ROUTER); variable_unset(VAR_ROUTERFLAGS); variable_set2(VAR_ROUTER_ENABLE, "NO"); cp = NULL; } } if (cp) { /* Now get the flags, if they chose a router */ ret = variable_get_value(VAR_ROUTERFLAGS, "Please Specify the routing daemon flags; if you're running routed\n" "then -q is the right choice for nodes and -s for gateway hosts.\n") ? DITEM_SUCCESS : DITEM_FAILURE; if (ret != DITEM_SUCCESS) variable_unset(VAR_ROUTERFLAGS); } } else { /* No router case */ variable_set2(VAR_ROUTER_ENABLE, "NO"); variable_unset(VAR_ROUTERFLAGS); variable_unset(VAR_ROUTER); } } return ret | DITEM_RESTORE; } int configPackages(dialogMenuItem *self) { static PkgNode top, plist; static Boolean index_initted = FALSE; PkgNodePtr tmp; FILE *fp; if (!mediaVerify()) return DITEM_FAILURE; if (!mediaDevice->init(mediaDevice)) return DITEM_FAILURE; if (!index_initted) { msgNotify("Attempting to fetch packages/INDEX file from selected media."); fp = mediaDevice->get(mediaDevice, "packages/INDEX", TRUE); if (!fp) { dialog_clear_norefresh(); msgConfirm("Unable to get packages/INDEX file from selected media.\n" "This may be because the packages collection is not available at\n" "on the distribution media you've chosen (most likely an FTP site\n" "without the packages collection mirrored). Please verify media\n" "(or path to media) and try again. If your local site does not\n" "carry the packages collection, then we recommend either a CD\n" "distribution or the master distribution on ftp.freebsd.org."); mediaDevice->shutdown(mediaDevice); return DITEM_FAILURE | DITEM_RESTORE; } msgNotify("Located INDEX, now reading package data from it..."); index_init(&top, &plist); if (index_read(fp, &top)) { msgConfirm("I/O or format error on packages/INDEX file.\n" "Please verify media (or path to media) and try again."); fclose(fp); return DITEM_FAILURE | DITEM_RESTORE; } fclose(fp); index_sort(&top); index_initted = TRUE; } while (1) { int ret, pos, scroll; /* Bring up the packages menu */ pos = scroll = 0; index_menu(&top, &plist, &pos, &scroll); if (plist.kids && plist.kids->name) { /* Now show the packing list menu */ pos = scroll = 0; ret = index_menu(&plist, NULL, &pos, &scroll); if (ret & DITEM_LEAVE_MENU) break; else if (DITEM_STATUS(ret) != DITEM_FAILURE) { index_extract(mediaDevice, &top, &plist); break; } } else { dialog_clear_norefresh(); msgConfirm("No packages were selected for extraction."); break; } } tmp = plist.kids; while (tmp) { PkgNodePtr tmp2 = tmp->next; safe_free(tmp); tmp = tmp2; } index_init(NULL, &plist); return DITEM_SUCCESS | DITEM_RESTORE; } - -#ifdef NETCON_EXTENTIONS -/* Load novell client/server package */ -int -configNovell(dialogMenuItem *self) -{ - int ret = DITEM_SUCCESS; - - if (!RunningAsInit) { - msgConfirm("This package can only be installed in multi-user mode."); - return ret; - } - if (variable_get(VAR_NOVELL)) - variable_unset(VAR_NOVELL); - else { - ret = package_add(PACKAGE_NETCON); - if (DITEM_STATUS(ret) == DITEM_SUCCESS) - variable_set2(VAR_NOVELL, "YES"); - } - return ret | DITEM_RESTORE; -} -#endif /* Load pcnfsd package */ int configPCNFSD(dialogMenuItem *self) { int ret = DITEM_SUCCESS; if (variable_get(VAR_PCNFSD)) variable_unset(VAR_PCNFSD); else { ret = package_add(variable_get(VAR_PCNFSD_PKG)); if (DITEM_STATUS(ret) == DITEM_SUCCESS) { variable_set2(VAR_PCNFSD, "YES"); variable_set2("mountd_flags", "-n"); } } return ret; } int configNFSServer(dialogMenuItem *self) { char cmd[256]; /* If we're an NFS server, we need an exports file */ if (!file_readable("/etc/exports")) { WINDOW *w = savescr(); if (file_readable("/etc/exports.disabled")) vsystem("mv /etc/exports.disabled /etc/exports"); else { dialog_clear_norefresh(); msgConfirm("Operating as an NFS server means that you must first configure\n" "an /etc/exports file to indicate which hosts are allowed certain\n" "kinds of access to your local file systems.\n" "Press [ENTER] now to invoke an editor on /etc/exports\n"); vsystem("echo '#The following examples export /usr to 3 machines named after ducks,' > /etc/exports"); vsystem("echo '#/home and all directories under it to machines named after dead rock stars' >> /etc/exports"); vsystem("echo '#and, finally, /a to 2 privileged machines allowed to write on it as root.' >> /etc/exports"); vsystem("echo '#/usr huey louie dewie' >> /etc/exports"); vsystem("echo '#/home -alldirs janice jimmy frank' >> /etc/exports"); vsystem("echo '#/a -maproot=0 bill albert' >> /etc/exports"); vsystem("echo '#' >> /etc/exports"); vsystem("echo '# You should replace these lines with your actual exported filesystems.' >> /etc/exports"); vsystem("echo >> /etc/exports"); sprintf(cmd, "%s /etc/exports", variable_get(VAR_EDITOR)); dialog_clear(); systemExecute(cmd); restorescr(w); } variable_set2(VAR_NFS_SERVER, "YES"); } else if (variable_get(VAR_NFS_SERVER)) { /* We want to turn it off again? */ vsystem("mv -f /etc/exports /etc/exports.disabled"); variable_unset(VAR_NFS_SERVER); } return DITEM_SUCCESS; } Index: stable/2.2/release/sysinstall/dist.c =================================================================== --- stable/2.2/release/sysinstall/dist.c (revision 40694) +++ stable/2.2/release/sysinstall/dist.c (revision 40695) @@ -1,797 +1,797 @@ /* * The new sysinstall program. * * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: dist.c,v 1.73.2.47 1998/07/21 06:09:39 jkh Exp $ + * $Id: dist.c,v 1.73.2.48 1998/07/23 19:21:39 jkh Exp $ * * 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 unsigned int Dists; unsigned int DESDists; unsigned int SrcDists; unsigned int XF86Dists; unsigned int XF86ServerDists; unsigned int XF86FontDists; typedef struct _dist { char *my_name; char *my_dir; unsigned int *my_mask; unsigned int my_bit; struct _dist *my_dist; } Distribution; extern Distribution DistTable[]; extern Distribution DESDistTable[]; extern Distribution SrcDistTable[]; extern Distribution XF86DistTable[]; extern Distribution XF86FontDistTable[]; extern Distribution XF86ServerDistTable[]; /* The top-level distribution categories */ static Distribution DistTable[] = { { "bin", "/", &Dists, DIST_BIN, NULL }, { "doc", "/", &Dists, DIST_DOC, NULL }, { "games", "/", &Dists, DIST_GAMES, NULL }, { "manpages", "/", &Dists, DIST_MANPAGES, NULL }, { "catpages", "/", &Dists, DIST_CATPAGES, NULL }, { "proflibs", "/", &Dists, DIST_PROFLIBS, NULL }, { "dict", "/", &Dists, DIST_DICT, NULL }, { "info", "/", &Dists, DIST_INFO, NULL }, { "src", "/", &Dists, DIST_SRC, SrcDistTable }, { "des", "/", &Dists, DIST_DES, DESDistTable }, { "compat1x", "/", &Dists, DIST_COMPAT1X, NULL }, { "compat20", "/", &Dists, DIST_COMPAT20, NULL }, { "compat21", "/", &Dists, DIST_COMPAT21, NULL }, { "ports", "/usr", &Dists, DIST_PORTS, NULL }, { "XF86332", "/usr", &Dists, DIST_XF86, XF86DistTable }, { NULL }, }; /* The DES distribution (not for export!) */ static Distribution DESDistTable[] = { { "des", "/", &DESDists, DIST_DES_DES, NULL }, { "krb", "/", &DESDists, DIST_DES_KERBEROS, NULL }, { "ssecure", "/usr/src", &DESDists, DIST_DES_SSECURE, NULL }, { "scrypto", "/usr/src", &DESDists, DIST_DES_SCRYPTO, NULL }, { "skerbero", "/usr/src", &DESDists, DIST_DES_SKERBEROS, NULL }, { NULL }, }; /* The /usr/src distribution */ static Distribution SrcDistTable[] = { { "sbase", "/usr/src", &SrcDists, DIST_SRC_BASE, NULL }, { "scontrib", "/usr/src", &SrcDists, DIST_SRC_CONTRIB, NULL }, { "sgnu", "/usr/src", &SrcDists, DIST_SRC_GNU, NULL }, { "setc", "/usr/src", &SrcDists, DIST_SRC_ETC, NULL }, { "sgames", "/usr/src", &SrcDists, DIST_SRC_GAMES, NULL }, { "sinclude", "/usr/src", &SrcDists, DIST_SRC_INCLUDE, NULL }, { "slib", "/usr/src", &SrcDists, DIST_SRC_LIB, NULL }, { "slibexec", "/usr/src", &SrcDists, DIST_SRC_LIBEXEC, NULL }, { "slkm", "/usr/src", &SrcDists, DIST_SRC_LKM, NULL }, { "srelease", "/usr/src", &SrcDists, DIST_SRC_RELEASE, NULL }, { "sbin", "/usr/src", &SrcDists, DIST_SRC_BIN, NULL }, { "ssbin", "/usr/src", &SrcDists, DIST_SRC_SBIN, NULL }, { "sshare", "/usr/src", &SrcDists, DIST_SRC_SHARE, NULL }, { "ssys", "/usr/src", &SrcDists, DIST_SRC_SYS, NULL }, { "subin", "/usr/src", &SrcDists, DIST_SRC_UBIN, NULL }, { "susbin", "/usr/src", &SrcDists, DIST_SRC_USBIN, NULL }, { "ssmailcf", "/usr/src", &SrcDists, DIST_SRC_SMAILCF, NULL }, { NULL }, }; /* The XFree86 distribution */ static Distribution XF86DistTable[] = { { "XF86332", "/usr/X11R6", &XF86Dists, DIST_XF86_FONTS, XF86FontDistTable }, { "XF86332", "/usr/X11R6", &XF86Dists, DIST_XF86_SERVER, XF86ServerDistTable }, -{ "X332src-1", "/usr/X11R6/src", &XF86Dists, DIST_XF86_SRC, NULL }, -{ "X332ctrb", "/usr/X11R6/src", &XF86Dists, DIST_XF86_CSRC, NULL }, -{ "X332bin", "/usr/X11R6", &XF86Dists, DIST_XF86_BIN, NULL }, -{ "X332cfg", "/usr/X11R6", &XF86Dists, DIST_XF86_CFG, NULL }, -{ "X332doc", "/usr/X11R6", &XF86Dists, DIST_XF86_DOC, NULL }, -{ "X332html", "/usr/X11R6", &XF86Dists, DIST_XF86_HTML, NULL }, -{ "X332lib", "/usr/X11R6", &XF86Dists, DIST_XF86_LIB, NULL }, -{ "X332lk98", "/usr/X11R6", &XF86Dists, DIST_XF86_LKIT98, NULL }, -{ "X332lkit", "/usr/X11R6", &XF86Dists, DIST_XF86_LKIT, NULL }, -{ "X332man", "/usr/X11R6", &XF86Dists, DIST_XF86_MAN, NULL }, -{ "X332prog", "/usr/X11R6", &XF86Dists, DIST_XF86_PROG, NULL }, -{ "X332ps", "/usr/X11R6", &XF86Dists, DIST_XF86_PS, NULL }, -{ "X332set", "/usr/X11R6", &XF86Dists, DIST_XF86_SET, NULL }, -{ "X3329set", "/usr/X11R6", &XF86Dists, DIST_XF86_9SET, NULL }, +{ "Xsrc1", "/usr/X11R6/src", &XF86Dists, DIST_XF86_SRC, NULL }, +{ "Xsrcctrb", "/usr/X11R6/src", &XF86Dists, DIST_XF86_CSRC, NULL }, +{ "Xbin", "/usr/X11R6", &XF86Dists, DIST_XF86_BIN, NULL }, +{ "Xcfg", "/usr/X11R6", &XF86Dists, DIST_XF86_CFG, NULL }, +{ "Xdoc", "/usr/X11R6", &XF86Dists, DIST_XF86_DOC, NULL }, +{ "Xhtml", "/usr/X11R6", &XF86Dists, DIST_XF86_HTML, NULL }, +{ "Xlib", "/usr/X11R6", &XF86Dists, DIST_XF86_LIB, NULL }, +{ "Xlk98", "/usr/X11R6", &XF86Dists, DIST_XF86_LKIT98, NULL }, +{ "Xlkit", "/usr/X11R6", &XF86Dists, DIST_XF86_LKIT, NULL }, +{ "Xman", "/usr/X11R6", &XF86Dists, DIST_XF86_MAN, NULL }, +{ "Xprog", "/usr/X11R6", &XF86Dists, DIST_XF86_PROG, NULL }, +{ "Xps", "/usr/X11R6", &XF86Dists, DIST_XF86_PS, NULL }, +{ "Xset", "/usr/X11R6", &XF86Dists, DIST_XF86_SET, NULL }, +{ "X9set", "/usr/X11R6", &XF86Dists, DIST_XF86_9SET, NULL }, { NULL }, }; /* The XFree86 server distribution */ static Distribution XF86ServerDistTable[] = { -{ "PC98-Servers/X3329480", "/usr/X11R6", &XF86ServerDists, DIST_XF86_SERVER_9480, NULL }, -{ "PC98-Servers/X3329EGC", "/usr/X11R6", &XF86ServerDists, DIST_XF86_SERVER_9EGC, NULL }, -{ "PC98-Servers/X3329GA9", "/usr/X11R6", &XF86ServerDists, DIST_XF86_SERVER_9GA9, NULL }, -{ "PC98-Servers/X3329GAN", "/usr/X11R6", &XF86ServerDists, DIST_XF86_SERVER_9GAN, NULL }, -{ "PC98-Servers/X3329LPW", "/usr/X11R6", &XF86ServerDists, DIST_XF86_SERVER_9LPW, NULL }, -{ "PC98-Servers/X3329MGA", "/usr/X11R6", &XF86ServerDists, DIST_XF86_SERVER_9MGA, NULL }, -{ "PC98-Servers/X3329NKV", "/usr/X11R6", &XF86ServerDists, DIST_XF86_SERVER_9NKV, NULL }, -{ "PC98-Servers/X3329NS3", "/usr/X11R6", &XF86ServerDists, DIST_XF86_SERVER_9NS3, NULL }, -{ "PC98-Servers/X3329SPW", "/usr/X11R6", &XF86ServerDists, DIST_XF86_SERVER_9SPW, NULL }, -{ "PC98-Servers/X3329SVG", "/usr/X11R6", &XF86ServerDists, DIST_XF86_SERVER_9SVG, NULL }, -{ "PC98-Servers/X3329TGU", "/usr/X11R6", &XF86ServerDists, DIST_XF86_SERVER_9TGU, NULL }, -{ "PC98-Servers/X3329WEP", "/usr/X11R6", &XF86ServerDists, DIST_XF86_SERVER_9WEP, NULL }, -{ "PC98-Servers/X3329WS", "/usr/X11R6", &XF86ServerDists, DIST_XF86_SERVER_9WS, NULL }, -{ "PC98-Servers/X3329WSN", "/usr/X11R6", &XF86ServerDists, DIST_XF86_SERVER_9WSN, NULL }, -{ "Servers/X3328514", "/usr/X11R6", &XF86ServerDists, DIST_XF86_SERVER_8514, NULL }, -{ "Servers/X332AGX", "/usr/X11R6", &XF86ServerDists, DIST_XF86_SERVER_AGX, NULL }, -{ "Servers/X332I128", "/usr/X11R6", &XF86ServerDists, DIST_XF86_SERVER_I128, NULL }, -{ "Servers/X332Ma8", "/usr/X11R6", &XF86ServerDists, DIST_XF86_SERVER_MACH8, NULL }, -{ "Servers/X332Ma32", "/usr/X11R6", &XF86ServerDists, DIST_XF86_SERVER_MACH32,NULL }, -{ "Servers/X332Ma64", "/usr/X11R6", &XF86ServerDists, DIST_XF86_SERVER_MACH64,NULL }, -{ "Servers/X332Mono", "/usr/X11R6", &XF86ServerDists, DIST_XF86_SERVER_MONO, NULL }, -{ "Servers/X332P9K", "/usr/X11R6", &XF86ServerDists, DIST_XF86_SERVER_P9000, NULL }, -{ "Servers/X332S3", "/usr/X11R6", &XF86ServerDists, DIST_XF86_SERVER_S3, NULL }, -{ "Servers/X332S3V", "/usr/X11R6", &XF86ServerDists, DIST_XF86_SERVER_S3V, NULL }, -{ "Servers/X332SVGA", "/usr/X11R6", &XF86ServerDists, DIST_XF86_SERVER_SVGA, NULL }, -{ "Servers/X332VG16", "/usr/X11R6", &XF86ServerDists, DIST_XF86_SERVER_VGA16, NULL }, -{ "Servers/X332W32", "/usr/X11R6", &XF86ServerDists, DIST_XF86_SERVER_W32, NULL }, -{ "X332nest", "/usr/X11R6", &XF86ServerDists, DIST_XF86_SERVER_NEST, NULL }, +{ "PC98-Servers/X9480", "/usr/X11R6", &XF86ServerDists, DIST_XF86_SERVER_9480, NULL }, +{ "PC98-Servers/X9EGC", "/usr/X11R6", &XF86ServerDists, DIST_XF86_SERVER_9EGC, NULL }, +{ "PC98-Servers/X9GA9", "/usr/X11R6", &XF86ServerDists, DIST_XF86_SERVER_9GA9, NULL }, +{ "PC98-Servers/X9GAN", "/usr/X11R6", &XF86ServerDists, DIST_XF86_SERVER_9GAN, NULL }, +{ "PC98-Servers/X9LPW", "/usr/X11R6", &XF86ServerDists, DIST_XF86_SERVER_9LPW, NULL }, +{ "PC98-Servers/X9MGA", "/usr/X11R6", &XF86ServerDists, DIST_XF86_SERVER_9MGA, NULL }, +{ "PC98-Servers/X9NKV", "/usr/X11R6", &XF86ServerDists, DIST_XF86_SERVER_9NKV, NULL }, +{ "PC98-Servers/X9NS3", "/usr/X11R6", &XF86ServerDists, DIST_XF86_SERVER_9NS3, NULL }, +{ "PC98-Servers/X9SPW", "/usr/X11R6", &XF86ServerDists, DIST_XF86_SERVER_9SPW, NULL }, +{ "PC98-Servers/X9SVG", "/usr/X11R6", &XF86ServerDists, DIST_XF86_SERVER_9SVG, NULL }, +{ "PC98-Servers/X9TGU", "/usr/X11R6", &XF86ServerDists, DIST_XF86_SERVER_9TGU, NULL }, +{ "PC98-Servers/X9WEP", "/usr/X11R6", &XF86ServerDists, DIST_XF86_SERVER_9WEP, NULL }, +{ "PC98-Servers/X9WS", "/usr/X11R6", &XF86ServerDists, DIST_XF86_SERVER_9WS, NULL }, +{ "PC98-Servers/X9WSN", "/usr/X11R6", &XF86ServerDists, DIST_XF86_SERVER_9WSN, NULL }, +{ "Servers/X8514", "/usr/X11R6", &XF86ServerDists, DIST_XF86_SERVER_8514, NULL }, +{ "Servers/XAGX", "/usr/X11R6", &XF86ServerDists, DIST_XF86_SERVER_AGX, NULL }, +{ "Servers/XI128", "/usr/X11R6", &XF86ServerDists, DIST_XF86_SERVER_I128, NULL }, +{ "Servers/XMa8", "/usr/X11R6", &XF86ServerDists, DIST_XF86_SERVER_MACH8, NULL }, +{ "Servers/XMa32", "/usr/X11R6", &XF86ServerDists, DIST_XF86_SERVER_MACH32,NULL }, +{ "Servers/XMa64", "/usr/X11R6", &XF86ServerDists, DIST_XF86_SERVER_MACH64,NULL }, +{ "Servers/XMono", "/usr/X11R6", &XF86ServerDists, DIST_XF86_SERVER_MONO, NULL }, +{ "Servers/XP9K", "/usr/X11R6", &XF86ServerDists, DIST_XF86_SERVER_P9000, NULL }, +{ "Servers/XS3", "/usr/X11R6", &XF86ServerDists, DIST_XF86_SERVER_S3, NULL }, +{ "Servers/XS3V", "/usr/X11R6", &XF86ServerDists, DIST_XF86_SERVER_S3V, NULL }, +{ "Servers/XSVGA", "/usr/X11R6", &XF86ServerDists, DIST_XF86_SERVER_SVGA, NULL }, +{ "Servers/XVG16", "/usr/X11R6", &XF86ServerDists, DIST_XF86_SERVER_VGA16, NULL }, +{ "Servers/XW32", "/usr/X11R6", &XF86ServerDists, DIST_XF86_SERVER_W32, NULL }, +{ "Xnest", "/usr/X11R6", &XF86ServerDists, DIST_XF86_SERVER_NEST, NULL }, { NULL }, }; /* The XFree86 font distribution */ static Distribution XF86FontDistTable[] = { -{ "X332fnts", "/usr/X11R6", &XF86FontDists, DIST_XF86_FONTS_MISC, NULL }, -{ "X332f100", "/usr/X11R6", &XF86FontDists, DIST_XF86_FONTS_100, NULL }, -{ "X332fcyr", "/usr/X11R6", &XF86FontDists, DIST_XF86_FONTS_CYR, NULL }, -{ "X332fscl", "/usr/X11R6", &XF86FontDists, DIST_XF86_FONTS_SCALE, NULL }, -{ "X332fnon", "/usr/X11R6", &XF86FontDists, DIST_XF86_FONTS_NON, NULL }, -{ "X332fsrv", "/usr/X11R6", &XF86FontDists, DIST_XF86_FONTS_SERVER, NULL }, +{ "Xfnts", "/usr/X11R6", &XF86FontDists, DIST_XF86_FONTS_MISC, NULL }, +{ "Xf100", "/usr/X11R6", &XF86FontDists, DIST_XF86_FONTS_100, NULL }, +{ "Xfcyr", "/usr/X11R6", &XF86FontDists, DIST_XF86_FONTS_CYR, NULL }, +{ "Xfscl", "/usr/X11R6", &XF86FontDists, DIST_XF86_FONTS_SCALE, NULL }, +{ "Xfnon", "/usr/X11R6", &XF86FontDists, DIST_XF86_FONTS_NON, NULL }, +{ "Xfsrv", "/usr/X11R6", &XF86FontDists, DIST_XF86_FONTS_SERVER, NULL }, { NULL }, }; static int distMaybeSetDES(dialogMenuItem *self); static int distMaybeSetPorts(dialogMenuItem *self); static void distVerifyFlags(void) { if (SrcDists) Dists |= DIST_SRC; if (DESDists) { if (DESDists & DIST_DES_KERBEROS) DESDists |= DIST_DES_DES; Dists |= DIST_DES; } if (XF86Dists & DIST_XF86_SET) XF86ServerDists |= DIST_XF86_SERVER_VGA16; if (XF86ServerDists) XF86Dists |= DIST_XF86_SERVER; if (XF86FontDists) XF86Dists |= DIST_XF86_FONTS; if (XF86Dists || XF86ServerDists || XF86FontDists) Dists |= DIST_XF86; if (isDebug()) msgDebug("Dist Masks: Dists: %0x, DES: %0x, Srcs: %0x\nXServer: %0x, XFonts: %0x, XDists: %0x\n", Dists, DESDists, SrcDists, XF86ServerDists, XF86FontDists, XF86Dists); } int distReset(dialogMenuItem *self) { Dists = 0; DESDists = 0; SrcDists = 0; XF86Dists = 0; XF86ServerDists = 0; XF86FontDists = 0; return DITEM_SUCCESS | DITEM_REDRAW; } int distConfig(dialogMenuItem *self) { char *cp; distReset(NULL); if ((cp = variable_get(VAR_DIST_MAIN)) != NULL) Dists = atoi(cp); if ((cp = variable_get(VAR_DIST_DES)) != NULL) DESDists = atoi(cp); if ((cp = variable_get(VAR_DIST_SRC)) != NULL) SrcDists = atoi(cp); if ((cp = variable_get(VAR_DIST_X11)) != NULL) XF86Dists = atoi(cp); if ((cp = variable_get(VAR_DIST_XSERVER)) != NULL) XF86ServerDists = atoi(cp); if ((cp = variable_get(VAR_DIST_XFONTS)) != NULL) XF86FontDists = atoi(cp); distVerifyFlags(); return DITEM_SUCCESS | DITEM_REDRAW; } int distSetDeveloper(dialogMenuItem *self) { int i; distReset(NULL); Dists = _DIST_DEVELOPER; SrcDists = DIST_SRC_ALL; i = distMaybeSetDES(self) | distMaybeSetPorts(self); distVerifyFlags(); return i; } int distSetXDeveloper(dialogMenuItem *self) { int i; i = distSetDeveloper(self); Dists |= DIST_XF86; XF86Dists = DIST_XF86_BIN | DIST_XF86_SET | DIST_XF86_CFG | DIST_XF86_LIB | DIST_XF86_PROG | DIST_XF86_MAN | DIST_XF86_SERVER | DIST_XF86_FONTS; XF86ServerDists = DIST_XF86_SERVER_SVGA | DIST_XF86_SERVER_VGA16; XF86FontDists = DIST_XF86_FONTS_MISC; i |= distSetXF86(NULL); distVerifyFlags(); return i; } int distSetKernDeveloper(dialogMenuItem *self) { int i; distReset(NULL); Dists = _DIST_DEVELOPER; SrcDists = DIST_SRC_SYS; i = distMaybeSetDES(self) | distMaybeSetPorts(self); distVerifyFlags(); return i; } int distSetUser(dialogMenuItem *self) { int i; distReset(NULL); Dists = _DIST_USER; i = distMaybeSetDES(self) | distMaybeSetPorts(self); distVerifyFlags(); return i; } int distSetXUser(dialogMenuItem *self) { int i; i = distSetUser(self); Dists |= DIST_XF86; XF86ServerDists = DIST_XF86_SERVER_SVGA | DIST_XF86_SERVER_VGA16; XF86Dists = DIST_XF86_BIN | DIST_XF86_SET | DIST_XF86_CFG | DIST_XF86_LIB | DIST_XF86_MAN | DIST_XF86_SERVER | DIST_XF86_FONTS; XF86FontDists = DIST_XF86_FONTS_MISC; i |= distSetXF86(NULL); distVerifyFlags(); return i; } int distSetMinimum(dialogMenuItem *self) { distReset(NULL); Dists = DIST_BIN; return DITEM_SUCCESS | DITEM_REDRAW; } int distSetEverything(dialogMenuItem *self) { int i; Dists = DIST_ALL | DIST_XF86; SrcDists = DIST_SRC_ALL; XF86Dists = DIST_XF86_ALL; XF86ServerDists = DIST_XF86_SERVER_ALL; XF86FontDists = DIST_XF86_FONTS_ALL; i = distMaybeSetDES(self) | distMaybeSetPorts(self); distVerifyFlags(); return i; } int distSetDES(dialogMenuItem *self) { int i; if (!dmenuOpenSimple(&MenuDESDistributions, FALSE)) i = DITEM_FAILURE; else i = DITEM_SUCCESS; distVerifyFlags(); return i | DITEM_RESTORE; } static int distMaybeSetDES(dialogMenuItem *self) { int i = DITEM_SUCCESS; dialog_clear_norefresh(); if (!msgYesNo("Do wish to install DES cryptographic software?\n\n" "If you choose No, FreeBSD will use an MD5 based password scheme which,\n" "while perhaps more secure, is not interoperable with the traditional\n" "UNIX DES passwords on other non-FreeBSD systems.\n\n" "Please do NOT choose Yes at this point if you are outside the\n" "United States and Canada yet are installing from a U.S. FTP server.\n" "This will violate U.S. export restrictions and possibly get the\n" "server site into trouble! In such cases, install everything but the\n" "DES distribution from the U.S. server then switch your media type to\n" "point to an international FTP server, using the Custom installation\n" "option to select and extract the DES distribution in a second pass.")) { if (!dmenuOpenSimple(&MenuDESDistributions, FALSE)) i = DITEM_FAILURE; } distVerifyFlags(); return i | DITEM_RESTORE; } static int distMaybeSetPorts(dialogMenuItem *self) { dialog_clear_norefresh(); if (!msgYesNo("Would you like to install the FreeBSD ports collection?\n\n" "This will give you ready access to over 1000 ported software packages,\n" "though at a cost of around 35MB of disk space when \"clean\" and possibly\n" "much more than that if a lot of the distribution tarballs are loaded\n" "(unless you have the 4th CD from a FreeBSD CDROM distribution available\n" "and can mount it on /cdrom, in which case this is far less of a problem).\n\n" "The ports collection is a very valuable resource and, if you have at least\n" "100MB to spare in your /usr partition, well worth having around.\n\n" "For more information on the ports collection & the latest ports, visit:\n" " http://www.freebsd.org/ports\n")) Dists |= DIST_PORTS; else Dists &= ~DIST_PORTS; return DITEM_SUCCESS | DITEM_RESTORE; } static Boolean distSetByName(Distribution *dist, char *name) { int i, status = FALSE; /* Loop through current set */ for (i = 0; dist[i].my_name; i++) { /* This is shorthand for "dist currently disabled" */ if (!dist[i].my_dir) continue; if (!strcmp(dist[i].my_name, name)) { *(dist[i].my_mask) |= dist[i].my_bit; status = TRUE; } if (dist[i].my_dist) { if (distSetByName(dist[i].my_dist, name)) { status = TRUE; } } } distVerifyFlags(); return status; } /* Just for the dispatch stuff */ int distSetCustom(dialogMenuItem *self) { char *cp, *cp2, *tmp; if (!(tmp = variable_get(VAR_DISTS))) { msgDebug("distSetCustom() called without %s variable set.\n", VAR_DISTS); return DITEM_FAILURE; } cp = alloca(strlen(tmp) + 1); if (!cp) msgFatal("Couldn't alloca() %d bytes!\n", strlen(tmp) + 1); strcpy(cp, tmp); while (cp) { if ((cp2 = index(cp, ' ')) != NULL) *(cp2++) = '\0'; if (!distSetByName(DistTable, cp)) msgDebug("distSetCustom: Warning, no such release \"%s\"\n", cp); cp = cp2; } distVerifyFlags(); return DITEM_SUCCESS; } int distSetSrc(dialogMenuItem *self) { int i; if (!dmenuOpenSimple(&MenuSrcDistributions, FALSE)) i = DITEM_FAILURE; else i = DITEM_SUCCESS; distVerifyFlags(); return i | DITEM_RESTORE; } int distSetXF86(dialogMenuItem *self) { int i = DITEM_SUCCESS; if (!dmenuOpenSimple(&MenuXF86Select, FALSE)) i = DITEM_FAILURE; distVerifyFlags(); return i | DITEM_RESTORE; } static Boolean got_intr = 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 Boolean distExtract(char *parent, Distribution *me) { int i, status, total, intr; int cpid, zpid, fd2, chunk, numchunks; char *path, *dist, buf[BUFSIZ]; const char *tmp; FILE *fp; WINDOW *w = savescr(); struct timeval start, stop; struct sigaction old, new; status = TRUE; dialog_clear_norefresh(); if (isDebug()) msgDebug("distExtract: parent: %s, me: %s\n", parent ? parent : "(none)", me->my_name); /* Make ^C fake a sudden timeout */ new.sa_handler = handle_intr; new.sa_flags = 0; new.sa_mask = 0; sigaction(SIGINT, &new, &old); /* Loop through to see if we're in our parent's plans */ for (i = 0; me[i].my_name; i++) { dist = me[i].my_name; path = parent ? parent : dist; /* If our bit isn't set, go to the next */ if (!(me[i].my_bit & *(me[i].my_mask))) continue; /* This is shorthand for "dist currently disabled" */ if (!me[i].my_dir) { *(me[i].my_mask) &= ~(me[i].my_bit); continue; } /* Recurse if we actually have a sub-distribution */ if (me[i].my_dist) { if ((status = distExtract(dist, me[i].my_dist)) == TRUE) *(me[i].my_mask) &= ~(me[i].my_bit); goto done; } /* * Try to get distribution as multiple pieces, locating and parsing an * info file which tells us how many we need for this distribution. */ numchunks = 0; snprintf(buf, sizeof buf, "%s/%s.inf", path, dist); getinfo: fp = mediaDevice->get(mediaDevice, buf, TRUE); intr = check_for_interrupt(); if (fp == (FILE *)IO_ERROR || intr) { /* Hard error, can't continue */ if (!msgYesNo("Unable to open %s: %s.\nReinitialize media?", buf, !intr ? "I/O error." : "User interrupt.")) { mediaDevice->shutdown(mediaDevice); if (!mediaDevice->init(mediaDevice)) { status = FALSE; goto done; } else goto getinfo; } else { status = FALSE; goto done; } } else if (fp > 0) { int status; Attribs *dist_attr; if (isDebug()) msgDebug("Parsing attributes file for distribution %s\n", dist); dist_attr = alloca(sizeof(Attribs) * MAX_ATTRIBS); status = attr_parse(dist_attr, fp); intr = check_for_interrupt(); if (intr || DITEM_STATUS(status) == DITEM_FAILURE) msgConfirm("Cannot parse information file for the %s distribution: %s\n" "Please verify that your media is valid and try again.", dist, !intr ? "I/O error" : "User interrupt"); else { tmp = attr_match(dist_attr, "pieces"); if (tmp) numchunks = strtol(tmp, 0, 0); } fclose(fp); if (!numchunks) continue; } else { /* Try to get the distribution as a single file */ snprintf(buf, sizeof buf, "%s/%s.tgz", path, dist); /* * Passing TRUE as 3rd parm to get routine makes this a "probing" get, for which errors * are not considered too significant. */ getsingle: fp = mediaDevice->get(mediaDevice, buf, TRUE); intr = check_for_interrupt(); if (fp == (FILE *)IO_ERROR || intr) { /* Hard error, can't continue */ if (intr) /* result of an interrupt */ msgConfirm("Unable to open %s: User interrupt", buf); else msgConfirm("Unable to open %s: I/O error", buf); mediaDevice->shutdown(mediaDevice); if (!mediaDevice->init(mediaDevice)) { status = FALSE; goto done; } else goto getsingle; } else if (fp > 0) { char *dir = root_bias(me[i].my_dir); msgNotify("Extracting %s into %s directory...", dist, dir); status = mediaExtractDist(dir, dist, fp); fclose(fp); goto done; } else numchunks = 0; } /* Fall through from "we got the attribute file, now get the pieces" step */ if (!numchunks) continue; if (isDebug()) msgDebug("Attempting to extract distribution from %u chunks.\n", numchunks); total = 0; (void)gettimeofday(&start, (struct timezone *)0); /* We have one or more chunks, initialize unpackers... */ mediaExtractDistBegin(root_bias(me[i].my_dir), &fd2, &zpid, &cpid); /* And go for all the chunks */ for (chunk = 0; chunk < numchunks; chunk++) { int n, retval, last_msg; char prompt[80]; last_msg = 0; getchunk: snprintf(buf, sizeof buf, "%s/%s.%c%c", path, dist, (chunk / 26) + 'a', (chunk % 26) + 'a'); if (isDebug()) msgDebug("trying for piece %d of %d: %s\n", chunk + 1, numchunks, buf); fp = mediaDevice->get(mediaDevice, buf, FALSE); intr = check_for_interrupt(); if (fp <= (FILE *)0 || intr) { if (fp == (FILE *)0) msgConfirm("Failed to find %s on this media. Reinitializing media.", buf); else msgConfirm("failed to retreive piece file %s.\n" "%s: Reinitializing media.", buf, !intr ? "I/O error" : "User interrupt"); mediaDevice->shutdown(mediaDevice); if (!mediaDevice->init(mediaDevice)) goto punt; else goto getchunk; } snprintf(prompt, sizeof prompt, "Extracting %s into %s directory...", dist, root_bias(me[i].my_dir)); dialog_gauge("Progress", prompt, 8, 15, 6, 50, (int)((float)(chunk + 1) / numchunks * 100)); while (1) { int seconds; n = fread(buf, 1, BUFSIZ, fp); if (check_for_interrupt()) { msgConfirm("Media read error: User interrupt."); fclose(fp); goto punt; } else if (n <= 0) break; total += n; /* Print statistics about how we're doing */ (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; if (seconds != last_msg) { last_msg = seconds; msgInfo("%10d bytes read from %s dist, chunk %2d of %2d @ %.1f KB/sec.", total, dist, chunk + 1, numchunks, (total / seconds) / 1024.0); } retval = write(fd2, buf, n); if (retval != n) { fclose(fp); dialog_clear_norefresh(); msgConfirm("Write failure on transfer! (wrote %d bytes of %d bytes)", retval, n); goto punt; } } fclose(fp); } close(fd2); status = mediaExtractDistEnd(zpid, cpid); goto done; punt: close(fd2); mediaExtractDistEnd(zpid, cpid); status = FALSE; done: if (!status) { if (me[i].my_dist) { msgConfirm("Unable to transfer all components of the %s distribution.\n" "If this is a CDROM install, it may be because export restrictions prohibit\n" "DES code from being shipped from the U.S. Try to get this code from a\n" "local FTP site instead!", me[i].my_name); } else { status = msgYesNo("Unable to transfer the %s distribution from\n%s.\n\n" "Do you want to try to retrieve it again?", me[i].my_name, mediaDevice->name); if (!status) --i; dialog_clear(); } } /* If extract was successful, remove ourselves from further consideration */ if (status) *(me[i].my_mask) &= ~(me[i].my_bit); else continue; } sigaction(SIGINT, &old, NULL); /* Restore signal handler */ restorescr(w); return status; } static void printSelected(char *buf, int selected, Distribution *me, int *col) { int i; /* Loop through to see if we're in our parent's plans */ for (i = 0; me[i].my_name; i++) { /* If our bit isn't set, go to the next */ if (!(me[i].my_bit & selected)) continue; /* This is shorthand for "dist currently disabled" */ if (!me[i].my_dir) continue; *col += strlen(me[i].my_name); if (*col > 50) { *col = 0; strcat(buf, "\n"); } sprintf(&buf[strlen(buf)], " %s", me[i].my_name); /* Recurse if have a sub-distribution */ if (me[i].my_dist) printSelected(buf, *(me[i].my_mask), me[i].my_dist, col); } } int distExtractAll(dialogMenuItem *self) { int retries = 0; char buf[512]; /* paranoia */ if (!Dists) { if (!dmenuOpenSimple(&MenuSubDistributions, FALSE) || !Dists) return DITEM_FAILURE | DITEM_RESTORE; } if (!mediaVerify() || !mediaDevice->init(mediaDevice)) return DITEM_FAILURE; distVerifyFlags(); dialog_clear_norefresh(); msgNotify("Attempting to install all selected distributions.."); /* Try for 3 times around the loop, then give up. */ while (Dists && ++retries < 3) distExtract(NULL, DistTable); if (Dists) { int col = 0; buf[0] = '\0'; printSelected(buf, Dists, DistTable, &col); dialog_clear_norefresh(); msgConfirm("Couldn't extract the following distributions. This may\n" "be because they were not available on the installation\n" "media you've chosen:\n\n\t%s", buf); return DITEM_SUCCESS | DITEM_RESTORE; } return DITEM_SUCCESS; } Index: stable/2.2/release/sysinstall/dos.c =================================================================== --- stable/2.2/release/sysinstall/dos.c (revision 40694) +++ stable/2.2/release/sysinstall/dos.c (revision 40695) @@ -1,111 +1,111 @@ /* * The new sysinstall program. * * This is probably the last attempt in the `sysinstall' line, the next * generation being slated to essentially a complete rewrite. * - * $Id: dos.c,v 1.14.2.2 1997/01/19 09:59:27 jkh Exp $ + * $Id: dos.c,v 1.14.2.3 1998/09/08 11:44:51 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. * Copyright (c) 1995 * Gary J Palmer. 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 #define MSDOSFS #include #undef MSDOSFS static Boolean DOSMounted; Boolean mediaInitDOS(Device *dev) { struct msdosfs_args args; if (!RunningAsInit || DOSMounted) return TRUE; if (DITEM_STATUS(Mkdir("/dist")) != DITEM_SUCCESS) return FALSE; memset(&args, 0, sizeof(args)); args.fspec = dev->devname; args.uid = args.gid = 0; args.mask = 0777; if (mount(MOUNT_MSDOS, "/dist", MNT_RDONLY, (caddr_t)&args) == -1) { msgConfirm("Error mounting %s on /dist: %s (%u)", args.fspec, strerror(errno), errno); return FALSE; } else msgDebug("Mounted DOS device (%s) on /dist.\n", args.fspec); DOSMounted = TRUE; return TRUE; } FILE * mediaGetDOS(Device *dev, char *file, Boolean probe) { char buf[PATH_MAX]; if (isDebug()) msgDebug("Request for %s from DOS\n", file); snprintf(buf, PATH_MAX, "/dist/%s", file); if (file_readable(buf)) return fopen(buf, "r"); - snprintf(buf, PATH_MAX, "/dist/dists/%s", file); + snprintf(buf, PATH_MAX, "/dist/FREEBSD/%s", file); if (file_readable(buf)) return fopen(buf, "r"); snprintf(buf, PATH_MAX, "/dist/%s/%s", variable_get(VAR_RELNAME), file); if (file_readable(buf)) return fopen(buf, "r"); snprintf(buf, PATH_MAX, "/dist/%s/dists/%s", variable_get(VAR_RELNAME), file); return fopen(buf, "r"); } void mediaShutdownDOS(Device *dev) { if (!RunningAsInit || !DOSMounted) return; msgDebug("Unmounting %s from /dist\n", dev->name); if (unmount("/dist", MNT_FORCE) != 0) msgConfirm("Could not unmount the DOS partition: %s", strerror(errno)); if (isDebug()) msgDebug("Unmount successful\n"); DOSMounted = FALSE; return; } Index: stable/2.2/release/sysinstall/floppy.c =================================================================== --- stable/2.2/release/sysinstall/floppy.c (revision 40694) +++ stable/2.2/release/sysinstall/floppy.c (revision 40695) @@ -1,151 +1,152 @@ /* * The new sysinstall program. * * This is probably the last attempt in the `sysinstall' line, the next * generation being slated to essentially a complete rewrite. * - * $Id: floppy.c,v 1.16.2.7 1998/02/11 15:43:14 jkh Exp $ + * $Id: floppy.c,v 1.16.2.8 1998/07/18 09:35:23 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. * Copyright (c) 1995 * Gary J Palmer. 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. * */ /* These routines deal with getting things off of floppy media */ #include "sysinstall.h" #include #include #include #include #include #include #include #define MSDOSFS #include #undef MSDOSFS static Boolean floppyMounted; char *distWanted; Boolean mediaInitFloppy(Device *dev) { struct msdosfs_args dosargs; struct ufs_args u_args; - char *mountpoint = "/dist"; + char *mountpoint; if (floppyMounted) return TRUE; + mountpoint = (char *)dev->private; if (Mkdir(mountpoint)) { msgConfirm("Unable to make %s directory mountpoint for %s!", mountpoint, dev->devname); return FALSE; } msgDebug("Init floppy called for %s distribution.\n", distWanted ? distWanted : "some"); if (!variable_get(VAR_NONINTERACTIVE)) { if (!distWanted) msgConfirm("Please insert floppy in %s", dev->description); else msgConfirm("Please insert floppy containing %s in %s", distWanted, dev->description); } memset(&dosargs, 0, sizeof dosargs); dosargs.fspec = dev->devname; dosargs.uid = dosargs.gid = 0; dosargs.mask = 0777; memset(&u_args, 0, sizeof(u_args)); u_args.fspec = dev->devname; if (mount(MOUNT_MSDOS, mountpoint, MNT_RDONLY, (caddr_t)&dosargs) == -1) { if (mount(MOUNT_UFS, mountpoint, MNT_RDONLY, (caddr_t)&u_args) == -1) { msgConfirm("Error mounting floppy %s (%s) on %s : %s", dev->name, dev->devname, mountpoint, strerror(errno)); return FALSE; } } msgDebug("initFloppy: mounted floppy %s successfully on %s\n", dev->devname, mountpoint); floppyMounted = TRUE; distWanted = NULL; return TRUE; } FILE * mediaGetFloppy(Device *dev, char *file, Boolean probe) { char buf[PATH_MAX]; FILE *fp; int nretries = 5; - snprintf(buf, PATH_MAX, "/dist/%s", file); + snprintf(buf, PATH_MAX, "%s/%s", (char *)dev->private, file); if (isDebug()) - msgDebug("Request for %s from floppy on /dist, probe is %d.\n", buf, probe); + msgDebug("Request for %s from floppy on %s, probe is %d.\n", buf, (char *)dev->private, probe); if (!file_readable(buf)) { if (probe) return NULL; else { while (!file_readable(buf)) { if (!--nretries) { msgConfirm("GetFloppy: Failed to get %s after retries;\ngiving up.", buf); return NULL; } distWanted = buf; mediaShutdownFloppy(dev); if (!mediaInitFloppy(dev)) return NULL; } } } fp = fopen(buf, "r"); return fp; } void mediaShutdownFloppy(Device *dev) { - char *mountpoint = "/dist"; + char *mountpoint = (char *)dev->private; if (floppyMounted) { if (unmount(mountpoint, MNT_FORCE) != 0) msgDebug("Umount of floppy on %s failed: %s (%d)\n", mountpoint, strerror(errno), errno); else { floppyMounted = FALSE; msgDebug("Floppy unmounted successfully.\n"); if (!variable_get(VAR_NONINTERACTIVE)) msgConfirm("You may remove the floppy from %s", dev->description); } } } Index: stable/2.2/release/sysinstall/help/XF86.hlp =================================================================== --- stable/2.2/release/sysinstall/help/XF86.hlp (revision 40694) +++ stable/2.2/release/sysinstall/help/XF86.hlp (revision 40695) @@ -1,1580 +1,1580 @@ - README for XFree86[tm] 3.3.2.3 + README for XFree86[tm] 3.3.2.3 - The XFree86 Project, Inc + The XFree86 Project, Inc - 20 July 1998 + 20 July 1998 - Abstract + Abstract XFree86 is a port of X11R6.3 that supports several Unix and Unix-like operating systems on Intel and other platforms. This release is a maintenance release, fixing bugs found in XFree86 3.3.1. The release is available as source patches against the X Consortium X11R6.3 code and the XFree86 3.3.1 release. Binary distributions for many archi- tectures are also available. [ FreeBSD Project Note: 3.3.2.3 is a security release relative to 3.3.2. Where 3.3.2 is referred to below, understand that "3.3.2.3" is actually being referred to. ] 1. What's new in XFree86 3.3.2 For a summary of new features in this release, please refer to the RELNOTES file. For a detailed list of changes, refer to the CHANGELOG file in the source distribution. 2. Systems XFree86 has been tested on Note: Not all systems listed here have been tested with the current release. SVR4.0: - o Esix: 4.0.3A, 4.0.4, 4.0.4.1 + o Esix: 4.0.3A, 4.0.4, 4.0.4.1 - o Microport: 2.2, 3.1, 4.1, 4.2 + o Microport: 2.2, 3.1, 4.1, 4.2 - o Dell: 2.1, 2.2, 2.2.1 + o Dell: 2.1, 2.2, 2.2.1 - o UHC: 2.0, 3.6 + o UHC: 2.0, 3.6 - o Consensys: 1.2 + o Consensys: 1.2 - o MST: 4.0.3 (Load 2.07 and Load 3.02) + o MST: 4.0.3 (Load 2.07 and Load 3.02) - o ISC: 4.0.3 + o ISC: 4.0.3 - o AT&T: 2.1, 4.0 + o AT&T: 2.1, 4.0 README for XFree86[tm] 3.3.2 README for XFree86[tm] 3.3.2 - o NCR: MP-RAS + o NCR: MP-RAS - o SunSoft: Solaris x86 2.1, 2.4, 2.5, 2.5.1, 2.6 + o SunSoft: Solaris x86 2.1, 2.4, 2.5, 2.5.1, 2.6 - o PANIX 5.0 for AT + o PANIX 5.0 for AT SVR4.2: - o Consensys + o Consensys - o Novell UnixWare + o Novell UnixWare SVR3: - o ISC: 3.0, 4.0, 4.1 + o ISC: 3.0, 4.0, 4.1 Others: - o NetBSD 1.0, 1.1, 1.2, 1.2.1, 1.3 + o NetBSD 1.0, 1.1, 1.2, 1.2.1, 1.3 - o OpenBSD 2.0, 2.1 + o OpenBSD 2.0, 2.1 - o FreeBSD 2.0.5, 2.1, 2.1.5, 2.1.6, 2.1.7, 2.1.7.1, 2.2, 2.2.1, - 2.2.2, 2.2.5, 3.0-current + o FreeBSD 2.0.5, 2.1, 2.1.5, 2.1.6, 2.1.7, 2.1.7.1, 2.2, 2.2.1, + 2.2.2, 2.2.5, 3.0-current - o Linux (Intel x86, DEC Alpha/AXP and m68k) + o Linux (Intel x86, DEC Alpha/AXP and m68k) - o LynxOS AT 2.3.0, 2.4.0, 2.5.0 + o LynxOS AT 2.3.0, 2.4.0, 2.5.0 - o LynxOS microSPARC 2.4.0, 2.5.0 + o LynxOS microSPARC 2.4.0, 2.5.0 - o LynxOS PowerPC 2.4.0, 2.5.0 + o LynxOS PowerPC 2.4.0, 2.5.0 - o OS/2 Warp 3 FP5/17/22, Warp 4 -/FP1 + o OS/2 Warp 3 FP5/17/22, Warp 4 -/FP1 PC98: - o FreeBSD(98) 2.0.5, 2.1, 2.1.5, 2.1.7.1, 2.2, 2.2.1, 2.2.2, - 2.2.5 + o FreeBSD(98) 2.0.5, 2.1, 2.1.5, 2.1.7.1, 2.2, 2.2.1, 2.2.2, + 2.2.5 - o NetBSD/pc98 (based on NetBSD 1.2, 1.2.1) + o NetBSD/pc98 (based on NetBSD 1.2, 1.2.1) - o PANIX 5.0 for 98 + o PANIX 5.0 for 98 - o Linux/98 + o Linux/98 3. Supported video-card chip-sets At this time, XFree86 3.3.2 supports the following chipsets: README for XFree86[tm] 3.3.2 Ark Logic - ARK1000PV, ARK1000VL, ARK2000PV, ARK2000MT + ARK1000PV, ARK1000VL, ARK2000PV, ARK2000MT Alliance - AP6422, AT24 + AP6422, AT24 ATI - 18800, 18800-1, 28800-2, 28800-4, 28800-5, 28800-6, 68800-3, - 68800-6, 68800AX, 68800LX, 88800GX-C, 88800GX-D, 88800GX-E, - 88800GX-F, 88800CX, 264CT, 264ET, 264VT, 264GT, 264VT-B, 264VT3, - 264GT-B, 264GT3 (this list includes the Mach8, Mach32, Mach64, 3D - Rage, 3D Rage II and 3D Rage Pro) + 18800, 18800-1, 28800-2, 28800-4, 28800-5, 28800-6, 68800-3, + 68800-6, 68800AX, 68800LX, 88800GX-C, 88800GX-D, 88800GX-E, + 88800GX-F, 88800CX, 264CT, 264ET, 264VT, 264GT, 264VT-B, 264VT3, + 264GT-B, 264GT3 (this list includes the Mach8, Mach32, Mach64, 3D + Rage, 3D Rage II and 3D Rage Pro) Avance Logic - ALG2101, ALG2228, ALG2301, ALG2302, ALG2308, ALG2401 + ALG2101, ALG2228, ALG2301, ALG2302, ALG2308, ALG2401 Chips & Technologies - 65520, 65530, 65540, 65545, 65520, 65530, 65540, 65545, 65546, - 65548, 65550, 65554, 65555, 68554, 64200, 64300 + 65520, 65530, 65540, 65545, 65520, 65530, 65540, 65545, 65546, + 65548, 65550, 65554, 65555, 68554, 64200, 64300 Cirrus Logic - CLGD5420, CLGD5422, CLGD5424, CLGD5426, CLGD5428, CLGD5429, - CLGD5430, CLGD5434, CLGD5436, CLGD5440, CLGD5446, CLGD5462, - CLGD5464, CLGD5465, CLGD5480, CLGD6205, CLGD6215, CLGD6225, - CLGD6235, CLGD6410, CLGD6412, CLGD6420, CLGD6440, CLGD7541(*), - CLGD7543(*), CLGD7548(*), CLGD7555(*) + CLGD5420, CLGD5422, CLGD5424, CLGD5426, CLGD5428, CLGD5429, + CLGD5430, CLGD5434, CLGD5436, CLGD5440, CLGD5446, CLGD5462, + CLGD5464, CLGD5465, CLGD5480, CLGD6205, CLGD6215, CLGD6225, + CLGD6235, CLGD6410, CLGD6412, CLGD6420, CLGD6440, CLGD7541(*), + CLGD7543(*), CLGD7548(*), CLGD7555(*) Digital Equipment Corporation - TGA + TGA Compaq - AVGA + AVGA Genoa - GVGA + GVGA IBM - 8514/A (and true clones), XGA-2 + 8514/A (and true clones), XGA-2 IIT - AGX-014, AGX-015, AGX-016 + AGX-014, AGX-015, AGX-016 Matrox - MGA2064W (Millennium), MGA1064SG (Mystique and Mystique 220), - MGA2164W (Millennium II PCI and AGP) + MGA2064W (Millennium), MGA1064SG (Mystique and Mystique 220), + MGA2164W (Millennium II PCI and AGP) MX - MX68000(*), MX680010(*) + MX68000(*), MX680010(*) NCR - 77C22(*), 77C22E(*), 77C22E+(*) + 77C22(*), 77C22E(*), 77C22E+(*) Number Nine - I128 (series I and II), Revolution 3D (T2R) + I128 (series I and II), Revolution 3D (T2R) README for XFree86[tm] 3.3.2 NVidia/SGS Thomson - NV1, STG2000, RIVA128 + NV1, STG2000, RIVA128 OAK - OTI067, OTI077, OTI087 + OTI067, OTI077, OTI087 RealTek - RTG3106(*) + RTG3106(*) S3 - 86C911, 86C924, 86C801, 86C805, 86C805i, 86C928, 86C864, 86C964, - 86C732, 86C764, 86C765, 86C767, 86C775, 86C785, 86C868, 86C968, - 86C325, 86C357, 86C375, 86C375, 86C385, 86C988, 86CM65, 86C260 + 86C911, 86C924, 86C801, 86C805, 86C805i, 86C928, 86C864, 86C964, + 86C732, 86C764, 86C765, 86C767, 86C775, 86C785, 86C868, 86C968, + 86C325, 86C357, 86C375, 86C375, 86C385, 86C988, 86CM65, 86C260 SiS - 86C201, 86C202, 86C205 + 86C201, 86C202, 86C205 Tseng - ET3000, ET4000AX, ET4000/W32, ET4000/W32i, ET4000/W32p, ET6000, - ET6100 + ET3000, ET4000AX, ET4000/W32, ET4000/W32i, ET4000/W32p, ET6000, + ET6100 Trident - TVGA8800CS, TVGA8900B, TVGA8900C, TVGA8900CL, TVGA9000, TVGA9000i, - TVGA9100B, TVGA9200CXR, Cyber9320(*), TVGA9400CXi, TVGA9420, - TGUI9420DGi, TGUI9430DGi, TGUI9440AGi, TGUI9660XGi, TGUI9680, Pro- - Vidia 9682, ProVidia 9685(*), Cyber 9382, Cyber 9385, Cyber 9388, - 3DImage975(PCI), 3DImage985(AGP), Cyber 9397, Cyber 9520 + TVGA8800CS, TVGA8900B, TVGA8900C, TVGA8900CL, TVGA9000, TVGA9000i, + TVGA9100B, TVGA9200CXR, Cyber9320(*), TVGA9400CXi, TVGA9420, + TGUI9420DGi, TGUI9430DGi, TGUI9440AGi, TGUI9660XGi, TGUI9680, Pro- + Vidia 9682, ProVidia 9685(*), Cyber 9382, Cyber 9385, Cyber 9388, + 3DImage975(PCI), 3DImage985(AGP), Cyber 9397, Cyber 9520 Video 7/Headland Technologies - HT216-32(*) + HT216-32(*) Weitek - P9000 + P9000 Western Digital/Paradise - PVGA1 + PVGA1 Western Digital - WD90C00, WD90C10, WD90C11, WD90C24, WD90C24A, WD90C30, WD90C31, - WD90C33 + WD90C00, WD90C10, WD90C11, WD90C24, WD90C24A, WD90C30, WD90C31, + WD90C33 (*) Note, chips marked in this way have either limited support or the drivers for them are not actively maintained. All of the above are supported in both 256 color, and some are supported in mono and 16 color modes, and some are supported an higher color depths. Refer to the chipset-specific README files (currently for TGA, Matrox, Mach32, Mach64, NVidia, Oak, P9000, S3 (except ViRGE), S3 ViRGE, SiS, Video7, Western Digital, Tseng (W32), Tseng (all), AGX/XGA, ARK, ATI (SVGA server), Chips and Technologies, Cirrus, Trident) for more information about using those chipsets. The monochrome server also supports generic VGA cards, using 64k of video mem- ory in a single bank, the Hercules monochrome card, the Hyundai HGC1280, Sigma README for XFree86[tm] 3.3.2 LaserView, Visa and Apollo monochrome cards. The VGA16 server supports memory banking with the ET4000, Trident, ATI, NCR, OAK and Cirrus 6420 chipsets allowing virtual display sizes up to about 1600x1200 (with 1MB of video memory). For other chipsets the display size is limited to approximately 800x600. Notes: The Diamond SpeedStar 24 (and possibly some SpeedStar+) boards are NOT supported, even though they use the ET4000. The Weitek 9100 and 9130 chipsets are not supported (these are used on the Dia- mond Viper Pro and Viper SE boards). Most other Diamond boards will work with this release of XFree86. Diamond is actively supporting The XFree86 Project, Inc. 3DLabs GLINT, Permedia and Permedia 2 support could unfortunately not be included in XFree86 3.3.2 since there are open issues regarding the documenta- tion and whether or not they were provided to us under NDA. S.u.S.E. will continue to make available binary only servers for these cards. These servers can be freely distributed just like XFree86, but sources cannot be made available. S.u.S.E. will continue to develop these servers and will continue to try to donate the code back to XFree86. For the time being S.u.S.E. will try to not only make Linux binaries available, but binaries for other platforms as well. Please contact x@suse.de with further questions. You can find the servers at http://www.suse.de/XSuSE/XSuSE_E.html 4. Where to get more information Additional documentation is available in the XFree86(1), XF86Config(4/5), XF86_SVGA(1), XF86_Mono(1), XF86_VGA16(1), XF86_Accel(1), XF86Setup(1) and xvidtune(1) manual pages. In addition, several README files and tutorial docu- ments are provided. These are available in /usr/X11R6/lib/X11/doc in the binary distributions, and in xc/programs/Xserver/hw/xfree86/doc in the source distribution. The files QuickStart.doc and README.Config should be consulted for information on how to set up the XFree86 servers. All supplied documents, manual pages, and the XFree86 FAQ should be read before con- tacting the XFree86 team for assistance. Documentation on SVGA driver development can be found in the directory /usr/X11R6/lib/Server/VGADriverDoc in the binary distribution, and in the directory xc/programs/Xserver/hw/xfree86/VGADriverDoc in the source distribu- tion. If you are totally at a loss, you can contact the XFree86 Support Team at -. Before doing so, please make sure that you are using -the latest release of XFree86. Check the versions listed on +. Before doing so, please make sure that you are using +the latest release of XFree86. Check the versions listed on ftp://ftp.xfree86.org/pub/XFree86. README for XFree86[tm] 3.3.2 There is a Usenet news group comp.windows.x.i386unix that contains mostly dis- cussions about XFree86 and related topics. Many questions can be answered there. 5. Thanks The XFree86 Project wants to express a special thanks to S.u.S.E. GmbH, Fuerth, Germany, for the long and successful cooperation over the last few years. S.u.S.E. GmbH at one point hired our Core Team member and Vice President Dirk Hohndel as an employee and allowed him to work more or less full time on XFree86 for almost nine months. S.u.S.E. continues to be a significant source of input and help to XFree86. This manifested itself in the XSuSE series of X servers that have all except for the GLINT server (due to unresolved legal issues) been integrated into XFree86 3.3.2. 6. Credits XFree86 was originally put together by: o David Dawes o Glenn Lai o Jim Tsillas o David Wexelblat XFree86 support was integrated into the base X11R6 distribution by: o Stuart Anderson o Doug Anson o Gertjan Akkerman o Mike Bernson o Robin Cutshaw o David Dawes o Marc Evans o Pascal Haible o Matthieu Herrb o Dirk Hohndel o David Holland README for XFree86[tm] 3.3.2 o Alan Hourihane o Jeffrey Hsu o Glenn Lai o Ted Lemon o Rich Murphey o Hans Nasten o Mark Snitily o Randy Terbush o Jon Tombs o Kees Verstoep o Paul Vixie o Mark Weaver o David Wexelblat o Philip Wheatley o Thomas Wolfram o Orest Zborowski 386BSD, FreeBSD, NetBSD support by: - o Rich Murphey + o Rich Murphey NetBSD, OpenBSD support by: - o Matthieu Herrb + o Matthieu Herrb Original 386BSD port by: - o Pace Willison, + o Pace Willison, - o Amancio Hasty Jr + o Amancio Hasty Jr Mach 386 support by: - o Robert Baron + o Robert Baron Linux support by: - o Orest Zborowski + o Orest Zborowski README for XFree86[tm] 3.3.2 SCO Unix support by: - o David McCullough + o David McCullough Amoeba support by: - o Kees Verstoep + o Kees Verstoep Minix-386 support by: - o Philip Homburg + o Philip Homburg OSF/1 support by: - o Marc Evans + o Marc Evans BSD/OS support by: - o Hans Nasten , + o Hans Nasten , - o Paul Vixie + o Paul Vixie Solaris support by: - o Doug Anson , + o Doug Anson , - o David Holland + o David Holland ISC SVR3 support by: - o Michael Rohleder + o Michael Rohleder LynxOS support by: - o Thomas Mueller + o Thomas Mueller OS/2 support by: - o Holger Veit + o Holger Veit - o Sebastien Marineau + o Sebastien Marineau Linux shared libraries by: - o Orest Zborowski , + o Orest Zborowski , - o Dirk Hohndel + o Dirk Hohndel PC98 support by: - o Toyonori Fujiura , + o Toyonori Fujiura , - o Hiroyuki Aizu , + o Hiroyuki Aizu , README for XFree86[tm] 3.3.2 - o Tetsuya Kakefuda , + o Tetsuya Kakefuda , - o Takefumi Tsukada , + o Takefumi Tsukada , - o H.Komatsuzaki, + o H.Komatsuzaki, - o Naoki Katsurakawa , + o Naoki Katsurakawa , - o Shuichiro Urata , + o Shuichiro Urata , - o Yasuyuki Kato , + o Yasuyuki Kato , - o Michio Jinbo , + o Michio Jinbo , - o Tatsuya Koike , + o Tatsuya Koike , - o Koichiro Suzuki , + o Koichiro Suzuki , - o Tsuyoshi Tamaki , + o Tsuyoshi Tamaki , - o Isao Ohishi , + o Isao Ohishi , - o Kohji Ohishi , + o Kohji Ohishi , - o Shin'ichi Yairo , + o Shin'ichi Yairo , - o Kazuo Ito , + o Kazuo Ito , - o Jun Sakuma , + o Jun Sakuma , - o Shuichi Ueno , + o Shuichi Ueno , - o Ishida Kazuo , + o Ishida Kazuo , - o Takaaki Nomura , + o Takaaki Nomura , - o Tadaaki Nagao , + o Tadaaki Nagao , - o Minoru Noda , + o Minoru Noda , - o Naofumi Honda , + o Naofumi Honda , - o Akio Morita , + o Akio Morita , - o Takashi Sakamoto , + o Takashi Sakamoto , - o Yasuhiro Ichikawa , + o Yasuhiro Ichikawa , - o Kazunori Ueno , + o Kazunori Ueno , - o Yasushi Suzuki , + o Yasushi Suzuki , - o Satoshi Kimura , + o Satoshi Kimura , README for XFree86[tm] 3.3.2 - o Kazuhiko Uno , + o Kazuhiko Uno , - o Tomiharu Takigami , + o Tomiharu Takigami , - o Tomomi Suzuki , + o Tomomi Suzuki , - o Toshihiko Yagi , + o Toshihiko Yagi , - o Masato Yoshida (Contributor of PW805i support) + o Masato Yoshida (Contributor of PW805i support) Original accelerated code by: - o Kevin Martin , + o Kevin Martin , - o Rik Faith , + o Rik Faith , - o Jon Tombs + o Jon Tombs XFree86 Acceleration Architecture (XAA) by: - o Harm Hanemaayer , + o Harm Hanemaayer , S3 accelerated code by: - o Jon Tombs , + o Jon Tombs , - o Harald Koenig , + o Harald Koenig , - o David Wexelblat , + o David Wexelblat , - o David Dawes , + o David Dawes , - o Robin Cutshaw , + o Robin Cutshaw , - o Amancio Hasty , + o Amancio Hasty , - o Norbert Distler , + o Norbert Distler , - o Leonard N. Zubkoff , + o Leonard N. Zubkoff , - o Bernhard Bender , + o Bernhard Bender , - o Dirk Hohndel , + o Dirk Hohndel , - o Joe Moss + o Joe Moss S3V accelerated code by: - o Harald Koenig , + o Harald Koenig , - o Kevin Brosius + o Kevin Brosius - o Berry Dijk + o Berry Dijk README for XFree86[tm] 3.3.2 - o Dirk Hohndel + o Dirk Hohndel - o Huver Hu + o Huver Hu - o Dirk Vangestel + o Dirk Vangestel Mach32 accelerated code by: - o Kevin Martin , + o Kevin Martin , - o Rik Faith , + o Rik Faith , - o Mike Bernson , + o Mike Bernson , - o Mark Weaver , + o Mark Weaver , - o Craig Groeschel + o Craig Groeschel - o Bryan Feir + o Bryan Feir Mach64 accelerated code by: - o Kevin Martin , + o Kevin Martin , Mach8, 8514 accelerated code by: - o Kevin Martin , + o Kevin Martin , - o Rik Faith , + o Rik Faith , - o Tiago Gons , + o Tiago Gons , - o Hans Nasten , + o Hans Nasten , - o Scott Laird + o Scott Laird Cirrus accelerated code by: - o Simon Cooper , + o Simon Cooper , - o Harm Hanemaayer , + o Harm Hanemaayer , - o Bill Reynolds , + o Bill Reynolds , - o Corin Anderson + o Corin Anderson Western Digital accelerated code by: - o Mike Tierney , + o Mike Tierney , - o Bill Conn + o Bill Conn P9000 accelerated code by: README for XFree86[tm] 3.3.2 - o Erik Nygren , + o Erik Nygren , - o Harry Langenbacher + o Harry Langenbacher - o Chris Mason + o Chris Mason - o Henrik Harmsen + o Henrik Harmsen AGX accelerated code by: - o Henry Worth , + o Henry Worth , Number Nine I128 driver by: - o Robin Cutshaw , + o Robin Cutshaw , ET4000/W32 accelerated code by: - o Glenn Lai , + o Glenn Lai , ET6000 SVGA and accelerated support (both based on the existing W32 code) by: - o Koen Gadeyne , + o Koen Gadeyne , Oak Technologies Inc. accelerated code by: - o Jorge Delgado , + o Jorge Delgado , 16 color VGA server by: - o Gertjan Akkerman + o Gertjan Akkerman 2 color VGA and non-VGA mono servers by: - o Pascal Haible + o Pascal Haible ATI SVGA driver by: - o Per Lindqvist and Doug Evans - . + o Per Lindqvist and Doug Evans + . - o Ported to X11R5 by Rik Faith . + o Ported to X11R5 by Rik Faith . - o Rewritten by Marc Aurele La France + o Rewritten by Marc Aurele La France WD90C24 support by: - o Brad Bosch + o Brad Bosch Trident SVGA driver by: - o Alan Hourihane + o Alan Hourihane README for XFree86[tm] 3.3.2 SiS SVGA driver by: - o Alan Hourihane + o Alan Hourihane - o Xavier Ducoin + o Xavier Ducoin DEC 21030 (TGA) server by: - o Alan Hourihane + o Alan Hourihane - o Harald Koenig + o Harald Koenig NCR SVGA driver by: - o Stuart Anderson with the permission - of NCR Corporation + o Stuart Anderson with the permission + of NCR Corporation Cirrus SVGA driver by: - o Bill Reynolds , + o Bill Reynolds , - o Hank Dietz , + o Hank Dietz , - o Simon Cooper , + o Simon Cooper , - o Harm Hanemaayer , + o Harm Hanemaayer , - o Corin Anderson + o Corin Anderson Cirrus CL64xx driver by: - o Manfred Brands + o Manfred Brands - o Randy Hendry + o Randy Hendry - o Jeff Kirk + o Jeff Kirk Compaq SVGA driver by: - o Hans Oey + o Hans Oey - o Ming Yu + o Ming Yu - o Gerry Toll + o Gerry Toll Oak SVGA driver by: - o Steve Goldman + o Steve Goldman - o Jorge Delgado + o Jorge Delgado ARK Logic SVGA driver by: README for XFree86[tm] 3.3.2 - o Harm Hanemaayer + o Harm Hanemaayer - o Leon Bottou + o Leon Bottou AL2101 SVGA driver by: - o Paolo Severini + o Paolo Severini Avance Logic ``ali'' SVGA driver by: - o Ching-Tai Chiu + o Ching-Tai Chiu Chips & Technologies SVGA driver by: - o Regis Cridlig + o Regis Cridlig - o Jon Block + o Jon Block - o Mike Hollick + o Mike Hollick - o Nozomi Ytow + o Nozomi Ytow - o Egbert Eich + o Egbert Eich - o David Bateman + o David Bateman - o Xavier Ducoin + o Xavier Ducoin MX SVGA driver by: - o Frank Dikker + o Frank Dikker Video7 SVGA driver by: - o Craig Struble + o Craig Struble RealTek SVGA driver by: - o Peter Trattler + o Peter Trattler Apollo Mono driver by: - o Hamish Coleman + o Hamish Coleman Matrox SVGA driver by: - o Guy Desbief + o Guy Desbief - o Radoslaw Kapitan + o Radoslaw Kapitan - o Andrew Vanderstock + o Andrew Vanderstock - o Angsar Hockmann + o Angsar Hockmann README for XFree86[tm] 3.3.2 - o Michael Will + o Michael Will - o Andrew Mileski + o Andrew Mileski - o Stephen Pitts + o Stephen Pitts - o Dirk Hohndel + o Dirk Hohndel - o Leonard N. Zubkoff + o Leonard N. Zubkoff ViRGE SVGA driver by: - o Sebastien Marineau , + o Sebastien Marineau , - o Harald Koenig + o Harald Koenig Linux/m68k Frame Buffer Device driver by: - o Martin Schaller + o Martin Schaller - o Geert Uytterhoeven + o Geert Uytterhoeven - o Andreas Schwab + o Andreas Schwab - o Guenther Kelleter + o Guenther Kelleter Tseng ET4000 and ET6000 SVGA driver by: - o [Unknown authors] + o [Unknown authors] - o Dirk Hohndel + o Dirk Hohndel - o Koen Gadeyne + o Koen Gadeyne - o ... and others + o ... and others XFree86-VidModeExtension and xvidtune client by: - o Kaleb S. Keithley + o Kaleb S. Keithley - o David Dawes + o David Dawes - o Jon Tombs + o Jon Tombs - o Joe Moss + o Joe Moss XFree86-Misc extension by: - o Joe Moss + o Joe Moss - o David Dawes + o David Dawes XFree86-DGA extension by: README for XFree86[tm] 3.3.2 - o Jon Tombs + o Jon Tombs - o Mark Vojkovich + o Mark Vojkovich - o Harm Hanemaayer , + o Harm Hanemaayer , - o David Dawes + o David Dawes XInput integration, devices and clients by: - o Frederic Lepied (XInput integration, - Wacom tablet, Joystick and extended mouse devices, xsetpointer - and xsetmode clients) + o Frederic Lepied (XInput integration, + Wacom tablet, Joystick and extended mouse devices, xsetpointer + and xsetmode clients) - o Patrick Lecoanet (Elographics touch- - screen device) + o Patrick Lecoanet (Elographics touch- + screen device) - o Steven Lang (Summagraphics tablet device) + o Steven Lang (Summagraphics tablet device) Other contributors: - o Joerg Wunsch (ET3000 banked mono), + o Joerg Wunsch (ET3000 banked mono), - o Thomas Dickey (xterm "new" model ANSI col- - ors and VT220, VT520 emulation). + o Thomas Dickey (xterm "new" model ANSI col- + ors and VT220, VT520 emulation). - o Eric Raymond (new video mode documen- - tation), + o Eric Raymond (new video mode documen- + tation), - o and an entire horde of beta-testers around the world! + o and an entire horde of beta-testers around the world! 7. Contact information Ongoing development planning and support is coordinated by the XFree86 Core Team. At this time the Core Team consists of (in alphabetical order): o Robin Cutshaw o David Dawes o Marc Evans o Harm Hanemaayer o Dirk Hohndel o Harald Koenig o Rich Murphey o Jon Tombs README for XFree86[tm] 3.3.2 o David Wexelblat Mail sent to will reach the core team. Please note that support questions should be sent to . 8. The XFree86 Project, Inc. The XFree86 Project, Inc, was founded to accomplish two major goals: 1. To provide a vehicle by which XFree86 can be represented in X Consortium, Inc, the organization responsible for the design, development, and release of The X Window System. 2. To provide some basic funding for acquisition of facilities for ongoing XFree86 development, largely to consist of new video hardware and basic computing facilities. -The first of these was the primary motivation. We have held discussions with +The first of these was the primary motivation. We have held discussions with the X Consortium on and off for many months, attempting to find an avenue by which our loosely-organized free software project could be given a voice within the X Consortium. The bylaws of the Consortium would not recognize such an organization. After an initial investigation about funding, we decided to form our own corporation to provide the avenue we needed to meet the requirements of the X Consortium bylaws. By doing this, we were able to be involved in the beta-test interval for X11R6, and have contributed the majority of XFree86 to the X11R6 and X11R6.1 core release. The version of XFree86 in the initial X11R6 core is 3.0. The version of XFree86 in the current X11R6.3 release is 3.2. An additional benefit of this incorporation is that The XFree86 Project, Inc has obtained outside financial support for our work. This will hopefully give us the freedom to be more pro-active in obtaining new video hardware, and enable us to release better products more quickly, as we will be able to go and get what we need, and get it into the hands of the people who can do the work. The current Board of Directors and Officers of the The XFree86 Project, Inc, are: o David Dawes, President and Secretary o Dirk Hohndel, Vice-President o Glenn Lai, Director o Rich Murphey, Treasurer o Jim Tsillas, Director o Jon Tombs, Director o David Wexelblat, Director README for XFree86[tm] 3.3.2 Email to reaches the board of directors. Our bylaws have been crafted in such a way to ensure that XFree86 is and always will be a free software project. There is no personal financial benefit to any member of the Core Team or any other XFree86 participant. All assets of the corporation remain with the corporation, and, in the event of the dissolution of the corporation, all assets will be turned over to the X Consortium, Inc. It is hoped that by doing this, our corporation will be merely a formalization of what we have been doing in the past, rather than something entirely new. As of March 1997, The XFree86 Project has revised its source/binary access and release policy. The main points of the new policy are: o There will be no more time-limited public binary-only beta releases. Instead we plan to increase the frequency of full public releases to about four releases per year. o The source access/use is divided into three categories: - o End users. End users have access to only the source of full public - releases. The main reason for this restriction is that our develop- - ment code often contains code from other sources which cannot be - released to the public immediately. + o End users. End users have access to only the source of full public + releases. The main reason for this restriction is that our develop- + ment code often contains code from other sources which cannot be + released to the public immediately. - o Active developers (members of the XFree86 ``developer team''). - Active developers must formally become non-voting members of the - XFree86 Project, and have full access to our internal development - source. They are permitted to make time-limited binaries (in coordi- - nation with the Core Team) of the servers they are actively working - on available to external testers for specific testing. + o Active developers (members of the XFree86 ``developer team''). + Active developers must formally become non-voting members of the + XFree86 Project, and have full access to our internal development + source. They are permitted to make time-limited binaries (in coordi- + nation with the Core Team) of the servers they are actively working + on available to external testers for specific testing. - o Commercial members. Commercial members are non-voting members of The - XFree86 Project who donate US$5000/year to the Project. Addition- - ally, companies who contribute significantly to the development - effort of XFree86 can be awarded commercial membership by the Core - Team on a yearly bases. Commercial members can use the internal - XFree86 development source for derived binary-only products providing - that they take full responsibility for supporting the product, and - don't call it ``XFree86'' (although the derivation of the product - must be acknowledged in any accompanying documentation). Binary - packages for the OSs we support which are simply compiled from our - internal source without significant added value are explicitly NOT - allowed. + o Commercial members. Commercial members are non-voting members of The + XFree86 Project who donate US$5000/year to the Project. Addition- + ally, companies who contribute significantly to the development + effort of XFree86 can be awarded commercial membership by the Core + Team on a yearly bases. Commercial members can use the internal + XFree86 development source for derived binary-only products providing + that they take full responsibility for supporting the product, and + don't call it ``XFree86'' (although the derivation of the product + must be acknowledged in any accompanying documentation). Binary + packages for the OSs we support which are simply compiled from our + internal source without significant added value are explicitly NOT + allowed. Here is a list of the organizations and individuals who have provided sponsor- ship to The XFree86 Project, Inc, either by financial contribution or by the donation of equipment and resources. The XFree86 Project, Inc gratefully acknowledges these contributions, and hopes that we can do justice to them by continuing to release high-quality free software for the betterment of the Internet community as a whole. o UUNET Communications Services, Inc. UUNET Communications Services, Inc, deserves special mention. This README for XFree86[tm] 3.3.2 organization stepped forward and contributed the entire 1994 X Consortium mem- bership fee on a moment's notice. This single act ensured XFree86's involve- ment in X11R6. o GUUG -- 1st German Linux Congress Also deserving of special mention are the organizers and attendees of the 1st German Linux Congress in Heidelberg. Significant funding to The XFree86 Pro- ject has been provided from its proceeds. o AIB Software Corporation , Herndon, VA o Roland Alder, Armin Fessler, Patrick Seemann, Martin Wunderli o American Micro Group o ATI Technologies Inc o Andrew Burgess o Berkeley Software Design, Inc , Falls Church, VA o Caldera, Inc. o Delix Computer GmbH , Stuttgart, Germany o The Destek Group, Inc. , Nashua, NH (formerly Synergytics) o Diamond Multimedia Systems, Inc. o Digital Equipment Corporation o Elsa GmbH , Aachen, Germany o Genoa Systems Corporation o Helius, Inc. o Hercules Computer Technology, Inc. o Ralf Hockens o Dirk Hohndel o InfoMagic , Flagstaff, AZ o Daniel Kraemer o Epoch Networks, Inc. , Irvine, CA o Frank & Paige McCormick README for XFree86[tm] 3.3.2 o Internet Labs, Inc. o Linux International o Linux Support Team, Erlangen, Germany o LunetIX Softfair , Berlin, Germany o Morse Telecommunications , Long Beach, NY o MELCO, Inc o MIRO Computer Products AG, Braunschweig, Germany o Rich & Amy Murphey o NCR Corp o Brett Neumeier o Number Nine, Lexington, MA o Kazuyuki Okamoto, Japan o Prime Time Freeware , San Bruno, CA o Red Hat Software , Chapel Hill, NC o Norbert Reithinger o SPEA Software AG, Starnberg, Germany o STB Systems o Clifford M Stein o Joel Storm o S.u.S.E. GmbH , Fuerth, Germany o Tekelec Airtronic GmbH , Muenchen, Germany o Jim Tsillas o Trans-Ameritech Enterprises, Inc., Santa Clara, CA o Unifix Software GmbH, Braunschweig, Germany o Vixie Enterprises , La Honda, CA o Walnut Creek CDROM , Concord, CA o Xtreme s.a.s. , Livorno, Italy README for XFree86[tm] 3.3.2 The XFree86 Project, Inc, welcomes the additional contribution of funding and/or equipment. Such contributions should be tax-deductible; we will know for certain when the lawyers get finished with the papers. For more informa- tion, contact The XFree86 Project, Inc, at 9. Source and binary archive sites Source patches are available to upgrade X11R6.3 PL2 from the X Consortium (now The Open Group) to XFree86 3.3.2. Binaries for many OSs are also available. The distribution is available from: o ftp://ftp.XFree86.org/pub/XFree86 and the following mirror sites: o North America: - o ftp://ftp2.XFree86.org/pub/XFree86 (source and binaries) + o ftp://ftp2.XFree86.org/pub/XFree86 (source and binaries) - o ftp://ftp.infomagic.com/pub/mirrors/XFree86-current (source and bina- - ries) + o ftp://ftp.infomagic.com/pub/mirrors/XFree86-current (source and bina- + ries) - o ftp://ftp.rge.com/pub/X/XFree86 and http://www.rge.com/pub/X/XFree86 - (source and binaries) + o ftp://ftp.rge.com/pub/X/XFree86 and http://www.rge.com/pub/X/XFree86 + (source and binaries) - o ftp://ftp.varesearch.com/pub/mirrors/xfree86 (source and binaries) + o ftp://ftp.varesearch.com/pub/mirrors/xfree86 (source and binaries) - o ftp://ftp.cs.umn.edu/pub/XFree86 (source and binaries) + o ftp://ftp.cs.umn.edu/pub/XFree86 (source and binaries) - o ftp://ftp.kernel.org/pub/mirrors/xfree86 (source and binaries) + o ftp://ftp.kernel.org/pub/mirrors/xfree86 (source and binaries) o Europe: - o ftp://fvkma.tu-graz.ac.at/pub/XFree86 (source and binaries) + o ftp://fvkma.tu-graz.ac.at/pub/XFree86 (source and binaries) - o ftp://gd.tuwien.ac.at/hci/X11/XFree86 and - http://gd.tuwien.ac.at/hci/X11/XFree86 (source and binaries) + o ftp://gd.tuwien.ac.at/hci/X11/XFree86 and + http://gd.tuwien.ac.at/hci/X11/XFree86 (source and binaries) - o ftp://ftp.fee.vutbr.cz/pub/XFree86 (source patches and binaries) + o ftp://ftp.fee.vutbr.cz/pub/XFree86 (source patches and binaries) - o ftp://ftp.gwdg.de/pub/xfree86/XFree86 (source and binaries) + o ftp://ftp.gwdg.de/pub/xfree86/XFree86 (source and binaries) - o ftp://ftp.mpi-sb.mpg.de/pub/X/mirror/ftp.xfree86.org (source and - binaries) + o ftp://ftp.mpi-sb.mpg.de/pub/X/mirror/ftp.xfree86.org (source and + binaries) - o ftp://ftp.cs.tu-berlin.de/pub/X/XFree86 (source and binaries) + o ftp://ftp.cs.tu-berlin.de/pub/X/XFree86 (source and binaries) - o ftp://ftp.uni-erlangen.de/pub/Linux/MIRROR.xfree86 (source and Linux - binaries) + o ftp://ftp.uni-erlangen.de/pub/Linux/MIRROR.xfree86 (source and Linux + binaries) - o ftp://ftp.uni-stuttgart.de/pub/X11/Xfree86 (source and binaries) + o ftp://ftp.uni-stuttgart.de/pub/X11/Xfree86 (source and binaries) README for XFree86[tm] 3.3.2 - o ftp://ftp.funet.fi/pub/X11/XFree86 (source and binaries) + o ftp://ftp.funet.fi/pub/X11/XFree86 (source and binaries) - o ftp://ftp.ibp.fr/pub/X11/XFree86 (source and binaries) + o ftp://ftp.ibp.fr/pub/X11/XFree86 (source and binaries) - o ftp://ftp.unina.it/pub/XFree86 (source and binaries) + o ftp://ftp.unina.it/pub/XFree86 (source and binaries) - o ftp://ftp.pvv.unit.no/pub/XFree86 (source and binaries) + o ftp://ftp.pvv.unit.no/pub/XFree86 (source and binaries) - o ftp://sunsite.doc.ic.ac.uk/packages/XFree86 (source and binaries) + o ftp://sunsite.doc.ic.ac.uk/packages/XFree86 (source and binaries) o Asia/Australia: - o ftp://x.physics.usyd.edu.au/pub/XFree86 (source and binaries) + o ftp://x.physics.usyd.edu.au/pub/XFree86 (source and binaries) - o ftp://ftp.netlab.is.tsukuba.ac.jp/pub/XFree86 (source and binaries) + o ftp://ftp.netlab.is.tsukuba.ac.jp/pub/XFree86 (source and binaries) - o ftp://ftp.iij.ad.jp/pub/X/XFree86/XFree86 (source and binaries) + o ftp://ftp.iij.ad.jp/pub/X/XFree86/XFree86 (source and binaries) - o ftp://ftp.kreonet.re.kr/pub/Linux/xfree86 (source and binaries) + o ftp://ftp.kreonet.re.kr/pub/Linux/xfree86 (source and binaries) Ensure that you are getting XFree86 3.3.2 - some of these sites may archive older releases as well. Check the RELNOTES to find which files you need to take from the archive. Generated from XFree86: xc/programs/Xserver/hw/xfree86/doc/sgml/README.sgml,v 3.75.2.33 1998/02/28 15:49:46 robin Exp $ $XConsortium: README.sgml /main/31 1996/10/28 05:43:24 kaleb $ README for XFree86[tm] 3.3.2 - CONTENTS + CONTENTS 1. What's new in XFree86 3.3.2 .............................................. 1 2. Systems XFree86 has been tested on ....................................... 1 3. Supported video-card chip-sets ........................................... 2 4. Where to get more information ............................................ 5 5. Thanks ................................................................... 6 6. Credits .................................................................. 6 7. Contact information ..................................................... 16 8. The XFree86 Project, Inc. ............................................... 17 9. Source and binary archive sites ......................................... 21 - i + i $XFree86: xc/programs/Xserver/hw/xfree86/doc/README,v 3.76.2.28 1998/03/01 13:58:20 dawes Exp $ Index: stable/2.2/release/sysinstall/help/install.hlp =================================================================== --- stable/2.2/release/sysinstall/help/install.hlp (revision 40694) +++ stable/2.2/release/sysinstall/help/install.hlp (revision 40695) @@ -1,516 +1,513 @@ +===================== Installing FreeBSD ==========================+ | | | Table of Contents: | | | | 0.0 Quick Start: | | 0.1 Installing FreeBSD from CDROM or the Internet. | | | | 1.0 Detail on various installation types: | | 1.1 Installing from a network CDROM | | 1.2 Installing from Floppies | | 1.3 Installing from a DOS partition | | 1.4 Installing from QIC/SCSI tape | | 1.5 Installing over a network using NFS or FTP | | 1.5.1 NFS Installation tips | | 1.5.2 FTP Installation tips | | | | 2.0 DOS User's Q&A section. | | 2.1 How do I make space for FreeBSD? | | 2.2 Can I use compressed DOS filesystems from FreeBSD? | | 2.3 Can I use DOS extended partitions? | | 2.4 Can I run DOS executables under FreeBSD? | | | +=====================================================================+ Author: Jordan K. Hubbard Last updated: Tue Mar 24 00:56:14 PST 1998 0.0 Quick Start --- ----------- This manual documents the process of making a new installation of FreeBSD on your machine. If you are upgrading from a previous release of FreeBSD, please see the file UPGRADE.TXT for important information on upgrading. If you are not familiar with configuring PC hardware for FreeBSD, you should also read the HARDWARE.TXT file - it contains important information which may save you a lot of grief. If you're new to FreeBSD then you should also read EVERYTHING listed in the Documentation menu on the boot floppy. It may seem like a lot to read, but the time you spend now reading the documents will be made up many times over because you were adequately prepared. Also, you will know the types of information available should you get stuck later. Once the system is installed, you can also revisit this menu and use a WEB browser to read the installed FAQ (Frequently Asked Questions) and Handbook HTML documentation sets for FreeBSD. You can also use the browser to visit other WEB sites on the net (like http://www.freebsd.org) if you have an Internet connection. See ABOUT.TXT for more information on the resources available to you. The best laid plans sometimes go awry, so if you run into trouble take a look at TROUBLE.TXT which contains valuable troubleshooting information. DISCLAIMER: While FreeBSD does its best to safeguard against accidental loss of data, it's still more than possible to WIPE OUT YOUR ENTIRE DISK with this installation! Please do not proceed to the final FreeBSD installation menu unless you've adequately backed up any important data first! We really mean it! FreeBSD requires a 386 or better processor to run (sorry, there is no support for '286 processors), 5 megs of RAM to install and 4 megs of -ram to run. You will need at least 80 megs of hard drive space free -on either a dedicated disk or a "primary," (not extended partition, -to use the DOS terminology). See below for ways to shrink existing -DOS partitions to install FreeBSD. +ram to run. You will need at least 80 megs of free hard drive space. +See below for ways of shrinking existing DOS partitions in order to +install FreeBSD. 0.1 Installing FreeBSD from CDROM or the Internet --- --------------------------------------------- The easiest type of installation is from CD. If you have a supported CDROM drive and a FreeBSD installation CD from Walnut Creek CDROM, there are 3 ways of starting the installation from it: 1. If your system supports bootable CDROM media (usually an option which can be selectively enabled in the controller's setup menu or in the PC BIOS for some systems) and you have it enabled, FreeBSD 2.2.1 and later CDs support the "El Torrito" bootable CD standard. Simply put the installation CD in your CDROM drive and boot the system to begin installation. 2. If you have drivers which allow you to see your CDROM drive from from DOS, first disable any fancy memory managers you may have configured, change directory to the CDROM (E:\ in the example below) and then type this: E> install and you should boot directly into the FreeBSD installation. If either steps fail, please go on to step 3. 3. Build a FreeBSD boot floppy from the floppies/boot.flp file in a FreeBSD distribution. Either simply use the ``makeflp.bat'' script from DOS or read floppies/README.TXT for more information on creating bootable floppies under different operating systems. Then you simply boot from the floppy and you should go into the FreeBSD installation. If you don't have a CDROM and would like to simply install over the net using PPP, slip or a dedicated connection, simply fetch the /floppies/boot.flp file from: ftp://ftp.freebsd.org/pub/FreeBSD or one of its many mirrors (http://www.freebsd.org/handbook/mirrors.html) and follow step 3 above. You should also read the floppies/README.TXT file as it contains important information for downloaders. Once you have a boot floppy made, please go to section 1.5 of this document for additional tips on installing via FTP or NFS. 1.0 Detail on various installation types --- ------------------------------------ Once you've gotten yourself to the initial installation screen somehow, you should be able to follow the various menu prompts and go from there. If you've never used the FreeBSD installation before, you are also encouraged to read some of the documentation in the the Documentation submenu as well as the general "Usage" instructions on the first menu. REMEMBER: If you get stuck at a screen, hit F1 for the online documentation for that section. If you've never installed FreeBSD before, or even if you have, the "Novice" installation mode is the most recommended since it makes sure that you'll visit all the various important checklist items along the way. If you're much more comfortable with the FreeBSD installation process and know _exactly_ what you want to do, use the Express or Custom installation options. If you're upgrading an existing system, use the Upgrade option. The FreeBSD installer supports the direct use of floppy, DOS, tape, CDROM, FTP, NFS and UFS partitions as installation media, further tips on installing from each type of media listed below. 1.1 Installing from a network CDROM --- ------------------------------- If you simply wish to install from a local CDROM drive then see the Quick Start section. If you don't have a CDROM drive on your system and wish to use a FreeBSD distribution CD in the CDROM drive of another system to which you have network connectivity, there are several ways of going about it: 1. If you would be able to FTP install FreeBSD directly from the CDROM drive in some FreeBSD machine, it's quite easy: You simply add the following line to the password file (using the vipw command): ftp:*:99:99::0:0:FTP:/cdrom:/sbin/nologin And anyone else on your network will now be able to chose a Media type of FTP and type in: ``ftp://'' after picking "Other" in the ftp sites menu. 2. If you would rather use NFS to export the CDROM directly to the machine(s) you'll be installing from, you need to first add an entry to the /etc/exports file (on the machine with the CDROM drive) which looks something like this: /cdrom -ro ziggy.foo.com To allow the machine "ziggy.foo.com" to mount the CDROM directly via NFS during installation. The machine with the CDROM must also be configured as an NFS server, of course, and if you're not sure how to do that then an NFS installation is probably not the best choice for you unless you're willing to read up on rc.conf(5) and configure things appropriately. Assuming that this part goes smoothly, you should be able to enter: :/cdrom as the path for an NFS installation when the target machine is installed. 1.2 Installing from Floppies --- ------------------------ If you must install from floppy disks, either due to unsupported hardware or just because you enjoy doing things the hard way, you must first prepare some floppies for the install. First, make a boot floppy as described in floppies/README.TXT Second, read the file LAYOUT.TXT and pay special attention to the "Distribution format" section since it describes which files you're going to need to put onto floppy and which you can safely skip. Next you will need, at minimum, as many 1.44MB floppies as it takes to hold all files in the bin (binary distribution) directory. If you're preparing these floppies under DOS, then THESE floppies *must* be formatted using the MS-DOS FORMAT command. If you're using Windows, use the Windows File Manager format command. Don't trust Factory Preformatted floppies! Format them again yourself, just to make sure. Many problems reported by our users in the past have resulted from the use of improperly formatted media, which is why I'm taking such special care to mention it here! If you're creating the floppies from another FreeBSD machine, a format is still not a bad idea though you don't need to put a DOS filesystem on each floppy. You can use the `disklabel' and `newfs' commands to put a UFS filesystem on a floppy, as the following sequence of commands illustrates: fdformat -f 1440 fd0.1440 disklabel -w -r fd0.1440 floppy3 newfs -t 2 -u 18 -l 1 -i 65536 /dev/rfd0 After you've formatted the floppies for DOS or UFS, you'll need to copy the files onto them. The distribution files are split into chunks conveniently sized so that 5 of them will fit on a conventional 1.44MB floppy. Go through all your floppies, packing as many files as will fit on each one, until you've got all the distributions you want packed up in this fashion. Each distribution should go into its own subdirectory on the floppy, e.g.: a:\bin\bin.inf, a:\bin\bin.aa, a:\bin\bin.ab, ... IMPORTANT NOTE: The bin.inf file also needs to go on the first floppy of the bin set since it is read by the installation program in order to figure out how many additional pieces to look for when fetching and concatenating the distribution. When putting distributions onto floppies, the .inf file MUST occupy the first floppy of each distribution set! Once you come to the Media screen of the install, select "Floppy" and you'll be prompted for the rest. 1.3 Installing from a DOS partition --- ------------------------------- To prepare for installation from an MS-DOS partition you should simply copy the files from the distribution into a directory called -"FREEBSD". For example, to do a minimal installation of FreeBSD from -DOS using files copied from the CDROM, you might do something like -this: +"FREEBSD" on the Primary DOS partition ("Drive C:"). For example, to do +a minimal installation of FreeBSD from DOS using files copied from the +CDROM, you might do something like this: - C> MD C:\FREEBSD - C> XCOPY /S E:\BIN C:\FREEBSD\BIN + C:\> MD C:\FREEBSD + C:\> XCOPY /S E:\BIN C:\FREEBSD\BIN -Assuming that `C:' was where you had free space and `E:' was where -your CD was mounted. +Assuming that `E:' was where your CD was mounted. For as many `DISTS' as you wish to install from DOS (and you have free space for), install each one in a directory under `C:\FREEBSD' - the BIN dist is only the minimal requirement. IMPORTANT NOTE: Though you can do all of the above by hand if you really want to, all of it is much more easily accomplished now by Robert Nordier's "setup.exe" program. It will give you a menu of distribution choices, verify that you have enough free space and do all the copying to C:\FREEBSD for you automatically. Once you've copied the directories or run setup.exe and let it do all the work for you, you can simply launch the installation from DOS by running the install.bat script (NOTE: Some memory managers don't like this - disable QEMM or EMM386 if they're running before trying this) or making a boot floppy as described in section 0.1. 1.4 Installing from QIC/SCSI Tape --- ----------------------------- When installing from tape, the installation program expects the files to be simply tar'ed onto it, so after fetching all of the files for the distributions you're interested in, simply tar them onto the tape with a command something like this: cd /where/you/have/your/dists tar cvf /dev/rwt0 (or /dev/rst0) dist1 .. dist2 When you go to do the installation, you should also make sure that you leave enough room in some temporary directory (which you'll be allowed to choose) to accommodate the FULL contents of the tape you've created. Due to the non-random access nature of tapes, this method of installation requires quite a bit of temporary storage! You should expect to require as much temporary storage as you have stuff written on tape. SPECIAL NOTE: When going to do the installation, the tape must be in the drive *before* booting from the boot floppy. The installation "probe" may otherwise fail to find it. Now create a boot floppy as described in section 0.1 and proceed with the installation. 1.5 Installing over a network using FTP or NFS --- ------------------------------------------ After making a boot floppy as described in the first section, you can load the rest of the installation over a network using one of 3 types of connections: Serial port: SLIP / PPP Parallel port: PLIP (using ``laplink'' style cable) Ethernet: A standard Ethernet controller (including certain PCCARD devices). Serial Port ----------- SLIP support is rather primitive, and is limited primarily to hard-wired links, such as a serial cable running between two computers. The link must be hard-wired because the SLIP installation doesn't currently offer a dialing capability. If you need to dial out with a modem or otherwise dialog with the link before connecting to it, then I recommend that the PPP utility be used instead. If you're using PPP, make sure that you have your Internet Service Provider's IP address and DNS information handy as you'll need to know it fairly early in the installation process. You may also need to know your own IP address, though PPP supports dynamic address negotiation and may be able to pick up this information directly from your ISP if they support it. You will also need to know how to use the various "AT commands" for dialing out with your particular brand of modem as the PPP dialer provides only a very simple terminal emulator. Parallel Port ------------- If a hard-wired connection to another FreeBSD (2.0R or later) or Linux machine is available, you might also consider installing over a "laplink" style parallel port cable. The data rate over the parallel port is much higher than what is typically possible over a serial line (up to 50k/sec), thus resulting in a quicker installation. It's not typically necessary to use "real" IP addresses when using a point-to-point parallel cable in this way and you can generally just use RFC 1918 style addresses for the ends of the link (e.g. 10.0.0.1, 10.0.0.2, etc). IMPORTANT NOTE: If you use a Linux machine rather than a FreeBSD machine as your PLIP peer, you will also have to specify "link0" in the TCP/IP setup screen's ``extra options for ifconfig'' field. Ethernet -------- FreeBSD supports most common PC Ethernet cards, a table of supported cards (and their required settings) being provided as part of the FreeBSD Hardware Guide (see the Documentation menu on the boot floppy or the top level directory of the CDROM). If you are using one of the supported PCMCIA Ethernet cards, also be sure that it's plugged in _before_ the laptop is powered on! FreeBSD does not, unfortunately, currently support "hot insertion" of PCMCIA cards during installation. You will also need to know your IP address on the network, the "netmask" value for your address class and the name of your machine. Your system administrator can tell you which values are appropriate to your particular network setup. If you will be referring to other hosts by name rather than IP address, you'll also need a name server and possibly the address of a gateway (if you're using PPP, it's your provider's IP address) to use in talking to it. If you do not know the answers to these questions then you should really probably talk to your system administrator _first_ before trying this type of installation! Using a randomly chosen IP address or netmask on a live network will almost certainly get you shot at dawn. Once you have a network connection of some sort working, the installation can continue over NFS or FTP. 1.5.1 NFS installation tips ----- --------------------- NFS installation is fairly straight-forward: Simply copy the FreeBSD distribution files you want onto a server somewhere and then point the NFS media selection at it. If this server supports only "privileged port" access (as is generally the default for Sun and Linux workstations), you will need to set this option in the Options menu before installation can proceed. If you have a poor quality Ethernet card which suffers from very slow transfer rates, you may also wish to toggle the appropriate Options flag. In order for NFS installation to work, the server must also support "subdir mounts", e.g. if your FreeBSD 2.2 distribution directory lives on: ziggy:/usr/archive/stuff/FreeBSD Then ziggy will have to allow the direct mounting of /usr/archive/stuff/FreeBSD, not just /usr or /usr/archive/stuff. In FreeBSD's /etc/exports file this is controlled by the ``-alldirs'' option. Other NFS servers may have different conventions. If you are getting `Permission Denied' messages from the server then it's likely that you don't have this properly enabled! 1.5.2 FTP Installation tips ----- --------------------- FTP installation may be done from any mirror site containing a reasonably up-to-date version of FreeBSD. A full menu of reasonable choices for almost any location in the world is provided in the FTP site menu during installation. If you are installing from some other FTP site not listed in this menu, or you are having troubles getting your name server configured properly, you can also specify your own URL by selecting the ``Other'' choice in that menu. A URL can contain a hostname or an IP address, so the following would work in the absence of a name server: ftp://192.216.191.11/pub/FreeBSD/2.2-RELEASE There are two FTP installation modes you can use: o FTP: For all FTP transfers, use the standard "Active" mode for transfers. This will not work through most firewalls but will often work best with older ftp servers that do not support passive mode. If your connection hangs with passive mode, try this one! o FTP Passive: For all FTP transfers, use "Passive" mode. This allows the user to pass through firewalls that do not allow incoming connections on random port addresses. NOTE: ACTIVE AND PASSIVE MODES ARE NOT THE SAME AS A `PROXY' CONNECTIONS, WHERE A PROXY FTP SERVER IS LISTENING ON A DIFFERENT PORT! In such instances, you should specify the URL as something like: ftp://foo.bar.com:1234/pub/FreeBSD Where "1234" is the port number of the proxy ftp server. 2.0 DOS user's Question and Answer section --- -------------------------------------- 2.1 Help! I have no space! Do I need to delete everything first? --- -------------------------------------------------------------- If your machine is already running DOS and has little or no free space available for FreeBSD's installation, all is not lost! You may find the "FIPS" utility, provided in the tools/ subdirectory on the FreeBSD CDROM or on the various FreeBSD ftp sites, to be quite useful. FIPS allows you to split an existing DOS partition into two pieces, preserving the original partition and allowing you to install onto the second free piece. You first "defrag" your DOS partition, using the DOS 6.xx "DEFRAG" utility or the Norton Disk tools, then run FIPS. It will prompt you for the rest of the information it needs. Afterwards, you can reboot and install FreeBSD on the new partition. Also note that FIPS will create the second partition as a "clone" of the first, so you'll actually see that you now have two DOS Primary partitions where you formerly had one. Don't be alarmed! You can simply delete the extra DOS Primary partition (making sure it's the right one by examining its size! :) NOTE: FIPS does NOT currently work with FAT32 or VFAT style partitions as used by newer versions of Windows 95. To split up such a partition, you will need a commercial product such as Partition Magic 3.0. Sorry, but this is just the breaks if you've got a Windows partition hogging your whole disk and you don't want to reinstall from scratch. 2.2 Can I use compressed DOS filesystems from FreeBSD? --- -------------------------------------------------- No. If you are using a utility such as Stacker(tm) or DoubleSpace(tm), FreeBSD will only be able to use whatever portion of the filesystem you leave uncompressed. The rest of the filesystem will show up as one large file (the stacked/dblspaced file!). DO NOT REMOVE THAT FILE as you will probably regret it greatly! -It is probably better to create another uncompressed DOS primary +It is probably better to create another uncompressed DOS extended partition and use this for communications between DOS and FreeBSD if such is your desire. 2.3 Can I mount my DOS extended partitions? --- --------------------------------------- Yes. DOS extended partitions are mapped in at the end of the other ``slices'' in FreeBSD, e.g. your D: drive might be /dev/sd0s5, your E: drive /dev/sd0s6, and so on. This example assumes, of course, that your extended partition is on SCSI drive 0. For IDE drives, substitute ``wd'' for ``sd'' appropriately. You otherwise mount extended partitions exactly like you would mount any other DOS drive, e.g.: mount -t msdos /dev/sd0s5 /dos_d 2.4 Can I run DOS binaries under FreeBSD? --- ------------------------------------- -Not yet! We'd like to add support for this someday, but are still -lacking anyone to actually do the work. Ongoing work with BSDI's -doscmd utility is bringing this much closer to being a reality in -FreeBSD-current (AKA 3.0) and you should send mail to -freebsd-hackers@FreeBSD.org if you're interested in joining this -effort! +Ongoing work with BSDI's doscmd utility is bringing this much closer to +being a reality in FreeBSD 3.0, though it still has some rough edges. +If you're interested in working on this, please send mail to +emulation@FreeBSD.org and indicate that you're interested in joining +this ongoing effort! There is also a neat utility called "pcemu" in the ports collection which emulates an 8088 and enough BIOS services to run DOS text mode applications. It requires the X Window System (provided as XFree86 3.2) to operate. ---- End of Installation Guide --- Index: stable/2.2/release/sysinstall/help/partition.hlp =================================================================== --- stable/2.2/release/sysinstall/help/partition.hlp (revision 40694) +++ stable/2.2/release/sysinstall/help/partition.hlp (revision 40695) @@ -1,153 +1,144 @@ This is the FreeBSD DiskLabel Editor. NOTE: If you're entering this editor from the update procedure then you probably shouldn't (C)reate anything at all but rather use only the (M)ount command to check and mount existing partitions for upgrading. If you would like the label editor to do most of the following for you, simply type `A' for automatic partitioning of the disk. If you wish to create partitions manually you may do so by moving the highlighted selection bar with the arrow keys over the FreeBSD partition(s) displayed at the top of the screen. Typing (C)reate while a partition with available free space is selected will allow you to create a BSD partition inside of it using some or all of its available space. Typing (M)ount over an existing partition entry (displayed in the middle of the screen) will allow you to set a mount point for it without initializing it. If you want it initialized, use the (T)oggle command to flip the Newfs flag. When Newfs is set to "Y", the filesystem in question will be ERASED and rebuilt from scratch! You should use this editor to create at least the following filesystems: Name Purpose Min Size? Optional? ---- ------- --------- --------- / Root filesystem 20MB No swap Swap space 2 * MEM No /usr System & user files 80MB or more Yes Note: If you do not create a /usr filesystem then your / filesystem will need to be bigger - at least 100MB. This is not recommended as any media errors that may occur during disk I/O to user files will corrupt the filesystem containing vital system files as well. It is for this reason that / is generally kept on its own filesystem, where it should be considered essentially "read only" in your administration of it. Swap space is a little tricker, and the rule of "2 * MEM" is simply a best-guess approximation and not necessarily accurate for your intended usage of the system. If you intend to use the system heavily in a server or multi-user application, you may be well advised to increase this size. You may also create swap space on multiple drives for a larger "total" swap and this is, in fact, recommended if you have multiple, fast drives for which such load-balancing can only help overall I/O performance. The /usr filesystem should be sized according to what kind of distributions you're trying to load and how many packages you intend to install in locations like /usr/local. You can also make /usr/local a separate filesystem if you don't want to risk filling up your /usr by mistake. Another useful filesystem to create is /var, which contains mail, news printer spool files and other temporary items. It is a popular candidate for a separate partition and should be sized according to your estimates of the amount of mail, news or spooled print jobs that may be stored there. WARNING: If you do not create a separate filesystem for /var, space for such files will be allocated out of the root (/) filesystem instead. You may therefore wish to make the / partition bigger if you expect a lot of mail or news and do not want to make /var its own partition. If you're new to this installation, you might also want to read the following explanation of how FreeBSD's new "slice" paradigm for looking at disk storage works: In FreeBSD's new system, a device name can be broken up into up to 3 parts. Take a typical name like ``/dev/sd0s1a'': The first three characters represent the drive name. If we had a system with two SCSI drives on it then we'd see /dev/sd0 and /dev/sd1 as the device entries representing the entire drives. Next you have the "slice" (or "FDISK Partition") number, as seen in the Partition Editor. Assuming that our sd0 contained two slices, a FreeBSD slice and a DOS slice, that would give us /dev/sd0s1 and /dev/sd0s2 as device entries pointing to the entire slices. Next, if a slice is a FreeBSD slice, you can have a number of (confusingly named) "partitions" inside of it. These partitions are where various filesystems or swap areas live, and using our hypothetical two-SCSI-disk machine again, we might have something like the following layout on sd0: Name Mountpoint ---- ---------- sd0s1a / sd0s1b sd0s1e /usr Because of historical convention, there is also a short-cut, or "compatibility slice", that is maintained for easy access to the *first* FreeBSD slice on a disk. This gives some backwards compatibility to utilities that still may not know how to deal with the new slice scheme. The compatibility slice names for our filesystem above would also look like: Name Mountpoint ---- ---------- sd0a / sd0b sd0e /usr Again, let it be noted: FreeBSD automatically maps the compatibility slice to the first FreeBSD slice it finds (in this case, sd0s1). You may have multiple FreeBSD slices on a drive, but only the first one will be mapped to the compatibility slice! - The compatibility slice will eventually be phased out, but - it is still important right now for several reasons: - - 1. Some programs, as mentioned before, still don't work - with the slice paradigm and need time to catch up. - - 2. The FreeBSD boot blocks are unable to look for - a root file system in anything but a compatibility - slice right now. This means that our root will always - show up on "sd0a" in the above scenario, even though - it really lives over on sd0s1a and would otherwise be - referred to by its full slice name. + The compatibility slice has essentially been phased out, but + it's important to be aware of when looking at or upgrading + older systems. Once you understand all this, then the purpose of the label editor becomes fairly clear: You're carving up the FreeBSD slices displayed at the top of the screen into smaller pieces, which are displayed in the middle of the screen, and then assigning FreeBSD file system names (mount points) to them. You can also use the label editor to mount existing partitions/slices into your filesystem hierarchy, as is frequently done for DOS FAT slices. For FreeBSD partitions, you can also toggle the "newfs" state so that the partitions are either (re)created from scratch or simply checked and mounted (the contents are preserved). When you're done, type `Q' to exit. No actual changes will be made to the disk until you (C)ommit from the Install menu or (W)rite directly from this one. You're working with what is essentially a copy of the disk label(s), both here and in the FDISK Partition Editor, and the actual on-disk labels won't be affected by any changes you make until you explicitly say so. Index: stable/2.2/release/sysinstall/help/trouble.hlp =================================================================== --- stable/2.2/release/sysinstall/help/trouble.hlp (revision 40694) +++ stable/2.2/release/sysinstall/help/trouble.hlp (revision 40695) @@ -1,269 +1,374 @@ =============== Troubleshooting =============== -Repairing an existing FreeBSD installation + Table of Contents: + + Repairing an Existing FreeBSD Installation + + Common Installation Problems, Q&A + + Common Hardware Problems, Q&A + +Repairing an Existing FreeBSD Installation ------------------------------------------ FreeBSD releases 2.2.1 and later feature a "Fixit" option in the top menu of the boot floppy. To use it, you will also need either a fixit.flp image floppy, generated in the same fashion as the boot floppy, or the 2nd CDROM from Walnut Creek CDROM's FreeBSD distribution. To invoke fixit, simply boot the boot floppy, chose the "Fixit" item and insert the fixit floppy or CDROM when asked. You will then be placed into a shell with a wide variety of commands available (in the /stand and /mnt2/stand directories) for checking, repairing and examining file systems and their contents. Some UNIX administration experience *is* required to use the fixit option! +Common Installation Problems, Q&A +--------------------------------- +Q: I go to boot from the hard disk for the first time after installing + FreeBSD, the kernel loads and probes my hardware, but stops with + messages like: + + changing root device to wd1s1a + panic: cannot mount root + + What is wrong? What can I do? + +Q: What is this 'bios_drive:interface(unit,partition)kernel_name' thing + that is displayed with the boot help? + +A: There is a longstanding problem in the case where the boot disk is + not the first disk in the system. The BIOS uses a different numbering + scheme to FreeBSD, and working out which numbers correspond to which + is difficult to get right. + + In the case where the boot disk is not the first disk in the system, + FreeBSD can need some help finding it. There are two common situations + here, and in both of these cases, you need to tell FreeBSD where the + root filesystem is. You do this by specifying the BIOS disk number, + the disk type and the FreeBSD disk number for that type. + + The first situation is where you have two IDE disks, each configured as + the master on their respective IDE busses, and wish to boot FreeBSD from + the second disk. The BIOS sees these as disk 0 and disk 1, while + FreeBSD sees them as wd0 and wd2. + + FreeBSD is on BIOS disk 1, of type 'wd' and the FreeBSD disk number + is 2, so you would say: + + 1:wd(2,a)kernel + + Note that if you have a slave on the primary bus, the above is not + necessary (and is effectively wrong). + + The second situation involves booting from a SCSI disk when you have + one or more IDE disks in the system. In this case, the FreeBSD disk + number is lower than the BIOS disk number. If you have two IDE disks + as well as the SCSI disk, the SCSI disk is BIOS disk 2, type 'da' and + FreeBSD disk number 0, so you would say: + + 2:da(0,a)kernel + + To tell FreeBSD that you want to boot from BIOS disk 2, which is + the first SCSI disk in the system. If you only had one IDE disk, + you would use '1:' instead. + + Once you have determined the correct values to use, you can put the + command exactly as you would have typed it in the /boot.config file + using a standard text editor. + Unless instructed otherwise, FreeBSD will use the contents of this + file as the default response to the 'boot:' prompt. + +Q: I go to boot from the hard disk for the first time after installing + FreeBSD, but the Boot Manager prompt just prints `F?' at the boot menu + each time but the boot won't go any further. + +A: The hard disk geometry was set incorrectly in the Partition editor when + you installed FreeBSD. Go back into the partition editor and specify + the actual geometry of your hard disk. You must reinstall FreeBSD + again from the beginning with the correct geometry. + + If you are failing entirely in figuring out the correct geometry for + your machine, here's a tip: Install a small DOS partition at the + beginning of the disk and install FreeBSD after that. The install + program will see the DOS partition and try to infer the correct + geometry from it, which usually works. + + The following tip is no longer recommended, but is left here + for reference: + + If you are setting up a truly dedicated FreeBSD server or work- + station where you don't care for (future) compatibility with DOS, + Linux or another operating system, you've also got the option to use + the entire disk (`A' in the partition editor), selecting the + non-standard option where FreeBSD occupies the entire disk from + the very first to the very last sector. This will leave all geometry + considerations aside, but is somewhat limiting unless you're never + going to run anything other than FreeBSD on a disk. + + Known Hardware Problems, Q & A ------------------------------ Q: mcd0 keeps thinking that it has found a device and this stops my Intel EtherExpress card from working. A: Use the UserConfig utility (see HARDWARE.TXT) and disable the probing of the mcd0 and mcd1 devices. Generally speaking, you should only leave the devices that you will be using enabled in your kernel. Q: FreeBSD claims to support the 3Com PCMCIA card, but my card isn't recognized when it's plugged into my laptop. A: There are a couple of possible problems. First of all, FreeBSD does not support multi-function cards, so if you have a combo ethernet/modem card (such as the 3C562), it won't work. The default driver for the 3C589 card was written just like all of the other drivers in FreeBSD, and depend on the card's own configuration data stored in NVRAM to work. You must correctly configure FreeBSD's driver to match the IRQ, port, and IOMEM stored in NVRAM. Unfortunately, the only program capable of reading them is the 3COM supplied DOS program. This program must be run on a absolutely clean system (no other drivers must be running), and the program will whine about CARD-Services not being found, but it will continue. This is necessary to read the NVRAM values. You want to know the IRQ, port, and IOMEM values (the latter is called the CIS tuple by 3COM). The first two can be set in the program, the third is un-settable, and can only be read. Once you have these values, set them in UserConfig and your card will be recognized. Q: FreeBSD finds my PCMCIA network card, but no packets appear to be sent even though it claims to be working. A: Many PCMCIA cards have the ability to use either the 10-Base2 (BNC) or 10-BaseT connectors for connecting to the network. The driver is unable to 'auto-select' the correct connector, so you must tell it which connector to use. In order to switch between the two connectors, the link flags must be set. Depending on the model of the card, '-link0 link1' or 'link0 -link1' will choose the correct network connector. You can set these in sysinstall by using the 'Extra options to ifconfig:' field in the network setup screen. Q: The system finds my ed network card, but I keep getting device timeout errors. A: Your card is probably on a different IRQ from what is specified in the kernel configuration. The ed driver does not use the `soft' configuration by default (values entered using EZSETUP in DOS), but it will use the software configuration if you specify `?' in the IRQ field of your kernel config file. Either move the jumper on the card to a hard configuration setting (altering the kernel settings if necessary), or specify the IRQ as `-1' in UserConfig or `?' in your kernel config file. This will tell the kernel to use the soft configuration. Another possibility is that your card is at IRQ 9, which is shared by IRQ 2 and frequently a cause of problems (especially when you have a VGA card using IRQ 2! :). You should not use IRQ 2 or 9 if at all possible. -Q: I go to boot from the hard disk for the first time after installing - FreeBSD, but the Boot Manager prompt just prints `F?' at the boot menu - each time but the boot won't go any further. - -A: The hard disk geometry was set incorrectly in the Partition editor when - you installed FreeBSD. Go back into the partition editor and specify - the actual geometry of your hard disk. You must reinstall FreeBSD - again from the beginning with the correct geometry. - - If you are failing entirely in figuring out the correct geometry for - your machine, here's a tip: Install a small DOS partition at the - beginning of the disk and install FreeBSD after that. The install - program will see the DOS partition and try to infer the correct - geometry from it, which usually works. - - If you are setting up a truly dedicated FreeBSD server or work- - station where you don't care for (future) compatibility with DOS, - Linux or another operating system, you've also got the option to use - the entire disk (`A' in the partition editor), selecting the - non-standard option where FreeBSD occupies the entire disk from - the very first to the very last sector. This will leave all geometry - considerations aside, but is somewhat limiting unless you're never - going to run anything other than FreeBSD on a disk. - - Q: I have a Matsushita/Panasonic drive but it isn't recognized by the system. A: Make certain that the I/O port that the matcd driver is set to is correct for the host interface card you have. (Some SoundBlaster DOS drivers report a hardware I/O port address for the CD-ROM interface that is 0x10 lower than it really is.) If you are unable to determine the settings for the card by examining the board or documentation, you can use UserConfig to change the 'port' address (I/O port) to -1 and start the system. This setting causes the driver to look at a number of I/O ports that various manufacturers use for their Matsushita/Panasonic/Creative CD-ROM interfaces. Once the driver locates the address, you should run UserConfig again and specify the correct address. Leaving the 'port' parameter set to -1 increases the amount of time that it takes the system to boot, and this could interfere with other devices. The double-speed Matsushita CR-562 and CR-563 are the only drives that are supported. Q: I booted the install floppy on my IBM ThinkPad (tm) laptop, and the keyboard is all messed up. A: Older IBM laptops use a non-standard keyboard controller, so you must tell the console driver (sc0) to go into a special mode which works on the ThinkPads. Change the sc0 'Flags' to 0x10 in UserConfig and it should work fine. (Look in the Input Menu for 'Syscons Console Driver'.) Q: I have a Matsushita/Panasonic CR-522, a Matsushita/Panasonic CR-523 or a TEAC CD55a drive, but it is not recognized even when the correct I/O port is set. A: These CD-ROM drives are currently not supported by FreeBSD. The command sets for these drives are not compatible with the double-speed CR-562 and CR-563 drives. The single-speed CR-522 and CR-523 drives can be identified by their use of a CD-caddy. Q: I'm trying to install from a tape drive but all I get is something like: st0(aha0:1:0) NOT READY csi 40,0,0,0 on the screen. Help! A: There's a limitation in the current sysinstall that the tape MUST be in the drive while sysinstall is started or it won't be detected. Try again with the tape in the drive the whole time. Q: I've installed FreeBSD onto my system, but it hangs when booting from the hard drive with the message: ``Changing root to /dev/sd0a''. A: This problem may occur in a system with a 3com 3c509 Ethernet adaptor. The ep0 device driver appears to be sensitive to probes for other devices that also use address 0x300. Boot your FreeBSD system by power cycling the machine (turn off and on). At the ``Boot:'' prompt specify the ``-c''. This will invoke UserConfig (see Section 1. above). Use the ``disable'' command to disable the device probes for all devices at address 0x300 except the ep0 driver. On exit, your machine should successfully boot FreeBSD. Q: My system hangs during boot, right after the "fd0: [my floppy drive]" line. A: This is not actually a hang, simply a very LONG "wdc0" probe that often takes a long time to complete on certain systems (where there usually _isn't_ a WD controller). Be patient, your system will boot! To eliminate the problem, boot with the -c flag and eliminate the wdc0 device, or compile a custom kernel. Q: My system can not find my Intel EtherExpress 16 card. A: You must set your Intel EtherExpress 16 card to be memory mapped at address 0xD0000, and set the amount of mapped memory to 32K using the Intel supplied softset.exe program. Q: When installing on an EISA HP Netserver, my on-board AIC-7xxx SCSI controller isn't detected. A: This is a known problem, and will hopefully be fixed in the future. In order to get your system installed at all, boot with the -c option into UserConfig, but _don't_ use the pretty visual mode but the plain old CLI mode. Type eisa 12 quit there at the prompt. (Instead of `quit', you might also type `visual', and continue the rest of the configuration session in visual mode.) While it's recommended to compile a custom kernel, dset(8) now also understands to save this value. Refer to the FAQ topic 3.16 for an explanation of the problem, and for how to continue. Remember that you can find the FAQ on your local system in /usr/share/doc/FAQ, provided you have installed the `doc' distribution. Q: I have a Panasonic AL-N1 or Rios Chandler Pentium machine and I find that the system hangs before ever getting into the installation now. A: Your machine doesn't like the new i586_copyout and i586_copyin code for some reason. To disable this, boot the installation boot floppy and when it comes to the very first menu (the choice to drop into kernel UserConfig mode or not) choose the command-line interface ("expert mode") version and type the following at it: flags npx0 1 Then proceed normally to boot. This will be saved into your kernel, so you only need to do it once. Q: I have this CMD640 IDE controller that is said to be broken. A: Yes, it is. There's a workaround available now and it is enabled automatically if this chip is used on your system. For the details refer to the manual page of the disk driver (man 4 wd). Q: On a Compaq Aero notebook, I get the message "No floppy devices found! Please check ..." when trying to install from floppy. A: With Compaq being always a little different from other systems, they do not announce their floppy drive in the CMOS RAM of an Aero notebook. Therefore, the floppy disk driver assumes there is no drive configured. Go to the UserConfig screen, and set the Flags value of the fdc0 device to 0x1. This pretends the existence of the first floppy drive (as a 1.44 MB drive) to the driver without asking the CMOS at all. Q: When I go to boot my Intel AL440LX ("Atlanta") -based system from the hard disk the first time, it stops with a "Read Error" message. A: There appears to be a bug in the BIOS on at least some of these boards, this bug results in the FreeBSD bootloader thinking that it is booting from a floppy disk. This is only a problem if you are not using the BootEasy boot manager. Slice the disk in 'compatible' mode and install BootEasy during the - FreeBSD installation to avoid the bug. + FreeBSD installation to avoid the bug, or upgrade the BIOS (see Intel's + website for details). Q: When installing on an Dell Poweredge XE, Dell proprietary RAID controller DSA (Dell SCSI Array) isn't recognized. A: Configure DSA to use AHA-1540 emulation using EISA configuration utility. After that FreeBSD detects DSA as Adaptec AHA-1540 SCSI controller, with irq 11 and port 340. Under emulation mode system will use DSA RAID disks, but you cannot use DSA specific features such as watching RAID health. -[ Please add more hardware tips to this Q&A section! ] + +Q: My Ethernet adapter is detected as an AMD PCnet-FAST (or similar) but + it doesn't work. (Eg. onboard Ethernet on IBM Netfinity 5xxx or 7xxx) + +A: The 'lnc' driver is currently faulty, and will often not work correctly + with the PCnet-FAST and PCnet-FAST+. You need to install a different + Ethernet adapter. + + +Q: I have an IBM EtherJet PCI card, it is detected by the 'fxp' driver + correctly, but the lights on the card don't come on and it doesn't + connect to the network. + +A: We don't understand why this happens. Neither do IBM (we asked them). + The card is a standard Intel EtherExpress Pro/100 with an IBM label + on it, and these cards normally work just fine. You may see these + symptoms only in some IBM Netfinity servers. The only solution is to + install a different Ethernet adapter. + + +Q: When I configure the network during installation on an IBM Netfinity + 3500, the system freezes. + +A: There is a problem with the onboard Ethernet in the Netfinity 3500 + which we have not been able to identify at this time. It may be + related to the SMP features of the system being misconfigured. You + will have to install another Ethernet adapter, and avoid attempting + to configure the onboard adapter at any time. + + +Q: Why does my CD-220E (rev 1.0D) IDE CD-ROM lock up the system when + I use it? + +A: There are apparently firmware problems with this drive and, + though a fix may soon be forthcoming, it should probably be avoided + for now. + +[ Please send hardware tips for this Q&A section to jkh@freebsd.org ] Index: stable/2.2/release/sysinstall/help/upgrade.hlp =================================================================== --- stable/2.2/release/sysinstall/help/upgrade.hlp (revision 40694) +++ stable/2.2/release/sysinstall/help/upgrade.hlp (revision 40695) @@ -1,167 +1,168 @@ +===================== Upgrading FreeBSD ==========================+ | | | 0.0 Preface | | 0.1 DISCLAIMER | | 0.2 IMPORTANT NOTE | | | | 1.0 Introduction | | 1.1 Upgrade Overview | | | | 2.0 Procedure | | 2.1 Backup | | 2.2 Mount Filesystems | | 2.3 Select Distributions | | 2.4 After Installation | | | | 3.0 Alternative Upgrade Techniques | | | +=====================================================================+ 0.1 DISCLAIMER --- ---------- While the FreeBSD upgrade procedure does its best to safeguard against accidental loss of data, it is still more than possible to WIPE OUT YOUR ENTIRE DISK with this installation! Please do not accept the final confirmation request unless you have adequately backed up any important data files. 0.2 IMPORTANT NOTE --- -------------- -See section 2.4 for important details regarding changes to the +If you are upgrading from FreeBSD 2.2.5 or earlier, see +section 2.4 for important details regarding changes to the /etc/fstab file required during the upgrade procedure. 1.0 Introduction --- ------------ The upgrade procedure replaces distributions selected by the user with those corresponding to the new FreeBSD release. It preserves standard system configuration data, as well as user data, installed packages and other software. Administrators contemplating an upgrade are encouraged to study this document in its entirety before commencing an upgrade. Failure to do so may result in a failed upgrade or loss of data. 1.1 Upgrade Overview --- ---------------- Upgrading of a distribution is performed by extracting the new version of the component over the top of the previous version. Files belonging to the old distribution are not deleted. System configuration is preserved by retaining and restoring the previous version of the following files: Xaccel.ini, adduser.conf, aliases, aliases.db, amd.map, crontab, csh.cshrc, csh.login, csh.logout, daily, disktab, dm.conf, exports, fbtab, fstab, ftpusers, gettytab, gnats, group, host.conf, hosts, hosts.equiv, hosts.lpd, inetd.conf, kerberosIV, localtime, login.access, mail.rc, make.conf, manpath.config, master.passwd, mib.txt, modems, monthly, motd, namedb, networks, passwd, phones, ppp, printcap, profile, protocols, pwd.db, rc, rc.firewall, rc.i386, rc.local, rc.network, rc.conf, remote, resolv.conf, rmt, security, sendmail.cf, services, shells, skeykeys, spwd.db, supfile, syslog.conf, termcap, ttys, uucp, weekly The versions of these files which correspond to the new version are moved to /etc/upgrade/. The system administrator may peruse these new versions and merge components as desired. Note that many of these files are interdependent, and the best merge procedure is to copy all site-specific data from the current files into the new. During the upgrade procedure, the administrator is prompted for a location into which all files from /etc/ are saved. In the event that local modifications have been made to other files, they may be subsequently retrieved from this location. 2.0 Procedure --- --------- This section details the upgrade procedure. Particular attention is given to items which substantially differ from a normal installation. 2.1 Backup --- ------ User data and system configuration should be backed up before upgrading. While the upgrade procedure does its best to prevent accidental mistakes, it is possible to partially or completely destroy data and configuration information. 2.2 Mount Filesystems --- ----------------- The disklabel editor is entered with the nominated disk's filesystem devices listed. Prior to commencing the upgrade, the administrator should make a note of the device names and corresponding mountpoints. These mountpoints should be entered here. DO NOT set the 'newfs flag' for any filesystems, as this will cause data loss. 2.3 Select Distributions --- -------------------- When selecting distributions, there are no constraints on which must be selected. As a general rule, the 'bin' distribution should be selected for an update, and the 'man' distribution if manpages are already installed. Other distributions may be selected beyond those originally installed if the administrator wishes to add additional functionality. 2.4 After Installation --- ------------------ Once the installation procedure has completed, the administrator is prompted to examine the new configuration files. At this point, checks should be made to ensure that the system configuration is valid. In particular, the /etc/rc.conf and /etc/fstab files should be checked. Read the following, but DO NOT update /etc/fstab as described below until the new system has booted correctly. The upgrade procedure replaces the previous FreeBSD kernel with a GENERIC kernel, and a custom kernel may need to be generated to suit the local system configuration. IMPORTANT NOTE: ============== -FreeBSD 2.2.6 introduces a change in the naming of the device from +FreeBSD 2.2.6 introduced a change in the naming of the device from which the root filesystem is mounted. This change affects all systems, however user intervention is only required for systems undergoing an -upgrade installation. +upgrade installation from a version prior to FreeBSD 2.2.6. Previously, the root filesystem was always mounted from the compatibility slice, while other partitions on the same disk were mounted from their true slice. This might, for example, have resulted in an /etc/fstab file like: # Device Mountpoint FStype Options Dump Pass# /dev/wd0s2b none swap sw 0 0 /dev/wd0a / ufs rw 1 1 /dev/wd0s2f /local0 ufs rw 1 1 /dev/wd0s2e /usr ufs rw 1 1 For FreeBSD 2.2.6 and later, this format changes so that the device for '/' is consistent with others, ie. # Device Mountpoint FStype Options Dump Pass# /dev/wd0s2b none swap sw 0 0 /dev/wd0s2a / ufs rw 1 1 /dev/wd0s2f /local0 ufs rw 1 1 /dev/wd0s2e /usr ufs rw 1 1 If /etc/fstab is not updated manually in this case, the system will issue a warning message whenever / is mounted (normally at startup) indicating the change that must be made. In addition, trouble may be experienced if the root filesystem is not correctly unmounted, whereby the root filesystem will not be marked clean at the next reboot. This change should be made as soon as the upgraded system has been successfully rebooted. 3.0 Alternative Upgrade Techniques --- ------------------------------ Those interested in an upgrade method that allows more flexibility and sophistication should take a look at the "Upgrading FreeBSD from source" tutorial found at http://www.freebsd.org/docs.html. This method requires reliable network connectivity, extra disk space and spare time, but has advantages for networks and other more complex installations. Index: stable/2.2/release/sysinstall/index.c =================================================================== --- stable/2.2/release/sysinstall/index.c (revision 40694) +++ stable/2.2/release/sysinstall/index.c (revision 40695) @@ -1,617 +1,620 @@ /* * The new sysinstall program. * * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: index.c,v 1.38.2.16 1998/07/23 19:33:05 jkh Exp $ + * $Id: index.c,v 1.38.2.17 1998/07/24 04:57:31 jkh Exp $ * * 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 #include #include #include #include #include #include "sysinstall.h" /* Macros and magic values */ -#define MAX_MENU 8 +#define MAX_MENU 12 #define _MAX_DESC 55 static int index_extract_one(Device *dev, PkgNodePtr top, PkgNodePtr who, Boolean depended); /* Smarter strdup */ inline char * _strdup(char *ptr) { return ptr ? strdup(ptr) : NULL; } static char *descrs[] = { "Package Selection", "To mark a package, move to it and press SPACE. If the package is\n" "already marked, it will be unmarked or deleted (if installed).\n" "To search for a package by name, press ESC. To select a category,\n" "press RETURN. NOTE: The All category selection creates a very large\n" - "submenu. If you select it, please be patient while it comes up.\n\n" - "If a package you're looking for is not listed here and you are\n" - "installing from CD, please check the other CD(s) after installation\n" - "since the sheer number of packages means they no longer all fit on one.\n", + "submenu. If you select it, please be patient while it comes up.", "Package Targets", "These are the packages you've selected for extraction.\n\n" "If you're sure of these choices, select OK.\n" "If not, select Cancel to go back to the package selection menu.\n", "All", "All available packages in all categories.", "applications", "User application software.", "astro", "Applications related to astronomy.", "archivers", "Utilities for archiving and unarchiving data.", "audio", "Audio utilities - most require a supported sound card.", "biology", "Software related to Biology.", "benchmarks", "Utilities for measuring system performance.", "benchmarking", "Utilities for measuring system performance.", "cad", "Computer Aided Design utilities.", "chinese", "Ported software for the Chinese market.", "comms", "Communications utilities.", "converters", "Format conversion utilities..", "databases", "Database software.", "devel", "Software development utilities and libraries.", "development", "Software development utilities and libraries.", + "deskutils", "Various Desktop utilities.", "documentation", "Document preparation utilities.", "editors", "Common text editors.", "emulation", "Utilities for emulating other OS types.", "emulators", "Utilities for emulating other OS types.", "games", "Various and sundry amusements.", "german", "Ported software for Germanic countries.", "graphics", "Graphics libraries and utilities.", "japanese", "Ported software for the Japanese market.", "kde", "Software for the K Desktop Environment.", "korean", "Ported software for the Korean market.", "lang", "Computer languages.", "languages", "Computer languages.", "libraries", "Software development libraries.", "mail", "Electronic mail packages and utilities.", "math", "Mathematical computation software.", "mbone", "Applications and utilities for the mbone.", "misc", "Miscellaneous utilities.", "net", "Networking utilities.", "networking", "Networking utilities.", "news", "USENET News support software.", "numeric", "Mathematical computation software.", "offix", "An office automation suite of sorts.", "orphans", "Packages without a home elsewhere.", "perl5", "Utilities/modules for the PERL5 language..", "pilot", "Software support for the USR Palm Pilot(tm).", "plan9", "Software from the plan9 Operating System.", "print", "Utilities for dealing with printing.", "printing", "Utilities for dealing with printing.", "programming", "Software development utilities and libraries.", "python", "Software related to the python language.", "russian", "Ported software for the Russian market.", "security", "System security software.", "shells", "Various shells (tcsh, bash, etc).", "sysutils", "Various system utilities.", "textproc", "Text processing/search utilities.", "tcl75", "TCL v7.5 and packages which depend on it.", "tcl76", "TCL v7.6 and packages which depend on it.", "tcl80", "TCL v8.0 and packages which depend on it.", "tcl81", "TCL v8.1 and packages which depend on it.", "tk41", "Tk4.1 and packages which depend on it.", "tk42", "Tk4.2 and packages which depend on it.", "tk80", "Tk8.0 and packages which depend on it.", "tk81", "Tk8.1 and packages which depend on it.", "troff", "TROFF Text formatting utilities.", "utils", "Various user utilities.", "utilities", "Various user utilities.", "vietnamese", "Ported software for the Vietnamese market.", "www", "WEB utilities (browers, HTTP servers, etc).", "x11", "X Window System based utilities.", + "x11-clocks", "X Window System based clocks.", + "x11-fm", "X Window System based file managers.", + "x11-fonts", "X Window System fonts.", + "x11-toolkits", "X Window System based development toolkits.", + "x11-wm", "X Window System Window Managers.", NULL, NULL, }; static char * fetch_desc(char *name) { int i; for (i = 0; descrs[i]; i += 2) { if (!strcmp(descrs[i], name)) return descrs[i + 1]; } return "No description provided"; } static PkgNodePtr new_pkg_node(char *name, node_type type) { PkgNodePtr tmp = safe_malloc(sizeof(PkgNode)); tmp->name = _strdup(name); tmp->type = type; return tmp; } static char * strip(char *buf) { int i; for (i = 0; buf[i]; i++) if (buf[i] == '\t' || buf[i] == '\n') buf[i] = ' '; return buf; } static IndexEntryPtr new_index(char *name, char *pathto, char *prefix, char *comment, char *descr, char *maint, char *deps) { IndexEntryPtr tmp = safe_malloc(sizeof(IndexEntry)); tmp->name = _strdup(name); tmp->path = _strdup(pathto); tmp->prefix = _strdup(prefix); tmp->comment = _strdup(comment); tmp->descrfile = strip(_strdup(descr)); tmp->maintainer = _strdup(maint); tmp->deps = _strdup(deps); return tmp; } static void index_register(PkgNodePtr top, char *where, IndexEntryPtr ptr) { PkgNodePtr p, q; for (q = NULL, p = top->kids; p; p = p->next) { if (!strcmp(p->name, where)) { q = p; break; } } if (!p) { /* Add new category */ q = new_pkg_node(where, PLACE); q->desc = fetch_desc(where); q->next = top->kids; top->kids = q; } p = new_pkg_node(ptr->name, PACKAGE); p->desc = ptr->comment; p->data = ptr; p->next = q->kids; q->kids = p; } static int copy_to_sep(char *to, char *from, int sep) { char *tok; tok = strchr(from, sep); if (!tok) { *to = '\0'; return 0; } *tok = '\0'; strcpy(to, from); return tok + 1 - from; } static int readline(FILE *fp, char *buf, int max) { int rv, i = 0; char ch; while ((rv = fread(&ch, 1, 1, fp)) == 1 && ch != '\n' && i < max) buf[i++] = ch; if (i < max) buf[i] = '\0'; return rv; } int index_parse(FILE *fp, char *name, char *pathto, char *prefix, char *comment, char *descr, char *maint, char *cats, char *rdeps) { char line[1024]; char junk[256]; char *cp; int i; i = readline(fp, line, 1024); if (i <= 0) return EOF; cp = line; cp += copy_to_sep(name, cp, '|'); cp += copy_to_sep(pathto, cp, '|'); cp += copy_to_sep(prefix, cp, '|'); cp += copy_to_sep(comment, cp, '|'); cp += copy_to_sep(descr, cp, '|'); cp += copy_to_sep(maint, cp, '|'); cp += copy_to_sep(cats, cp, '|'); cp += copy_to_sep(junk, cp, '|'); /* build deps - not used */ if (index(cp, '|')) copy_to_sep(rdeps, cp, '|'); else strncpy(rdeps, cp, 510); return 0; } int index_read(FILE *fp, PkgNodePtr papa) { char name[127], pathto[255], prefix[255], comment[255], descr[127], maint[127], cats[511], deps[511]; while (index_parse(fp, name, pathto, prefix, comment, descr, maint, cats, deps) != EOF) { char *cp, *cp2, tmp[511]; IndexEntryPtr idx; idx = new_index(name, pathto, prefix, comment, descr, maint, deps); /* For now, we only add things to menus if they're in categories. Keywords are ignored */ for (cp = strcpy(tmp, cats); (cp2 = strchr(cp, ' ')) != NULL; cp = cp2 + 1) { *cp2 = '\0'; index_register(papa, cp, idx); } index_register(papa, cp, idx); /* Add to special "All" category */ index_register(papa, "All", idx); } return 0; } void index_init(PkgNodePtr top, PkgNodePtr plist) { if (top) { top->next = top->kids = NULL; top->name = "Package Selection"; top->type = PLACE; top->desc = fetch_desc(top->name); top->data = NULL; } if (plist) { plist->next = plist->kids = NULL; plist->name = "Package Targets"; plist->type = PLACE; plist->desc = fetch_desc(plist->name); plist->data = NULL; } } void index_print(PkgNodePtr top, int level) { int i; while (top) { for (i = 0; i < level; i++) putchar('\t'); printf("name [%s]: %s\n", top->type == PLACE ? "place" : "package", top->name); for (i = 0; i < level; i++) putchar('\t'); printf("desc: %s\n", top->desc); if (top->kids) index_print(top->kids, level + 1); top = top->next; } } /* Swap one node for another */ static void swap_nodes(PkgNodePtr a, PkgNodePtr b) { PkgNode tmp; tmp = *a; *a = *b; a->next = tmp.next; tmp.next = b->next; *b = tmp; } /* Use a disgustingly simplistic bubble sort to put our lists in order */ void index_sort(PkgNodePtr top) { PkgNodePtr p, q; /* Sort everything at the top level */ for (p = top->kids; p; p = p->next) { for (q = top->kids; q; q = q->next) { if (q->next && strcmp(q->name, q->next->name) > 0) swap_nodes(q, q->next); } } /* Now sub-sort everything n levels down */ for (p = top->kids; p; p = p->next) { if (p->kids) index_sort(p); } } /* Delete an entry out of the list it's in (only the plist, at present) */ void index_delete(PkgNodePtr n) { if (n->next) { PkgNodePtr p = n->next; *n = *(n->next); safe_free(p); } else /* Kludgy end sentinal */ n->name = NULL; } /* * Search for a given node by name, returning the category in if * tp is non-NULL. */ PkgNodePtr index_search(PkgNodePtr top, char *str, PkgNodePtr *tp) { PkgNodePtr p, sp; for (p = top->kids; p && p->name; p = p->next) { /* Subtract out the All category from searches */ if (!strcmp(p->name, "All")) continue; /* If tp == NULL, we're looking for an exact package match */ if (!tp && !strncmp(p->name, str, strlen(str))) return p; /* If tp, we're looking for both a package and a pointer to the place it's in */ if (tp && !strncmp(p->name, str, strlen(str))) { *tp = top; return p; } /* The usual recursion-out-of-laziness ploy */ if (p->kids) if ((sp = index_search(p, str, tp)) != NULL) return sp; } if (p && !p->name) p = NULL; return p; } int pkg_checked(dialogMenuItem *self) { PkgNodePtr kp = self->data, plist = (PkgNodePtr)self->aux; int i; i = index_search(plist, kp->name, NULL) ? TRUE : FALSE; if (kp->type == PACKAGE && plist) return i || package_exists(kp->name); else return FALSE; } int pkg_fire(dialogMenuItem *self) { int ret; PkgNodePtr sp, kp = self->data, plist = (PkgNodePtr)self->aux; if (!plist) ret = DITEM_FAILURE; else if (kp->type == PACKAGE) { sp = index_search(plist, kp->name, NULL); /* Not already selected? */ if (!sp) { if (!package_exists(kp->name)) { PkgNodePtr np = (PkgNodePtr)safe_malloc(sizeof(PkgNode)); *np = *kp; np->next = plist->kids; plist->kids = np; msgInfo("Added %s to selection list", kp->name); } else { WINDOW *save = savescr(); if (!msgYesNo("Do you really want to delete %s from the system?", kp->name)) if (vsystem("pkg_delete %s %s", isDebug() ? "-v" : "", kp->name)) msgConfirm("Warning: pkg_delete of %s failed.\n Check debug output for details.", kp->name); restorescr(save); } } else { msgInfo("Removed %s from selection list", kp->name); index_delete(sp); } ret = DITEM_SUCCESS; } else { /* Not a package, must be a directory */ int p, s; p = s = 0; index_menu(kp, plist, &p, &s); ret = DITEM_SUCCESS | DITEM_CONTINUE; } return ret; } void pkg_selected(dialogMenuItem *self, int is_selected) { PkgNodePtr kp = self->data; if (!is_selected || kp->type != PACKAGE) return; msgInfo(kp->desc); } int index_menu(PkgNodePtr top, PkgNodePtr plist, int *pos, int *scroll) { int n, rval, maxname; int curr, max; PkgNodePtr kp; dialogMenuItem *nitems; Boolean hasPackages; WINDOW *w; hasPackages = FALSE; nitems = NULL; w = savescr(); n = maxname = 0; /* Figure out if this menu is full of "leaves" or "branches" */ for (kp = top->kids; kp && kp->name; kp = kp->next) { int len; ++n; if (kp->type == PACKAGE && plist) { hasPackages = TRUE; if ((len = strlen(kp->name)) > maxname) maxname = len; } } if (!n && plist) { msgConfirm("The %s menu is empty.", top->name); restorescr(w); return DITEM_LEAVE_MENU; } while (1) { n = 0; curr = max = 0; use_helpline(NULL); use_helpfile(NULL); kp = top->kids; if (!hasPackages && plist) { nitems = item_add(nitems, "OK", NULL, NULL, NULL, NULL, NULL, 0, &curr, &max); nitems = item_add(nitems, "Install", NULL, NULL, NULL, NULL, NULL, 0, &curr, &max); } while (kp && kp->name) { char buf[256]; IndexEntryPtr ie = kp->data; /* Brutally adjust description to fit in menu */ if (kp->type == PACKAGE) snprintf(buf, sizeof buf, "[%s]", ie->path ? ie->path : "External vendor"); else SAFE_STRCPY(buf, kp->desc); if (strlen(buf) > (_MAX_DESC - maxname)) buf[_MAX_DESC - maxname] = '\0'; nitems = item_add(nitems, kp->name, buf, pkg_checked, pkg_fire, pkg_selected, kp, (int)plist, &curr, &max); ++n; kp = kp->next; } /* NULL delimiter so item_free() knows when to stop later */ nitems = item_add(nitems, NULL, NULL, NULL, NULL, NULL, NULL, 0, &curr, &max); recycle: dialog_clear_norefresh(); if (hasPackages) rval = dialog_checklist(top->name, top->desc, -1, -1, n > MAX_MENU ? MAX_MENU : n, -n, nitems, NULL); else rval = dialog_menu(top->name, top->desc, -1, -1, n > MAX_MENU ? MAX_MENU : n, -n, nitems + (plist ? 2 : 0), (char *)plist, pos, scroll); if (rval == -1 && plist) { static char *cp; PkgNodePtr menu; /* Search */ if ((cp = msgGetInput(cp, "Search by package name. Please enter search string:")) != NULL) { PkgNodePtr p = index_search(top, cp, &menu); if (p) { int pos, scroll; /* These need to be set to point at the found item, actually. Hmmm! */ pos = scroll = 0; index_menu(menu, plist, &pos, &scroll); } else msgConfirm("Search string: %s yielded no hits.", cp); } goto recycle; } items_free(nitems, &curr, &max); restorescr(w); return rval ? DITEM_FAILURE : DITEM_SUCCESS; } } int index_extract(Device *dev, PkgNodePtr top, PkgNodePtr plist) { PkgNodePtr tmp; int status = DITEM_SUCCESS; for (tmp = plist->kids; tmp && tmp->name; tmp = tmp->next) status = index_extract_one(dev, top, tmp, FALSE); return status; } static int index_extract_one(Device *dev, PkgNodePtr top, PkgNodePtr who, Boolean depended) { int status = DITEM_SUCCESS; PkgNodePtr tmp2; IndexEntryPtr id = who->data; if (id && id->deps && strlen(id->deps)) { char t[1024], *cp, *cp2; SAFE_STRCPY(t, id->deps); cp = t; while (cp && DITEM_STATUS(status) == DITEM_SUCCESS) { if ((cp2 = index(cp, ' ')) != NULL) *cp2 = '\0'; if ((tmp2 = index_search(top, cp, NULL)) != NULL) { status = index_extract_one(dev, top, tmp2, TRUE); if (DITEM_STATUS(status) != DITEM_SUCCESS) { if (variable_get(VAR_NO_CONFIRM)) msgNotify("Loading of dependant package %s failed", cp); else msgConfirm("Loading of dependant package %s failed", cp); } } - else { + else if (!package_exists(cp)) { if (variable_get(VAR_NO_CONFIRM)) msgNotify("Warning: %s is a required package but was not found.", cp); else msgConfirm("Warning: %s is a required package but was not found.", cp); } if (cp2) cp = cp2 + 1; else cp = NULL; } } /* Done with the deps? Load the real m'coy */ if (DITEM_STATUS(status) == DITEM_SUCCESS) status = package_extract(dev, who->name, depended); return status; } Index: stable/2.2/release/sysinstall/install.c =================================================================== --- stable/2.2/release/sysinstall/install.c (revision 40694) +++ stable/2.2/release/sysinstall/install.c (revision 40695) @@ -1,1139 +1,1140 @@ /* * The new sysinstall program. * * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: install.c,v 1.134.2.70 1998/08/31 17:48:39 jkh Exp $ + * $Id: install.c,v 1.134.2.71 1998/09/29 05:13:52 jkh Exp $ * * 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 "uc_main.h" #include #include #include #include #include #include #include #define MSDOSFS #include #undef MSDOSFS #include #include static void create_termcap(void); static void fixit_common(void); #ifdef SAVE_USERCONFIG static void save_userconfig_to_kernel(char *); #endif #define TERMCAP_FILE "/usr/share/misc/termcap" static void installConfigure(void); Boolean checkLabels(Boolean whinge, Chunk **rdev, Chunk **sdev, Chunk **udev, Chunk **vdev) { Device **devs; Boolean status; Disk *disk; Chunk *c1, *c2, *rootdev, *swapdev, *usrdev, *vardev; int i; /* Don't allow whinging if noWarn is set */ if (variable_get(VAR_NO_WARN)) whinge = FALSE; status = TRUE; *rdev = *sdev = *udev = *vdev = rootdev = swapdev = usrdev = vardev = NULL; /* We don't need to worry about root/usr/swap if we're already multiuser */ if (!RunningAsInit) return status; devs = deviceFind(NULL, DEVICE_TYPE_DISK); /* First verify that we have a root device */ for (i = 0; devs[i]; i++) { if (!devs[i]->enabled) continue; disk = (Disk *)devs[i]->private; msgDebug("Scanning disk %s for root filesystem\n", disk->name); if (!disk->chunks) msgFatal("No chunk list found for %s!", disk->name); for (c1 = disk->chunks->part; c1; c1 = c1->next) { if (c1->type == freebsd) { for (c2 = c1->part; c2; c2 = c2->next) { if (c2->type == part && c2->subtype != FS_SWAP && c2->private_data) { if (!strcmp(((PartInfo *)c2->private_data)->mountpoint, "/")) { if (rootdev) { if (whinge) msgConfirm("WARNING: You have more than one root device set?!\n" "Using the first one found."); continue; } else { rootdev = c2; if (isDebug()) msgDebug("Found rootdev at %s!\n", rootdev->name); } } else if (!strcmp(((PartInfo *)c2->private_data)->mountpoint, "/usr")) { if (usrdev) { if (whinge) msgConfirm("WARNING: You have more than one /usr filesystem.\n" "Using the first one found."); continue; } else { usrdev = c2; if (isDebug()) msgDebug("Found usrdev at %s!\n", usrdev->name); } } else if (!strcmp(((PartInfo *)c2->private_data)->mountpoint, "/var")) { if (vardev) { if (whinge) msgConfirm("WARNING: You have more than one /var filesystem.\n" "Using the first one found."); continue; } else { vardev = c2; if (isDebug()) msgDebug("Found vardev at %s!\n", vardev->name); } } } } } } } /* Now check for swap devices */ for (i = 0; devs[i]; i++) { if (!devs[i]->enabled) continue; disk = (Disk *)devs[i]->private; msgDebug("Scanning disk %s for swap partitions\n", disk->name); if (!disk->chunks) msgFatal("No chunk list found for %s!", disk->name); for (c1 = disk->chunks->part; c1; c1 = c1->next) { if (c1->type == freebsd) { for (c2 = c1->part; c2; c2 = c2->next) { if (c2->type == part && c2->subtype == FS_SWAP && !swapdev) { swapdev = c2; if (isDebug()) msgDebug("Found swapdev at %s!\n", swapdev->name); break; } } } } } /* Copy our values over */ *rdev = rootdev; *sdev = swapdev; *udev = usrdev; *vdev = vardev; if (!rootdev && whinge) { msgConfirm("No root device found - you must label a partition as /\n" "in the label editor."); status = FALSE; } if (!swapdev && whinge) { msgConfirm("No swap devices found - you must create at least one\n" "swap partition."); status = FALSE; } if (!usrdev && whinge && !variable_get(VAR_NO_USR)) { msgConfirm("WARNING: No /usr filesystem found. This is not technically\n" "an error if your root filesystem is big enough (or you later\n" "intend to mount your /usr filesystem over NFS), but it may otherwise\n" "cause you trouble if you're not exactly sure what you are doing!"); } if (!vardev && whinge && variable_cmp(SYSTEM_STATE, "upgrade")) { msgConfirm("WARNING: No /var filesystem found. This is not technically\n" "an error if your root filesystem is big enough (or you later\n" "intend to link /var to someplace else), but it may otherwise\n" "cause your root filesystem to fill up if you receive lots of mail\n" "or edit large temporary files."); } return status; } static int installInitial(void) { static Boolean alreadyDone = FALSE; if (alreadyDone) return DITEM_SUCCESS; if (!variable_get(DISK_LABELLED)) { msgConfirm("You need to assign disk labels before you can proceed with\n" "the installation."); return DITEM_FAILURE; } /* If it's labelled, assume it's also partitioned */ if (!variable_get(DISK_PARTITIONED)) variable_set2(DISK_PARTITIONED, "yes"); /* If we refuse to proceed, bail. */ dialog_clear_norefresh(); if (!variable_get(VAR_NO_WARN)) if (msgYesNo( "Last Chance! Are you SURE you want continue the installation?\n\n" "If you're running this on a disk with data you wish to save\n" "then WE STRONGLY ENCOURAGE YOU TO MAKE PROPER BACKUPS before\n" "proceeding!\n\n" "We can take no responsibility for lost disk contents!") != 0) return DITEM_FAILURE | DITEM_RESTORE; if (DITEM_STATUS(diskLabelCommit(NULL)) != DITEM_SUCCESS) { msgConfirm("Couldn't make filesystems properly. Aborting."); return DITEM_FAILURE; } if (!copySelf()) { msgConfirm("installInitial: Couldn't clone the boot floppy onto the\n" "root file system. Aborting!"); return DITEM_FAILURE; } if (chroot("/mnt") == -1) { msgConfirm("installInitial: Unable to chroot to %s - this is bad!", "/mnt"); return DITEM_FAILURE; } chdir("/"); variable_set2(RUNNING_ON_ROOT, "yes"); configResolv(); /* stick a helpful shell over on the 4th VTY */ systemCreateHoloshell(); alreadyDone = TRUE; return DITEM_SUCCESS; } int installFixitHoloShell(dialogMenuItem *self) { systemCreateHoloshell(); return DITEM_SUCCESS; } int installFixitCDROM(dialogMenuItem *self) { struct stat sb; if (!RunningAsInit) return DITEM_SUCCESS; variable_set2(SYSTEM_STATE, "fixit"); (void)unlink("/mnt2"); (void)rmdir("/mnt2"); while (1) { msgConfirm("Please insert the second FreeBSD CDROM and press return"); if (DITEM_STATUS(mediaSetCDROM(NULL)) != DITEM_SUCCESS || !mediaDevice || !mediaDevice->init(mediaDevice)) { /* If we can't initialize it, it's probably not a FreeBSD CDROM so punt on it */ if (mediaDevice) { mediaDevice->shutdown(mediaDevice); mediaDevice = NULL; } if (msgYesNo("Unable to mount the CDROM - do you want to try again?") != 0) return DITEM_FAILURE; } else break; } /* Since the fixit code expects everything to be in /mnt2, and the CDROM mounting stuff /dist, do * a little kludge dance here.. */ if (symlink("/dist", "/mnt2")) { msgConfirm("Unable to symlink /mnt2 to the CDROM mount point. Please report this\n" "unexpected failure to freebsd-bugs@FreeBSD.org."); return DITEM_FAILURE; } /* * If /tmp points to /mnt2/tmp from a previous fixit floppy session, it's * not very good for us if we point it to the CDROM now. Rather make it * a directory in the root MFS then. Experienced admins will still be * able to mount their disk's /tmp over this if they need. */ if (lstat("/tmp", &sb) == 0 && (sb.st_mode & S_IFMT) == S_IFLNK) (void)unlink("/tmp"); Mkdir("/tmp"); /* * Since setuid binaries ignore LD_LIBRARY_PATH, we indeed need the * ld.so.hints file. Fortunately, it's fairly small (~ 3 KB). */ if (!file_readable("/var/run/ld.so.hints")) { Mkdir("/var/run"); if (vsystem("/mnt2/sbin/ldconfig -s /mnt2/usr/lib")) { msgConfirm("Warning: ldconfig could not create the ld.so hints file.\n" "Dynamic executables from the CDROM likely won't work."); } } /* Yet another iggly hardcoded pathname. */ if (!file_readable("/usr/libexec/ld.so")) { Mkdir("/usr/libexec"); if (symlink("/mnt2/usr/libexec/ld.so", "/usr/libexec/ld.so")) { msgConfirm("Warning: could not create the symlink for ld.so.\n" "Dynamic executables from the CDROM likely won't work."); } } fixit_common(); mediaDevice->shutdown(mediaDevice); msgConfirm("Please remove the FreeBSD CDROM now."); return DITEM_SUCCESS; } int installFixitFloppy(dialogMenuItem *self) { struct ufs_args args; if (!RunningAsInit) return DITEM_SUCCESS; variable_set2(SYSTEM_STATE, "fixit"); Mkdir("/mnt2"); /* Try to open the floppy drive */ if (DITEM_STATUS(mediaSetFloppy(NULL)) == DITEM_FAILURE) { msgConfirm("Unable to set media device to floppy."); mediaClose(); return DITEM_FAILURE; } memset(&args, 0, sizeof(args)); args.fspec = mediaDevice->devname; while (1) { msgConfirm("Please insert a writable fixit floppy and press return"); - if (mount(MOUNT_UFS, "/mnt2", 0, (caddr_t)&args) != -1) - break; - msgConfirm("An attempt to mount the fixit floppy failed, maybe the filesystem\n" - "is unclean. Trying a forcible mount as a last resort..."); - if (mount(MOUNT_UFS, "/mnt2", MNT_FORCE, (caddr_t)&args) != -1) - break; - if (msgYesNo("Unable to mount the fixit floppy - do you want to try again?") != 0) - return DITEM_FAILURE; + mediaDevice->private = "/mnt2"; + if (!mediaDevice->init(mediaDevice)) { + if (msgYesNo("The attempt to mount the fixit floppy failed, bad floppy\n" + "or unclean filesystem. Do you want to try again?")) + return DITEM_FAILURE; + } } - if (!directory_exists("/tmp")) (void)symlink("/mnt2/tmp", "/tmp"); - fixit_common(); - - unmount("/mnt2", MNT_FORCE); + mediaDevice->shutdown(mediaDevice); + mediaDevice = NULL; msgConfirm("Please remove the fixit floppy now."); return DITEM_SUCCESS; } /* * The common code for both fixit variants. */ static void fixit_common(void) { pid_t child; int waitstatus; if (!directory_exists("/var/tmp/vi.recover")) { if (DITEM_STATUS(Mkdir("/var/tmp/vi.recover")) != DITEM_SUCCESS) { msgConfirm("Warning: Was unable to create a /var/tmp/vi.recover directory.\n" "vi will kvetch and moan about it as a result but should still\n" "be essentially usable."); } } if (!directory_exists("/bin")) (void)Mkdir("/bin"); (void)symlink("/stand/sh", "/bin/sh"); /* Link the /etc/ files */ if (DITEM_STATUS(Mkdir("/etc")) != DITEM_SUCCESS) msgConfirm("Unable to create an /etc directory! Things are weird on this floppy.."); else if ((symlink("/mnt2/etc/spwd.db", "/etc/spwd.db") == -1 && errno != EEXIST) || (symlink("/mnt2/etc/protocols", "/etc/protocols") == -1 && errno != EEXIST) || (symlink("/mnt2/etc/services", "/etc/services") == -1 && errno != EEXIST)) msgConfirm("Couldn't symlink the /etc/ files! I'm not sure I like this.."); if (!file_readable(TERMCAP_FILE)) create_termcap(); if (!(child = fork())) { int i, fd; struct termios foo; extern int login_tty(int); ioctl(0, TIOCNOTTY, NULL); for (i = getdtablesize(); i >= 0; --i) close(i); fd = open("/dev/ttyv3", O_RDWR); ioctl(0, TIOCSCTTY, &fd); dup2(0, 1); dup2(0, 2); DebugFD = 2; if (login_tty(fd) == -1) msgDebug("fixit: I can't set the controlling terminal.\n"); signal(SIGTTOU, SIG_IGN); if (tcgetattr(0, &foo) != -1) { foo.c_cc[VERASE] = '\010'; if (tcsetattr(0, TCSANOW, &foo) == -1) msgDebug("fixit shell: Unable to set erase character.\n"); } else msgDebug("fixit shell: Unable to get terminal attributes!\n"); setenv("PATH", "/bin:/sbin:/usr/bin:/usr/sbin:/stand:" "/mnt2/stand:/mnt2/bin:/mnt2/sbin:/mnt2/usr/bin:/mnt2/usr/sbin", 1); /* use the .profile from the fixit medium */ setenv("HOME", "/mnt2", 1); chdir("/mnt2"); execlp("sh", "-sh", 0); msgDebug("fixit shell: Failed to execute shell!\n"); _exit(1);; } else { msgNotify("Waiting for fixit shell to exit. Go to VTY4 now by\n" "typing ALT-F4. When you are done, type ``exit'' to exit\n" "the fixit shell and be returned here."); (void)waitpid(child, &waitstatus, 0); } dialog_clear(); } int installExpress(dialogMenuItem *self) { int i; variable_set2(SYSTEM_STATE, "express"); if (DITEM_STATUS((i = diskPartitionEditor(self))) == DITEM_FAILURE) return i; if (DITEM_STATUS((i = diskLabelEditor(self))) == DITEM_FAILURE) return i; dialog_clear_norefresh(); if (DITEM_STATUS((i = installCommit(self))) == DITEM_SUCCESS) { i |= DITEM_LEAVE_MENU; /* Give user the option of one last configuration spree */ installConfigure(); } return i | DITEM_RESTORE; } /* Novice mode installation */ int installNovice(dialogMenuItem *self) { int i, tries = 0; Device **devs; variable_set2(SYSTEM_STATE, "novice"); dialog_clear_norefresh(); msgConfirm("In the next menu, you will need to set up a DOS-style (\"fdisk\") partitioning\n" "scheme for your hard disk. If you simply wish to devote all disk space\n" "to FreeBSD (overwriting anything else that might be on the disk(s) selected)\n" "then use the (A)ll command to select the default partitioning scheme followed\n" "by a (Q)uit. If you wish to allocate only free space to FreeBSD, move to a\n" "partition marked \"unused\" and use the (C)reate command."); nodisks: if (DITEM_STATUS(diskPartitionEditor(self)) == DITEM_FAILURE) return DITEM_FAILURE; if (diskGetSelectCount(&devs) <= 0 && tries < 3) { msgConfirm("You need to select some disks to operate on! Be sure to use SPACE\n" "instead of RETURN in the disk selection menu when selecting a disk."); ++tries; goto nodisks; } dialog_clear_norefresh(); msgConfirm("Next, you need to create BSD partitions inside of the fdisk partition(s)\n" "just created. If you have a reasonable amount of disk space (200MB or more)\n" "and don't have any special requirements, simply use the (A)uto command to\n" "allocate space automatically. If you have more specific needs or just don't\n" "care for the layout chosen by (A)uto, press F1 for more information on\n" "manual layout."); if (DITEM_STATUS(diskLabelEditor(self)) == DITEM_FAILURE) return DITEM_FAILURE; dialog_clear_norefresh(); if (DITEM_STATUS((i = installCommit(self))) == DITEM_FAILURE) { dialog_clear_norefresh(); msgConfirm("Installation completed with some errors. You may wish to\n" "scroll through the debugging messages on VTY1 with the\n" "scroll-lock feature. You can also chose \"No\" at the next\n" "prompt and go back into the installation menus to try and retry\n" "whichever operations have failed."); return i | DITEM_RESTORE; } else { dialog_clear_norefresh(); msgConfirm("Congratulations! You now have FreeBSD installed on your system.\n\n" "We will now move on to the final configuration questions.\n" "For any option you do not wish to configure, simply select\n" "No.\n\n" "If you wish to re-enter this utility after the system is up, you\n" "may do so by typing: /stand/sysinstall."); } if (mediaDevice->type != DEVICE_TYPE_FTP && mediaDevice->type != DEVICE_TYPE_NFS) { if (!msgYesNo("Would you like to configure any Ethernet or SLIP/PPP network devices?")) { Device *tmp; dialog_clear_norefresh(); tmp = tcpDeviceSelect(); dialog_clear_norefresh(); if (tmp && !msgYesNo("Would you like to bring the %s interface up right now?", tmp->name)) if (!tmp->init(tmp)) msgConfirm("Initialization of %s device failed.", tmp->name); } } dialog_clear_norefresh(); if (!msgYesNo("Will this machine be an IP gateway (e.g. will it forward packets\n" "between interfaces)?")) variable_set2("gateway_enable", "YES"); dialog_clear_norefresh(); if (!msgYesNo("Do you want to allow anonymous FTP connections to this machine?")) configAnonFTP(self); dialog_clear_norefresh(); if (!msgYesNo("Do you want to configure this machine as an NFS server?")) configNFSServer(self); dialog_clear_norefresh(); if (!msgYesNo("Do you want to configure this machine as an NFS client?")) variable_set2("nfs_client_enable", "YES"); dialog_clear_norefresh(); if (!msgYesNo("Would you like to customize your system console settings?")) { WINDOW *w = savescr(); dmenuOpenSimple(&MenuSyscons, FALSE); restorescr(w); } dialog_clear_norefresh(); if (!msgYesNo("Would you like to set this machine's time zone now?")) { WINDOW *w = savescr(); dialog_clear(); systemExecute("tzsetup"); restorescr(w); } dialog_clear_norefresh(); if (!msgYesNo("Does this system have a mouse attached to it?")) { WINDOW *w = savescr(); dmenuOpenSimple(&MenuMouse, FALSE); restorescr(w); } /* Now would be a good time to checkpoint the configuration data */ configRC_conf("/etc/rc.conf"); sync(); if (directory_exists("/usr/X11R6")) { dialog_clear_norefresh(); if (!msgYesNo("Would you like to configure your X server at this time?")) configXEnvironment(self); } dialog_clear_norefresh(); if (!msgYesNo("The FreeBSD package collection is a collection of hundreds of ready-to-run\n" "applications, from text editors to games to WEB servers and more. Would you\n" "like to browse the collection now?")) configPackages(self); dialog_clear_norefresh(); if (!msgYesNo("Would you like to add any initial user accounts to the system?\n" "Adding at least one account for yourself at this stage is suggested\n" "since working as the \"root\" user is dangerous (it is easy to do\n" "things which adversely affect the entire system).")) configUsers(self); dialog_clear_norefresh(); msgConfirm("Now you must set the system manager's password.\n" "This is the password you'll use to log in as \"root\"."); { WINDOW *w = savescr(); if (!systemExecute("passwd root")) variable_set2("root_password", "YES"); restorescr(w); } dialog_clear_norefresh(); if (!msgYesNo("Would you like to register your FreeBSD system at this time?\n\n" "PLEASE, take just 5 minutes to do this. If we're ever to get any\n" "significant base of commercial software for FreeBSD, we need to\n" "be able to provide more information about the size of our user community.\n" "This is where your registration can really help us, and you can also\n" "sign up for the new FreeBSD newsletter (its free!) at the same time.\n")) configRegister(NULL); else { dialog_clear_norefresh(); msgConfirm("OK, but if you should change your mind then you always can register\n" "later by typing ``/stand/sysinstall register'' or by simply visiting our\n" "web site at http://www.freebsd.org/register.html"); } /* XXX Put whatever other nice configuration questions you'd like to ask the user here XXX */ /* Give user the option of one last configuration spree */ dialog_clear_norefresh(); installConfigure(); return DITEM_LEAVE_MENU | DITEM_RESTORE; } /* The version of commit we call from the Install Custom menu */ int installCustomCommit(dialogMenuItem *self) { int i; dialog_clear_norefresh(); i = installCommit(self); if (DITEM_STATUS(i) == DITEM_SUCCESS) { /* Give user the option of one last configuration spree */ installConfigure(); return i; } else msgConfirm("The commit operation completed with errors. Not\n" "updating /etc files."); return i; } /* * What happens when we finally decide to going ahead with the installation. * * This is broken into multiple stages so that the user can do a full * installation but come back here again to load more distributions, * perhaps from a different media type. This would allow, for * example, the user to load the majority of the system from CDROM and * then use ftp to load just the DES dist. */ int installCommit(dialogMenuItem *self) { int i; char *str; Boolean need_bin; if (!Dists) distConfig(NULL); if (!Dists) if (!dmenuOpenSimple(&MenuDistributions, FALSE) && !Dists) return DITEM_FAILURE | DITEM_RESTORE; if (!mediaVerify()) return DITEM_FAILURE | DITEM_RESTORE; str = variable_get(SYSTEM_STATE); if (isDebug()) msgDebug("installCommit: System state is `%s'\n", str); if (RunningAsInit) { /* Do things we wouldn't do to a multi-user system */ if (DITEM_STATUS((i = installInitial())) == DITEM_FAILURE) return i; if (DITEM_STATUS((i = configFstab())) == DITEM_FAILURE) return i; } try_media: if (!mediaDevice->init(mediaDevice)) { if (!msgYesNo("Unable to initialize selected media. Would you like to\n" "adjust your media configuration and try again?")) { mediaDevice = NULL; if (!mediaVerify()) return DITEM_FAILURE | DITEM_RESTORE; else goto try_media; } else return DITEM_FAILURE | DITEM_RESTORE; } need_bin = Dists & DIST_BIN; i = distExtractAll(self); /* Only do fixup if bin dist was successfully extracted */ if (need_bin && !(Dists & DIST_BIN)) i |= installFixup(self); /* When running as init, *now* it's safe to grab the rc.foo vars */ installEnvironment(); variable_set2(SYSTEM_STATE, DITEM_STATUS(i) == DITEM_FAILURE ? "error-install" : "full-install"); return i | DITEM_RESTORE; } static void installConfigure(void) { /* Final menu of last resort */ dialog_clear_norefresh(); if (!msgYesNo("Visit the general configuration menu for a chance to set\n" "any last options?")) { WINDOW *w = savescr(); dmenuOpenSimple(&MenuConfigure, FALSE); restorescr(w); } configRC_conf("/etc/rc.conf"); sync(); } int installFixup(dialogMenuItem *self) { Device **devs; int i; if (!file_readable("/kernel")) { if (file_readable("/kernel.GENERIC")) { -#ifdef SAVE_USERCONFIG - /* Snapshot any boot -c changes back to the GENERIC kernel */ - if (!variable_cmp(VAR_RELNAME, RELEASE_NAME)) - save_userconfig_to_kernel("/kernel.GENERIC"); -#endif if (vsystem("cp -p /kernel.GENERIC /kernel")) { msgConfirm("Unable to link /kernel into place!"); return DITEM_FAILURE; } +#ifdef SAVE_USERCONFIG + /* Snapshot any boot -c changes back to the new kernel */ + if (!variable_cmp(VAR_RELNAME, RELEASE_NAME)) + save_userconfig_to_kernel("/kernel"); +#endif } else { msgConfirm("Can't find a kernel image to link to on the root file system!\n" "You're going to have a hard time getting this system to\n" "boot from the hard disk, I'm afraid!"); return DITEM_FAILURE; } } /* Resurrect /dev after bin distribution screws it up */ if (RunningAsInit) { msgNotify("Remaking all devices.. Please wait!"); if (vsystem("cd /dev; sh MAKEDEV all")) { msgConfirm("MAKEDEV returned non-zero status"); return DITEM_FAILURE; } msgNotify("Resurrecting /dev entries for slices.."); devs = deviceFind(NULL, DEVICE_TYPE_DISK); if (!devs) msgFatal("Couldn't get a disk device list!"); /* Resurrect the slices that the former clobbered */ for (i = 0; devs[i]; i++) { Disk *disk = (Disk *)devs[i]->private; Chunk *c1; if (!devs[i]->enabled) continue; if (!disk->chunks) msgFatal("No chunk list found for %s!", disk->name); for (c1 = disk->chunks->part; c1; c1 = c1->next) { if (c1->type == freebsd) { msgNotify("Making slice entries for %s", c1->name); if (vsystem("cd /dev; sh MAKEDEV %sh", c1->name)) { msgConfirm("Unable to make slice entries for %s!", c1->name); return DITEM_FAILURE; } } } } - /* XXX Do all the last ugly work-arounds here which we'll try and excise someday right?? XXX */ + /* Do all the last ugly work-arounds here */ msgNotify("Fixing permissions.."); - /* BOGON #1: XFree86 extracting /usr/X11R6 with root-only perms */ + /* BOGON #1: XFree86 requires various specialized fixups */ if (directory_exists("/usr/X11R6")) { vsystem("chmod -R a+r /usr/X11R6"); vsystem("find /usr/X11R6 -type d | xargs chmod a+x"); + + /* Also do bogus minimal package registration so ports don't whine */ + if (file_readable("/usr/X11R6/lib/X11/pkgreg.tar.gz")) + vsystem("tar xpzf /usr/X11R6/lib/X11/pkgreg.tar.gz -C / && rm /usr/X11R6/lib/X11/pkgreg.tar.gz"); } + /* BOGON #2: We leave /etc in a bad state */ chmod("/etc", 0755); /* BOGON #3: No /var/db/mountdtab complains */ Mkdir("/var/db"); creat("/var/db/mountdtab", 0644); /* BOGON #4: /compat created by default in root fs */ Mkdir("/usr/compat"); vsystem("ln -s /usr/compat /compat"); /* BOGON #5: aliases database not build for bin */ vsystem("newaliases"); /* BOGON #6: deal with new boot files */ vsystem("touch /kernel.config"); vsystem("touch /boot.config"); if (file_readable("/stand/boot.help") && !file_readable("/boot.help")) vsystem("mv /stand/boot.help /"); /* Now run all the mtree stuff to fix things up */ vsystem("mtree -deU -f /etc/mtree/BSD.root.dist -p /"); vsystem("mtree -deU -f /etc/mtree/BSD.var.dist -p /var"); vsystem("mtree -deU -f /etc/mtree/BSD.usr.dist -p /usr"); } return DITEM_SUCCESS; } /* Go newfs and/or mount all the filesystems we've been asked to */ int installFilesystems(dialogMenuItem *self) { int i; Disk *disk; Chunk *c1, *c2, *rootdev, *swapdev, *usrdev, *vardev; Device **devs; PartInfo *root; char dname[80]; extern int MakeDevChunk(Chunk *c, char *n); Boolean upgrade = FALSE; /* If we've already done this, bail out */ if (!variable_cmp(DISK_LABELLED, "written")) return DITEM_SUCCESS; upgrade = !variable_cmp(SYSTEM_STATE, "upgrade"); if (!checkLabels(TRUE, &rootdev, &swapdev, &usrdev, &vardev)) return DITEM_FAILURE; if (rootdev) root = (PartInfo *)rootdev->private_data; else root = NULL; command_clear(); if (swapdev && RunningAsInit) { /* As the very first thing, try to get ourselves some swap space */ sprintf(dname, "/dev/%s", swapdev->name); if (!Fake && (!MakeDevChunk(swapdev, "/dev") || !file_readable(dname))) { msgConfirm("Unable to make device node for %s in /dev!\n" "The creation of filesystems will be aborted.", dname); return DITEM_FAILURE; } if (!Fake) { if (!swapon(dname)) msgNotify("Added %s as initial swap device", dname); else msgConfirm("WARNING! Unable to swap to %s: %s\n" "This may cause the installation to fail at some point\n" "if you don't have a lot of memory.", dname, strerror(errno)); } } if (rootdev && RunningAsInit) { /* Next, create and/or mount the root device */ sprintf(dname, "/dev/r%s", rootdev->name); if (!Fake && (!MakeDevChunk(rootdev, "/dev") || !file_readable(dname))) { msgConfirm("Unable to make device node for %s in /dev!\n" "The creation of filesystems will be aborted.", dname); return DITEM_FAILURE; } if (strcmp(root->mountpoint, "/")) msgConfirm("Warning: %s is marked as a root partition but is mounted on %s", rootdev->name, root->mountpoint); if (root->newfs && (!upgrade || !msgYesNo("You are upgrading - are you SURE you want to newfs the root partition?"))) { int i; msgNotify("Making a new root filesystem on %s", dname); i = vsystem("%s %s", root->newfs_cmd, dname); if (i) { msgConfirm("Unable to make new root filesystem on %s!\n" "Command returned status %d", dname, i); return DITEM_FAILURE; } } else { if (!upgrade) { msgConfirm("Warning: Using existing root partition. It will be assumed\n" "that you have the appropriate device entries already in /dev."); } msgNotify("Checking integrity of existing %s filesystem.", dname); i = vsystem("fsck -y %s", dname); if (i) msgConfirm("Warning: fsck returned status of %d for %s.\n" "This partition may be unsafe to use.", i, dname); } /* Switch to block device */ sprintf(dname, "/dev/%s", rootdev->name); if (Mount("/mnt", dname)) { msgConfirm("Unable to mount the root file system on %s! Giving up.", dname); return DITEM_FAILURE; } } /* Now buzz through the rest of the partitions and mount them too */ devs = deviceFind(NULL, DEVICE_TYPE_DISK); for (i = 0; devs[i]; i++) { if (!devs[i]->enabled) continue; disk = (Disk *)devs[i]->private; if (!disk->chunks) { msgConfirm("No chunk list found for %s!", disk->name); return DITEM_FAILURE; } if (RunningAsInit && root && (root->newfs || upgrade)) { Mkdir("/mnt/dev"); if (!Fake) MakeDevDisk(disk, "/mnt/dev"); } else if (!RunningAsInit && !Fake) MakeDevDisk(disk, "/dev"); for (c1 = disk->chunks->part; c1; c1 = c1->next) { if (c1->type == freebsd) { for (c2 = c1->part; c2; c2 = c2->next) { if (c2->type == part && c2->subtype != FS_SWAP && c2->private_data) { PartInfo *tmp = (PartInfo *)c2->private_data; /* Already did root */ if (c2 == rootdev) continue; - if (tmp->newfs && (!upgrade || !msgYesNo("You are upgradding - are you SURE you want to newfs /dev/%s?", c2->name))) + if (tmp->newfs && (!upgrade || !msgYesNo("You are upgrading - are you SURE you want to newfs /dev/%s?", c2->name))) command_shell_add(tmp->mountpoint, "%s %s/dev/r%s", tmp->newfs_cmd, RunningAsInit ? "/mnt" : "", c2->name); else command_shell_add(tmp->mountpoint, "fsck -y %s/dev/r%s", RunningAsInit ? "/mnt" : "", c2->name); command_func_add(tmp->mountpoint, Mount, c2->name); } else if (c2->type == part && c2->subtype == FS_SWAP) { char fname[80]; int i; if (c2 == swapdev) continue; sprintf(fname, "%s/dev/%s", RunningAsInit ? "/mnt" : "", c2->name); i = (Fake || swapon(fname)); if (!i) msgNotify("Added %s as an additional swap device", fname); else msgConfirm("Unable to add %s as a swap device: %s", fname, strerror(errno)); } } } else if (c1->type == fat && c1->private_data && (root->newfs || upgrade)) { char name[FILENAME_MAX]; sprintf(name, "%s/%s", RunningAsInit ? "/mnt" : "", ((PartInfo *)c1->private_data)->mountpoint); Mkdir(name); } } } if (RunningAsInit) { msgNotify("Copying initial device files.."); /* Copy the boot floppy's dev files */ if ((root->newfs || upgrade) && vsystem("find -x /dev | cpio %s -pdum /mnt", cpioVerbosity())) { msgConfirm("Couldn't clone the /dev files!"); return DITEM_FAILURE; } } command_sort(); command_execute(); return DITEM_SUCCESS; } /* Initialize various user-settable values to their defaults */ int installVarDefaults(dialogMenuItem *self) { char *cp; /* Set default startup options */ variable_set2(VAR_RELNAME, RELEASE_NAME); variable_set2(VAR_CPIO_VERBOSITY, "high"); variable_set2(VAR_TAPE_BLOCKSIZE, DEFAULT_TAPE_BLOCKSIZE); variable_set2(VAR_INSTALL_ROOT, "/"); variable_set2(VAR_INSTALL_CFG, "install.cfg"); cp = getenv("EDITOR"); if (!cp) cp = "/usr/bin/ee"; variable_set2(VAR_EDITOR, cp); variable_set2(VAR_FTP_USER, "ftp"); variable_set2(VAR_BROWSER_PACKAGE, PACKAGE_LYNX); variable_set2(VAR_BROWSER_BINARY, "/usr/local/bin/lynx"); variable_set2(VAR_FTP_STATE, "passive"); variable_set2(VAR_NFS_SECURE, "YES"); variable_set2(VAR_PKG_TMPDIR, "/usr/tmp"); variable_set2(VAR_GATED_PKG, PACKAGE_GATED); variable_set2(VAR_PCNFSD_PKG, PACKAGE_PCNFSD); variable_set2(VAR_MEDIA_TIMEOUT, itoa(MEDIA_TIMEOUT)); if (getpid() != 1) variable_set2(SYSTEM_STATE, "update"); else variable_set2(SYSTEM_STATE, "init"); return DITEM_SUCCESS; } /* Load the environment up from various system configuration files */ void installEnvironment(void) { if (file_readable("/etc/rc.conf")) configEnvironmentRC_conf("/etc/rc.conf"); if (file_readable("/etc/resolv.conf")) configEnvironmentResolv("/etc/resolv.conf"); } /* Copy the boot floppy contents into /stand */ Boolean copySelf(void) { int i; if (file_readable("/boot.help")) vsystem("cp /boot.help /mnt"); msgWeHaveOutput("Copying the boot floppy to /stand on root filesystem"); i = vsystem("find -x /stand | cpio %s -pdum /mnt", cpioVerbosity()); if (i) { msgConfirm("Copy returned error status of %d!", i); return FALSE; } /* Copy the /etc files into their rightful place */ if (vsystem("cd /mnt/stand; find etc | cpio %s -pdum /mnt", cpioVerbosity())) { msgConfirm("Couldn't copy up the /etc files!"); return TRUE; } return TRUE; } static void create_termcap(void) { FILE *fp; const char *caps[] = { termcap_vt100, termcap_cons25, termcap_cons25_m, termcap_cons25r, termcap_cons25r_m, termcap_cons25l1, termcap_cons25l1_m, NULL, }; const char **cp; if (!file_readable(TERMCAP_FILE)) { Mkdir("/usr/share/misc"); fp = fopen(TERMCAP_FILE, "w"); if (!fp) { msgConfirm("Unable to initialize termcap file. Some screen-oriented\nutilities may not work."); return; } cp = caps; while (*cp) fprintf(fp, "%s\n", *(cp++)); fclose(fp); } } #ifdef SAVE_USERCONFIG static void save_userconfig_to_kernel(char *kern) { struct kernel *core, *boot; struct list *c_isa, *b_isa, *c_dev, *b_dev; int i, d; if ((core = uc_open("-incore")) == NULL) { msgDebug("save_userconf: Can't read in-core information for kernel.\n"); return; } if ((boot = uc_open(kern)) == NULL) { msgDebug("save_userconf: Can't read device information for kernel image %s\n", kern); return; } msgNotify("Saving any boot -c changes to new kernel..."); c_isa = uc_getdev(core, "-isa"); b_isa = uc_getdev(boot, "-isa"); if (isDebug()) msgDebug("save_userconf: got %d ISA device entries from core, %d from boot.\n", c_isa->ac, b_isa->ac); for (d = 0; d < c_isa->ac; d++) { if (isDebug()) msgDebug("save_userconf: ISA device loop, c_isa->av[%d] = %s\n", d, c_isa->av[d]); if (strcmp(c_isa->av[d], "npx0")) { /* special case npx0, which mucks with its id_irq member */ c_dev = uc_getdev(core, c_isa->av[d]); b_dev = uc_getdev(boot, b_isa->av[d]); if (!c_dev || !b_dev) { msgDebug("save_userconf: c_dev: %x b_dev: %x\n", c_dev, b_dev); continue; } if (isDebug()) msgDebug("save_userconf: ISA device %s: %d config parameters (core), %d (boot)\n", c_isa->av[d], c_dev->ac, b_dev->ac); for (i = 0; i < c_dev->ac; i++) { if (isDebug()) msgDebug("save_userconf: c_dev->av[%d] = %s, b_dev->av[%d] = %s\n", i, c_dev->av[i], i, b_dev->av[i]); if (strcmp(c_dev->av[i], b_dev->av[i])) { if (isDebug()) msgDebug("save_userconf: %s (boot) -> %s (core)\n", c_dev->av[i], b_dev->av[i]); isa_setdev(boot, c_dev); } } } else { if (isDebug()) msgDebug("skipping npx0\n"); } } if (isDebug()) msgDebug("Closing kernels\n"); uc_close(core, 0); uc_close(boot, 1); } #endif Index: stable/2.2/release/sysinstall/media.c =================================================================== --- stable/2.2/release/sysinstall/media.c (revision 40694) +++ stable/2.2/release/sysinstall/media.c (revision 40695) @@ -1,754 +1,756 @@ /* * The new sysinstall program. * * This is probably the last attempt in the `sysinstall' line, the next * generation being slated to essentially a complete rewrite. * - * $Id: media.c,v 1.62.2.18 1997/08/11 13:15:25 jkh Exp $ + * $Id: media.c,v 1.62.2.19 1998/02/19 02:22:03 jkh Exp $ * * 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 static Boolean got_intr = 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 ""; } void mediaClose(void) { if (mediaDevice) mediaDevice->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 CDROM devices found! Please check that your system's\n" "configuration is correct and that the CDROM 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 | DITEM_RESTORE; } else mediaDevice = devs[0]; return (mediaDevice ? DITEM_SUCCESS | DITEM_LEAVE_MENU : DITEM_FAILURE) | DITEM_RESTORE; } 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 | DITEM_RESTORE; } else mediaDevice = devs[0]; + if (mediaDevice) + mediaDevice->private = "/dist"; return (mediaDevice ? DITEM_LEAVE_MENU : DITEM_FAILURE) | DITEM_RESTORE; } 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 | DITEM_RESTORE; } else mediaDevice = devs[0]; return (mediaDevice ? DITEM_LEAVE_MENU : DITEM_FAILURE) | DITEM_RESTORE; } 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 | DITEM_RESTORE; } else mediaDevice = devs[0]; if (mediaDevice) { char *val; val = msgGetInput("/usr/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) | DITEM_RESTORE; } /* * 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, hostname[MAXHOSTNAMELEN], *dir; extern int FtpPort; static Device *networkDev = NULL; int what = DITEM_RESTORE; mediaClose(); cp = variable_get(VAR_FTP_PATH); /* If we've been through here before ... */ if (!variable_get(VAR_NONINTERACTIVE)) if (networkDev && cp && msgYesNo("Re-use old FTP site selection values?")) cp = NULL; if (!cp) { dialog_clear_norefresh(); if (!dmenuOpenSimple(&MenuMediaFTP, FALSE)) return DITEM_FAILURE | DITEM_RESTORE; else cp = variable_get(VAR_FTP_PATH); what = DITEM_RESTORE; } if (!cp) return DITEM_FAILURE | what; else if (!strcmp(cp, "other")) { variable_set2(VAR_FTP_PATH, "ftp://"); dialog_clear_norefresh(); 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."); if (!cp || !*cp || !strcmp(cp, "ftp://")) { variable_unset(VAR_FTP_PATH); return DITEM_FAILURE | what; } } if (strncmp("ftp://", cp, 6)) { msgConfirm("Sorry, %s is an invalid URL!", cp); variable_unset(VAR_FTP_PATH); return DITEM_FAILURE | what; } SAFE_STRCPY(ftpDevice.name, cp); SAFE_STRCPY(hostname, cp + 6); dialog_clear_norefresh(); if (!networkDev || msgYesNo("You've already done the network configuration once,\n" "would you like to skip over it now?") != 0) { if (networkDev) networkDev->shutdown(networkDev); if (!(networkDev = tcpDeviceSelect())) { variable_unset(VAR_FTP_PATH); return DITEM_FAILURE | what; } } if (!networkDev->init(networkDev)) { if (isDebug()) msgDebug("mediaSetFTP: Net device init failed.\n"); variable_unset(VAR_FTP_PATH); return DITEM_FAILURE | what; } if ((cp = index(hostname, ':')) != NULL) { *(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 (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) networkDev->shutdown(networkDev); networkDev = NULL; variable_unset(VAR_FTP_PATH); return DITEM_FAILURE | what; } else - msgDebug("Found DNS entry for %s successfully..", hostname); + msgDebug("Found DNS entry for %s successfully..\n", hostname); } variable_set2(VAR_FTP_HOST, hostname); variable_set2(VAR_FTP_DIR, dir ? dir : "/"); variable_set2(VAR_FTP_PORT, itoa(FtpPort)); 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 | what; } int mediaSetFTPActive(dialogMenuItem *self) { variable_set2(VAR_FTP_STATE, "active"); return mediaSetFTP(self); } int mediaSetFTPPassive(dialogMenuItem *self) { variable_set2(VAR_FTP_STATE, "passive"); return mediaSetFTP(self); } int mediaSetUFS(dialogMenuItem *self) { static Device ufsDevice; char *cp; mediaClose(); dialog_clear_norefresh(); cp = variable_get_value(VAR_UFS_PATH, "Enter a fully qualified pathname for the directory\n" "containing the FreeBSD distribution files:"); if (!cp) return DITEM_FAILURE; strcpy(ufsDevice.name, "ufs"); 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[MAXHOSTNAMELEN]; mediaClose(); dialog_clear_norefresh(); 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"); 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; } 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) networkDev->shutdown(networkDev); if (!(networkDev = tcpDeviceSelect())) return DITEM_FAILURE; } if (!networkDev->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) networkDev->shutdown(networkDev); networkDev = NULL; variable_unset(VAR_NFS_PATH); return DITEM_FAILURE; } else msgDebug("Found DNS entry for %s successfully..", hostname); } variable_set2(VAR_NFS_HOST, hostname); 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 *gunzip = RunningAsInit ? "/stand/gunzip" : "/usr/bin/gunzip"; 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(gunzip, gunzip, 0); if (isDebug()) msgDebug("%s command returns %d status\n", gunzip, 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(), "--block-size", mediaTapeBlocksize(), 0); else i = execl(cpio, cpio, "-idum", "--block-size", mediaTapeBlocksize(), 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 gunzip returned status of %d!\n", 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 *gunzip = RunningAsInit ? "/stand/gunzip" : "/usr/bin/gunzip"; 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(gunzip, gunzip, 0); if (isDebug()) msgDebug("%s command returns %d status\n", gunzip, 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(), "--block-size", mediaTapeBlocksize(), 0); else i = execl(cpio, cpio, "-idum", "--block-size", mediaTapeBlocksize(), 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; new.sa_mask = 0; 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 gunzip returned status of %d!\n", 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) | DITEM_RESTORE; } /* 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; dialog_clear_norefresh(); if (variable_get_value(VAR_FTP_USER, "Please enter the username you wish to login as:")) { dialog_clear_norefresh(); DialogInputAttrs |= DITEM_NO_ECHO; pass = variable_get_value(VAR_FTP_PASS, "Please enter the password for this user:"); DialogInputAttrs &= ~DITEM_NO_ECHO; } else pass = NULL; return (pass ? DITEM_SUCCESS : DITEM_FAILURE) | DITEM_RESTORE; } /* 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"); else if (!strcmp(cp, "medium")) variable_set2(VAR_CPIO_VERBOSITY, "high"); else /* must be "high" - wrap around */ variable_set2(VAR_CPIO_VERBOSITY, "low"); } return DITEM_SUCCESS; } Index: stable/2.2/release/sysinstall/menus.c =================================================================== --- stable/2.2/release/sysinstall/menus.c (revision 40694) +++ stable/2.2/release/sysinstall/menus.c (revision 40695) @@ -1,1483 +1,1479 @@ /* * The new sysinstall program. * * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: menus.c,v 1.89.2.77 1998/09/09 05:07:42 danny Exp $ + * $Id: menus.c,v 1.89.2.78 1998/09/09 05:11:29 danny Exp $ * * 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" /* Miscellaneous work routines for menus */ static int setSrc(dialogMenuItem *self) { Dists |= DIST_SRC; SrcDists = DIST_SRC_ALL | DIST_SRC_SMAILCF; return DITEM_SUCCESS | DITEM_REDRAW; } static int clearSrc(dialogMenuItem *self) { Dists &= ~DIST_SRC; SrcDists = 0; return DITEM_SUCCESS | DITEM_REDRAW; } static int setX11All(dialogMenuItem *self) { XF86Dists = DIST_XF86_ALL; XF86ServerDists = DIST_XF86_SERVER_ALL; XF86FontDists = DIST_XF86_FONTS_ALL; Dists |= DIST_XF86; return DITEM_SUCCESS | DITEM_REDRAW; } static int clearX11All(dialogMenuItem *self) { XF86Dists = 0; XF86ServerDists = 0; XF86FontDists = 0; Dists &= ~DIST_XF86; return DITEM_SUCCESS | DITEM_REDRAW; } static int setX11Misc(dialogMenuItem *self) { XF86Dists |= DIST_XF86_MISC_ALL; Dists |= DIST_XF86; return DITEM_SUCCESS | DITEM_REDRAW; } static int clearX11Misc(dialogMenuItem *self) { XF86Dists &= ~DIST_XF86_MISC_ALL; if (!XF86ServerDists && !XF86FontDists) Dists &= ~DIST_XF86; return DITEM_SUCCESS | DITEM_REDRAW; } static int setX11Servers(dialogMenuItem *self) { XF86Dists |= DIST_XF86_SERVER; XF86ServerDists = DIST_XF86_SERVER_ALL; return DITEM_SUCCESS | DITEM_REDRAW; } static int clearX11Servers(dialogMenuItem *self) { XF86Dists &= ~DIST_XF86_SERVER; XF86ServerDists = 0; return DITEM_SUCCESS | DITEM_REDRAW; } static int setX11Fonts(dialogMenuItem *self) { XF86Dists |= DIST_XF86_FONTS; XF86FontDists = DIST_XF86_FONTS_ALL; return DITEM_SUCCESS | DITEM_REDRAW; } static int clearX11Fonts(dialogMenuItem *self) { XF86Dists &= ~DIST_XF86_FONTS; XF86FontDists = 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 | DIST_DES | extra)) #define IS_USER(dist, extra) (_IS_SET(dist, _DIST_USER | extra) || \ _IS_SET(dist, _DIST_USER | DIST_DES | extra)) static int checkDistDeveloper(dialogMenuItem *self) { return IS_DEVELOPER(Dists, 0) && _IS_SET(SrcDists, DIST_SRC_ALL); } static int checkDistXDeveloper(dialogMenuItem *self) { return IS_DEVELOPER(Dists, DIST_XF86) && _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 checkDistXUser(dialogMenuItem *self) { return IS_USER(Dists, DIST_XF86); } static int checkDistMinimum(dialogMenuItem *self) { return Dists == DIST_BIN; } static int checkDistEverything(dialogMenuItem *self) { return Dists == DIST_ALL && _IS_SET(SrcDists, DIST_SRC_ALL) && \ _IS_SET(XF86Dists, DIST_XF86_ALL) && \ _IS_SET(XF86ServerDists, DIST_XF86_SERVER_ALL) && \ _IS_SET(XF86FontDists, DIST_XF86_FONTS_ALL); } static int DESFlagCheck(dialogMenuItem *item) { return DESDists; } static int srcFlagCheck(dialogMenuItem *item) { return SrcDists; } static int x11FlagCheck(dialogMenuItem *item) { return Dists & DIST_XF86; } 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 [ENTER].\n" "Leave the index page by selecting Cancel [TAB-ENTER].", "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 }, { "Console settings", "Customize system console behavior.", NULL, dmenuSubmenu, NULL, &MenuSyscons }, { "Configure", "The system configuration menu.", NULL, dmenuSubmenu, NULL, &MenuConfigure }, { "Defaults, Load", "Load default settings.", NULL, dispatch_load_floppy }, { "Device, Mouse", "The mouse configuration menu.", NULL, dmenuSubmenu, NULL, &MenuMouse }, { "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, DES", "DES distribution menu.", NULL, dmenuSubmenu, NULL, &MenuDESDistributions }, { "Dists, Developer", "Select developer's distribution.", checkDistDeveloper, distSetDeveloper }, { "Dists, Src", "Src distribution menu.", NULL, dmenuSubmenu, NULL, &MenuSrcDistributions }, { "Dists, X Developer", "Select X developer's distribution.", checkDistXDeveloper, distSetXDeveloper }, { "Dists, Kern Developer", "Select kernel developer's distribution.", checkDistKernDeveloper, distSetKernDeveloper }, { "Dists, User", "Select average user distribution.", checkDistUser, distSetUser }, { "Dists, X User", "Select average X user distribution.", checkDistXUser, distSetXUser }, { "Distributions, Adding", "Installing additional distribution sets", NULL, distExtractAll }, { "Distributions, XFree86","XFree86 distribution menu.", NULL, distSetXF86 }, { "Documentation", "Installation instructions, README, etc.", NULL, dmenuSubmenu, NULL, &MenuDocumentation }, { "Doc, README", "The distribution README file.", NULL, dmenuDisplayFile, NULL, "readme" }, { "Doc, Hardware", "The distribution hardware guide.", NULL, dmenuDisplayFile, NULL, "hardware" }, { "Doc, Install", "The distribution installation guide.", NULL, dmenuDisplayFile, NULL, "install" }, { "Doc, Copyright", "The distribution copyright notices.", NULL, dmenuDisplayFile, NULL, "COPYRIGHT" }, { "Doc, Release", "The distribution release notes.", NULL, dmenuDisplayFile, NULL, "relnotes" }, { "Doc, HTML", "The HTML documentation menu.", NULL, docBrowser }, { "Emergency shell", "Start an Emergency Holographic shell.", NULL, installFixitHoloShell }, { "Fdisk", "The disk Partition Editor", NULL, diskPartitionEditor }, { "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 }, { "Install, Novice", "A novice system installation.", NULL, installNovice }, { "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", "Select CDROM 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 }, { "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 }, { "Partition", "The disk Slice (PC-style partition) Editor", NULL, diskPartitionEditor }, { "PCNFSD", "Run authentication server for PC-NFS.", dmenuVarCheck, configPCNFSD, NULL, "pcnfsd" }, { "Register", "Register yourself or company as a FreeBSD user.", dmenuVarCheck, configRegister, NULL, "registered" }, { "Root Password", "Set the system manager's password.", NULL, dmenuSystemCommand, NULL, "passwd root" }, { "Root Password", "Set the system manager's password.", NULL, dmenuSystemCommand, NULL, "passwd root" }, { "Router", "Select routing daemon (default: routed)", NULL, configRouter, NULL, "router" }, { "Syscons", "The system console configuration menu.", NULL, dmenuSubmenu, NULL, &MenuSyscons }, { "Syscons, Font", "The console screen font.", NULL, dmenuSubmenu, NULL, &MenuSysconsFont }, { "Syscons, Keymap", "The console keymap configuration menu.", NULL, dmenuSubmenu, NULL, &MenuSysconsKeymap }, { "Syscons, Keyrate", "The console key rate configuration menu.", NULL, dmenuSubmenu, NULL, &MenuSysconsKeyrate }, { "Syscons, Saver", "The console screen saver configuration menu.", NULL, dmenuSubmenu, NULL, &MenuSysconsSaver }, { "Syscons, Screenmap", "The console screenmap configuration menu.", NULL, dmenuSubmenu, NULL, &MenuSysconsScrnmap }, { "Time Zone", "Set the system's time zone.", NULL, dmenuSystemCommand, NULL, "tzsetup" }, { "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 }, { "XFree86, Fonts", "XFree86 Font selection menu.", NULL, dmenuSubmenu, NULL, &MenuXF86SelectFonts }, { "XFree86, Server", "XFree86 Server selection menu.", NULL, dmenuSubmenu, NULL, &MenuXF86SelectServer }, { "XFree86, PC98 Server", "XFree86 PC98 Server selection menu.", NULL, dmenuSubmenu, NULL, &MenuXF86SelectPC98Server }, { NULL } }, }; /* The initial installation menu */ DMenu MenuInitial = { DMENU_NORMAL_TYPE, "Welcome to FreeBSD! [" RELEASE_NAME "]", /* title */ "This is the main menu of the FreeBSD installation system. 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 by pressing [ENTER] or [TAB-ENTER] to exit the installation.", "Press F1 for Installation Guide", /* help line */ "install", /* help file */ { { "Select" }, { "Exit Install", NULL, NULL, dmenuExit }, { "1 Usage", "Quick start - How to use this menu system", NULL, dmenuDisplayFile, NULL, "usage" }, { "2 Doc", "Installation instructions, README, etc.", NULL, dmenuSubmenu, NULL, &MenuDocumentation }, { "3 Keymap", "Select keyboard type", NULL, dmenuSubmenu, NULL, &MenuSysconsKeymap }, { "4 Options", "View/Set various installation options", NULL, optionsEditor }, { "5 Novice", "Begin a novice installation (for beginners)", NULL, installNovice }, { "6 Express", "Begin a quick installation (for the impatient)", NULL, installExpress }, { "7 Custom", "Begin a custom installation (for experts)", NULL, dmenuSubmenu, NULL, &MenuInstallCustom }, { "8 Fixit", "Enter repair mode with CDROM/floppy or start shell", NULL, dmenuSubmenu, NULL, &MenuFixit }, { "9 Upgrade", "Upgrade an existing system", NULL, installUpgrade }, { "c Configure", "Do post-install configuration of FreeBSD", NULL, dmenuSubmenu, NULL, &MenuConfigure }, { "l Load Config","Load default install configuration", NULL, dispatch_load_floppy }, { "0 Index", "Glossary of functions", NULL, dmenuSubmenu, NULL, &MenuIndex }, { NULL } }, }; /* The main documentation menu */ DMenu MenuDocumentation = { DMENU_NORMAL_TYPE, "Documentation for FreeBSD " RELEASE_NAME, "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", { { "1 README", "A general description of FreeBSD. Read this!", NULL, dmenuDisplayFile, NULL, "readme" }, { "2 Hardware", "The FreeBSD survival guide for PC hardware.", NULL, dmenuDisplayFile, NULL, "hardware" }, { "3 Install", "A step-by-step guide to installing FreeBSD.", NULL, dmenuDisplayFile, NULL, "install" }, { "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 }, { "0 Exit", "Exit this menu (returning to previous)", NULL, dmenuExit }, { NULL } }, }; DMenu MenuMouseType = { DMENU_RADIO_TYPE | DMENU_SELECTION_RETURNS, "Select a protocol type for your mouse", "If you are not sure, choose \"Auto\". It should always work for bus\n" "and PS/2 style mice. It may not work for the serial mouse if the mouse\n" "does not support the PnP standard. But, it won't hurt. Many 2-button\n" "serial mice are compatible with \"Microsoft\" or \"MouseMan\". 3-button\n" "serial mice may be compatible with \"MouseSystems\" or \"MouseMan\". If\n" "the mouse has a wheel, it may be compatible with \"IntelliMouse\".", NULL, NULL, { { "Auto", "Bus mouse, PS/2 style mouse or PnP serial mouse", dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_TYPE "=auto" }, { "GlidePoint", "ALPS GlidePoint pad (serial)", dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_TYPE "=glidepoint" }, { "Hitachi","Hitachi tablet (serial)", dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_TYPE "=mmhittab" }, { "IntelliMouse", "Microsoft IntelliMouse (serial)", dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_TYPE "=intellimouse" }, { "Logitech", "Logitech protocol (old models) (serial)", dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_TYPE "=logitech" }, { "Microsoft", "Microsoft protocol (serial)", dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_TYPE "=microsoft" }, { "MM Series","MM Series protocol (serial)", dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_TYPE "=mmseries" }, { "MouseMan", "Logitech MouseMan/TrackMan models (serial)", dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_TYPE "=mouseman" }, { "MouseSystems", "MouseSystems protocol (serial)", dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_TYPE "=mousesystems" }, { "ThinkingMouse","Kensington ThinkingMouse (serial)", dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_TYPE "=thinkingmouse" }, { NULL } }, }; DMenu MenuMousePort = { DMENU_RADIO_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, { { "COM1", "Serial mouse on COM1 (/dev/cuaa0)", dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_PORT "=/dev/cuaa0" }, { "COM2", "Serial mouse on COM2 (/dev/cuaa1)", dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_PORT "=/dev/cuaa1" }, { "COM3", "Serial mouse on COM3 (/dev/cuaa2)", dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_PORT "=/dev/cuaa2" }, { "COM4", "Serial mouse on COM4 (/dev/cuaa3)", dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_PORT "=/dev/cuaa3" }, { "BusMouse", "Logitech, ATI or MS bus mouse (/dev/mse0)", dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_PORT "=/dev/mse0" }, { "PS/2", "PS/2 style mouse (/dev/psm0)", dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_PORT "=/dev/psm0" }, { NULL } }, }; 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 4 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, { { "1 Type", "Select mouse protocol type", NULL, dmenuSubmenu, NULL, &MenuMouseType }, { "2 Port", "Select mouse port", NULL, dmenuSubmenu, NULL, &MenuMousePort }, { "3 Enable", "Test and run the mouse daemon", NULL, mousedTest, NULL, NULL }, { "4 Disable", "Disable the mouse daemon", NULL, mousedDisable, NULL, NULL }, { "0 Exit", "Exit this menu (returning to previous)", NULL, dmenuExit }, { NULL } }, }; DMenu MenuXF86Config = { DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS, "Please select the XFree86 configuration tool you want to use.", "The first tool, XF86Setup, is fully graphical and requires the\n" "VGA16 server in order to work (should have been selected by\n" "default, but if you de-selected it then you won't be able to\n" "use this fancy setup tool). The second tool, xf86config, is\n" "a more simplistic shell-script based tool and less friendly to\n" "new users, but it may work in situations where the fancier one\n" "does not.", "Press F1 to read the XFree86 release notes for FreeBSD", "XF86", { { "XF86Setup", "Fully graphical XFree86 configuration tool.", NULL, dmenuSetVariable, NULL, VAR_XF86_CONFIG "=XF86Setup" }, { "xf86config", "Shell-script based XFree86 configuration tool.", NULL, dmenuSetVariable, NULL, VAR_XF86_CONFIG "=xf86config" }, { "XF98Setup", "Fully graphical XFree86 configuration tool (PC98).", NULL, dmenuSetVariable, NULL, VAR_XF86_CONFIG "=XF98Setup" }, { NULL } }, }; DMenu MenuMediaCDROM = { DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS, "Choose a CDROM type", "FreeBSD can be installed directly from a CDROM containing a valid\n" "FreeBSD distribution. If you are seeing this menu it is because\n" "more than one CDROM drive was found on your system. Please select one\n" "of the following CDROM drives as your installation drive.", "Press F1 to read the installation guide", "install", { { NULL } }, }; DMenu MenuMediaFloppy = { DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS, "Choose a Floppy drive", "You have more than one floppy drive. Please chose which drive\n" "you would like to use.", NULL, NULL, { { NULL } }, }; DMenu MenuMediaDOS = { DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS, "Choose a DOS partition", "FreeBSD can be installed directly from a DOS partition\n" "assuming, of course, that you have copied the relevant\n" "distributions into your DOS partition before starting this\n" "installation. If this is not the case then you should reboot\n" "DOS at this time and copy the distributions you wish to install\n" "into a \"FREEBSD\" subdirectory on one of your DOS partitions.\n" "Otherwise, please select the DOS partition containing the FreeBSD\n" "distribution files.", "Press F1 to read the installation guide", "install", { { NULL } }, }; DMenu MenuMediaFTP = { DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS, "Please select a FreeBSD FTP distribution site", "Please select the site closest to you or \"other\" if you'd like to\n" "specify a different choice. Also note that not every site listed here\n" "carries more than the base distribution kits. Only the Primary site is\n" "guaranteed to carry the full range of possible distributions.", "Select a site that's close!", "install", { { "Primary Site", "ftp.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH "=ftp://ftp.freebsd.org/pub/FreeBSD/" }, { "URL", "Specify some other ftp site by URL", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH "=other" }, { "3.0 SNAP Server", "current.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH "=ftp://current.freebsd.org/pub/FreeBSD/" }, { "2.2 SNAP Server", "releng22.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH "=ftp://releng22.freebsd.org/pub/FreeBSD/" }, { "2.1 SNAP Server", "releng210.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH "=ftp://releng210.freebsd.org/pub/FreeBSD/" }, { "Argentina", "ftp.ar.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH "=ftp://ftp.ar.freebsd.org/pub/FreeBSD/" }, { "Australia", "ftp.au.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH "=ftp://ftp.au.freebsd.org/pub/FreeBSD/" }, { "Australia #2", "ftp2.au.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH "=ftp://ftp2.au.freebsd.org/pub/FreeBSD/" }, { "Australia #3", "ftp3.au.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH "=ftp://ftp3.au.freebsd.org/pub/FreeBSD/" }, { "Australia #4", "ftp4.au.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH "=ftp://ftp4.au.freebsd.org/pub/FreeBSD/" }, { "Australia #5", "ftp5.au.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH "=ftp://ftp5.au.freebsd.org/pub/FreeBSD/" }, { "Brazil", "ftp.br.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH "=ftp://ftp.br.freebsd.org/pub/FreeBSD/" }, { "Brazil #2", "ftp2.br.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH "=ftp://ftp2.br.freebsd.org/pub/FreeBSD/" }, { "Brazil #3", "ftp3.br.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH "=ftp://ftp3.br.freebsd.org/pub/FreeBSD/" }, { "Brazil #4", "ftp4.br.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH "=ftp://ftp4.br.freebsd.org/pub/FreeBSD/" }, { "Brazil #5", "ftp5.br.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH "=ftp://ftp5.br.freebsd.org/pub/FreeBSD/" }, { "Brazil #6", "ftp6.br.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH "=ftp://ftp6.br.freebsd.org/pub/FreeBSD/" }, { "Brazil #7", "ftp7.br.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH "=ftp://ftp7.br.freebsd.org/pub/FreeBSD/" }, { "Canada", "ftp.ca.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH "=ftp://ftp.ca.freebsd.org/pub/FreeBSD/" }, { "Czech Republic", "ftp.cz.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH "=ftp://ftp.cz.freebsd.org/pub/FreeBSD/" }, { "Denmark", "ftp.dk.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH "=ftp://ftp.dk.freebsd.org/pub/FreeBSD/" }, { "Denmark #2", "ftp2.dk.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH "=ftp://ftp2.dk.freebsd.org/pub/FreeBSD/" }, { "Estonia", "ftp.ee.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH "=ftp://ftp.ee.freebsd.org/pub/FreeBSD/" }, { "Finland", "ftp.fi.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH "=ftp://ftp.fi.freebsd.org/pub/FreeBSD/" }, { "France", "ftp.fr.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH "=ftp://ftp.fr.freebsd.org/pub/FreeBSD/" }, { "France #2", "ftp2.fr.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH "=ftp://ftp2.fr.freebsd.org/pub/FreeBSD/" }, { "Germany", "ftp.de.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH "=ftp://ftp.de.freebsd.org/pub/FreeBSD/" }, { "Germany #2", "ftp2.de.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH "=ftp://ftp2.de.freebsd.org/pub/FreeBSD/" }, { "Germany #3", "ftp3.de.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH "=ftp://ftp3.de.freebsd.org/pub/FreeBSD/" }, { "Germany #4", "ftp4.de.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH "=ftp://ftp4.de.freebsd.org/pub/FreeBSD/" }, { "Germany #5", "ftp5.de.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH "=ftp://ftp5.de.freebsd.org/pub/FreeBSD/" }, { "Germany #6", "ftp6.de.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH "=ftp://ftp6.de.freebsd.org/pub/FreeBSD/" }, { "Germany #7", "ftp7.de.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH "=ftp://ftp7.de.freebsd.org/pub/FreeBSD/" }, { "Holland", "ftp.nl.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH "=ftp://ftp.nl.freebsd.org/pub/FreeBSD/" }, { "Hong Kong", "ftp.hk.super.net", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH "=ftp://ftp.hk.super.net/pub/FreeBSD/" }, { "Iceland", "ftp.is.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH "=ftp://ftp.is.freebsd.org/pub/FreeBSD/" }, { "Ireland", "ftp.ie.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH "=ftp://ftp.ie.freebsd.org/pub/FreeBSD/" }, { "Israel", "ftp.il.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH "=ftp://ftp.il.freebsd.org/pub/FreeBSD/" }, { "Israel #2", "ftp2.il.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH "=ftp://ftp2.il.freebsd.org/pub/FreeBSD/" }, { "Japan", "ftp.jp.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH "=ftp://ftp.jp.freebsd.org/pub/FreeBSD/" }, { "Japan #2", "ftp2.jp.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH "=ftp://ftp2.jp.freebsd.org/pub/FreeBSD/" }, { "Japan #3", "ftp3.jp.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH "=ftp://ftp3.jp.freebsd.org/pub/FreeBSD/" }, { "Japan #4", "ftp4.jp.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH "=ftp://ftp4.jp.freebsd.org/pub/FreeBSD/" }, { "Japan #5", "ftp5.jp.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH "=ftp://ftp5.jp.freebsd.org/pub/FreeBSD/" }, { "Japan #6", "ftp6.jp.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH "=ftp://ftp6.jp.freebsd.org/pub/FreeBSD/" }, { "Korea", "ftp.kr.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH "=ftp://ftp.kr.freebsd.org/pub/FreeBSD/" }, { "Korea #2", "ftp2.kr.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH "=ftp://ftp2.kr.freebsd.org/pub/FreeBSD/" }, { "Poland", "ftp.pl.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH "=ftp://ftp.pl.freebsd.org/pub/FreeBSD/" }, { "Portugal", "ftp.pt.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH "=ftp://ftp.pt.freebsd.org/pub/misc/FreeBSD/" }, { "Portugal #2", "ftp2.pt.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH "=ftp://ftp2.pt.freebsd.org/pub/FreeBSD/" }, { "Russia", "ftp.ru.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH "=ftp://ftp.ru.freebsd.org/pub/FreeBSD/" }, { "Russia #2", "ftp2.ru.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH "=ftp://ftp2.ru.freebsd.org/pub/FreeBSD/" }, { "Russia #3", "ftp3.ru.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH "=ftp://ftp3.ru.freebsd.org/pub/FreeBSD/" }, { "Russia #4", "ftp4.ru.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH "=ftp://ftp4.ru.freebsd.org/pub/FreeBSD/" }, { "South Africa", "ftp.za.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH "=ftp://ftp.za.freebsd.org/pub/FreeBSD/" }, { "South Africa #2", "ftp2.za.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH "=ftp://ftp2.za.freebsd.org/pub/FreeBSD/" }, { "South Africa #3", "ftp3.za.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH "=ftp://ftp3.za.freebsd.org/pub/FreeBSD/" }, { "South Africa #4", "ftp4.za.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH "=ftp://ftp4.za.freebsd.org/pub/FreeBSD/" }, { "Sweden", "ftp.se.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH "=ftp://ftp.se.freebsd.org/pub/FreeBSD/" }, { "Sweden #2", "ftp2.se.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH "=ftp://ftp2.se.freebsd.org/pub/FreeBSD/" }, { "Sweden #3", "ftp3.se.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH "=ftp://ftp3.se.freebsd.org/pub/FreeBSD/" }, { "Taiwan", "ftp.tw.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH "=ftp://ftp.tw.freebsd.org/pub/FreeBSD" }, { "Taiwan #2", "ftp2.tw.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH "=ftp://ftp2.tw.freebsd.org/pub/FreeBSD" }, { "Taiwan #3", "ftp3.tw.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH "=ftp://ftp3.tw.freebsd.org/pub/FreeBSD/" }, { "Thailand", "ftp.nectec.or.th", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH "=ftp://ftp.nectec.or.th/pub/mirrors/FreeBSD/" }, { "UK", "ftp.uk.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH "=ftp://ftp.uk.freebsd.org/pub/FreeBSD/" }, { "UK #2", "ftp2.uk.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH "=ftp://ftp2.uk.freebsd.org/pub/FreeBSD/" }, { "UK #3", "ftp3.uk.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH "=ftp://ftp3.uk.freebsd.org/pub/FreeBSD/" }, { "UK #4", "ftp4.uk.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH "=ftp://ftp4.uk.freebsd.org/pub/FreeBSD/" }, { "USA", "ftp.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH "=ftp://ftp.freebsd.org/pub/FreeBSD/" }, { "USA #2", "ftp2.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH "=ftp://ftp2.freebsd.org/pub/FreeBSD/" }, { "USA #3", "ftp3.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH "=ftp://ftp3.freebsd.org/pub/FreeBSD/" }, { "USA #4", "ftp4.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH "=ftp://ftp4.freebsd.org/pub/FreeBSD/" }, { "USA #5", "ftp5.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH "=ftp://ftp5.freebsd.org/pub/FreeBSD/" }, { "USA #6", "ftp6.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH "=ftp://ftp6.freebsd.org/pub/FreeBSD/" }, { NULL } } }; DMenu MenuMediaTape = { DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS, "Choose a tape drive type", "FreeBSD can be installed from tape drive, though this installation\n" "method requires a certain amount of temporary storage in addition\n" "to the space required by the distribution itself (tape drives make\n" "poor random-access devices, so we extract _everything_ on the tape\n" "in one pass). If you have sufficient space for this, then you should\n" "select one of the following tape devices detected on your system.", "Press F1 to read the installation guide", "install", { { NULL } }, }; DMenu MenuNetworkDevice = { DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS, "Network interface information required", "If you are using PPP over a serial device, as opposed to a direct\n" "ethernet connection, then you may first need to dial your Internet\n" "Service Provider using the ppp utility we provide for that purpose.\n" "If you're using SLIP over a serial device then the expectation is\n" "that you have a HARDWIRED connection.\n\n" "You can also install over a parallel port using a special \"laplink\"\n" "cable to another machine running a fairly recent (2.0R or later)\n" "version of FreeBSD.", "Press F1 to read network configuration manual", "network_device", { { 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 CDROM 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 CDROM", "Install from a FreeBSD CDROM", 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 DOS", "Install from a DOS partition", NULL, mediaSetDOS }, { "5 NFS", "Install over NFS", NULL, mediaSetNFS }, { "6 File System", "Install from an existing filesystem", NULL, mediaSetUFS }, { "7 Floppy", "Install from a floppy disk set", NULL, mediaSetFloppy }, { "8 Tape", "Install from SCSI or QIC tape", NULL, mediaSetTape }, { "9 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]. When you are finished, chose the Exit\n" "item or press [ENTER].", "Press F1 for more information on these options.", "distributions", { { "1 Developer", "Full sources, binaries and doc but no games", checkDistDeveloper, distSetDeveloper }, { "2 X-Developer", "Same as above, but includes the X Window System", checkDistXDeveloper, distSetXDeveloper }, { "3 Kern-Developer", "Full binaries and doc, kernel sources only", checkDistKernDeveloper, distSetKernDeveloper }, { "4 User", "Average user - binaries and doc only", checkDistUser, distSetUser }, { "5 X-User", "Same as above, but includes the X Window System", checkDistXUser, distSetXUser }, { "6 Minimal", "The smallest configuration possible", checkDistMinimum, distSetMinimum }, { "7 Custom", "Specify your own distribution set", NULL, dmenuSubmenu, NULL, &MenuSubDistributions, '>', '>', '>' }, { "8 All", "All sources and binaries (incl X Window System)", checkDistEverything, distSetEverything }, { "9 Clear", "Reset selected distribution list to nothing", NULL, distReset, NULL, NULL, ' ', ' ', ' ' }, { "0 Exit", "Exit this menu (returning to previous)", checkTrue, dmenuExit, NULL, NULL, '<', '<', '<' }, { 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 \"bin\". WARNING: Do not export the\n" "DES distribution out of the U.S.! It is for U.S. customers only.", NULL, NULL, { { "bin", "Binary base distribution (required)", dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_BIN }, { "compat1x", "FreeBSD 1.x binary compatibility", dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_COMPAT1X }, { "compat20", "FreeBSD 2.0 binary compatibility", dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_COMPAT20 }, { "compat21", "FreeBSD 2.1 binary compatibility", dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_COMPAT21 }, { "DES", "DES encryption code - NOT FOR EXPORT!", DESFlagCheck, distSetDES }, { "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 }, { "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 but DES", srcFlagCheck, distSetSrc }, { "ports", "The FreeBSD Ports collection", dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_PORTS }, { "XFree86", "The XFree86 3.3.2.3 distribution", x11FlagCheck, distSetXF86 }, { "All", "All sources, binaries and X Window System binaries", NULL, distSetEverything, NULL, NULL, ' ', ' ', ' ' }, { "Clear", "Reset all of the above", NULL, distReset, NULL, NULL, ' ', ' ', ' ' }, { "Exit", "Exit this menu (returning to previous)", checkTrue, dmenuExit, NULL, NULL, '<', '<', '<' }, { NULL } }, }; DMenu MenuDESDistributions = { DMENU_CHECKLIST_TYPE | DMENU_SELECTION_RETURNS, "Select the encryption facilities you wish to install.", "Please check off any special DES-based encryption distributions\n" "you would like to install. Please note that these services are NOT FOR\n" "EXPORT from the United States. For information on non-U.S. FTP\n" "distributions of this software, please consult the release notes.", NULL, NULL, { { "des", "Basic DES encryption services", dmenuFlagCheck, dmenuSetFlag, NULL, &DESDists, '[', 'X', ']', DIST_DES_DES, }, { "krb", "Kerberos encryption services", dmenuFlagCheck, dmenuSetFlag, NULL, &DESDists, '[', 'X', ']', DIST_DES_KERBEROS }, { "skerbero", "Sources for Kerberos IV", dmenuFlagCheck, dmenuSetFlag, NULL, &DESDists, '[', 'X', ']', DIST_DES_SKERBEROS }, { "ssecure", "Sources for DES", dmenuFlagCheck, dmenuSetFlag, NULL, &DESDists, '[', 'X', ']', DIST_DES_SSECURE }, { "scrypto", "Export controlled crypto sources", dmenuFlagCheck, dmenuSetFlag, NULL, &DESDists, '[', 'X', ']', DIST_DES_SCRYPTO }, { "Exit", "Exit this menu (returning to previous)", checkTrue, dmenuExit, NULL, NULL, '<', '<', '<' }, { 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, { { "base", "top-level files in /usr/src", dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_BASE }, { "contrib", "/usr/src/contrib (contributed software)", dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_CONTRIB }, { "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 }, { "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 }, { "lkm", "/usr/src/lkm (Loadable Kernel Modules)", dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_LKM }, { "release", "/usr/src/release (release-generation tools)", dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_RELEASE }, { "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 }, { "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 }, { "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 }, { "smailcf", "/usr/src/usr.sbin (sendmail config macros)", dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_SMAILCF }, { "All", "Select all of the above", NULL, setSrc, NULL, NULL, ' ', ' ', ' ' }, { "Clear", "Reset all of the above", NULL, clearSrc, NULL, NULL, ' ', ' ', ' ' }, { "Exit", "Exit this menu (returning to previous)", checkTrue, dmenuExit, NULL, NULL, '<', '<', '<' }, { NULL } }, }; DMenu MenuXF86Select = { DMENU_NORMAL_TYPE, "XFree86 3.3.2.3 Distribution", "Please select the components you need from the XFree86 3.3.2.3\n" "distribution sets.", "Press F1 to read the XFree86 release notes for FreeBSD", "XF86", { { "Basic", "Basic component menu (required)", NULL, dmenuSubmenu, NULL, &MenuXF86SelectCore }, { "Server", "X server menu", NULL, dmenuSubmenu, NULL, &MenuXF86SelectServer }, { "Fonts", "Font set menu", NULL, dmenuSubmenu, NULL, &MenuXF86SelectFonts }, { "All", "Select all XFree86 distribution sets", NULL, setX11All }, { "Clear", "Reset XFree86 distribution list", NULL, clearX11All }, { "Exit", "Exit this menu (returning to previous)", checkTrue, dmenuExit, NULL, NULL, '<', '<', '<' }, { NULL } }, }; DMenu MenuXF86SelectCore = { DMENU_CHECKLIST_TYPE | DMENU_SELECTION_RETURNS, "XFree86 3.3.2.3 base distribution types", "Please check off the basic XFree86 components you wish to install.\n" "Bin, lib, and set are recommended for a minimum installaion.", "Press F1 to read the XFree86 release notes for FreeBSD", "XF86", { { "bin", "Client applications and shared libs", dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_BIN }, { "cfg", "Configuration files", dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_CFG }, { "doc", "READMEs and release notes", dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_DOC }, { "html", "HTML documentation files", dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_HTML }, { "lib", "Data files needed at runtime", dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_LIB }, { "lk98", "Server link kit for PC98 machines", dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_LKIT98 }, { "lkit", "Server link kit for all other machines", dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_LKIT }, { "man", "Manual pages", dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_MAN }, { "prog", "Programmer's header and library files", dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_PROG }, { "set", "XFree86 Setup Utility", dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_SET }, { "9set", "XFree86 Setup Utility for PC98 machines", dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_9SET }, { "sources", "XFree86 3.3.2.3 standard sources", dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_SRC }, { "csources", "XFree86 3.3.2.3 contrib sources", dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_CSRC }, { "All", "Select all of the above", NULL, setX11Misc, NULL, NULL, ' ', ' ', ' ' }, { "Clear", "Reset all of the above", NULL, clearX11Misc, NULL, NULL, ' ', ' ', ' ' }, { "Exit", "Exit this menu (returning to previous)", checkTrue, dmenuExit, NULL, NULL, '<', '<', '<' }, { NULL } }, }; DMenu MenuXF86SelectFonts = { DMENU_CHECKLIST_TYPE | DMENU_SELECTION_RETURNS , "Font distribution selection.", "Please check off the individual font distributions you wish to\n\ install. At the minimum, you should install the standard\n\ 75 DPI and misc fonts if you're also installing a server\n\ (these are selected by default).", "Press F1 to read the XFree86 release notes for FreeBSD", "XF86", { { "fnts", "Standard 75 DPI and miscellaneous fonts", dmenuFlagCheck, dmenuSetFlag, NULL, &XF86FontDists, '[', 'X', ']', DIST_XF86_FONTS_MISC }, { "f100", "100 DPI fonts", dmenuFlagCheck, dmenuSetFlag, NULL, &XF86FontDists, '[', 'X', ']', DIST_XF86_FONTS_100 }, { "fcyr", "Cyrillic Fonts", dmenuFlagCheck, dmenuSetFlag, NULL, &XF86FontDists, '[', 'X', ']', DIST_XF86_FONTS_CYR }, { "fscl", "Speedo and Type scalable fonts", dmenuFlagCheck, dmenuSetFlag, NULL, &XF86FontDists, '[', 'X', ']', DIST_XF86_FONTS_SCALE }, { "non", "Japanese, Chinese and other non-english fonts", dmenuFlagCheck, dmenuSetFlag, NULL, &XF86FontDists, '[', 'X', ']', DIST_XF86_FONTS_NON }, { "server", "Font server", dmenuFlagCheck, dmenuSetFlag, NULL, &XF86FontDists, '[', 'X', ']', DIST_XF86_FONTS_SERVER }, { "All", "All fonts", NULL, setX11Fonts, NULL, NULL, ' ', ' ', ' ' }, { "Clear", "Reset font selections", NULL, clearX11Fonts, NULL, NULL, ' ', ' ', ' ' }, { "Exit", "Exit this menu (returning to previous)", checkTrue, dmenuExit, NULL, NULL, '<', '<', '<' }, { NULL } }, }; DMenu MenuXF86SelectServer = { DMENU_CHECKLIST_TYPE | DMENU_SELECTION_RETURNS, "X Server selection.", "Please check off the types of X servers you wish to install.\n" "If you are unsure as to which server will work for your graphics card,\n" "it is recommended that try the SVGA or VGA16 servers or, for PC98\n" "machines, the 9EGC or 9840 servers.", "Press F1 to read the XFree86 release notes for FreeBSD", "XF86", { { "SVGA", "Standard VGA or Super VGA card", dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_SVGA }, { "VGA16", "Standard 16 color VGA card", dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_VGA16 }, { "Mono", "Standard Monochrome card", dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_MONO }, { "8514", "8-bit (256 color) IBM 8514 or compatible card", dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_8514 }, { "AGX", "8-bit AGX card", dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_AGX }, { "I128", "8, 16 and 24-bit #9 Imagine I128 card", dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_I128 }, { "Ma8", "8-bit ATI Mach8 card", dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_MACH8 }, { "Ma32", "8 and 16-bit (65K color) ATI Mach32 card", dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_MACH32 }, { "Ma64", "8 and 16-bit (65K color) ATI Mach64 card", dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_MACH64 }, { "P9K", "8, 16, and 24-bit color Weitek P9000 based boards", dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_P9000 }, { "S3", "8, 16 and 24-bit color S3 based boards", dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_S3 }, { "S3V", "8, 16 and 24-bit color S3 Virge based boards", dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_S3V }, { "W32", "8-bit ET4000/W32, /W32i and /W32p cards", dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_W32 }, { "nest", "A nested server for testing purposes", dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_NEST }, { "PC98", "Select an X server for a NEC PC98 [Submenu]", NULL, dmenuSubmenu, NULL, &MenuXF86SelectPC98Server, '>', ' ', '>', 0 }, { "All", "Select all of the above", NULL, setX11Servers, NULL, NULL, ' ', ' ', ' ' }, { "Clear", "Reset all of the above", NULL, clearX11Servers, NULL, NULL, ' ', ' ', ' ' }, { "Exit", "Exit this menu (returning to previous)", checkTrue, dmenuExit, NULL, NULL, '<', '<', '<' }, { NULL } }, }; DMenu MenuXF86SelectPC98Server = { DMENU_CHECKLIST_TYPE | DMENU_SELECTION_RETURNS, "PC98 X Server selection.", "Please check off the types of NEC PC98 X servers you wish to install.\n\ If you are unsure as to which server will work for your graphics card,\n\ it is recommended that try the SVGA or VGA16 servers (the VGA16 and\n\ Mono servers are particularly well-suited to most LCD displays).", "Press F1 to read the XFree86 release notes for FreeBSD", "XF86", { { "9480", "PC98 8-bit (256 color) PEGC-480 card", dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_9480 }, { "9EGC", "PC98 4-bit (16 color) EGC card", dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_9EGC }, { "9GA9", "PC98 GA-968V4/PCI (S3 968) card", dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_9GA9 }, { "9GAN", "PC98 GANB-WAP (cirrus) card", dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_9GAN }, { "9LPW", "PC98 PowerWindowLB (S3) card", dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_9LPW }, { "9MGA", "PC98 MGA (Matrox) card", dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_9MGA }, { "9NKV", "PC98 NKV-NEC (cirrus) card", dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_9NKV }, { "9NS3", "PC98 NEC (S3) card", dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_9NS3 }, { "9SPW", "PC98 SKB-PowerWindow (S3) card", dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_9SPW }, { "9SVG", "PC98 generic SVGA card", dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_9SVG }, { "9TGU", "PC98 Cyber9320 and TGUI9680 cards", dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_9TGU }, { "9WEP", "PC98 WAB-EP (cirrus) card", dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_9WEP }, { "9WS", "PC98 WABS (cirrus) card", dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_9WS }, { "9WSN", "PC98 WSN-A2F (cirrus) card", dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_9WSN }, { "Exit", "Exit this menu (returning to previous)", checkTrue, dmenuExit, NULL, NULL, '<', '<', '<' }, { 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]. To de-select it, press [SPACE] again.\n\n" "Select OK or Cancel to 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 chose \"other\"\n" "to enter an arbitrary URL for browsing.", "Press F1 for more help on what you see here.", "html", { { "Handbook", "The FreeBSD Handbook.", NULL, docShowDocument }, { "FAQ", "The Frequently Asked Questions guide.", NULL, docShowDocument }, { "Home", "The Home Pages for the FreeBSD Project (requires net)", NULL, docShowDocument }, { "Other", "Enter a URL.", NULL, docShowDocument }, { NULL } }, }; /* The main installation menu */ DMenu MenuInstallCustom = { DMENU_NORMAL_TYPE, "Choose Custom Installation Options", "This is the custom installation menu. You may use this menu to specify\n" "details on the type of distribution you wish to have, where you wish\n" "to install it from and how you wish to allocate disk storage to FreeBSD.", "Press F1 to read the installation guide", "install", { { "1 Options", "View/Set various installation options", NULL, optionsEditor }, { "2 Partition", "Allocate disk space for FreeBSD", NULL, diskPartitionEditor }, { "3 Label", "Label allocated 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 }, { "0 Exit", "Exit this menu (returning to previous)", NULL, dmenuExit }, { NULL } }, }; /* MBR type menu */ DMenu MenuMBRType = { DMENU_RADIO_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 (\"Booteasy\")", 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 } }, }; /* 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", { { "1 User Management", "Add user and group information", NULL, dmenuSubmenu, NULL, &MenuUsermgmt }, { "2 Console", "Customize system console behavior", NULL, dmenuSubmenu, NULL, &MenuSyscons }, { "3 Time Zone", "Set which time zone you're in", NULL, dmenuSystemCommand, NULL, "tzsetup" }, { "4 Media", "Change the installation media type", NULL, dmenuSubmenu, NULL, &MenuMedia }, { "5 Mouse", "Configure your mouse", NULL, dmenuSubmenu, NULL, &MenuMouse, NULL }, { "6 Networking", "Configure additional network services", NULL, dmenuSubmenu, NULL, &MenuNetworking }, { "7 Startup", "Configure system startup options", NULL, dmenuSubmenu, NULL, &MenuStartup }, { "8 Options", "View/Set various installation options", NULL, optionsEditor }, { "9 Distributions", "Install additional distribution sets", NULL, distExtractAll }, { "P Packages", "Install pre-packaged software for FreeBSD", NULL, configPackages }, { "R Root Password", "Set the system manager's password", NULL, dmenuSystemCommand, NULL, "passwd root" }, { "D HTML Docs", "Go to the HTML documentation menu (post-install)", NULL, docBrowser }, { "X XFree86", "Configure XFree86", NULL, configXEnvironment }, { "L Label", "The disk Label editor", NULL, diskLabelEditor }, { "F Fdisk", "The disk Slice (PC-style partition) Editor", NULL, diskPartitionEditor }, { "U Register", "Register yourself or company as a FreeBSD user.", NULL, configRegister }, { "E Exit", "Exit this menu (returning to previous)", NULL, dmenuExit }, { 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. Remember to use SPACE to select items! The\n" "RETURN key will leave this menu (as with all checkbox menus).", NULL, NULL, { { "APM", "Auto-power management services (typically laptops)", dmenuVarCheck, dmenuToggleVariable, NULL, "apm_enable=YES" }, { "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" }, { " ", " -- ", 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, dmenuToggleVariable, NULL, "nis_client_enable=YES" }, { "nis server", "This host wishes to be an NIS server.", dmenuVarCheck, dmenuToggleVariable, 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" }, { "linux", "This host wants to be able to run linux binaries.", dmenuVarCheck, dmenuToggleVariable, NULL, "linux_enable=YES" }, { "quotas", "This host wishes to check quotas on startup.", dmenuVarCheck, dmenuToggleVariable, NULL, "check_quotas=YES" }, { "SCO", "This host wants to be able to run IBCS2 binaries.", dmenuVarCheck, dmenuToggleVariable, NULL, "ibcs2_enable=YES" }, { "Exit", "Exit this menu (returning to previous)", checkTrue, dmenuExit, NULL, NULL, '<', '<', '<' }, { 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, { { "Interfaces", "Configure additional network interfaces", NULL, tcpMenuSelect }, { "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" }, { "AMD", "This machine wants to run the auto-mounter service", dmenuVarCheck, dmenuToggleVariable, NULL, "amd_enable=YES" }, { "AMD Flags", "Set flags to AMD service (if enabled)", dmenuVarCheck, dmenuISetVariable, NULL, "amd_flags" }, { "TCP Extensions", "Allow RFC1323 and RFC1644 TCP extensions?", dmenuVarCheck, dmenuToggleVariable, NULL, "tcp_extensions=YES" }, { "Gateway", "This machine will route packets between interfaces", dmenuVarCheck, dmenuToggleVariable, NULL, "gateway_enable=YES" }, -#ifdef NETCON_EXTENTIONS - { "Netcon", "Install the Novell client/server demo package", - dmenuVarCheck, configNovell, NULL, "novell" }, -#endif { "Ntpdate", "Select a clock-synchronization server", - dmenuVarCheck, dmenuSubmenu, NULL, &MenuNTP, '[', 'X', ']', (int)"ntpdate_enable=YES" }, + dmenuVarCheck, dmenuSubmenu, NULL, &MenuNTP, '[', 'X', ']', "ntpdate_enable=YES" }, { "router", "Select routing daemon (default: routed)", dmenuVarCheck, configRouter, NULL, "router" }, { "Rwhod", "This machine wants to run the rwho daemon", dmenuVarCheck, dmenuToggleVariable, NULL, "rwhod_enable=YES" }, { "Anon FTP", "This machine wishes to allow anonymous FTP.", dmenuVarCheck, configAnonFTP, NULL, "anon_ftp" }, { "PCNFSD", "Run authentication server for clients with PC-NFS.", dmenuVarCheck, configPCNFSD, NULL, "pcnfsd" }, { "Exit", "Exit this menu (returning to previous)", checkTrue, dmenuExit, NULL, NULL, '<', '<', '<' }, { NULL } }, }; DMenu MenuNTP = { DMENU_RADIO_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 }, { "Australia", "ntp.syd.dms.csiro.au (HP 5061 Cesium Beam)", dmenuVarsCheck, dmenuSetVariables, NULL, "ntpdate_enable=YES,ntpdate_flags=ntp.syd.dms.csiro.au" }, { "Canada", "tick.usask.ca (GOES clock)", dmenuVarsCheck, dmenuSetVariables, NULL, "ntpdate_enable=YES,ntpdate_flags=tick.usask.ca" }, { "France", "canon.inria.fr (TDF clock)", dmenuVarsCheck, dmenuSetVariables, NULL, "ntpdate_enable=YES,ntpdate_flags=canon.inria.fr" }, { "Germany", "ntps1-{0,1,2}.uni-erlangen.de (GPS)", dmenuVarsCheck, dmenuSetVariables, NULL, "ntpdate_enable=YES,ntpdate_flags=ntps1-0.uni-erlangen.de" }, { "Germany #2", "ntps1-0.cs.tu-berlin.de (GPS)", dmenuVarsCheck, dmenuSetVariables, NULL, "ntpdate_enable=YES,ntpdate_flags=ntps1-0.cs.tu-berlin.de" }, { "Japan", "clock.nc.fukuoka-u.ac.jp (GPS clock)", dmenuVarsCheck, dmenuSetVariables, NULL, "ntpdate_enable=YES,ntpdate_flags=clock.nc.fukuoka-u.ac.jp" }, { "Japan #2", "clock.tl.fukuoka-u.ac.jp (GPS clock)", dmenuVarsCheck, dmenuSetVariables, NULL, "ntpdate_enable=YES,ntpdate_flags=clock.tl.fukuoka-u.ac.jp" }, { "Netherlands", "ntp0.nl.net (GPS clock)", dmenuVarsCheck, dmenuSetVariables, NULL, "ntpdate_enable=YES,ntpdate_flags=ntp0.nl.net" }, { "Norway", "timer.unik.no (NTP clock)", dmenuVarsCheck, dmenuSetVariables, NULL, "ntpdate_enable=YES,ntpdate_flags=timer.unik.no" }, { "Sweden", "Time1.Stupi.SE (Cesium/GPS)", dmenuVarsCheck, dmenuSetVariables, NULL, "ntpdate_enable=YES,ntpdate_flags=Time1.Stupi.SE" }, { "Switzerland", "swisstime.ethz.ch (DCF77 clock)", dmenuVarsCheck, dmenuSetVariables, NULL, "ntpdate_enable=YES,ntpdate_flags=swisstime.ethz.ch" }, { "U.S. East Coast", "bitsy.mit.edu (WWV clock)", dmenuVarsCheck, dmenuSetVariables, NULL, "ntpdate_enable=YES,ntpdate_flags=bitsy.mit.edu" }, { "U.S. East Coast #2", "otc1.psu.edu (WWV clock)", dmenuVarsCheck, dmenuSetVariables, NULL, "ntpdate_enable=YES,ntpdate_flags=otc1.psu.edu" }, { "U.S. West Coast", "apple.com (WWV clock)", dmenuVarsCheck, dmenuSetVariables, NULL, "ntpdate_enable=YES,ntpdate_flags=apple.com" }, { "U.S. West Coast #2", "clepsydra.dec.com (GOES clock)", dmenuVarsCheck, dmenuSetVariables, NULL, "ntpdate_enable=YES,ntpdate_flags=clepsydra.dec.com" }, { "U.S. West Coast #3", "clock.llnl.gov (WWVB clock)", dmenuVarsCheck, dmenuSetVariables, NULL, "ntpdate_enable=YES,ntpdate_flags=clock.llnl.gov" }, { "U.S. Midwest", "ncar.ucar.edu (WWVB clock)", dmenuVarsCheck, dmenuSetVariables, NULL, "ntpdate_enable=YES,ntpdate_flags=ncar.ucar.edu" }, { "U.S. Pacific", "chantry.hawaii.net (WWV/H clock)", dmenuVarsCheck, dmenuSetVariables, NULL, "ntpdate_enable=YES,ntpdate_flags=chantry.hawaii.net" }, { "U.S. Southwest", "shorty.chpc.utexas.edu (WWV clock)", dmenuVarsCheck, dmenuSetVariables, NULL, "ntpdate_enable=YES,ntpdate_flags=shorty.chpc.utexas.edu" }, { NULL } }, }; 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, { { "Font", "Choose an alternate screen font", NULL, dmenuSubmenu, NULL, &MenuSysconsFont }, { "Keymap", "Choose an alternate keyboard map", NULL, dmenuSubmenu, NULL, &MenuSysconsKeymap }, { "Repeat", "Set the rate at which keys repeat", NULL, dmenuSubmenu, NULL, &MenuSysconsKeyrate }, { "Saver", "Configure the screen saver", NULL, dmenuSubmenu, NULL, &MenuSysconsSaver }, { "Screenmap", "Choose an alternate screenmap", NULL, dmenuSubmenu, NULL, &MenuSysconsScrnmap }, { "Exit", "Exit this menu (returning to previous)", NULL, dmenuExit }, { NULL } }, }; DMenu MenuSysconsKeymap = { DMENU_RADIO_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" }, { "Danish CP865", "Danish Code Page 865 keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=danish.cp865" }, { "Danish ISO", "Danish ISO keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=danish.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" }, { "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" }, { "Latin American", "Latin American ISO keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=lat-amer" }, { "Japanese 106", "Japanese 106 keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=jp.106" }, { "Norway ISO", "Norwegian ISO keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=norwegian.iso" }, { "Russia CP866", "Russian CP866 keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=ru.cp866" }, { "Russia KOI8-R", "Russian KOI8-R keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=ru.koi8-r" }, { "Slovenian", "Slovenian ISO keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=si.iso.acc" }, { "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 German", "Swiss German ISO keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=swissgerman.iso" }, { "U.K. CP850", "United Kingdom Code Page 850 keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=uk.cp850" }, { "U.K. ISO", "United Kingdom ISO keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=uk.iso" }, { "U.S. Dvorak", "United States Dvorak keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=us.dvorak" }, { "U.S. ISO", "United States ISO keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=us.iso" }, { NULL } }, }; DMenu MenuSysconsKeyrate = { DMENU_RADIO_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_RADIO_TYPE | DMENU_SELECTION_RETURNS, "System Console Screen Saver", "By default, the console driver will not attempt to do anything\n" "special with your screen when it's idle. If you expect to leave your\n" "monitor switched on and idle for long periods of time then you should\n" "probably enable one of these screen savers to prevent phosphor burn-in.", "Choose a nifty-looking screen saver", NULL, { { "blank", "Simply blank the screen", dmenuVarCheck, configSaver, NULL, "saver=blank" }, { "Daemon", "\"BSD Daemon\" animated screen saver", dmenuVarCheck, configSaver, NULL, "saver=daemon" }, { "Green", "\"Green\" power saving mode (if supported by monitor)", dmenuVarCheck, configSaver, NULL, "saver=green" }, { "Snake", "Draw a FreeBSD \"snake\" on your screen", dmenuVarCheck, configSaver, NULL, "saver=snake" }, { "Star", "A \"twinkling stars\" effect", dmenuVarCheck, configSaver, NULL, "saver=star" }, { "Timeout", "Set the screen saver timeout interval", NULL, configSaverTimeout, NULL, NULL, ' ', ' ', ' ' }, { NULL } }, }; DMenu MenuSysconsScrnmap = { DMENU_RADIO_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, { { "None", "No screenmap, use default font", dmenuVarCheck, dmenuSetVariable, NULL, "scrnmap=NO" }, { "KOI8-R to IBM866", "Russian KOI8-R to IBM 866 screenmap", dmenuVarCheck, dmenuSetVariable, NULL, "scrnmap=koi8-r2cp866" }, { "ISO 8859-1 to IBM437", "W-Europe ISO 8859-1 to IBM 437 screenmap", dmenuVarCheck, dmenuSetVariable, NULL, "scrnmap=iso-8859-1_to_cp437" }, { NULL } }, }; DMenu MenuSysconsFont = { DMENU_RADIO_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, { { "None", "Use default font", dmenuVarCheck, dmenuSetVariables, NULL, "font8x8=NO,font8x14=NO,font8x16=NO" }, { "IBM 437", "English", dmenuVarCheck, dmenuSetVariables, NULL, "font8x8=cp437-8x8,font8x14=cp437-8x14,font8x16=cp437-8x16" }, { "IBM 850", "Western Europe, IBM encoding", dmenuVarCheck, dmenuSetVariables, NULL, "font8x8=cp850-8x8,font8x14=cp850-8x14,font8x16=cp850-8x16" }, { "IBM 865", "Norwegian, IBM encoding", dmenuVarCheck, dmenuSetVariables, NULL, "font8x8=cp865-8x8,font8x14=cp865-8x14,font8x16=cp865-8x16" }, { "IBM 866", "Russian, IBM encoding", dmenuVarCheck, dmenuSetVariables, NULL, "font8x8=cp866-8x8,font8x14=cp866-8x14,font8x16=cp866-8x16" }, { "ISO 8859-1", "Western Europe, ISO encoding", dmenuVarCheck, dmenuSetVariables, NULL, "font8x8=iso-8x8,font8x14=iso-8x14,font8x16=iso-8x16" }, { "KOI8-R", "Russian, KOI8-R encoding", dmenuVarCheck, dmenuSetVariables, NULL, "font8x8=koi8-r-8x8,font8x14=koi8-r-8x14,font8x16=koi8-r-8x16" }, { NULL } }, }; 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, { { "Add user", "Add a new user to the system.", NULL, userAddUser }, { "Add group", "Add a new user group to the system.", NULL, userAddGroup }, { "Exit", "Exit this menu (returning to previous)", NULL, dmenuExit }, { 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 2nd FreeBSD CDROM, 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", { { "1 CDROM", "Use the 2nd \"live\" CDROM from the distribution", NULL, installFixitCDROM }, { "2 Floppy", "Use a floppy generated from the fixit image", NULL, installFixitFloppy }, { "3 Shell", "Start an Emergency Holographic Shell", NULL, installFixitHoloShell }, { NULL } }, }; Index: stable/2.2/release/sysinstall/network.c =================================================================== --- stable/2.2/release/sysinstall/network.c (revision 40694) +++ stable/2.2/release/sysinstall/network.c (revision 40695) @@ -1,302 +1,302 @@ /* * The new sysinstall program. * * This is probably the last attempt in the `sysinstall' line, the next * generation being slated to essentially a complete rewrite. * - * $Id: network.c,v 1.16.2.12 1998/07/16 10:35:24 jkh Exp $ + * $Id: network.c,v 1.16.2.13 1998/07/27 06:40:18 brian Exp $ * * 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. * */ /* These routines deal with getting things off of network media */ #include "sysinstall.h" #include #include #include #include static Boolean networkInitialized; static pid_t startPPP(Device *devp); static pid_t pppPID; Boolean mediaInitNetwork(Device *dev) { int i; char *rp; char *cp, ifconfig[255]; if (!RunningAsInit || networkInitialized) return TRUE; msgDebug("Init routine called for network device %s.\n", dev->name); if (!file_readable("/etc/resolv.conf")) configResolv(); /* Old PPP process lying around? */ if (pppPID) { msgNotify("Killing previous PPP process %d.", pppPID); kill(pppPID, SIGTERM); pppPID = 0; } if (!strncmp("ppp", dev->name, 3)) { /* PPP? */ if (!(pppPID = startPPP(dev))) { msgConfirm("Unable to start PPP! This installation method cannot be used."); return FALSE; } networkInitialized = TRUE; return TRUE; } else if (!strncmp("sl", dev->name, 2)) { /* SLIP? */ char *val; char attach[256]; dialog_clear_norefresh(); /* Cheesy slip attach */ snprintf(attach, 256, "slattach -a -h -l -s 9600 %s", dev->devname); val = msgGetInput(attach, "Warning: SLIP is rather poorly supported in this revision\n" "of the installation due to the lack of a dialing utility.\n" "If you can use PPP for this instead then you're much better\n" "off doing so, otherwise SLIP works fairly well for *hardwired*\n" "links. Please edit the following slattach command for\n" "correctness (default here is: VJ compression, Hardware flow-\n" "control, ignore carrier and 9600 baud data rate). When you're\n" "ready, press [ENTER] to execute it."); if (!val) { msgConfirm("slattach command was empty. Try again!"); return FALSE; } else SAFE_STRCPY(attach, val); /* * Doing this with vsystem() is actually bogus since we should be storing the pid of slattach * for later killing. It's just too convenient to call vsystem(), however, rather than * constructing a proper argument for exec() so we punt on doing slip right for now. */ if (vsystem(attach)) { msgConfirm("slattach returned a bad status! Please verify that\n" "the command is correct and try this operation again."); return FALSE; } } snprintf(ifconfig, 255, "%s%s", VAR_IFCONFIG, dev->name); cp = variable_get(ifconfig); if (!cp) { msgConfirm("The %s device is not configured. You will need to do so\n" "in the Networking configuration menu before proceeding.", dev->name); return FALSE; } msgNotify("ifconfig %s %s", dev->name, cp); i = vsystem("ifconfig %s %s", dev->name, cp); if (i) { msgConfirm("Unable to configure the %s interface!\n" "This installation method cannot be used.", dev->name); return FALSE; } rp = variable_get(VAR_GATEWAY); if (!rp || *rp == '0') { msgConfirm("No gateway has been set. You may be unable to access hosts\n" "not on your local network"); } else { msgNotify("Adding default route to %s.", rp); - vsystem("route add default %s", rp); + vsystem("route -n add default %s", rp); } if (isDebug()) msgDebug("Network initialized successfully.\n"); networkInitialized = TRUE; return TRUE; } void mediaShutdownNetwork(Device *dev) { char *cp; if (!RunningAsInit || !networkInitialized) return; msgDebug("Shutdown called for network device %s\n", dev->name); /* Not a serial device? */ if (strncmp("sl", dev->name, 2) && strncmp("ppp", dev->name, 3)) { int i; char ifconfig[255]; snprintf(ifconfig, 255, "%s%s", VAR_IFCONFIG, dev->name); cp = variable_get(ifconfig); if (!cp) return; msgNotify("ifconfig %s down", dev->name); i = vsystem("ifconfig %s down", dev->name); if (i) msgConfirm("Warning: Unable to down the %s interface properly", dev->name); cp = variable_get(VAR_GATEWAY); if (cp) { msgNotify("Deleting default route."); - vsystem("route delete default"); + vsystem("route -n delete default"); } } else if (pppPID) { msgNotify("Killing previous PPP process %d.", pppPID); kill(pppPID, SIGTERM); pppPID = 0; } networkInitialized = FALSE; } /* Start PPP on the 3rd screen */ static pid_t startPPP(Device *devp) { int fd2; FILE *fp; char *val; pid_t pid = 0; char myaddr[16], provider[16], speed[16]; /* These are needed to make ppp work */ Mkdir("/var/log"); Mkdir("/var/run"); Mkdir("/var/spool/lock"); Mkdir("/etc/ppp"); dialog_clear_norefresh(); if (!variable_get(VAR_SERIAL_SPEED)) variable_set2(VAR_SERIAL_SPEED, "115200"); /* Get any important user values */ val = variable_get_value(VAR_SERIAL_SPEED, "Enter the baud rate for your modem - this can be higher than the actual\n" "maximum data rate since most modems can talk at one speed to the\n" "computer and at another speed to the remote end.\n\n" "If you're not sure what to put here, just select the default."); SAFE_STRCPY(speed, (val && *val) ? val : "115200"); val = variable_get(VAR_GATEWAY); SAFE_STRCPY(provider, (val && *val) ? val : "0"); dialog_clear_norefresh(); val = msgGetInput(provider, "Enter the IP address of your service provider or 0 if you\n" "don't know it and would prefer to negotiate it dynamically."); SAFE_STRCPY(provider, (val && *val) ? val : "0"); if (devp->private && ((DevInfo *)devp->private)->ipaddr[0]) SAFE_STRCPY(myaddr, ((DevInfo *)devp->private)->ipaddr); else strcpy(myaddr, "0"); if (!Fake) fp = fopen("/etc/ppp/ppp.linkup", "w"); else fp = fopen("/dev/stderr", "w"); if (fp != NULL) { fprintf(fp, "MYADDR:\n"); fprintf(fp, " delete ALL\n"); fprintf(fp, " add 0 0 HISADDR\n"); fchmod(fileno(fp), 0755); fclose(fp); } if (!Fake) fd2 = open("/etc/ppp/ppp.secret", O_CREAT); else fd2 = -1; if (fd2 != -1) { fchmod(fd2, 0700); close(fd2); } if (!Fake) fp = fopen("/etc/ppp/ppp.conf", "w"); else fp = fopen("/dev/stderr", "w"); if (!fp) { msgConfirm("Couldn't open /etc/ppp/ppp.conf file! This isn't going to work"); return 0; } fprintf(fp, "default:\n"); fprintf(fp, " set speed %s\n", speed); fprintf(fp, " set device %s\n", devp->devname); fprintf(fp, " set ifaddr %s %s\n", myaddr, provider); fprintf(fp, " set timeout 0\n"); fprintf(fp, " set log local phase\n"); fclose(fp); if (!Fake && !file_readable("/dev/tun0") && mknod("/dev/tun0", 0600 | S_IFCHR, makedev(52, 0))) { msgConfirm("Warning: No /dev/tun0 device. PPP will not work!"); return 0; } if (isDebug()) msgDebug("About to start PPP on device %s @ %s baud. Provider = %s\n", devp->devname, speed, provider); if (!Fake && !(pid = fork())) { int i, fd; struct termios foo; extern int login_tty(int); for (i = getdtablesize(); i >= 0; i--) close(i); /* We're going over to VTY2 */ fd = open("/dev/ttyv2", O_RDWR); ioctl(0, TIOCSCTTY, &fd); dup2(0, 1); dup2(0, 2); DebugFD = 2; if (login_tty(fd) == -1) msgDebug("ppp: Can't set the controlling terminal.\n"); signal(SIGTTOU, SIG_IGN); if (tcgetattr(fd, &foo) != -1) { foo.c_cc[VERASE] = '\010'; if (tcsetattr(fd, TCSANOW, &foo) == -1) msgDebug("ppp: Unable to set the erase character.\n"); } else msgDebug("ppp: Unable to get the terminal attributes!\n"); execlp("ppp", "ppp", (char *)NULL); msgDebug("PPP process failed to exec!\n"); exit(1); } else { dialog_clear_norefresh(); msgConfirm("NOTICE: The PPP command is now started on VTY3 (type ALT-F3 to\n" "interact with it, ALT-F1 to switch back here). The only command\n" "you'll probably want or need to use is the \"term\" command\n" "which starts a terminal emulator you can use to talk to your\n" "modem and dial the service provider. Once you're connected,\n" "come back to this screen and press return.\n\n" "DO NOT PRESS [ENTER] HERE UNTIL THE CONNECTION IS FULLY\n" "ESTABLISHED!"); } return pid; } Index: stable/2.2/release/sysinstall/sysinstall.8 =================================================================== --- stable/2.2/release/sysinstall/sysinstall.8 (revision 40694) +++ stable/2.2/release/sysinstall/sysinstall.8 (revision 40695) @@ -1,804 +1,804 @@ .\" 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. .\" -.\" $Id: sysinstall.8,v 1.1.2.8 1998/07/20 11:33:03 jkh Exp $ +.\" $Id: sysinstall.8,v 1.1.2.9 1998/07/21 04:03:14 jkh Exp $ .\" .Dd August 9, 1997 .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 .Nm is a utility for installing and configuring FreeBSD systems. It is the first utility invoked by the FreeBSD installation boot floppy and is also copied into .Pa /stand/sysinstall on newly installed FreeBSD systems for use in later configuring the system. .Pp The .Nm program is generally invoked without arguments for the default behavior, where the main installation/configuration menu is presented. 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. .Pp .Sh NOTES .Nm 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 FreeBSD systems. It also contains some extra intelligence for running as a replacement for .Xr init 8 when it's invoked by the FreeBSD 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 .Nm currently uses the .Xr libdialog 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 ``xterm-color'' termcap entry). .Pp This product is currently at the end of its life cycle and will -be replaced in FreeBSD 3.0 by the +be replaced in FreeBSD 3.1 (hopefully) by the .Xr setup 1 utility. .Sh RUNNING SCRIPTS .Nm 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 -compact .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: .nf /stand/sysinstall ftp=ftp:/ziggy/pub/ mediaSetFTP configPackages .fi Would initialize .Nm for FTP installation media (using the server `ziggy') and then bring up the package installation editor, exiting when finished. .El .Pp .Sh SCRIPT SYNTAX A script is a list of one or more directives, each directive taking the form of: .Ar var=value .Pp .Ar function .Pp or .Ar #somecomment 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. When and where a function depends on the settings of one or more variables will be noted in the following table: .Pp \fBFunction Glossary:\fR .Pp .Bl -tag -width indent .It configAnonFTP Invoke the Anonymous FTP configuration menu. .Pp \fBVariables:\fR None .It configRouter Select which routing daemon you wish to use, potentially loading any required 3rd-party routing daemons as necessary. .Pp \fBVariables:\fR .Bl -tag -width indent .It router can be set to the name of the desired routing daemon, e.g. ``routed'' or ``gated'', otherwise it is prompted for. .El .It configNFSServer Configure host as an NFS server. .Pp \fBVariables:\fR None .It configNTP Configure host as a user of the Network Time Protocol. .Pp \fBVariables:\fR .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 \fBVariables:\fR .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 \fBVariables:\fR None .It configRegister Register the user with the FreeBSD counter. .Pp \fBVariables:\fR None .It configUsers Add users and/or groups to the system. .Pp \fBVariables:\fR None .It configXEnvironment Configure the X display subsystem. .Pp \fBVariables:\fR None .It diskPartitionEditor Invokes the disk partition (MBR) editor. .Pp \fBVariables:\fR .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 FreeBSD, .Ar all to use the entire disk for FreeBSD but maintain a proper partition table, .Ar existing to use an existing FreeBSD partition (first found), .Ar exclusive to use the disk in ``dangerously dedicated'' mode or, finally, .Ar somenumber to allocate .Ar somenumber blocks of available free space to a new FreeBSD 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. .El .Pp Note: Nothing is actually written to disk by this function, a 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 \fBVariables:\fR 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 FreeBSD (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've created a new FreeBSD partition in slice 2 (your DOS partition residing in slice 1). The slice name would be .Ar sd0s2 for the whole FreeBSD partition ( .Ar sd0s1 being your DOS primary partition). Now let's further assume that you have 500MB in this partition and you want to sub-partition that space into root, swap, var and usr file systems for FreeBSD. Your invocation of the .Ar diskLabelEditor function might involve setting the following variables: .Bl -tag -width findx .It Li "sd0s2-1=ufs 40960 /" A 20MB root file system (all sizes are in 512 byte blocks). .It Li "sd0s2-2=swap 131072 /" A 64MB swap partition. .It Li "sd0s2-3=ufs 204800 /var" A 100MB /var file system. .It Li "sd0s2-4=ufs 0 /usr" With the balance of free space (around 316MB) going to the /usr file system. .El 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: .nf sd0s1=/dos_c N .fi 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 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 \fBVariables:\fR None .It distReset Resets all selected distributions to the empty set (no distributions selected). .Pp \fBVariables:\fR None .It distSetCustom Allows the selection of a custom distribution set (e.g. not just on of the existing "canned" sets) with no user interaction. \fBVariables:\fR .Bl -tag -width indent .It dists List of distributions to load. Possible distribution values are: .Bl -tag -width indent .It Li bin The base binary distribution. .It Li doc Miscellaneous documentation .It Li games Games .It Li manpages Manual pages (unformatted) .It Li catpages Pre-formatted manual pages .It Li proflibs Profiled libraries for developers. .It Li dict Dictionary information (for tools like spell). .It Li info GNU info files and other extra docs. .It Li des DES encryption binaries and libraries. .It Li compat1x Compatibility with FreeBSD 1.x .It Li compat20 Compatibility with FreeBSD 2.0 .It Li compat21 Compatibility with FreeBSD 2.1 .It Li ports The ports collection. .It Li krb Kerberos binaries. .It Li ssecure /usr/src/secure .It Li sebones /usr/src/eBones .It Li sbase /usr/src/[top level files] .It Li scontrib /usr/src/contrib .It Li sgnu /usr/src/gnu .It Li setc /usr/src/etc .It Li sgames /usr/src/games .It Li sinclude /usr/src/include .It Li slib /usr/src/lib .It Li slibexec /usr/src/libexec .It Li slkm /usr/src/lkm .It Li srelease /usr/src/release .It Li sbin /usr/src/bin .It Li ssbin /usr/src/sbin .It Li sshare /usr/src/share .It Li ssys /usr/src/sys .It Li subin /usr/src/usr.bin .It Li susbin /usr/src/usr.sbin .It Li ssmailcf /usr/src/usr.sbin/sendmail/cf .It Li XF86-xc XFree86 official sources. .It Li XF86-co XFree86 contributed sources. .It Li X332bin XFree86 3.3.2.3 binaries. .It Li X332cfg XFree86 3.3.2.3 configuration files. .It Li X332doc XFree86 3.3.2.3 documentation. .It Li X332html XFree86 3.3.2.3 HTML documentation. .It Li X332lib XFree86 3.3.2.3 libraries. .It Li X332lk98 XFree86 3.3.2.3 server link-kit for PC98 machines. .It Li X332lkit XFree86 3.3.2.3 server link-kit for standard machines. .It Li X332man XFree86 3.3.2.3 manual pages. .It Li X332prog XFree86 3.3.2.3 programmer's distribution. .It Li X332ps XFree86 3.3.2.3 postscript documentation. .It Li X332set XFree86 3.3.2.3 graphical setup tool. .It Li X3328514 XFree86 3.3.2.3 8514 server. .It Li X3329480 XFree86 3.3.2.3 PC98 8-bit (256 color) PEGC-480 server. .It Li X3329EGC XFree86 3.3.2.3 PC98 4-bit (16 color) EGC server. .It Li X3329GA9 XFree86 3.3.2.3 PC98 GA-968V4/PCI (S3 968) server. .It Li X3329GAN XFree86 3.3.2.3 PC98 GANB-WAP (cirrus) server. .It Li X3329LPW XFree86 3.3.2.3 PC98 PowerWindowLB (S3) server. .It Li X3329NKV XFree86 3.3.2.3 PC98 NKV-NEC (cirrus) server. .It Li X3329NS3 XFree86 3.3.2.3 PC98 NEC (S3) server. .It Li X3329SPW XFree86 3.3.2.3 PC98 SKB-PowerWindow (S3) server. .It Li X3329TGU XFree86 3.3.2.3 PC98 Cyber9320 and TGUI9680 server. .It Li X3329WEP XFree86 3.3.2.3 PC98 WAB-EP (cirrus) server. .It Li X3329WS XFree86 3.3.2.3 PC98 WABS (cirrus) server. .It Li X3329WSN XFree86 3.3.2.3 PC98 WSN-A2F (cirrus) server. .It Li X332AGX XFree86 3.3.2.3 8 bit AGX server. .It Li X332I128 XFree86 3.3.2.3 #9 Imagine I128 server. .It Li X332Ma8 XFree86 3.3.2.3 ATI Mach8 server. .It Li X332Ma32 XFree86 3.3.2.3 ATI Mach32 server. .It Li X332Ma64 XFree86 3.3.2.3 ATI Mach64 server. .It Li X332Mono XFree86 3.3.2.3 monochrome server. .It Li X332P9K XFree86 3.3.2.3 P9000 server. .It Li X332S3 XFree86 3.3.2.3 S3 server. .It Li X332S3V XFree86 3.3.2.3 S3 Virge server. .It Li X332SVGA XFree86 3.3.2.3 SVGA server. .It Li X332VG16 XFree86 3.3.2.3 VGA16 server. .It Li X332W32 XFree86 3.3.2.3 ET4000/W32, /W32i and /W32p server. .It Li X332nest XFree86 3.3.2.3 nested X server. .It Li X332vfb XFree86 3.3.2.3 virtual frame-buffer X server. .It Li X332fnts XFree86 3.3.2.3 base font set. .It Li X332f100 XFree86 3.3.2.3 100DPI font set. .It Li X332fcyr XFree86 3.3.2.3 Cyrillic font set. .It Li X332fscl XFree86 3.3.2.3 scalable font set. .It Li X332fnon XFree86 3.3.2.3 non-english font set. .It Li X332fsrv XFree86 3.3.2.3 font server. .El .It distSetDeveloper Selects the standard Developer's distribution set. .Pp \fBVariables:\fR None .It distSetXDeveloper Selects the standard X Developer's distribution set. .Pp \fBVariables:\fR None .It distSetKernDeveloper Selects the standard kernel Developer's distribution set. .Pp \fBVariables:\fR None .It distSetUser Selects the standard user distribution set. .Pp \fBVariables:\fR None .It distSetXUser Selects the standard X user's distribution set. .Pp \fBVariables:\fR None .It distSetMinimum Selects the very minimum distribution set. .Pp \fBVariables:\fR None .It distSetEverything Selects the full whack - all available distributions. .Pp \fBVariables:\fR None .It distSetDES Interactively select DES subcomponents. .Pp \fBVariables:\fR None .It distSetSrc Interactively select source subcomponents. .Pp \fBVariables:\fR None .It distSetXF86 Interactively select XFree86 3.3.2.3 subcomponents. .Pp \fBVariables:\fR None .It distExtractAll Install all currently selected distributions (requires that media device also be selected). .Pp \fBVariables:\fR None .It docBrowser Install (if necessary) an HTML documentation browser and go to the HTML documentation submenu. .Pp \fBVariables:\fR .Bl -tag -width indent .It browserPackage The name of the browser package to try and install as necessary. Defaults to latest lynx package. .It browserBinary The name of the browser binary itself (if overriding the .Ar browserPackage variable). Defaults to lynx. .El .It installCommit .Pp Commit any and all pending changes to disk. This function is essentially shorthand for a number of more granular "commit" functions. \fBVariables:\fR None .It installExpress Start an "express" installation, asking few questions of the user. .Pp \fBVariables:\fR None .It installNovice Start a "novice" installation, the most user-friendly installation type available. .Pp \fBVariables:\fR None .It installUpgrade Start an upgrade installation. .Pp \fBVariables:\fR None .It installFixitHoloShell Start up the "emergency holographic shell" over on VTY4 if running as init. .Pp \fBVariables:\fR None .It installFixitCDROM Go into "fixit" mode, assuming a live file system CDROM currently in the drive. .Pp \fBVariables:\fR None .It installFixitFloppy Go into "fixit" mode, assuming an available fixit floppy disk (user will be prompted for it). .Pp \fBVariables:\fR None .It installFilesystems Do just the file system initialization part of an install. .Pp \fBVariables:\fR None .It installVarDefaults Initialize all variables to their defaults, overriding any previous settings. .Pp \fBVariables:\fR None .It loadConfig Sort of like an #include statement, it allows you to load one configuration file from another. .Pp \fBVariables:\fR .Bl -tag -width indent .It file The fully pathname of the file to load. .El .It mediaSetCDROM Select a FreeBSD CDROM as the installation media. .Pp \fBVariables:\fR None .It mediaSetFloppy Select a pre-made floppy installation set as the installation media. .Pp \fBVariables:\fR None .It mediaSetDOS Select an existing DOS primary partition as the installation media. The first primary partition found is used (e.g. C:). .Pp \fBVariables:\fR None .It mediaSetTape Select a tape device as the installation media. .Pp \fBVariables:\fR None .It mediaSetFTP Select an FTP site as the installation media. .Pp \fBVariables:\fR .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 ftp The fully qualified URL of the FTP site containing the FreeBSD distribution you're interested in, e.g. .Ar ftp://ftp.freebsd.org/pub/FreeBSD/ . .El .It mediaSetFTPActive Alias for .Ar mediaSetFTP using "active" FTP transfer mode. .Pp \fBVariables:\fR Same as for .Ar mediaSetFTP . .It mediaSetFTPPassive Alias for .Ar mediaSetFTP using "passive" FTP transfer mode. .Pp \fBVariables:\fR Same as for .Ar mediaSetFTP . .It mediaSetUFS Select an existing UFS partition (mounted with the label editor) as the installation media. .Pp \fBVariables:\fR .Bl -tag -width indent .It ufs full /path to directory containing the FreeBSD distribution you're interested in. .El .It mediaSetNFS .Pp \fBVariables:\fR .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 FreeBSD distribution you're interested in. .El .It mediaSetFTPUserPass .Pp \fBVariables:\fR .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 \fBVariables:\fR .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 \fBVariables:\fR None .It optionsEditor Invoke the interactive options editor. .Pp \fBVariables:\fR None .It register Bring up the FreeBSD registration form. .Pp \fBVariables:\fR None .It packageAdd Try to fetch and add a package to the system (requires that a media type be set), .Pp \fBVariables:\fR .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 \fBVariables:\fR None .It addUser Invoke the interactive user editor. .Pp \fBVariables:\fR None .It shutdown Stop the script and terminate sysinstall. .Pp \fBVariables:\fR None .It system Execute an arbitrary command with .Xr system 3 .Pp \fBVariables:\fR .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's available until/unless a relatively full system installation has just been done. .El .El .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/release/sysinstall/install.cfg for a sample installation script. .Sh BUGS -This utility is a prototype which lasted approximately 2 years past +This utility is a prototype which lasted approximately 3 years past its expiration date and is greatly in need of death. .Sh AUTHOR Jordan K. Hubbard .Sh HISTORY This version of .Nm first appeared in .Fx 2.0 . Index: stable/2.2/release/sysinstall/sysinstall.h =================================================================== --- stable/2.2/release/sysinstall/sysinstall.h (revision 40694) +++ stable/2.2/release/sysinstall/sysinstall.h (revision 40695) @@ -1,736 +1,732 @@ /* * The new sysinstall program. * * This is probably the last attempt in the `sysinstall' line, the next * generation being slated to essentially a complete rewrite. * - * $Id: sysinstall.h,v 1.82.2.51 1998/03/23 20:27:37 jkh Exp $ + * $Id: sysinstall.h,v 1.82.2.52 1998/07/18 09:35:27 jkh Exp $ * * 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 _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 "libdisk.h" #include "dist.h" #include "version.h" /*** Defines ***/ -/* Different packages we depend on - update this when package version change! */ -#define PACKAGE_GATED "gated-3.5.8" -#define PACKAGE_NETCON "commerce/netcon/bsd61" -#define PACKAGE_PCNFSD "pcnfsd-93.02.16" -#define PACKAGE_LYNX "lynx-2.7.2" +/* Different packages we depend on - update symlinks when versions change! */ +#define PACKAGE_GATED "gated" +#define PACKAGE_PCNFSD "pcnfsd" +#define PACKAGE_LYNX "lynx" /* device limits */ #define DEV_NAME_MAX 64 /* 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_CPIO_VERBOSITY "cpioVerbose" #define VAR_DEBUG "debug" #define VAR_DISK "disk" #define VAR_DISTS "dists" #define VAR_DIST_MAIN "distMain" #define VAR_DIST_DES "distDES" #define VAR_DIST_SRC "distSRC" #define VAR_DIST_X11 "distX11" #define VAR_DIST_XSERVER "distXserver" #define VAR_DIST_XFONTS "distXfonts" #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_FTP_DIR "ftpDirectory" #define VAR_FTP_PASS "ftpPass" #define VAR_FTP_PATH "ftp" #define VAR_FTP_PORT "ftpPort" #define VAR_FTP_STATE "ftpState" #define VAR_FTP_USER "ftpUser" #define VAR_FTP_HOST "ftpHost" #define VAR_GATED_PKG "gated_pkg" #define VAR_GATEWAY "defaultrouter" #define VAR_GEOMETRY "geometry" #define VAR_HOSTNAME "hostname" #define VAR_IFCONFIG "ifconfig_" #define VAR_INTERFACES "network_interfaces" #define VAR_INSTALL_CFG "installConfig" #define VAR_INSTALL_ROOT "installRoot" #define VAR_IPADDR "ipaddr" #define VAR_KEYMAP "keymap" #define VAR_LABEL "label" #define VAR_LABEL_COUNT "labelCount" #define VAR_MEDIA_TYPE "mediaType" #define VAR_MEDIA_TIMEOUT "MEDIA_TIMEOUT" #define VAR_MOUSED "moused_enable" #define VAR_MOUSED_PORT "moused_port" #define VAR_MOUSED_TYPE "moused_type" #define VAR_NAMESERVER "nameserver" #define VAR_NETINTERACTIVE "netInteractive" #define VAR_NETMASK "netmask" #define VAR_NETWORK_DEVICE "netDev" #define VAR_NFS_PATH "nfs" #define VAR_NFS_HOST "nfsHost" #define VAR_NFS_SECURE "nfsSecure" #define VAR_NFS_SERVER "nfs_server_enable" #define VAR_NO_CONFIRM "noConfirm" #define VAR_NO_ERROR "noError" #define VAR_NO_WARN "noWarn" #define VAR_NO_USR "noUsr" #define VAR_NONINTERACTIVE "nonInteractive" #define VAR_NOVELL "novell" #define VAR_NTPDATE_FLAGS "ntpdate_flags" #define VAR_PACKAGE "package" #define VAR_PARTITION "partition" #define VAR_PCNFSD "pcnfsd" #define VAR_PCNFSD_PKG "pcnfsd_pkg" #define VAR_PKG_TMPDIR "PKG_TMPDIR" #define VAR_PORTS_PATH "ports" #define VAR_RELNAME "releaseName" #define VAR_ROOT_SIZE "rootSize" #define VAR_ROUTER "router" #define VAR_ROUTER_ENABLE "router_enable" #define VAR_ROUTERFLAGS "routerflags" #define VAR_SERIAL_SPEED "serialSpeed" #define VAR_SLOW_ETHER "slowEthernetCard" #define VAR_SWAP_SIZE "swapSize" #define VAR_TAPE_BLOCKSIZE "tapeBlocksize" #define VAR_UFS_PATH "ufs" #define VAR_USR_SIZE "usrSize" #define VAR_VAR_SIZE "varSize" #define VAR_XF86_CONFIG "xf86config" #define DEFAULT_TAPE_BLOCKSIZE "20" /* One MB worth of blocks */ #define ONE_MEG 2048 /* 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 unsigned 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" */ dialogMenuItem items[0]; /* Array of menu items */ } DMenu; /* An rc.conf variable */ typedef struct _variable { struct _variable *next; char *name; char *value; } 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; /* For attribs */ #define MAX_ATTRIBS 200 #define MAX_NAME 64 #define MAX_VALUE 256 typedef struct _attribs { char name[MAX_NAME]; char value[MAX_VALUE]; } Attribs; 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, } 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; } Device; /* Some internal representations of partitions */ typedef enum { PART_NONE, PART_SLICE, PART_SWAP, PART_FILESYSTEM, PART_FAT, } PartType; /* The longest newfs command we'll hand to system() */ #define NEWFS_CMD_MAX 256 typedef struct _part_info { Boolean newfs; char mountpoint[FILENAME_MAX]; char newfs_cmd[NEWFS_CMD_MAX]; } 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)(); } 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 */ char *maintainer; /* maintainer */ } 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 { 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 DebugFD; /* Where diagnostic output goes */ extern Boolean Fake; /* Don't actually modify anything - testing */ 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 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 DESDists; /* Which naughty distributions we want */ extern unsigned int SrcDists; /* Which src distributions we want */ extern unsigned int XF86Dists; /* Which XFree86 dists we want */ extern unsigned int XF86ServerDists; /* The XFree86 servers we want */ extern unsigned int XF86FontDists; /* The XFree86 fonts we want */ extern int BootMgr; /* Which boot manager to use */ extern int StatusLine; /* Where to print our status messages */ extern DMenu MenuInitial; /* Initial installation menu */ extern DMenu MenuFixit; /* Fixit repair menu */ extern DMenu MenuMBRType; /* Type of MBR to write on the disk */ 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 MenuMedia; /* Media type menu */ extern DMenu MenuMouse; /* Mouse type menu */ 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 MenuStartup; /* Startup services menu */ 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 MenuNetworking; /* Network configuration menu */ extern DMenu MenuInstallCustom; /* Custom Installation menu */ extern DMenu MenuDistributions; /* Distribution menu */ extern DMenu MenuSubDistributions; /* Custom distribution menu */ extern DMenu MenuDESDistributions; /* DES distribution menu */ extern DMenu MenuSrcDistributions; /* Source distribution menu */ extern DMenu MenuXF86; /* XFree86 main menu */ extern DMenu MenuXF86Select; /* XFree86 distribution selection menu */ extern DMenu MenuXF86SelectCore; /* XFree86 core distribution menu */ extern DMenu MenuXF86SelectServer; /* XFree86 server distribution menu */ extern DMenu MenuXF86SelectPC98Server; /* XFree86 server distribution menu */ extern DMenu MenuXF86SelectFonts; /* XFree86 font selection menu */ extern DMenu MenuDiskDevices; /* Disk devices menu */ extern DMenu MenuHTMLDoc; /* HTML Documentation menu */ extern DMenu MenuUsermgmt; /* User management menu */ extern DMenu MenuFixit; /* Fixit floppy/CDROM/shell menu */ extern DMenu MenuXF86Config; /* Select XFree86 configuration type */ /* 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 ***/ /* anonFTP.c */ extern int configAnonFTP(dialogMenuItem *self); /* attrs.c */ extern char *attr_match(Attribs *attr, char *name); extern int attr_parse_file(Attribs *attr, char *file); extern int attr_parse(Attribs *attr, FILE *fp); /* 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, ...); extern void command_func_add(char *key, commandFunc func, void *data); /* config.c */ extern int configFstab(void); extern void configEnvironmentRC_conf(char *config); extern void configEnvironmentResolv(char *config); extern void configRC_conf(char *config); extern int configRC(dialogMenuItem *self); extern int configRegister(dialogMenuItem *self); extern void configResolv(void); extern int configPackages(dialogMenuItem *self); extern int configSaver(dialogMenuItem *self); extern int configSaverTimeout(dialogMenuItem *self); extern int configNTP(dialogMenuItem *self); extern int configUsers(dialogMenuItem *self); extern int configXEnvironment(dialogMenuItem *self); extern int configRouter(dialogMenuItem *self); extern int configPCNFSD(dialogMenuItem *self); extern int configNFSServer(dialogMenuItem *self); extern int configWriteRC_conf(dialogMenuItem *self); -#ifdef NETCON_EXTENTIONS -extern int configNovell(dialogMenuItem *self); -#endif /* crc.c */ extern int crc(int, unsigned long *, unsigned long *); /* devices.c */ extern DMenu *deviceCreateMenu(DMenu *menu, DeviceType type, int (*hook)(dialogMenuItem *d), int (*check)(dialogMenuItem *d)); extern void deviceGetAll(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); /* disks.c */ extern int diskPartitionEditor(dialogMenuItem *self); extern int diskPartitionWrite(dialogMenuItem *self); extern int diskGetSelectCount(Device ***devs); extern void diskPartition(Device *dev); /* 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 distSetDeveloper(dialogMenuItem *self); extern int distSetXDeveloper(dialogMenuItem *self); extern int distSetKernDeveloper(dialogMenuItem *self); extern int distSetUser(dialogMenuItem *self); extern int distSetXUser(dialogMenuItem *self); extern int distSetMinimum(dialogMenuItem *self); extern int distSetEverything(dialogMenuItem *self); extern int distSetDES(dialogMenuItem *self); extern int distSetSrc(dialogMenuItem *self); extern int distSetXF86(dialogMenuItem *self); extern int distExtractAll(dialogMenuItem *self); /* 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 dmenuSetKmapVariable(dialogMenuItem *tmp); extern int dmenuSetVariables(dialogMenuItem *tmp); extern int dmenuToggleVariable(dialogMenuItem *tmp); extern int dmenuSetFlag(dialogMenuItem *tmp); extern int dmenuSetValue(dialogMenuItem *tmp); 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); /* globals.c */ extern void globalsInit(void); /* index.c */ int index_read(FILE *fp, PkgNodePtr papa); int index_menu(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 plist); /* install.c */ extern Boolean checkLabels(Boolean whinge, Chunk **rdev, Chunk **sdev, Chunk **udev, Chunk **vdev); extern int installCommit(dialogMenuItem *self); extern int installCustomCommit(dialogMenuItem *self); extern int installExpress(dialogMenuItem *self); extern int installNovice(dialogMenuItem *self); extern int installFixitHoloShell(dialogMenuItem *self); extern int installFixitCDROM(dialogMenuItem *self); extern int installFixitFloppy(dialogMenuItem *self); extern int installFixup(dialogMenuItem *self); extern int installUpgrade(dialogMenuItem *self); extern int installFilesystems(dialogMenuItem *self); extern int installVarDefaults(dialogMenuItem *self); extern void installEnvironment(void); extern Boolean copySelf(void); /* keymap.c */ extern int loadKeymap(const char *lang); /* label.c */ extern int diskLabelEditor(dialogMenuItem *self); extern int diskLabelCommit(dialogMenuItem *self); /* lndir.c */ extern int lndir(char *from, char *to); /* makedevs.c (auto-generated) */ extern const char termcap_ansi[]; extern const char termcap_vt100[]; 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 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 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 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); /* 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 Mount(char *, void *data); 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); /* mouse.c */ extern int mousedTest(dialogMenuItem *self); extern int mousedDisable(dialogMenuItem *self); /* msg.c */ extern Boolean isDebug(void); extern void msgInfo(char *fmt, ...); extern void msgYap(char *fmt, ...); extern void msgWarn(char *fmt, ...); extern void msgDebug(char *fmt, ...); extern void msgError(char *fmt, ...); extern void msgFatal(char *fmt, ...); extern void msgConfirm(char *fmt, ...); extern void msgNotify(char *fmt, ...); extern void msgWeHaveOutput(char *fmt, ...); extern int msgYesNo(char *fmt, ...); extern char *msgGetInput(char *buf, char *fmt, ...); 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_exists(char *name); /* register.c */ extern int registerOpenDialog(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 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, ...); /* tape.c */ extern char *mediaTapeBlocksize(void); extern Boolean mediaInitTape(Device *dev); extern FILE *mediaGetTape(Device *dev, char *file, Boolean probe); extern void mediaShutdownTape(Device *dev); /* tcpip.c */ extern int tcpOpenDialog(Device *dev); extern int tcpMenuSelect(dialogMenuItem *self); extern Device *tcpDeviceSelect(void); /* termcap.c */ extern int set_termcap(void); /* 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); extern void variable_set2(char *name, char *value); 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); extern int variable_check(char *data); extern int dump_variables(dialogMenuItem *self); /* wizard.c */ extern void slice_wizard(Disk *d); #endif /* _SYSINSTALL_H_INCLUDE */ Index: stable/2.2/release/sysinstall/system.c =================================================================== --- stable/2.2/release/sysinstall/system.c (revision 40694) +++ stable/2.2/release/sysinstall/system.c (revision 40695) @@ -1,376 +1,378 @@ /* * The new sysinstall program. * * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: system.c,v 1.66.2.12 1997/05/27 18:56:16 jkh Exp $ + * $Id: system.c,v 1.66.2.13 1997/07/31 11:11:38 jkh Exp $ * * Jordan Hubbard * * My contributions are in the public domain. * * Parts of this file are also blatently stolen from Poul-Henning Kamp's * previous version of sysinstall, and as such fall under his "BEERWARE license" * so buy him a beer if you like it! Buy him a beer for me, too! * Heck, get him completely drunk and send me pictures! :-) */ #include "sysinstall.h" #include #include #include #include #include #include /* Where we stick our temporary expanded doc file */ #define DOC_TMP_DIR "/tmp" #define DOC_TMP_FILE "/tmp/doc.tmp" static pid_t ehs_pid; /* * Handle interrupt signals - this probably won't work in all cases * due to our having bogotified the internal state of dialog or curses, * but we'll give it a try. */ static void handle_intr(int sig) { WINDOW *save = savescr(); if (!msgYesNo("Are you sure you want to abort the installation?")) systemShutdown(-1); else restorescr(save); } /* Expand a file into a convenient location, nuking it each time */ static char * expand(char *fname) { + char *gunzip = RunningAsInit ? "/stand/gunzip" : "/usr/bin/gunzip"; + Mkdir(DOC_TMP_DIR); unlink(DOC_TMP_FILE); - if (!file_readable(fname) || vsystem("gzip -c -d %s > %s", fname, DOC_TMP_FILE)) + if (!file_readable(fname) || vsystem("%s < %s > %s", gunzip, fname, DOC_TMP_FILE)) return NULL; return DOC_TMP_FILE; } /* Initialize system defaults */ void systemInitialize(int argc, char **argv) { int i; signal(SIGINT, SIG_IGN); globalsInit(); /* Are we running as init? */ if (getpid() == 1) { int fd, type; RunningAsInit = 1; setsid(); close(0); fd = open("/dev/ttyv0", O_RDWR); if (fd == -1) fd = open("/dev/console", O_RDWR); /* fallback */ else OnVTY = TRUE; /* * To make _sure_ we're on a VTY and don't have /dev/console switched * away to a serial port or something, attempt to set the cursor appearance. */ type = 0; /* normal */ if (OnVTY) { int fd2; if ((fd2 = open("/dev/console", O_RDWR)) != -1) { if (ioctl(fd2, CONS_CURSORTYPE, &type) == -1) { OnVTY = FALSE; close(fd); close(fd2); open("/dev/console", O_RDWR); } else close(fd2); } } close(1); dup(0); close(2); dup(0); printf("%s running as init on %s\n", argv[0], OnVTY ? "vty0" : "serial console"); i = ioctl(0, TIOCSCTTY, (char *)NULL); setlogin("root"); setenv("PATH", "/stand:/bin:/sbin:/usr/sbin:/usr/bin:/mnt/bin:/mnt/sbin:/mnt/usr/sbin:/mnt/usr/bin:/usr/X11R6/bin", 1); setbuf(stdin, 0); setbuf(stderr, 0); } else { char hname[256]; /* Initalize various things for a multi-user environment */ if (!gethostname(hname, sizeof hname)) variable_set2(VAR_HOSTNAME, hname); } if (set_termcap() == -1) { printf("Can't find terminal entry\n"); exit(-1); } /* XXX - libdialog has particularly bad return value checking */ init_dialog(); /* If we haven't crashed I guess dialog is running ! */ DialogActive = TRUE; /* Make sure HOME is set for those utilities that need it */ if (!getenv("HOME")) setenv("HOME", "/", 1); signal(SIGINT, handle_intr); } /* Close down and prepare to exit */ void systemShutdown(int status) { /* If some media is open, close it down */ if (status >=0 && mediaDevice) mediaDevice->shutdown(mediaDevice); /* write out any changes to rc.conf .. */ configRC_conf("/etc/rc.conf"); /* Shut down the dialog library */ if (DialogActive) { end_dialog(); DialogActive = FALSE; } /* Shut down curses */ endwin(); /* If we have a temporary doc file lying around, nuke it */ unlink(DOC_TMP_FILE); /* REALLY exit! */ if (RunningAsInit) { /* Put the console back */ ioctl(0, VT_ACTIVATE, 2); reboot(0); } else exit(status); } /* Run some general command */ int systemExecute(char *command) { int status; struct termios foo; dialog_update(); end_dialog(); DialogActive = FALSE; if (tcgetattr(0, &foo) != -1) { foo.c_cc[VERASE] = '\010'; tcsetattr(0, TCSANOW, &foo); } if (!Fake) status = system(command); else { status = 0; msgDebug("systemExecute: Faked execution of `%s'\n", command); } DialogActive = TRUE; return status; } /* Display a help file in a filebox */ int systemDisplayHelp(char *file) { char *fname = NULL; char buf[FILENAME_MAX]; int ret = 0; fname = systemHelpFile(file, buf); if (!fname) { snprintf(buf, FILENAME_MAX, "The %s file is not provided on this particular floppy image.", file); use_helpfile(NULL); use_helpline(NULL); dialog_mesgbox("Sorry!", buf, -1, -1); ret = 1; } else { use_helpfile(NULL); use_helpline(NULL); dialog_textbox(file, fname, LINES, COLS); } return ret; } char * systemHelpFile(char *file, char *buf) { if (!file) return NULL; snprintf(buf, FILENAME_MAX, "/stand/help/%s.hlp.gz", file); if (file_readable(buf)) return expand(buf); snprintf(buf, FILENAME_MAX, "/usr/src/release/sysinstall/help/%s.hlp", file); if (file_readable(buf)) return buf; return NULL; } void systemChangeTerminal(char *color, const u_char c_term[], char *mono, const u_char m_term[]) { extern void init_acs(void); if (OnVTY) { if (ColorDisplay) { setenv("TERM", color, 1); setenv("TERMCAP", c_term, 1); reset_shell_mode(); setterm(color); init_acs(); cbreak(); noecho(); } else { setenv("TERM", mono, 1); setenv("TERMCAP", m_term, 1); reset_shell_mode(); setterm(mono); init_acs(); cbreak(); noecho(); } } clear(); refresh(); dialog_clear(); } int vsystem(char *fmt, ...) { va_list args; int pstat; pid_t pid; int omask; sig_t intsave, quitsave; char *cmd; int i; cmd = (char *)alloca(FILENAME_MAX); cmd[0] = '\0'; va_start(args, fmt); vsnprintf(cmd, FILENAME_MAX, fmt, args); va_end(args); omask = sigblock(sigmask(SIGCHLD)); if (Fake) { msgDebug("vsystem: Faked execution of `%s'\n", cmd); return 0; } if (isDebug()) msgDebug("Executing command `%s'\n", cmd); pid = fork(); if (pid == -1) { (void)sigsetmask(omask); i = 127; } else if (!pid) { /* Junior */ (void)sigsetmask(omask); if (DebugFD != -1) { dup2(DebugFD, 0); dup2(DebugFD, 1); dup2(DebugFD, 2); } else { close(1); open("/dev/null", O_WRONLY); dup2(1, 2); } if (!RunningAsInit) execl("/bin/sh", "/bin/sh", "-c", cmd, (char *)NULL); else execl("/stand/sh", "/stand/sh", "-c", cmd, (char *)NULL); exit(1); } else { intsave = signal(SIGINT, SIG_IGN); quitsave = signal(SIGQUIT, SIG_IGN); pid = waitpid(pid, &pstat, 0); (void)sigsetmask(omask); (void)signal(SIGINT, intsave); (void)signal(SIGQUIT, quitsave); i = (pid == -1) ? -1 : WEXITSTATUS(pstat); if (isDebug()) msgDebug("Command `%s' returns status of %d\n", cmd, i); } return i; } void systemCreateHoloshell(void) { if (OnVTY && RunningAsInit) { if (ehs_pid != 0) { int pstat; if (kill(ehs_pid, 0) == 0) { if (msgYesNo("There seems to be an emergency holographic shell\n" "already running von VTY 4.\n" "Kill it and start a new one?")) return; /* try cleaning up as much as possible */ (void) kill(ehs_pid, SIGHUP); sleep(1); (void) kill(ehs_pid, SIGKILL); } /* avoid too many zombies */ (void) waitpid(ehs_pid, &pstat, WNOHANG); } if ((ehs_pid = fork()) == 0) { int i, fd; struct termios foo; extern int login_tty(int); ioctl(0, TIOCNOTTY, NULL); for (i = getdtablesize(); i >= 0; --i) close(i); fd = open("/dev/ttyv3", O_RDWR); ioctl(0, TIOCSCTTY, &fd); dup2(0, 1); dup2(0, 2); DebugFD = 2; if (login_tty(fd) == -1) msgDebug("Doctor: I can't set the controlling terminal.\n"); signal(SIGTTOU, SIG_IGN); if (tcgetattr(fd, &foo) != -1) { foo.c_cc[VERASE] = '\010'; if (tcsetattr(fd, TCSANOW, &foo) == -1) msgDebug("Doctor: I'm unable to set the erase character.\n"); } else msgDebug("Doctor: I'm unable to get the terminal attributes!\n"); execlp("sh", "-sh", 0); msgDebug("Was unable to execute sh for Holographic shell!\n"); exit(1); } else { msgNotify("Starting an emergency holographic shell on VTY4"); sleep(2); } } } Index: stable/2.2/release/sysinstall/uc_main.c =================================================================== --- stable/2.2/release/sysinstall/uc_main.c (revision 40694) +++ stable/2.2/release/sysinstall/uc_main.c (revision 40695) @@ -1,332 +1,333 @@ /*************************************************** * file: userconfig/uc_main.c * * Copyright (c) 1996 Eric L. Hernes (erich@rrnet.com) * 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. The name of the author may not be used to endorse or promote products * derived from this software withough specific prior written permission * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 THE AUTHOR 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. * library functions for userconfig library * - * $Id: uc_main.c,v 1.13.4.5 1998/02/19 02:22:08 jkh Exp $ + * $Id: uc_main.c,v 1.13.4.6 1998/09/29 05:13:53 jkh Exp $ */ #include #include #include #include #include #include #include #include #include #include #include "uc_main.h" #include "sysinstall.h" static struct nlist _nl[] = { {"_isa_devtab_bio"}, {"_isa_devtab_tty"}, {"_isa_devtab_net"}, {"_isa_devtab_null"}, {"_isa_biotab_wdc"}, {"_isa_biotab_fdc"}, {"_eisadriver_set"}, {"_eisa_dev_list"}, {"_pcidevice_set"}, {"_device_list"}, +#ifdef DO_SCSI {"_scbusses"}, -#ifdef USE_SCSI {"_scsi_cinit"}, {"_scsi_dinit"}, {"_scsi_tinit"}, #endif {""}, }; struct kernel * uc_open(char *name){ int kd, flags, incore; struct kernel *kern; struct stat sb; char kname[80]; int size, i = 0; struct nlist *nl = _nl; if (strcmp(name, "-incore") == 0) incore = 1; else incore = 0; if (incore || (strcmp(name,"-bootfile") == 0)) SAFE_STRCPY(kname, getbootfile()); else SAFE_STRCPY(kname, name); if (isDebug()) msgDebug("uc_open: kernel name is %s, incore = %d\n", kname, incore); kern = (struct kernel *)malloc(sizeof(struct kernel)); #ifdef KERN_NO_SYMBOLS if (incore) { FILE *fp; fp = fopen("/stand/symbols", "r"); if (!fp) { msgDebug("Couldn't open /stand/symbols file! Punting.\n"); free(kern); return NULL; } if (fscanf(fp, "%d\n", &size) != 1) { msgDebug("Unable to get # of name list entries from symbol file.\n"); free(kern); return NULL; } else if (isDebug()) msgDebug("uc_open: opened /stand/symbols file, reading %d entries.\n", size); kern->nl = nl = (struct nlist *)malloc((size + 1) * sizeof(struct nlist)); bzero(nl, (size + 1) * sizeof(struct nlist)); for (i = 0; i < size; i++) { char *cp, name[255]; int c1; unsigned int uc1; short d1; unsigned long v1; if (fgets(name, 255, fp) == NULL) { msgDebug("Can't get name field for entry %d\n", i); free(kern); return NULL; } if ((cp = index(name, '\n')) != NULL) *cp = '\0'; nl[i].n_name = strdup(name); if (fscanf(fp, "%u %d %hd %ld\n", &uc1, &c1, &d1, &v1) == 4) { nl[i].n_type = (unsigned char)uc1; nl[i].n_other = (char)c1; nl[i].n_desc = d1; nl[i].n_value = v1; if (isDebug()) msgDebug("uc_open: for entry %d, decoded: \"%s\", %u %d %hd %ld\n", i, nl[i].n_name, nl[i].n_type, nl[i].n_other, nl[i].n_desc, nl[i].n_value); } } nl[i].n_name = ""; fclose(fp); i = 0; } else #endif i = nlist(kname, nl); if (i == -1) { msgDebug("uc_open: kernel %s does not contain symbols.\n", kname); free(kern); return NULL; } #ifdef KERN_NO_SYMBOLS if (!incore) { #else { #endif kern->nl=(struct nlist *)malloc(sizeof(_nl)); bcopy(_nl, kern->nl, sizeof(_nl)); } if (incore) { if (isDebug()) msgDebug("uc_open: attempting to open /dev/kmem for incore.\n"); if ((kd = open("/dev/kmem", O_RDONLY)) < 0) { free(kern); msgDebug("uc_open: Unable to open /dev/kmem.\n"); return NULL; } kern->core = (caddr_t)NULL; kern->incore = 1; kern->size = 0; } else { if (stat(kname, &sb) < 0) { free(kern); msgDebug("uc_open: Unable to stat %s.\n", kname); return NULL; } kern->size = sb.st_size; flags = sb.st_flags; if (chflags(kname, 0) < 0) { free(kern); msgDebug("uc_open: Unable to chflags %s.\n", kname); return NULL; } if (isDebug()) msgDebug("uc_open: attempting to open %s\n", kname); if ((kd = open(kname, O_RDWR, 0644)) < 0) { free(kern); msgDebug("uc_open: Unable to open %s.\n", kname); return NULL; } fchflags(kd, flags); if (isDebug()) msgDebug("uc_open: attempting to mmap %d bytes\n", sb.st_size); kern->core = mmap((caddr_t)0, sb.st_size, PROT_READ | PROT_WRITE, MAP_SHARED, kd, 0); kern->incore = 0; if (kern->core == MAP_FAILED) { free(kern); msgDebug("uc_open: Unable to mmap from %s.\n", kname); return NULL; } } kern->fd = kd; get_isa_info(kern); if (isDebug()) msgDebug("uc_open: got isa information\n"); get_pci_info(kern); if (isDebug()) msgDebug("uc_open: got pci information\n"); get_eisa_info(kern); if (isDebug()) msgDebug("uc_open: got eisa information\n"); -#ifdef USE_SCSI +#ifdef DO_SCSI get_scsi_info(kern); if (isDebug()) msgDebug("uc_open: got scsi information\n"); #else kern->scsi_devp=(struct uc_scsi*)NULL; kern->scsibus_devp=(struct uc_scsibus*)NULL; #endif return kern; } int uc_close(struct kernel *kern, int writeback) { if (kern->isa_devp) isa_free(kern, writeback); if (kern->eisa_devp) eisa_free(kern, writeback); /* `writeback' isn't really useful here */ if (kern->pci_devp) pci_free(kern, writeback); /* or here */ -#ifdef USE_SCSI +#ifdef DO_SCSI if (kern->scsi_devp) scsi_free(kern, writeback); #endif if (!kern->incore) munmap(kern->core, kern->size); close(kern->fd); free(kern->nl); free(kern); return 0; } struct list * uc_getdev(struct kernel *kern, char *dev) { struct list *list = (struct list *)0; if (*dev == '-') { /* asked for -isa, -eisa, -pci, -scsi, -all */ if (strcmp(dev, "-all") == 0) { list = list_new(); if (kern->isa_devp) list_append(list, "isa"); if (kern->eisa_devp) list_append(list, "eisa"); if (kern->pci_devp) list_append(list, "pci"); -#ifdef USE_SCSI +#ifdef DO_SCSI if (kern->scsi_devp) list_append(list, "scsi"); #endif } else if (strcmp(dev, "-isa") == 0) list = get_isa_devlist(kern); else if (strcmp(dev, "-eisa") == 0) list = get_eisa_devlist(kern); else if (strcmp(dev, "-pci") == 0) list = get_pci_devlist(kern); -#ifdef USE_SCSI +#ifdef DO_SCSI else if (strcmp(dev, "-scsi") == 0) list = get_scsi_devlist(kern); #endif } else { /* we gotta figure out which real device to report */ struct uc_isa *ip; - struct uc_scsi *sp; struct uc_pci *pp; struct uc_eisa *ep; if (kern->isa_devp) { for (ip = kern->isa_devp; ip->device; ip++) { if (strcmp(dev, ip->device) == 0) { list = get_isa_device(ip); goto end; } } } -#ifdef USE_SCSI +#ifdef DO_SCSI if (kern->scsi_devp) { + struct uc_scsi *sp; + for (sp = kern->scsi_devp; sp->device; sp++) { if (strcmp(dev, sp->device) == 0) { list = get_scsi_device(sp); goto end; } } } #endif if (kern->pci_devp) { for(pp = kern->pci_devp; pp->device; pp++) { if (strcmp(dev, pp->device) == 0) { list = get_pci_device(pp); goto end; } } } if (kern->eisa_devp) { for (ep = kern->eisa_devp; ep->device; ep++) { if (strcmp(dev, ep->device) == 0) { list = get_eisa_device(ep); goto end; } } } } end: return(list); }