diff options
author | jkh <jkh@FreeBSD.org> | 1995-05-08 10:20:56 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 1995-05-08 10:20:56 +0000 |
commit | 46ed9b1d828ba9ba410293e2e0778286875ee556 (patch) | |
tree | f464a30d135b2a1c165fb2510445e14a8b1e406a | |
parent | 6aa33920ccc9c52c3c16505023626b26f7fd8988 (diff) | |
download | FreeBSD-src-46ed9b1d828ba9ba410293e2e0778286875ee556.zip FreeBSD-src-46ed9b1d828ba9ba410293e2e0778286875ee556.tar.gz |
Perform a much needed tidying-up pass over this code. Sleep for now,
more tomorrow.
-rw-r--r-- | release/sysinstall/devices.c | 4 | ||||
-rw-r--r-- | release/sysinstall/disks.c | 50 | ||||
-rw-r--r-- | release/sysinstall/install.c | 51 | ||||
-rw-r--r-- | release/sysinstall/menus.c | 357 | ||||
-rw-r--r-- | release/sysinstall/sysinstall.h | 144 | ||||
-rw-r--r-- | usr.sbin/sade/devices.c | 4 | ||||
-rw-r--r-- | usr.sbin/sade/disks.c | 50 | ||||
-rw-r--r-- | usr.sbin/sade/install.c | 51 | ||||
-rw-r--r-- | usr.sbin/sade/menus.c | 357 | ||||
-rw-r--r-- | usr.sbin/sade/sade.h | 144 | ||||
-rw-r--r-- | usr.sbin/sysinstall/devices.c | 4 | ||||
-rw-r--r-- | usr.sbin/sysinstall/disks.c | 50 | ||||
-rw-r--r-- | usr.sbin/sysinstall/install.c | 51 | ||||
-rw-r--r-- | usr.sbin/sysinstall/menus.c | 357 | ||||
-rw-r--r-- | usr.sbin/sysinstall/sysinstall.h | 144 |
15 files changed, 1041 insertions, 777 deletions
diff --git a/release/sysinstall/devices.c b/release/sysinstall/devices.c index 1b45290..a087fdf 100644 --- a/release/sysinstall/devices.c +++ b/release/sysinstall/devices.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: devices.c,v 1.9 1995/05/07 22:07:50 jkh Exp $ + * $Id: devices.c,v 1.10 1995/05/08 01:27:06 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -48,7 +48,7 @@ #define CHUNK_START_ROW 5 /* Get all device information for a given device class */ -Device * +static Device * device_get_all(DeviceType which, int *ndevs) { char **names; diff --git a/release/sysinstall/disks.c b/release/sysinstall/disks.c index d29ba6f..6ed5938 100644 --- a/release/sysinstall/disks.c +++ b/release/sysinstall/disks.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: disks.c,v 1.10 1995/05/08 00:56:28 jkh Exp $ + * $Id: disks.c,v 1.11 1995/05/08 01:27:07 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -151,29 +151,29 @@ space_free(struct chunk *c) } static void -record_fbsd_chunks(struct disk **disks) +record_fbsd_chunks() { int i, j, p; struct chunk *c1, *c2; j = p = 0; - for (i = 0; disks[i]; i++) { - if (!disks[i]->chunks) - msgFatal("No chunk list found for %s!", disks[i]->name); + for (i = 0; Disks[i]; i++) { + if (!Disks[i]->chunks) + msgFatal("No chunk list found for %s!", Disks[i]->name); /* Put the freebsd chunks first */ - for (c1 = disks[i]->chunks->part; c1; c1 = c1->next) { + for (c1 = Disks[i]->chunks->part; c1; c1 = c1->next) { if (c1->type == freebsd) { fbsd_chunk_info[j].type = PART_SLICE; - fbsd_chunk_info[j].d = disks[i]; + fbsd_chunk_info[j].d = Disks[i]; fbsd_chunk_info[j].c = c1; ++j; } } } - for (i = 0; disks[i]; i++) { + for (i = 0; Disks[i]; i++) { /* Then buzz through and pick up the partitions */ - for (c1 = disks[i]->chunks->part; c1; c1 = c1->next) { + for (c1 = Disks[i]->chunks->part; c1; c1 = c1->next) { if (c1->type == freebsd) { for (c2 = c1->part; c2; c2 = c2->next) { if (c2->type == part) { @@ -181,7 +181,7 @@ record_fbsd_chunks(struct disk **disks) fbsd_chunk_info[j].type = PART_SWAP; else fbsd_chunk_info[j].type = PART_FILESYSTEM; - fbsd_chunk_info[j].d = disks[i]; + fbsd_chunk_info[j].d = Disks[i]; fbsd_chunk_info[j].c = c2; ++j; } @@ -393,7 +393,7 @@ print_command_summary() } void -partition_disks(struct disk **disks) +partition_disks(void) { int sz, key = 0; Boolean partitioning; @@ -404,7 +404,7 @@ partition_disks(struct disk **disks) dialog_clear(); partitioning = TRUE; keypad(stdscr, TRUE); - record_fbsd_chunks(disks); + record_fbsd_chunks(); while (partitioning) { clear(); @@ -495,7 +495,7 @@ partition_disks(struct disk **disks) else { tmp->private = p; tmp->private_free = safe_free; - record_fbsd_chunks(disks); + record_fbsd_chunks(); } } } @@ -508,7 +508,7 @@ partition_disks(struct disk **disks) } Delete_Chunk(fbsd_chunk_info[current_chunk].d, fbsd_chunk_info[current_chunk].c); - record_fbsd_chunks(disks); + record_fbsd_chunks(); break; case 'M': /* mount */ @@ -525,7 +525,7 @@ partition_disks(struct disk **disks) p = get_mountpoint(fbsd_chunk_info[current_chunk].c); if (p) { p->newfs = FALSE; - record_fbsd_chunks(disks); + record_fbsd_chunks(); } break; @@ -558,12 +558,12 @@ partition_disks(struct disk **disks) dialog_clear(); end_dialog(); DialogActive = FALSE; - for (i = 0; disks[i]; i++) - slice_wizard(disks[i]); + for (i = 0; Disks[i]; i++) + slice_wizard(Disks[i]); clear(); dialog_clear(); DialogActive = TRUE; - record_fbsd_chunks(disks); + record_fbsd_chunks(); } else msg = "A most prudent choice!"; @@ -582,27 +582,27 @@ partition_disks(struct disk **disks) } int -write_disks(struct disk **disks) +write_disks(void) { int i; extern u_char boot1[], boot2[]; extern u_char mbr[], bteasy17[]; dialog_clear(); - for (i = 0; disks[i]; i++) { - if (contains_root_partition(disks[i])) - Set_Boot_Blocks(disks[i], boot1, boot2); + for (i = 0; Disks[i]; i++) { + if (contains_root_partition(Disks[i])) + Set_Boot_Blocks(Disks[i], boot1, boot2); dialog_clear(); if (i == 0 && !msgYesNo("Would you like to install a boot manager?\n\nThis will allow you to easily select between other operating systems\non the first disk, or boot from a disk other than the first.")) - Set_Boot_Mgr(disks[i], bteasy17); + Set_Boot_Mgr(Disks[i], bteasy17); else { dialog_clear(); if (i == 0 && !msgYesNo("Would you like to remove an existing boot manager?")) - Set_Boot_Mgr(disks[i], mbr); + Set_Boot_Mgr(Disks[i], mbr); } dialog_clear(); if (!msgYesNo("Last Chance! Are you sure you want to write out\nall these changes to disk?")) { - Write_Disk(disks[i]); + /* Write_Disk(Disks[i]); */ return 0; } } diff --git a/release/sysinstall/install.c b/release/sysinstall/install.c index 8f1ad5e..ab68f1e 100644 --- a/release/sysinstall/install.c +++ b/release/sysinstall/install.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: install.c,v 1.10 1995/05/07 23:37:33 jkh Exp $ + * $Id: install.c,v 1.11 1995/05/08 06:06:25 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -48,12 +48,13 @@ #include <unistd.h> Boolean SystemWasInstalled; +struct disk *Disks[100]; /* some ridiculously large number */ static int installHook(char *str) { int i; - struct disk *disks[100]; /* some ridiculously large number */ + extern DMenu MenuInstall; i = 0; /* Clip garbage off the ends */ @@ -70,37 +71,41 @@ installHook(char *str) beep(); return 0; } - disks[i] = Open_Disk(str); - if (!disks[i]) + Disks[i] = Open_Disk(str); + if (!Disks[i]) msgFatal("Unable to open disk %s!", str); ++i; str = cp; } - disks[i] = NULL; + Disks[i] = NULL; if (!i) return 0; while (1) { /* Now go set up all the MBR partition information */ - for (i = 0; disks[i]; i++) - disks[i] = device_slice_disk(disks[i]); + for (i = 0; Disks[i]; i++) + Disks[i] = device_slice_disk(Disks[i]); - partition_disks(disks); + partition_disks(); - if (!write_disks(disks)) { - make_filesystems(disks); + if (!write_disks()) { + int scroll, choice, curr, max; + + make_filesystems(); + scroll = choice = curr = max = 0; + dmenuOpen(&MenuInstall, &choice, &scroll, &curr, &max); cpio_extract(); - extract_dists(disks); - install_configuration_files(disks); - do_final_setup(disks); + extract_dists(); + install_configuration_files(); + do_final_setup(); SystemWasInstalled = TRUE; break; } else { dialog_clear(); if (msgYesNo("Would you like to go back to the Master Partition Editor?")) { - for (i = 0; disks[i]; i++) - Free_Disk(disks[i]); + for (i = 0; Disks[i]; i++) + Free_Disk(Disks[i]); break; } } @@ -155,17 +160,17 @@ installMaint(char *str) /* Go newfs and/or mount all the filesystems we've been asked to */ void -make_filesystems(struct disk **disks) +make_filesystems(void) { int i; command_clear(); - for (i = 0; disks[i]; i++) { + for (i = 0; Disks[i]; i++) { struct chunk *c1; - if (!disks[i]->chunks) - msgFatal("No chunk list found for %s!", disks[i]->name); - c1 = disks[i]->chunks->part; + if (!Disks[i]->chunks) + msgFatal("No chunk list found for %s!", Disks[i]->name); + c1 = Disks[i]->chunks->part; while (c1) { if (c1->type == freebsd) { struct chunk *c2 = c1->part; @@ -238,17 +243,17 @@ cpio_extract(void) } void -extract_dists(struct disk **disks) +extract_dists(void) { } void -install_configuration_files(struct disk **disks) +install_configuration_files(void) { } void -do_final_setup(struct disk **disks) +do_final_setup(void) { } diff --git a/release/sysinstall/menus.c b/release/sysinstall/menus.c index aa55d40..57dd0ab 100644 --- a/release/sysinstall/menus.c +++ b/release/sysinstall/menus.c @@ -4,13 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * -<<<<<<< menus.c - * $Id: menus.c,v 1.5 1995/05/04 03:51:19 jkh Exp $ -||||||| 1.7 - * $Id: menus.c,v 1.6 1995/05/04 19:48:14 jkh Exp $ -======= - * $Id: menus.c,v 1.7 1995/05/04 23:36:20 jkh Exp $ ->>>>>>> /tmp/T4000279 + * $Id: menus.c,v 1.8 1995/05/05 23:47:43 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -74,38 +68,38 @@ first character of the option name you're interested in. Invoke an\n\ option by pressing enter. If you'd like a shell, press ESC", /* prompt */ "Press F1 for usage instructions", /* help line */ "usage.hlp", /* help file */ - { { "Usage", "Quick start - How to use this menu system.", /* U */ - DMENU_DISPLAY_FILE, (void *)"usage.hlp", 0 }, - { "Doc", "More detailed documentation on FreeBSD.", /* D */ - DMENU_SUBMENU, (void *)&MenuDocumentation, 0 }, - { "Lang", "Select natural language options.", /* L */ - DMENU_SUBMENU, (void *)&MenuLanguage, 0 }, - { "Install", "Begin installation", /* I */ - DMENU_CALL, (void *)installCustom, 0 }, - { NULL } }, +{ { "Usage", "Quick start - How to use this menu system.", /* U */ + DMENU_DISPLAY_FILE, (void *)"usage.hlp", 0 }, + { "Doc", "More detailed documentation on FreeBSD.", /* D */ + DMENU_SUBMENU, (void *)&MenuDocumentation, 0 }, + { "Lang", "Select natural language options.", /* L */ + DMENU_SUBMENU, (void *)&MenuLanguage, 0 }, + { "Install", "Begin installation", /* I */ + DMENU_CALL, (void *)installCustom, 0 }, + { NULL } }, }; /* The main documentation menu */ DMenu MenuDocumentation = { - DMENU_NORMAL_TYPE, - "Documentation for FreeBSD 2.0.5", /* Title */ - "If you are at all unsure about the configuration of your hardware\n\ +DMENU_NORMAL_TYPE, +"Documentation for FreeBSD 2.0.5", /* Title */ +"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. If you're having other problems, you may find\n\ answers in the FAQ.", - "Confused? Press F1 for help.", - "usage.hlp", /* help file */ - { { "README", "Read this for a general description of FreeBSD", /* R */ - DMENU_DISPLAY_FILE, (void *)"readme.hlp", 0 }, - { "Hardware", "The FreeBSD survival guide for PC hardware.", /* H */ - DMENU_DISPLAY_FILE, (void *)"hardware.hlp", 0 }, - { "Install", "A step-by-step guide to installing FreeBSD.", /* I */ - DMENU_DISPLAY_FILE, (void *)"install.hlp", 0 }, - { "FAQ", "Frequently Asked Questions about FreeBSD.", /* F */ - DMENU_DISPLAY_FILE, (void *)"faq.hlp", 0 }, - { NULL } }, +"Confused? Press F1 for help.", +"usage.hlp", /* help file */ +{ { "README", "Read this for a general description of FreeBSD", /* R */ + DMENU_DISPLAY_FILE, (void *)"readme.hlp", 0 }, + { "Hardware", "The FreeBSD survival guide for PC hardware.", /* H */ + DMENU_DISPLAY_FILE, (void *)"hardware.hlp", 0 }, + { "Install", "A step-by-step guide to installing FreeBSD.", /* I */ + DMENU_DISPLAY_FILE, (void *)"install.hlp", 0 }, + { "FAQ", "Frequently Asked Questions about FreeBSD.", /* F */ + DMENU_DISPLAY_FILE, (void *)"faq.hlp", 0 }, + { NULL } }, }; /* The language selection menu */ @@ -115,170 +109,261 @@ answers in the FAQ.", * otherwise off. */ DMenu MenuLanguage = { - DMENU_RADIO_TYPE | DMENU_SELECTION_RETURNS, - "Natural language selection", /* title */ - "Please specify the language you'd like to use by default.\n\n\ +DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS, +"Natural language selection", /* title */ +"Please specify the language you'd like to use by default.\n\n\ While almost all of the system's documentation is still written\n\ in english (and may never be translated), there are a few guides\n\ and types of system documentation that may be written in your\n\ preferred language. When such are found, they will be used instead\n\ of the english versions.", /* prompt */ - "Press F1 for more information", /* help line */ - "language.hlp", /* help file */ - { { "Danish", "Danish language and character set (ISO-8859-1)", /* D */ - DMENU_CALL, (void *)lang_set_Danish, 0 }, - { "Dutch", "Dutch language and character set (ISO-8859-1)", /* D */ - DMENU_CALL, (void *)lang_set_Dutch, 0 }, - { "*English", "English language (system default)", /* E */ - DMENU_CALL, (void *)lang_set_English, 0 }, - { "French", "French language and character set (ISO-8859-1)", /* F */ - DMENU_CALL, (void *)lang_set_French, 0 }, - { "German", "German language and character set (ISO-8859-1)", /* G */ - DMENU_CALL, (void *)lang_set_German, 0 }, - { "Italian", "Italian language and character set (ISO-8859-1)", /* I */ - DMENU_CALL, (void *)lang_set_Italian, 0 }, - { "Japanese", "Japanese language and default character set (romaji)",/* J */ - DMENU_CALL, (void *)lang_set_Japanese, 0 }, - { "Norwegian", "Norwegian language and character set (ISO-8859-1)", /* N */ - DMENU_CALL, (void *)lang_set_Norwegian, 0 }, - { "Russian", "Russian language and character set (cp866-8x14)", /* R */ - DMENU_CALL, (void *)lang_set_Russian, 0 }, - { "Spanish", "Spanish language and character set (ISO-8859-1)", /* S */ - DMENU_CALL, (void *)lang_set_Spanish, 0 }, - { "Swedish", "Swedish language and character set (ISO-8859-1)", /* S */ - DMENU_CALL, (void *)lang_set_Swedish, 0 }, - { NULL } }, +"Press F1 for more information", /* help line */ +"language.hlp", /* help file */ +{ { "Danish", "Danish language and character set (ISO-8859-1)", /* D */ + DMENU_CALL, (void *)lang_set_Danish, 0 }, + { "Dutch", "Dutch language and character set (ISO-8859-1)", /* D */ + DMENU_CALL, (void *)lang_set_Dutch, 0 }, + { "English", "English language (system default)", /* E */ + DMENU_CALL, (void *)lang_set_English, 0 }, + { "French", "French language and character set (ISO-8859-1)", /* F */ + DMENU_CALL, (void *)lang_set_French, 0 }, + { "German", "German language and character set (ISO-8859-1)", /* G */ + DMENU_CALL, (void *)lang_set_German, 0 }, + { "Italian", "Italian language and character set (ISO-8859-1)", /* I */ + DMENU_CALL, (void *)lang_set_Italian, 0 }, + { "Japanese", "Japanese language and default character set (romaji)",/* J */ + DMENU_CALL, (void *)lang_set_Japanese, 0 }, + { "Norwegian", "Norwegian language and character set (ISO-8859-1)", /* N */ + DMENU_CALL, (void *)lang_set_Norwegian, 0 }, + { "Russian", "Russian language and character set (cp866-8x14)", /* R */ + DMENU_CALL, (void *)lang_set_Russian, 0 }, + { "Spanish", "Spanish language and character set (ISO-8859-1)", /* S */ + DMENU_CALL, (void *)lang_set_Spanish, 0 }, + { "Swedish", "Swedish language and character set (ISO-8859-1)", /* S */ + DMENU_CALL, (void *)lang_set_Swedish, 0 }, + { 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 2.0.5 distribution. If you're seeing this menu, it's because\n\ +your CDROM drive was not properly auto-detected, or you did not launch\n\ +this installation from the CD under DOS or Windows. If you think you're\n\ +seeing this dialog in error, you may wish to reboot FreeBSD with the\n\ +-c boot flag (.. boot: /kernel -c) and check that your hardware and\n +the kernel agree on reasonable values.", +"Press F1 for more information on CDROM support", +"media_cdrom.hlp", +{ { "Matsushita", "Panasonic \"Sound Blaster\" CDROM.", + DMENU_SET_VARIABLE, (void *)"mediaDevice=/dev/matcd0a", 0 }, + { "Mitsumi", "Mitsumi FX-001 series drive (not IDE)", + DMENU_SET_VARIABLE, (void *)"mediaDevice=/dev/mcd0a", 0 }, + { "SCSI", "SCSI CDROM drive attached to supported SCSI controller", + DMENU_SET_VARIABLE, (void *)"mediaDevice=/dev/cd0a", 0 }, + { "Sony", "Sony CDU31/33A or compatible CDROM drive", + DMENU_SET_VARIABLE, (void *)"mediaDevice=/dev/scd0a", 0 }, + { NULL } }, +}; + +DMenu MenuMediaFTP = { +DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS, +"Please specify an FTP site", +"FreeBSD is distributed from a number of sites on the Internet.\n\ +Please select the site closest to you or \"other\" if you'd like\n\ +to specify another choice. Also note that not all sites carry\n\ +every possible distribution! Distributions other than the basic\n\ +binary set are only guaranteed to be available from the Primary site.\n\ +If the first site selected doesn't respond, try one of the alternates.", +"Select a site that's close!", +"media_ftp.hlp", +{ { "Primary", "ftp.freebsd.org", + DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://ftp.freebsd.org/pub/FreeBSD/2.0.5-ALPHA", 0 }, + { "Secondary", "freefall.cdrom.com", + DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://freefall.cdrom.com/pub/FreeBSD/2.0.5-ALPHA", 0 }, + { "Australia", "ftp.physics.usyd.edu.au", + DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://ftp.physics.usyd.edu.au/FreeBSD/2.0.5-ALPHA", 0 }, + { "Finland", "nic.funet.fi", + DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://nic.funet.fi/pub/unix/FreeBSD/2.0.5-ALPHA", 0 }, + { "France", "ftp.ibp.fr", + DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://ftp.ibp.fr/pub/FreeBSD/2.0.5-ALPHA", 0 }, + { "Germany", "ftp.uni-duisburg.de", + DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://ftp.uni-duisburg.de/pub/unix/FreeBSD/2.0.5-ALPHA", 0 }, + { "Israel", "orgchem.weizmann.ac.il", + DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://orgchem.weizmann.ac.il/pub/FreeBSD-2.0.5-ALPHA", 0 }, + { "Japan", "ftp.sra.co.jp", + DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://ftp.sra.co.jp/pub/os/FreeBSD/distribution/2.0.5-ALPHA", 0 }, + { "Japan-2", "ftp.mei.co.jp", + DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://ftp.mei.co.jp/free/PC-UNIX/FreeBSD/2.0.5-ALPHA", 0 }, + { "Japan-3", "ftp.waseda.ac.jp", + DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://ftp.waseda.ac.jp/pub/FreeBSD/2.0.5-ALPHA", 0 }, + { "Japan-4", "ftp.pu-toyama.ac.jp", + DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://ftp.pu-toyama.ac.jp/pub/FreeBSD/2.0.5-ALPHA", 0 }, + { "Japan-5", "ftpsv1.u-aizu.ac.jp", + DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://ftpsv1.u-aizu.ac.jp/pub/os/FreeBSD/2.0.5-ALPHA", 0 }, + { "Japan-6", "tutserver.tutcc.tut.ac.jp", + DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://tutserver.tutcc.tut.ac.jp/FreeBSD/FreeBSD-2.0.5-ALPHA", 0 }, + { "Japan-7", "ftp.ee.uec.ac.jp", + DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://ftp.ee.uec.ac.jp/pub/os/FreeBSD.other/FreeBSD-2.0.5-ALPHA", 0 }, + { "Korea", "ftp.cau.ac.kr", + DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://ftp.cau.ac.kr/pub/FreeBSD/2.0.5-ALPHA", 0 }, + { "Netherlands", "ftp.nl.net", + DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://ftp.nl.net/pub/os/FreeBSD/2.0.5-ALPHA", 0 }, + { "Russia", "ftp.kiae.su", + DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://ftp.kiae.su/FreeBSD/2.0.5-ALPHA", 0 }, + { "Sweden", "ftp.luth.se", + DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://ftp.luth.se/pub/FreeBSD/2.0.5-ALPHA", 0 }, + { "Taiwan", "netbsd.csie.nctu.edu.tw", + DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://netbsd.csie.nctu.edu.tw/pub/FreeBSD/2.0.5-ALPHA", 0 }, + { "Thailand", "ftp.nectec.or.th", + DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://ftp.nectec.or.th/pub/FreeBSD/2.0.5-ALPHA", 0 }, + { "UK", "ftp.demon.co.uk", + DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://ftp.demon.co.uk/pub/BSD/FreeBSD/2.0.5-ALPHA", 0 }, + { "UK-2", "src.doc.ic.ac.uk", + DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://src.doc.ic.ac.uk/packages/unix/FreeBSD/2.0.5-ALPHA", 0 }, + { "UK-3", "unix.hensa.ac.uk", + DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://unix.hensa.ac.uk/pub/walnut.creek/FreeBSD/2.0.5-ALPHA", 0 }, + { "USA", "ref.tfs.com", + DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://ref.tfs.com/pub/FreeBSD/2.0.5-ALPHA", 0 }, + { "USA-2", "ftp.dataplex.net", + DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://ftp.dataplex.net/pub/FreeBSD/2.0.5-ALPHA", 0 }, + { "USA-3", "kryten.atinc.com", + DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://kryten.atinc.com/pub/FreeBSD/2.0.5-ALPHA", 0 }, + { "USA-4", "ftp.neosoft.com", + DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://ftp.neosoft.com/systems/FreeBSD/2.0.5-ALPHA", 0 }, + { NULL } } }; /* The media selection menu */ DMenu MenuMedia = { - DMENU_NORMAL_TYPE, - "Choose Installation Media", - "FreeBSD can be installed from a variety of different installation\n\ +DMENU_NORMAL_TYPE, +"Choose Installation Media", +"FreeBSD can be installed from a variety of different installation\n\ media, ranging from floppies to the Internet. If you're installing\n\ FreeBSD from a supported CDROM drive then this is generally the best\n\ method to use unless you have some overriding reason for using another\n\ method. Please also note that the DES distribution is NOT available on \n\ CDROM due to U.S. export restrictions.", - "Press F1 for more information on the various media types", - "media.hlp", - { { "CDROM", "Install from a FreeBSD CDROM", - DMENU_CALL, (void *)mediaSetCDROM, 0 }, - { "FLOPPY", "Install from a floppy disk set", - DMENU_CALL, (void *)mediaSetFloppy, 0 }, - { "DOS", "Install from a DOS partition", - DMENU_CALL, (void *)mediaSetDOS, 0 }, - { "TAPE", "Install from SCSI or QIC tape", - DMENU_CALL, (void *)mediaSetTape, 0 }, - { "FTP", "Install from an Internet FTP server", - DMENU_CALL, (void *)mediaSetFTP, 0 }, - { "FILESYSTEM", "Install from a UFS or NFS mounted distribution", - DMENU_CALL, (void *)mediaSetFS, 0 }, - { NULL } }, +"Press F1 for more information on the various media types", +"media.hlp", +{ { "CDROM", "Install from a FreeBSD CDROM", + DMENU_CALL, (void *)mediaSetCDROM, 0 }, + { "FLOPPY", "Install from a floppy disk set", + DMENU_CALL, (void *)mediaSetFloppy, 0 }, + { "DOS", "Install from a DOS partition", + DMENU_CALL, (void *)mediaSetDOS, 0 }, + { "TAPE", "Install from SCSI or QIC tape", + DMENU_CALL, (void *)mediaSetTape, 0 }, + { "FTP", "Install from an Internet FTP server", + DMENU_CALL, (void *)mediaSetFTP, 0 }, + { "FILESYSTEM", "Install from a UFS or NFS mounted distribution", + DMENU_CALL, (void *)mediaSetFS, 0 }, + { NULL } }, }; /* The installation type menu */ DMenu MenuInstallType = { - DMENU_NORMAL_TYPE, - "Choose Installation Type", - "As a convenience, we provide several `canned' installation types. \ +DMENU_NORMAL_TYPE, +"Choose Installation Type", +"As a convenience, we provide several `canned' installation types. \ These pick what we consider to be the most reasonable defaults for the \ type of system in question. If you would prefer to pick and choose \ the list of distributions yourself, simply select `custom'.", - "Press F1 for more information on the various distributions", - "dist_types.hlp", - { { "Developer", "Includes full sources, binaries and doc but no games.", +"Press F1 for more information on the various distributions", +"dist_types.hlp", +{ { "Developer", "Includes full sources, binaries and doc but no games.", DMENU_CALL, (void *)distSetDeveloper, 0 }, - { "X-Developer", "Same as above, but includes XFree86.", + { "X-Developer", "Same as above, but includes XFree86.", DMENU_CALL, (void *)distSetXDeveloper, 0 }, - { "User", "General user. Binaries and doc but no sources.", + { "User", "General user. Binaries and doc but no sources.", DMENU_CALL, (void *)distSetUser, 0 }, - { "X-User", "Same as above, but includes XFree86.", + { "X-User", "Same as above, but includes XFree86.", DMENU_CALL, (void *)distSetXUser, 0 }, - { "Minimal", "The smallest configuration possible.", + { "Minimal", "The smallest configuration possible.", DMENU_CALL, (void *)distSetMinimum, 0 }, - { "Everything", "The entire source and binary distribution.", + { "Everything", "The entire source and binary distribution.", DMENU_CALL, (void *)distSetEverything, 0 }, - { "Custom", "Specify your own distribution set", + { "Custom", "Specify your own distribution set", DMENU_SUBMENU, (void *)&MenuDistributions, 0 }, - { NULL } }, + { NULL } }, }; DMenu MenuDistributions = { - DMENU_MULTIPLE_TYPE, - "Select the distributions you wish to install.", - "Please check off the distributions you wish to install.", - "Press F1 for a more complete description of these distributions.", - "distribution_types.hlp", - { { "*bin", "Binary base distribution (required)", +DMENU_MULTIPLE_TYPE, +"Select the distributions you wish to install.", +"Please check off the distributions you wish to install.", +"Press F1 for a more complete description of these distributions.", +"distribution_types.hlp", +{ { "*bin", "Binary base distribution (required)", DMENU_NOP, NULL, 0 }, - { "commercial", "Commercial demos and shareware", + { "commercial", "Commercial demos and shareware", DMENU_NOP, NULL, 0 }, - { "compat1x", "FreeBSD 1.x binary compatability package", + { "compat1x", "FreeBSD 1.x binary compatability package", DMENU_NOP, NULL, 0 }, - { "DES", "DES encryption code and sources", + { "DES", "DES encryption code and sources", DMENU_NOP, NULL, 0 }, - { "dict", "Spelling checker disctionary files", + { "dict", "Spelling checker disctionary files", DMENU_NOP, NULL, 0 }, - { "games", "Games and other amusements (non-commercial)", + { "games", "Games and other amusements (non-commercial)", DMENU_NOP, NULL, 0 }, - { "info", "GNU info files", + { "info", "GNU info files", DMENU_NOP, NULL, 0 }, - { "man", "System manual pages - strongly recommended", + { "man", "System manual pages - strongly recommended", DMENU_NOP, NULL, 0 }, - { "proflibs", "Profiled versions of the libraries", + { "proflibs", "Profiled versions of the libraries", DMENU_NOP, NULL, 0 }, - { "src", "Sources for everything but DES", + { "src", "Sources for everything but DES", DMENU_NOP, NULL, 0 }, - { "XFree86", "The XFree86 3.1.1 distribution", + { "XFree86", "The XFree86 3.1.1 distribution", DMENU_NOP, NULL, 0 }, - { NULL } }, -}; - -/* The installation options menu */ -DMenu MenuInstallOptions = { - DMENU_NORMAL_TYPE, - "Choose Installation Options", - "blah blah", - NULL, - NULL, - { { NULL } }, + { NULL } }, }; DMenu MenuDiskDevices = { - DMENU_MULTIPLE_TYPE, - "Select Drive(s)", - "Please select the drive, or drives, on which you wish to install\n\ +DMENU_MULTIPLE_TYPE, +"Select Drive(s)", +"Please select the drive, or drives, on which you wish to install\n\ FreeBSD. You need to select at least one drive containing some free\n\ space, though FreeBSD can be installed across several drives if you do\n\ not have the required space on a single drive. If you wish to boot\n\ off a drive that's not a `zero drive', or have multiple operating\n\ systems on your machine, you will have the option to install a boot\n\ manager later.", - "Press F1 for more information on what you see here.", - "drives.hlp", - { { NULL } }, +"Press F1 for more information on what you see here.", +"drives.hlp", +{ { NULL } }, +}; + +/* The installation options menu */ +DMenu MenuInstallOptions = { +DMENU_NORMAL_TYPE, +"Choose Installation Options", +"blah blah", +NULL, +NULL, +{ { NULL } }, }; /* The main installation menu */ DMenu MenuInstall = { - DMENU_NORMAL_TYPE, - "Choose Installation Options", /* title */ - "Before installation can continue, you need to specify a few items\n\ +DMENU_NORMAL_TYPE, +"Choose Installation Options", /* title */ +"Before installation can continue, you need to specify a few items\n\ of information regarding the location of the distribution and the kind\n\ of installation you want to have (and where). There are also a number\n\ of options you can specify in the Options menu. If you do not wish to\n\ install FreeBSD at this time, you may select Cancel to leave this menu", - "You may wish to read the install guide - press F1 to do so", - "install.hlp", - { { "Media", "Choose Installation media type", /* M */ - DMENU_SUBMENU, (void *)&MenuMedia, 0 }, - { "Type", "Choose the type of installation you want", /* T */ - DMENU_SUBMENU, (void *)&MenuInstallType, 0 }, - { "Options", "Specify installation options", /* O */ - DMENU_SUBMENU, (void *)&MenuInstallOptions, 0 }, - { "Proceed", "Proceed with installation", /* P */ - DMENU_CANCEL, (void *)NULL, 0 }, - { NULL } }, +"You may also wish to read the install guide - press F1 to do so", +"install.hlp", +{ { "Media", "Choose Installation media type", /* M */ + DMENU_SUBMENU, (void *)&MenuMedia, 0 }, + { "Type", "Choose the type of installation you want", /* T */ + DMENU_SUBMENU, (void *)&MenuInstallType, 0 }, + { "Options", "Specify installation options", /* O */ + DMENU_SUBMENU, (void *)&MenuInstallOptions, 0 }, + { "Proceed", "Proceed with installation", /* P */ + DMENU_CANCEL, (void *)NULL, 0 }, + { NULL } }, }; diff --git a/release/sysinstall/sysinstall.h b/release/sysinstall/sysinstall.h index fad3398..f9e3ec7 100644 --- a/release/sysinstall/sysinstall.h +++ b/release/sysinstall/sysinstall.h @@ -4,7 +4,7 @@ * 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.11 1995/05/07 23:37:34 jkh Exp $ + * $Id: sysinstall.h,v 1.12 1995/05/08 06:06:28 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -199,7 +199,7 @@ extern Boolean OnVTY; /* On a syscons VTY? */ extern Variable *VarHead; /* The head of the variable chain */ extern unsigned int Dists; /* Which distributions we want */ extern unsigned int SrcDists; /* Which src distributions we want */ - +extern struct disk *Disks[]; /* The disks we're working on */ /*** Prototypes ***/ @@ -209,13 +209,18 @@ extern void command_sort(void); extern void command_execute(void); extern void command_add(char *key, char *fmt, ...); -/* globals.c */ -extern void globalsInit(void); +/* devices.c */ +extern struct disk *device_slice_disk(struct disk *d); +extern DMenu *device_create_disk_menu(DMenu *menu, Device **rdevs, int (*hook)()); -/* install.c */ -extern int installCustom(char *str); -extern int installExpress(char *str); -extern int installMaint(char *str); +/* disks.c */ +extern void partition_disks(void); +extern int write_disks(void); +extern void make_filesystems(void); +extern void cpio_extract(void); +extern void extract_dists(void); +extern void install_configuration_files(void); +extern void do_final_setup(void); /* dist.c */ extern int distSetDeveloper(char *str); @@ -225,34 +230,52 @@ extern int distSetXUser(char *str); extern int distSetMinimum(char *str); extern int distSetEverything(char *str); -/* system.c */ -extern void systemInitialize(int argc, char **argv); -extern void systemShutdown(void); -extern void systemWelcome(void); -extern int systemExecute(char *cmd); -extern int systemShellEscape(void); -extern int systemDisplayFile(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 int vsystem(char *fmt, ...); - -/* disks.c */ -extern void partition_disks(struct disk **disks); -extern int write_disks(struct disk **disks); -extern void make_filesystems(struct disk **disks); -extern void cpio_extract(void); -extern void extract_dists(struct disk **disks); -extern void install_configuration_files(struct disk **disks); -extern void do_final_setup(struct disk **disks); - /* dmenu.c */ extern void dmenuOpen(DMenu *menu, int *choice, int *scroll, int *curr, int *max); +/* globals.c */ +extern void globalsInit(void); + +/* install.c */ +extern int installCustom(char *str); +extern int installExpress(char *str); +extern int installMaint(char *str); + +/* lang.c */ +extern void lang_set_Danish(char *str); +extern void lang_set_Dutch(char *str); +extern void lang_set_English(char *str); +extern void lang_set_French(char *str); +extern void lang_set_German(char *str); +extern void lang_set_Italian(char *str); +extern void lang_set_Japanese(char *str); +extern void lang_set_Norwegian(char *str); +extern void lang_set_Russian(char *str); +extern void lang_set_Spanish(char *str); +extern void lang_set_Swedish(char *str); + +/* makedevs.c (auto-generated) */ +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_8x14[]; +extern const u_char font_cp850_8x14[]; +extern const u_char font_koi8_r_8x14[]; +extern const u_char koi8_r2cp866[]; + +/* media.c */ +extern int mediaSetCDROM(char *str); +extern int mediaSetFloppy(char *str); +extern int mediaSetDOS(char *str); +extern int mediaSetTape(char *str); +extern int mediaSetFTP(char *str); +extern int mediaSetFS(char *str); + /* misc.c */ extern Boolean file_readable(char *fname); extern Boolean file_executable(char *fname); @@ -266,9 +289,6 @@ extern char **item_add_pair(char **list, char *item1, char *item2, int *curr, int *max); extern void items_free(char **list, int *curr, int *max); -/* termcap.c */ -extern int set_termcap(void); - /* msg.c */ extern void msgInfo(char *fmt, ...); extern void msgYap(char *fmt, ...); @@ -281,50 +301,28 @@ extern void msgNotify(char *fmt, ...); extern int msgYesNo(char *fmt, ...); extern char *msgGetInput(char *buf, char *fmt, ...); -/* media.c */ -extern int mediaSetCDROM(char *str); -extern int mediaSetFloppy(char *str); -extern int mediaSetDOS(char *str); -extern int mediaSetTape(char *str); -extern int mediaSetFTP(char *str); -extern int mediaSetFS(char *str); +/* system.c */ +extern void systemInitialize(int argc, char **argv); +extern void systemShutdown(void); +extern void systemWelcome(void); +extern int systemExecute(char *cmd); +extern int systemShellEscape(void); +extern int systemDisplayFile(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 int vsystem(char *fmt, ...); -/* devices.c */ -extern Device *device_get_all(DeviceType type, int *ndevs); -extern struct disk *device_slice_disk(struct disk *d); -extern DMenu *device_create_disk_menu(DMenu *menu, Device **rdevs, - int (*func)()); +/* termcap.c */ +extern int set_termcap(void); /* variables.c */ extern void variable_set(char *var); extern void variable_set2(char *name, char *value); -/* lang.c */ -extern void lang_set_Danish(char *str); -extern void lang_set_Dutch(char *str); -extern void lang_set_English(char *str); -extern void lang_set_French(char *str); -extern void lang_set_German(char *str); -extern void lang_set_Italian(char *str); -extern void lang_set_Japanese(char *str); -extern void lang_set_Norwegian(char *str); -extern void lang_set_Russian(char *str); -extern void lang_set_Spanish(char *str); -extern void lang_set_Swedish(char *str); - -/* makedevs.c (auto-generated) */ -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_8x14[]; -extern const u_char font_cp850_8x14[]; -extern const u_char font_koi8_r_8x14[]; -extern const u_char koi8_r2cp866[]; - /* wizard.c */ extern void slice_wizard(struct disk *d); diff --git a/usr.sbin/sade/devices.c b/usr.sbin/sade/devices.c index 1b45290..a087fdf 100644 --- a/usr.sbin/sade/devices.c +++ b/usr.sbin/sade/devices.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: devices.c,v 1.9 1995/05/07 22:07:50 jkh Exp $ + * $Id: devices.c,v 1.10 1995/05/08 01:27:06 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -48,7 +48,7 @@ #define CHUNK_START_ROW 5 /* Get all device information for a given device class */ -Device * +static Device * device_get_all(DeviceType which, int *ndevs) { char **names; diff --git a/usr.sbin/sade/disks.c b/usr.sbin/sade/disks.c index d29ba6f..6ed5938 100644 --- a/usr.sbin/sade/disks.c +++ b/usr.sbin/sade/disks.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: disks.c,v 1.10 1995/05/08 00:56:28 jkh Exp $ + * $Id: disks.c,v 1.11 1995/05/08 01:27:07 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -151,29 +151,29 @@ space_free(struct chunk *c) } static void -record_fbsd_chunks(struct disk **disks) +record_fbsd_chunks() { int i, j, p; struct chunk *c1, *c2; j = p = 0; - for (i = 0; disks[i]; i++) { - if (!disks[i]->chunks) - msgFatal("No chunk list found for %s!", disks[i]->name); + for (i = 0; Disks[i]; i++) { + if (!Disks[i]->chunks) + msgFatal("No chunk list found for %s!", Disks[i]->name); /* Put the freebsd chunks first */ - for (c1 = disks[i]->chunks->part; c1; c1 = c1->next) { + for (c1 = Disks[i]->chunks->part; c1; c1 = c1->next) { if (c1->type == freebsd) { fbsd_chunk_info[j].type = PART_SLICE; - fbsd_chunk_info[j].d = disks[i]; + fbsd_chunk_info[j].d = Disks[i]; fbsd_chunk_info[j].c = c1; ++j; } } } - for (i = 0; disks[i]; i++) { + for (i = 0; Disks[i]; i++) { /* Then buzz through and pick up the partitions */ - for (c1 = disks[i]->chunks->part; c1; c1 = c1->next) { + for (c1 = Disks[i]->chunks->part; c1; c1 = c1->next) { if (c1->type == freebsd) { for (c2 = c1->part; c2; c2 = c2->next) { if (c2->type == part) { @@ -181,7 +181,7 @@ record_fbsd_chunks(struct disk **disks) fbsd_chunk_info[j].type = PART_SWAP; else fbsd_chunk_info[j].type = PART_FILESYSTEM; - fbsd_chunk_info[j].d = disks[i]; + fbsd_chunk_info[j].d = Disks[i]; fbsd_chunk_info[j].c = c2; ++j; } @@ -393,7 +393,7 @@ print_command_summary() } void -partition_disks(struct disk **disks) +partition_disks(void) { int sz, key = 0; Boolean partitioning; @@ -404,7 +404,7 @@ partition_disks(struct disk **disks) dialog_clear(); partitioning = TRUE; keypad(stdscr, TRUE); - record_fbsd_chunks(disks); + record_fbsd_chunks(); while (partitioning) { clear(); @@ -495,7 +495,7 @@ partition_disks(struct disk **disks) else { tmp->private = p; tmp->private_free = safe_free; - record_fbsd_chunks(disks); + record_fbsd_chunks(); } } } @@ -508,7 +508,7 @@ partition_disks(struct disk **disks) } Delete_Chunk(fbsd_chunk_info[current_chunk].d, fbsd_chunk_info[current_chunk].c); - record_fbsd_chunks(disks); + record_fbsd_chunks(); break; case 'M': /* mount */ @@ -525,7 +525,7 @@ partition_disks(struct disk **disks) p = get_mountpoint(fbsd_chunk_info[current_chunk].c); if (p) { p->newfs = FALSE; - record_fbsd_chunks(disks); + record_fbsd_chunks(); } break; @@ -558,12 +558,12 @@ partition_disks(struct disk **disks) dialog_clear(); end_dialog(); DialogActive = FALSE; - for (i = 0; disks[i]; i++) - slice_wizard(disks[i]); + for (i = 0; Disks[i]; i++) + slice_wizard(Disks[i]); clear(); dialog_clear(); DialogActive = TRUE; - record_fbsd_chunks(disks); + record_fbsd_chunks(); } else msg = "A most prudent choice!"; @@ -582,27 +582,27 @@ partition_disks(struct disk **disks) } int -write_disks(struct disk **disks) +write_disks(void) { int i; extern u_char boot1[], boot2[]; extern u_char mbr[], bteasy17[]; dialog_clear(); - for (i = 0; disks[i]; i++) { - if (contains_root_partition(disks[i])) - Set_Boot_Blocks(disks[i], boot1, boot2); + for (i = 0; Disks[i]; i++) { + if (contains_root_partition(Disks[i])) + Set_Boot_Blocks(Disks[i], boot1, boot2); dialog_clear(); if (i == 0 && !msgYesNo("Would you like to install a boot manager?\n\nThis will allow you to easily select between other operating systems\non the first disk, or boot from a disk other than the first.")) - Set_Boot_Mgr(disks[i], bteasy17); + Set_Boot_Mgr(Disks[i], bteasy17); else { dialog_clear(); if (i == 0 && !msgYesNo("Would you like to remove an existing boot manager?")) - Set_Boot_Mgr(disks[i], mbr); + Set_Boot_Mgr(Disks[i], mbr); } dialog_clear(); if (!msgYesNo("Last Chance! Are you sure you want to write out\nall these changes to disk?")) { - Write_Disk(disks[i]); + /* Write_Disk(Disks[i]); */ return 0; } } diff --git a/usr.sbin/sade/install.c b/usr.sbin/sade/install.c index 8f1ad5e..ab68f1e 100644 --- a/usr.sbin/sade/install.c +++ b/usr.sbin/sade/install.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: install.c,v 1.10 1995/05/07 23:37:33 jkh Exp $ + * $Id: install.c,v 1.11 1995/05/08 06:06:25 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -48,12 +48,13 @@ #include <unistd.h> Boolean SystemWasInstalled; +struct disk *Disks[100]; /* some ridiculously large number */ static int installHook(char *str) { int i; - struct disk *disks[100]; /* some ridiculously large number */ + extern DMenu MenuInstall; i = 0; /* Clip garbage off the ends */ @@ -70,37 +71,41 @@ installHook(char *str) beep(); return 0; } - disks[i] = Open_Disk(str); - if (!disks[i]) + Disks[i] = Open_Disk(str); + if (!Disks[i]) msgFatal("Unable to open disk %s!", str); ++i; str = cp; } - disks[i] = NULL; + Disks[i] = NULL; if (!i) return 0; while (1) { /* Now go set up all the MBR partition information */ - for (i = 0; disks[i]; i++) - disks[i] = device_slice_disk(disks[i]); + for (i = 0; Disks[i]; i++) + Disks[i] = device_slice_disk(Disks[i]); - partition_disks(disks); + partition_disks(); - if (!write_disks(disks)) { - make_filesystems(disks); + if (!write_disks()) { + int scroll, choice, curr, max; + + make_filesystems(); + scroll = choice = curr = max = 0; + dmenuOpen(&MenuInstall, &choice, &scroll, &curr, &max); cpio_extract(); - extract_dists(disks); - install_configuration_files(disks); - do_final_setup(disks); + extract_dists(); + install_configuration_files(); + do_final_setup(); SystemWasInstalled = TRUE; break; } else { dialog_clear(); if (msgYesNo("Would you like to go back to the Master Partition Editor?")) { - for (i = 0; disks[i]; i++) - Free_Disk(disks[i]); + for (i = 0; Disks[i]; i++) + Free_Disk(Disks[i]); break; } } @@ -155,17 +160,17 @@ installMaint(char *str) /* Go newfs and/or mount all the filesystems we've been asked to */ void -make_filesystems(struct disk **disks) +make_filesystems(void) { int i; command_clear(); - for (i = 0; disks[i]; i++) { + for (i = 0; Disks[i]; i++) { struct chunk *c1; - if (!disks[i]->chunks) - msgFatal("No chunk list found for %s!", disks[i]->name); - c1 = disks[i]->chunks->part; + if (!Disks[i]->chunks) + msgFatal("No chunk list found for %s!", Disks[i]->name); + c1 = Disks[i]->chunks->part; while (c1) { if (c1->type == freebsd) { struct chunk *c2 = c1->part; @@ -238,17 +243,17 @@ cpio_extract(void) } void -extract_dists(struct disk **disks) +extract_dists(void) { } void -install_configuration_files(struct disk **disks) +install_configuration_files(void) { } void -do_final_setup(struct disk **disks) +do_final_setup(void) { } diff --git a/usr.sbin/sade/menus.c b/usr.sbin/sade/menus.c index aa55d40..57dd0ab 100644 --- a/usr.sbin/sade/menus.c +++ b/usr.sbin/sade/menus.c @@ -4,13 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * -<<<<<<< menus.c - * $Id: menus.c,v 1.5 1995/05/04 03:51:19 jkh Exp $ -||||||| 1.7 - * $Id: menus.c,v 1.6 1995/05/04 19:48:14 jkh Exp $ -======= - * $Id: menus.c,v 1.7 1995/05/04 23:36:20 jkh Exp $ ->>>>>>> /tmp/T4000279 + * $Id: menus.c,v 1.8 1995/05/05 23:47:43 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -74,38 +68,38 @@ first character of the option name you're interested in. Invoke an\n\ option by pressing enter. If you'd like a shell, press ESC", /* prompt */ "Press F1 for usage instructions", /* help line */ "usage.hlp", /* help file */ - { { "Usage", "Quick start - How to use this menu system.", /* U */ - DMENU_DISPLAY_FILE, (void *)"usage.hlp", 0 }, - { "Doc", "More detailed documentation on FreeBSD.", /* D */ - DMENU_SUBMENU, (void *)&MenuDocumentation, 0 }, - { "Lang", "Select natural language options.", /* L */ - DMENU_SUBMENU, (void *)&MenuLanguage, 0 }, - { "Install", "Begin installation", /* I */ - DMENU_CALL, (void *)installCustom, 0 }, - { NULL } }, +{ { "Usage", "Quick start - How to use this menu system.", /* U */ + DMENU_DISPLAY_FILE, (void *)"usage.hlp", 0 }, + { "Doc", "More detailed documentation on FreeBSD.", /* D */ + DMENU_SUBMENU, (void *)&MenuDocumentation, 0 }, + { "Lang", "Select natural language options.", /* L */ + DMENU_SUBMENU, (void *)&MenuLanguage, 0 }, + { "Install", "Begin installation", /* I */ + DMENU_CALL, (void *)installCustom, 0 }, + { NULL } }, }; /* The main documentation menu */ DMenu MenuDocumentation = { - DMENU_NORMAL_TYPE, - "Documentation for FreeBSD 2.0.5", /* Title */ - "If you are at all unsure about the configuration of your hardware\n\ +DMENU_NORMAL_TYPE, +"Documentation for FreeBSD 2.0.5", /* Title */ +"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. If you're having other problems, you may find\n\ answers in the FAQ.", - "Confused? Press F1 for help.", - "usage.hlp", /* help file */ - { { "README", "Read this for a general description of FreeBSD", /* R */ - DMENU_DISPLAY_FILE, (void *)"readme.hlp", 0 }, - { "Hardware", "The FreeBSD survival guide for PC hardware.", /* H */ - DMENU_DISPLAY_FILE, (void *)"hardware.hlp", 0 }, - { "Install", "A step-by-step guide to installing FreeBSD.", /* I */ - DMENU_DISPLAY_FILE, (void *)"install.hlp", 0 }, - { "FAQ", "Frequently Asked Questions about FreeBSD.", /* F */ - DMENU_DISPLAY_FILE, (void *)"faq.hlp", 0 }, - { NULL } }, +"Confused? Press F1 for help.", +"usage.hlp", /* help file */ +{ { "README", "Read this for a general description of FreeBSD", /* R */ + DMENU_DISPLAY_FILE, (void *)"readme.hlp", 0 }, + { "Hardware", "The FreeBSD survival guide for PC hardware.", /* H */ + DMENU_DISPLAY_FILE, (void *)"hardware.hlp", 0 }, + { "Install", "A step-by-step guide to installing FreeBSD.", /* I */ + DMENU_DISPLAY_FILE, (void *)"install.hlp", 0 }, + { "FAQ", "Frequently Asked Questions about FreeBSD.", /* F */ + DMENU_DISPLAY_FILE, (void *)"faq.hlp", 0 }, + { NULL } }, }; /* The language selection menu */ @@ -115,170 +109,261 @@ answers in the FAQ.", * otherwise off. */ DMenu MenuLanguage = { - DMENU_RADIO_TYPE | DMENU_SELECTION_RETURNS, - "Natural language selection", /* title */ - "Please specify the language you'd like to use by default.\n\n\ +DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS, +"Natural language selection", /* title */ +"Please specify the language you'd like to use by default.\n\n\ While almost all of the system's documentation is still written\n\ in english (and may never be translated), there are a few guides\n\ and types of system documentation that may be written in your\n\ preferred language. When such are found, they will be used instead\n\ of the english versions.", /* prompt */ - "Press F1 for more information", /* help line */ - "language.hlp", /* help file */ - { { "Danish", "Danish language and character set (ISO-8859-1)", /* D */ - DMENU_CALL, (void *)lang_set_Danish, 0 }, - { "Dutch", "Dutch language and character set (ISO-8859-1)", /* D */ - DMENU_CALL, (void *)lang_set_Dutch, 0 }, - { "*English", "English language (system default)", /* E */ - DMENU_CALL, (void *)lang_set_English, 0 }, - { "French", "French language and character set (ISO-8859-1)", /* F */ - DMENU_CALL, (void *)lang_set_French, 0 }, - { "German", "German language and character set (ISO-8859-1)", /* G */ - DMENU_CALL, (void *)lang_set_German, 0 }, - { "Italian", "Italian language and character set (ISO-8859-1)", /* I */ - DMENU_CALL, (void *)lang_set_Italian, 0 }, - { "Japanese", "Japanese language and default character set (romaji)",/* J */ - DMENU_CALL, (void *)lang_set_Japanese, 0 }, - { "Norwegian", "Norwegian language and character set (ISO-8859-1)", /* N */ - DMENU_CALL, (void *)lang_set_Norwegian, 0 }, - { "Russian", "Russian language and character set (cp866-8x14)", /* R */ - DMENU_CALL, (void *)lang_set_Russian, 0 }, - { "Spanish", "Spanish language and character set (ISO-8859-1)", /* S */ - DMENU_CALL, (void *)lang_set_Spanish, 0 }, - { "Swedish", "Swedish language and character set (ISO-8859-1)", /* S */ - DMENU_CALL, (void *)lang_set_Swedish, 0 }, - { NULL } }, +"Press F1 for more information", /* help line */ +"language.hlp", /* help file */ +{ { "Danish", "Danish language and character set (ISO-8859-1)", /* D */ + DMENU_CALL, (void *)lang_set_Danish, 0 }, + { "Dutch", "Dutch language and character set (ISO-8859-1)", /* D */ + DMENU_CALL, (void *)lang_set_Dutch, 0 }, + { "English", "English language (system default)", /* E */ + DMENU_CALL, (void *)lang_set_English, 0 }, + { "French", "French language and character set (ISO-8859-1)", /* F */ + DMENU_CALL, (void *)lang_set_French, 0 }, + { "German", "German language and character set (ISO-8859-1)", /* G */ + DMENU_CALL, (void *)lang_set_German, 0 }, + { "Italian", "Italian language and character set (ISO-8859-1)", /* I */ + DMENU_CALL, (void *)lang_set_Italian, 0 }, + { "Japanese", "Japanese language and default character set (romaji)",/* J */ + DMENU_CALL, (void *)lang_set_Japanese, 0 }, + { "Norwegian", "Norwegian language and character set (ISO-8859-1)", /* N */ + DMENU_CALL, (void *)lang_set_Norwegian, 0 }, + { "Russian", "Russian language and character set (cp866-8x14)", /* R */ + DMENU_CALL, (void *)lang_set_Russian, 0 }, + { "Spanish", "Spanish language and character set (ISO-8859-1)", /* S */ + DMENU_CALL, (void *)lang_set_Spanish, 0 }, + { "Swedish", "Swedish language and character set (ISO-8859-1)", /* S */ + DMENU_CALL, (void *)lang_set_Swedish, 0 }, + { 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 2.0.5 distribution. If you're seeing this menu, it's because\n\ +your CDROM drive was not properly auto-detected, or you did not launch\n\ +this installation from the CD under DOS or Windows. If you think you're\n\ +seeing this dialog in error, you may wish to reboot FreeBSD with the\n\ +-c boot flag (.. boot: /kernel -c) and check that your hardware and\n +the kernel agree on reasonable values.", +"Press F1 for more information on CDROM support", +"media_cdrom.hlp", +{ { "Matsushita", "Panasonic \"Sound Blaster\" CDROM.", + DMENU_SET_VARIABLE, (void *)"mediaDevice=/dev/matcd0a", 0 }, + { "Mitsumi", "Mitsumi FX-001 series drive (not IDE)", + DMENU_SET_VARIABLE, (void *)"mediaDevice=/dev/mcd0a", 0 }, + { "SCSI", "SCSI CDROM drive attached to supported SCSI controller", + DMENU_SET_VARIABLE, (void *)"mediaDevice=/dev/cd0a", 0 }, + { "Sony", "Sony CDU31/33A or compatible CDROM drive", + DMENU_SET_VARIABLE, (void *)"mediaDevice=/dev/scd0a", 0 }, + { NULL } }, +}; + +DMenu MenuMediaFTP = { +DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS, +"Please specify an FTP site", +"FreeBSD is distributed from a number of sites on the Internet.\n\ +Please select the site closest to you or \"other\" if you'd like\n\ +to specify another choice. Also note that not all sites carry\n\ +every possible distribution! Distributions other than the basic\n\ +binary set are only guaranteed to be available from the Primary site.\n\ +If the first site selected doesn't respond, try one of the alternates.", +"Select a site that's close!", +"media_ftp.hlp", +{ { "Primary", "ftp.freebsd.org", + DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://ftp.freebsd.org/pub/FreeBSD/2.0.5-ALPHA", 0 }, + { "Secondary", "freefall.cdrom.com", + DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://freefall.cdrom.com/pub/FreeBSD/2.0.5-ALPHA", 0 }, + { "Australia", "ftp.physics.usyd.edu.au", + DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://ftp.physics.usyd.edu.au/FreeBSD/2.0.5-ALPHA", 0 }, + { "Finland", "nic.funet.fi", + DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://nic.funet.fi/pub/unix/FreeBSD/2.0.5-ALPHA", 0 }, + { "France", "ftp.ibp.fr", + DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://ftp.ibp.fr/pub/FreeBSD/2.0.5-ALPHA", 0 }, + { "Germany", "ftp.uni-duisburg.de", + DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://ftp.uni-duisburg.de/pub/unix/FreeBSD/2.0.5-ALPHA", 0 }, + { "Israel", "orgchem.weizmann.ac.il", + DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://orgchem.weizmann.ac.il/pub/FreeBSD-2.0.5-ALPHA", 0 }, + { "Japan", "ftp.sra.co.jp", + DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://ftp.sra.co.jp/pub/os/FreeBSD/distribution/2.0.5-ALPHA", 0 }, + { "Japan-2", "ftp.mei.co.jp", + DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://ftp.mei.co.jp/free/PC-UNIX/FreeBSD/2.0.5-ALPHA", 0 }, + { "Japan-3", "ftp.waseda.ac.jp", + DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://ftp.waseda.ac.jp/pub/FreeBSD/2.0.5-ALPHA", 0 }, + { "Japan-4", "ftp.pu-toyama.ac.jp", + DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://ftp.pu-toyama.ac.jp/pub/FreeBSD/2.0.5-ALPHA", 0 }, + { "Japan-5", "ftpsv1.u-aizu.ac.jp", + DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://ftpsv1.u-aizu.ac.jp/pub/os/FreeBSD/2.0.5-ALPHA", 0 }, + { "Japan-6", "tutserver.tutcc.tut.ac.jp", + DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://tutserver.tutcc.tut.ac.jp/FreeBSD/FreeBSD-2.0.5-ALPHA", 0 }, + { "Japan-7", "ftp.ee.uec.ac.jp", + DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://ftp.ee.uec.ac.jp/pub/os/FreeBSD.other/FreeBSD-2.0.5-ALPHA", 0 }, + { "Korea", "ftp.cau.ac.kr", + DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://ftp.cau.ac.kr/pub/FreeBSD/2.0.5-ALPHA", 0 }, + { "Netherlands", "ftp.nl.net", + DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://ftp.nl.net/pub/os/FreeBSD/2.0.5-ALPHA", 0 }, + { "Russia", "ftp.kiae.su", + DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://ftp.kiae.su/FreeBSD/2.0.5-ALPHA", 0 }, + { "Sweden", "ftp.luth.se", + DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://ftp.luth.se/pub/FreeBSD/2.0.5-ALPHA", 0 }, + { "Taiwan", "netbsd.csie.nctu.edu.tw", + DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://netbsd.csie.nctu.edu.tw/pub/FreeBSD/2.0.5-ALPHA", 0 }, + { "Thailand", "ftp.nectec.or.th", + DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://ftp.nectec.or.th/pub/FreeBSD/2.0.5-ALPHA", 0 }, + { "UK", "ftp.demon.co.uk", + DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://ftp.demon.co.uk/pub/BSD/FreeBSD/2.0.5-ALPHA", 0 }, + { "UK-2", "src.doc.ic.ac.uk", + DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://src.doc.ic.ac.uk/packages/unix/FreeBSD/2.0.5-ALPHA", 0 }, + { "UK-3", "unix.hensa.ac.uk", + DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://unix.hensa.ac.uk/pub/walnut.creek/FreeBSD/2.0.5-ALPHA", 0 }, + { "USA", "ref.tfs.com", + DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://ref.tfs.com/pub/FreeBSD/2.0.5-ALPHA", 0 }, + { "USA-2", "ftp.dataplex.net", + DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://ftp.dataplex.net/pub/FreeBSD/2.0.5-ALPHA", 0 }, + { "USA-3", "kryten.atinc.com", + DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://kryten.atinc.com/pub/FreeBSD/2.0.5-ALPHA", 0 }, + { "USA-4", "ftp.neosoft.com", + DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://ftp.neosoft.com/systems/FreeBSD/2.0.5-ALPHA", 0 }, + { NULL } } }; /* The media selection menu */ DMenu MenuMedia = { - DMENU_NORMAL_TYPE, - "Choose Installation Media", - "FreeBSD can be installed from a variety of different installation\n\ +DMENU_NORMAL_TYPE, +"Choose Installation Media", +"FreeBSD can be installed from a variety of different installation\n\ media, ranging from floppies to the Internet. If you're installing\n\ FreeBSD from a supported CDROM drive then this is generally the best\n\ method to use unless you have some overriding reason for using another\n\ method. Please also note that the DES distribution is NOT available on \n\ CDROM due to U.S. export restrictions.", - "Press F1 for more information on the various media types", - "media.hlp", - { { "CDROM", "Install from a FreeBSD CDROM", - DMENU_CALL, (void *)mediaSetCDROM, 0 }, - { "FLOPPY", "Install from a floppy disk set", - DMENU_CALL, (void *)mediaSetFloppy, 0 }, - { "DOS", "Install from a DOS partition", - DMENU_CALL, (void *)mediaSetDOS, 0 }, - { "TAPE", "Install from SCSI or QIC tape", - DMENU_CALL, (void *)mediaSetTape, 0 }, - { "FTP", "Install from an Internet FTP server", - DMENU_CALL, (void *)mediaSetFTP, 0 }, - { "FILESYSTEM", "Install from a UFS or NFS mounted distribution", - DMENU_CALL, (void *)mediaSetFS, 0 }, - { NULL } }, +"Press F1 for more information on the various media types", +"media.hlp", +{ { "CDROM", "Install from a FreeBSD CDROM", + DMENU_CALL, (void *)mediaSetCDROM, 0 }, + { "FLOPPY", "Install from a floppy disk set", + DMENU_CALL, (void *)mediaSetFloppy, 0 }, + { "DOS", "Install from a DOS partition", + DMENU_CALL, (void *)mediaSetDOS, 0 }, + { "TAPE", "Install from SCSI or QIC tape", + DMENU_CALL, (void *)mediaSetTape, 0 }, + { "FTP", "Install from an Internet FTP server", + DMENU_CALL, (void *)mediaSetFTP, 0 }, + { "FILESYSTEM", "Install from a UFS or NFS mounted distribution", + DMENU_CALL, (void *)mediaSetFS, 0 }, + { NULL } }, }; /* The installation type menu */ DMenu MenuInstallType = { - DMENU_NORMAL_TYPE, - "Choose Installation Type", - "As a convenience, we provide several `canned' installation types. \ +DMENU_NORMAL_TYPE, +"Choose Installation Type", +"As a convenience, we provide several `canned' installation types. \ These pick what we consider to be the most reasonable defaults for the \ type of system in question. If you would prefer to pick and choose \ the list of distributions yourself, simply select `custom'.", - "Press F1 for more information on the various distributions", - "dist_types.hlp", - { { "Developer", "Includes full sources, binaries and doc but no games.", +"Press F1 for more information on the various distributions", +"dist_types.hlp", +{ { "Developer", "Includes full sources, binaries and doc but no games.", DMENU_CALL, (void *)distSetDeveloper, 0 }, - { "X-Developer", "Same as above, but includes XFree86.", + { "X-Developer", "Same as above, but includes XFree86.", DMENU_CALL, (void *)distSetXDeveloper, 0 }, - { "User", "General user. Binaries and doc but no sources.", + { "User", "General user. Binaries and doc but no sources.", DMENU_CALL, (void *)distSetUser, 0 }, - { "X-User", "Same as above, but includes XFree86.", + { "X-User", "Same as above, but includes XFree86.", DMENU_CALL, (void *)distSetXUser, 0 }, - { "Minimal", "The smallest configuration possible.", + { "Minimal", "The smallest configuration possible.", DMENU_CALL, (void *)distSetMinimum, 0 }, - { "Everything", "The entire source and binary distribution.", + { "Everything", "The entire source and binary distribution.", DMENU_CALL, (void *)distSetEverything, 0 }, - { "Custom", "Specify your own distribution set", + { "Custom", "Specify your own distribution set", DMENU_SUBMENU, (void *)&MenuDistributions, 0 }, - { NULL } }, + { NULL } }, }; DMenu MenuDistributions = { - DMENU_MULTIPLE_TYPE, - "Select the distributions you wish to install.", - "Please check off the distributions you wish to install.", - "Press F1 for a more complete description of these distributions.", - "distribution_types.hlp", - { { "*bin", "Binary base distribution (required)", +DMENU_MULTIPLE_TYPE, +"Select the distributions you wish to install.", +"Please check off the distributions you wish to install.", +"Press F1 for a more complete description of these distributions.", +"distribution_types.hlp", +{ { "*bin", "Binary base distribution (required)", DMENU_NOP, NULL, 0 }, - { "commercial", "Commercial demos and shareware", + { "commercial", "Commercial demos and shareware", DMENU_NOP, NULL, 0 }, - { "compat1x", "FreeBSD 1.x binary compatability package", + { "compat1x", "FreeBSD 1.x binary compatability package", DMENU_NOP, NULL, 0 }, - { "DES", "DES encryption code and sources", + { "DES", "DES encryption code and sources", DMENU_NOP, NULL, 0 }, - { "dict", "Spelling checker disctionary files", + { "dict", "Spelling checker disctionary files", DMENU_NOP, NULL, 0 }, - { "games", "Games and other amusements (non-commercial)", + { "games", "Games and other amusements (non-commercial)", DMENU_NOP, NULL, 0 }, - { "info", "GNU info files", + { "info", "GNU info files", DMENU_NOP, NULL, 0 }, - { "man", "System manual pages - strongly recommended", + { "man", "System manual pages - strongly recommended", DMENU_NOP, NULL, 0 }, - { "proflibs", "Profiled versions of the libraries", + { "proflibs", "Profiled versions of the libraries", DMENU_NOP, NULL, 0 }, - { "src", "Sources for everything but DES", + { "src", "Sources for everything but DES", DMENU_NOP, NULL, 0 }, - { "XFree86", "The XFree86 3.1.1 distribution", + { "XFree86", "The XFree86 3.1.1 distribution", DMENU_NOP, NULL, 0 }, - { NULL } }, -}; - -/* The installation options menu */ -DMenu MenuInstallOptions = { - DMENU_NORMAL_TYPE, - "Choose Installation Options", - "blah blah", - NULL, - NULL, - { { NULL } }, + { NULL } }, }; DMenu MenuDiskDevices = { - DMENU_MULTIPLE_TYPE, - "Select Drive(s)", - "Please select the drive, or drives, on which you wish to install\n\ +DMENU_MULTIPLE_TYPE, +"Select Drive(s)", +"Please select the drive, or drives, on which you wish to install\n\ FreeBSD. You need to select at least one drive containing some free\n\ space, though FreeBSD can be installed across several drives if you do\n\ not have the required space on a single drive. If you wish to boot\n\ off a drive that's not a `zero drive', or have multiple operating\n\ systems on your machine, you will have the option to install a boot\n\ manager later.", - "Press F1 for more information on what you see here.", - "drives.hlp", - { { NULL } }, +"Press F1 for more information on what you see here.", +"drives.hlp", +{ { NULL } }, +}; + +/* The installation options menu */ +DMenu MenuInstallOptions = { +DMENU_NORMAL_TYPE, +"Choose Installation Options", +"blah blah", +NULL, +NULL, +{ { NULL } }, }; /* The main installation menu */ DMenu MenuInstall = { - DMENU_NORMAL_TYPE, - "Choose Installation Options", /* title */ - "Before installation can continue, you need to specify a few items\n\ +DMENU_NORMAL_TYPE, +"Choose Installation Options", /* title */ +"Before installation can continue, you need to specify a few items\n\ of information regarding the location of the distribution and the kind\n\ of installation you want to have (and where). There are also a number\n\ of options you can specify in the Options menu. If you do not wish to\n\ install FreeBSD at this time, you may select Cancel to leave this menu", - "You may wish to read the install guide - press F1 to do so", - "install.hlp", - { { "Media", "Choose Installation media type", /* M */ - DMENU_SUBMENU, (void *)&MenuMedia, 0 }, - { "Type", "Choose the type of installation you want", /* T */ - DMENU_SUBMENU, (void *)&MenuInstallType, 0 }, - { "Options", "Specify installation options", /* O */ - DMENU_SUBMENU, (void *)&MenuInstallOptions, 0 }, - { "Proceed", "Proceed with installation", /* P */ - DMENU_CANCEL, (void *)NULL, 0 }, - { NULL } }, +"You may also wish to read the install guide - press F1 to do so", +"install.hlp", +{ { "Media", "Choose Installation media type", /* M */ + DMENU_SUBMENU, (void *)&MenuMedia, 0 }, + { "Type", "Choose the type of installation you want", /* T */ + DMENU_SUBMENU, (void *)&MenuInstallType, 0 }, + { "Options", "Specify installation options", /* O */ + DMENU_SUBMENU, (void *)&MenuInstallOptions, 0 }, + { "Proceed", "Proceed with installation", /* P */ + DMENU_CANCEL, (void *)NULL, 0 }, + { NULL } }, }; diff --git a/usr.sbin/sade/sade.h b/usr.sbin/sade/sade.h index fad3398..f9e3ec7 100644 --- a/usr.sbin/sade/sade.h +++ b/usr.sbin/sade/sade.h @@ -4,7 +4,7 @@ * 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.11 1995/05/07 23:37:34 jkh Exp $ + * $Id: sysinstall.h,v 1.12 1995/05/08 06:06:28 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -199,7 +199,7 @@ extern Boolean OnVTY; /* On a syscons VTY? */ extern Variable *VarHead; /* The head of the variable chain */ extern unsigned int Dists; /* Which distributions we want */ extern unsigned int SrcDists; /* Which src distributions we want */ - +extern struct disk *Disks[]; /* The disks we're working on */ /*** Prototypes ***/ @@ -209,13 +209,18 @@ extern void command_sort(void); extern void command_execute(void); extern void command_add(char *key, char *fmt, ...); -/* globals.c */ -extern void globalsInit(void); +/* devices.c */ +extern struct disk *device_slice_disk(struct disk *d); +extern DMenu *device_create_disk_menu(DMenu *menu, Device **rdevs, int (*hook)()); -/* install.c */ -extern int installCustom(char *str); -extern int installExpress(char *str); -extern int installMaint(char *str); +/* disks.c */ +extern void partition_disks(void); +extern int write_disks(void); +extern void make_filesystems(void); +extern void cpio_extract(void); +extern void extract_dists(void); +extern void install_configuration_files(void); +extern void do_final_setup(void); /* dist.c */ extern int distSetDeveloper(char *str); @@ -225,34 +230,52 @@ extern int distSetXUser(char *str); extern int distSetMinimum(char *str); extern int distSetEverything(char *str); -/* system.c */ -extern void systemInitialize(int argc, char **argv); -extern void systemShutdown(void); -extern void systemWelcome(void); -extern int systemExecute(char *cmd); -extern int systemShellEscape(void); -extern int systemDisplayFile(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 int vsystem(char *fmt, ...); - -/* disks.c */ -extern void partition_disks(struct disk **disks); -extern int write_disks(struct disk **disks); -extern void make_filesystems(struct disk **disks); -extern void cpio_extract(void); -extern void extract_dists(struct disk **disks); -extern void install_configuration_files(struct disk **disks); -extern void do_final_setup(struct disk **disks); - /* dmenu.c */ extern void dmenuOpen(DMenu *menu, int *choice, int *scroll, int *curr, int *max); +/* globals.c */ +extern void globalsInit(void); + +/* install.c */ +extern int installCustom(char *str); +extern int installExpress(char *str); +extern int installMaint(char *str); + +/* lang.c */ +extern void lang_set_Danish(char *str); +extern void lang_set_Dutch(char *str); +extern void lang_set_English(char *str); +extern void lang_set_French(char *str); +extern void lang_set_German(char *str); +extern void lang_set_Italian(char *str); +extern void lang_set_Japanese(char *str); +extern void lang_set_Norwegian(char *str); +extern void lang_set_Russian(char *str); +extern void lang_set_Spanish(char *str); +extern void lang_set_Swedish(char *str); + +/* makedevs.c (auto-generated) */ +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_8x14[]; +extern const u_char font_cp850_8x14[]; +extern const u_char font_koi8_r_8x14[]; +extern const u_char koi8_r2cp866[]; + +/* media.c */ +extern int mediaSetCDROM(char *str); +extern int mediaSetFloppy(char *str); +extern int mediaSetDOS(char *str); +extern int mediaSetTape(char *str); +extern int mediaSetFTP(char *str); +extern int mediaSetFS(char *str); + /* misc.c */ extern Boolean file_readable(char *fname); extern Boolean file_executable(char *fname); @@ -266,9 +289,6 @@ extern char **item_add_pair(char **list, char *item1, char *item2, int *curr, int *max); extern void items_free(char **list, int *curr, int *max); -/* termcap.c */ -extern int set_termcap(void); - /* msg.c */ extern void msgInfo(char *fmt, ...); extern void msgYap(char *fmt, ...); @@ -281,50 +301,28 @@ extern void msgNotify(char *fmt, ...); extern int msgYesNo(char *fmt, ...); extern char *msgGetInput(char *buf, char *fmt, ...); -/* media.c */ -extern int mediaSetCDROM(char *str); -extern int mediaSetFloppy(char *str); -extern int mediaSetDOS(char *str); -extern int mediaSetTape(char *str); -extern int mediaSetFTP(char *str); -extern int mediaSetFS(char *str); +/* system.c */ +extern void systemInitialize(int argc, char **argv); +extern void systemShutdown(void); +extern void systemWelcome(void); +extern int systemExecute(char *cmd); +extern int systemShellEscape(void); +extern int systemDisplayFile(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 int vsystem(char *fmt, ...); -/* devices.c */ -extern Device *device_get_all(DeviceType type, int *ndevs); -extern struct disk *device_slice_disk(struct disk *d); -extern DMenu *device_create_disk_menu(DMenu *menu, Device **rdevs, - int (*func)()); +/* termcap.c */ +extern int set_termcap(void); /* variables.c */ extern void variable_set(char *var); extern void variable_set2(char *name, char *value); -/* lang.c */ -extern void lang_set_Danish(char *str); -extern void lang_set_Dutch(char *str); -extern void lang_set_English(char *str); -extern void lang_set_French(char *str); -extern void lang_set_German(char *str); -extern void lang_set_Italian(char *str); -extern void lang_set_Japanese(char *str); -extern void lang_set_Norwegian(char *str); -extern void lang_set_Russian(char *str); -extern void lang_set_Spanish(char *str); -extern void lang_set_Swedish(char *str); - -/* makedevs.c (auto-generated) */ -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_8x14[]; -extern const u_char font_cp850_8x14[]; -extern const u_char font_koi8_r_8x14[]; -extern const u_char koi8_r2cp866[]; - /* wizard.c */ extern void slice_wizard(struct disk *d); diff --git a/usr.sbin/sysinstall/devices.c b/usr.sbin/sysinstall/devices.c index 1b45290..a087fdf 100644 --- a/usr.sbin/sysinstall/devices.c +++ b/usr.sbin/sysinstall/devices.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: devices.c,v 1.9 1995/05/07 22:07:50 jkh Exp $ + * $Id: devices.c,v 1.10 1995/05/08 01:27:06 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -48,7 +48,7 @@ #define CHUNK_START_ROW 5 /* Get all device information for a given device class */ -Device * +static Device * device_get_all(DeviceType which, int *ndevs) { char **names; diff --git a/usr.sbin/sysinstall/disks.c b/usr.sbin/sysinstall/disks.c index d29ba6f..6ed5938 100644 --- a/usr.sbin/sysinstall/disks.c +++ b/usr.sbin/sysinstall/disks.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: disks.c,v 1.10 1995/05/08 00:56:28 jkh Exp $ + * $Id: disks.c,v 1.11 1995/05/08 01:27:07 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -151,29 +151,29 @@ space_free(struct chunk *c) } static void -record_fbsd_chunks(struct disk **disks) +record_fbsd_chunks() { int i, j, p; struct chunk *c1, *c2; j = p = 0; - for (i = 0; disks[i]; i++) { - if (!disks[i]->chunks) - msgFatal("No chunk list found for %s!", disks[i]->name); + for (i = 0; Disks[i]; i++) { + if (!Disks[i]->chunks) + msgFatal("No chunk list found for %s!", Disks[i]->name); /* Put the freebsd chunks first */ - for (c1 = disks[i]->chunks->part; c1; c1 = c1->next) { + for (c1 = Disks[i]->chunks->part; c1; c1 = c1->next) { if (c1->type == freebsd) { fbsd_chunk_info[j].type = PART_SLICE; - fbsd_chunk_info[j].d = disks[i]; + fbsd_chunk_info[j].d = Disks[i]; fbsd_chunk_info[j].c = c1; ++j; } } } - for (i = 0; disks[i]; i++) { + for (i = 0; Disks[i]; i++) { /* Then buzz through and pick up the partitions */ - for (c1 = disks[i]->chunks->part; c1; c1 = c1->next) { + for (c1 = Disks[i]->chunks->part; c1; c1 = c1->next) { if (c1->type == freebsd) { for (c2 = c1->part; c2; c2 = c2->next) { if (c2->type == part) { @@ -181,7 +181,7 @@ record_fbsd_chunks(struct disk **disks) fbsd_chunk_info[j].type = PART_SWAP; else fbsd_chunk_info[j].type = PART_FILESYSTEM; - fbsd_chunk_info[j].d = disks[i]; + fbsd_chunk_info[j].d = Disks[i]; fbsd_chunk_info[j].c = c2; ++j; } @@ -393,7 +393,7 @@ print_command_summary() } void -partition_disks(struct disk **disks) +partition_disks(void) { int sz, key = 0; Boolean partitioning; @@ -404,7 +404,7 @@ partition_disks(struct disk **disks) dialog_clear(); partitioning = TRUE; keypad(stdscr, TRUE); - record_fbsd_chunks(disks); + record_fbsd_chunks(); while (partitioning) { clear(); @@ -495,7 +495,7 @@ partition_disks(struct disk **disks) else { tmp->private = p; tmp->private_free = safe_free; - record_fbsd_chunks(disks); + record_fbsd_chunks(); } } } @@ -508,7 +508,7 @@ partition_disks(struct disk **disks) } Delete_Chunk(fbsd_chunk_info[current_chunk].d, fbsd_chunk_info[current_chunk].c); - record_fbsd_chunks(disks); + record_fbsd_chunks(); break; case 'M': /* mount */ @@ -525,7 +525,7 @@ partition_disks(struct disk **disks) p = get_mountpoint(fbsd_chunk_info[current_chunk].c); if (p) { p->newfs = FALSE; - record_fbsd_chunks(disks); + record_fbsd_chunks(); } break; @@ -558,12 +558,12 @@ partition_disks(struct disk **disks) dialog_clear(); end_dialog(); DialogActive = FALSE; - for (i = 0; disks[i]; i++) - slice_wizard(disks[i]); + for (i = 0; Disks[i]; i++) + slice_wizard(Disks[i]); clear(); dialog_clear(); DialogActive = TRUE; - record_fbsd_chunks(disks); + record_fbsd_chunks(); } else msg = "A most prudent choice!"; @@ -582,27 +582,27 @@ partition_disks(struct disk **disks) } int -write_disks(struct disk **disks) +write_disks(void) { int i; extern u_char boot1[], boot2[]; extern u_char mbr[], bteasy17[]; dialog_clear(); - for (i = 0; disks[i]; i++) { - if (contains_root_partition(disks[i])) - Set_Boot_Blocks(disks[i], boot1, boot2); + for (i = 0; Disks[i]; i++) { + if (contains_root_partition(Disks[i])) + Set_Boot_Blocks(Disks[i], boot1, boot2); dialog_clear(); if (i == 0 && !msgYesNo("Would you like to install a boot manager?\n\nThis will allow you to easily select between other operating systems\non the first disk, or boot from a disk other than the first.")) - Set_Boot_Mgr(disks[i], bteasy17); + Set_Boot_Mgr(Disks[i], bteasy17); else { dialog_clear(); if (i == 0 && !msgYesNo("Would you like to remove an existing boot manager?")) - Set_Boot_Mgr(disks[i], mbr); + Set_Boot_Mgr(Disks[i], mbr); } dialog_clear(); if (!msgYesNo("Last Chance! Are you sure you want to write out\nall these changes to disk?")) { - Write_Disk(disks[i]); + /* Write_Disk(Disks[i]); */ return 0; } } diff --git a/usr.sbin/sysinstall/install.c b/usr.sbin/sysinstall/install.c index 8f1ad5e..ab68f1e 100644 --- a/usr.sbin/sysinstall/install.c +++ b/usr.sbin/sysinstall/install.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: install.c,v 1.10 1995/05/07 23:37:33 jkh Exp $ + * $Id: install.c,v 1.11 1995/05/08 06:06:25 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -48,12 +48,13 @@ #include <unistd.h> Boolean SystemWasInstalled; +struct disk *Disks[100]; /* some ridiculously large number */ static int installHook(char *str) { int i; - struct disk *disks[100]; /* some ridiculously large number */ + extern DMenu MenuInstall; i = 0; /* Clip garbage off the ends */ @@ -70,37 +71,41 @@ installHook(char *str) beep(); return 0; } - disks[i] = Open_Disk(str); - if (!disks[i]) + Disks[i] = Open_Disk(str); + if (!Disks[i]) msgFatal("Unable to open disk %s!", str); ++i; str = cp; } - disks[i] = NULL; + Disks[i] = NULL; if (!i) return 0; while (1) { /* Now go set up all the MBR partition information */ - for (i = 0; disks[i]; i++) - disks[i] = device_slice_disk(disks[i]); + for (i = 0; Disks[i]; i++) + Disks[i] = device_slice_disk(Disks[i]); - partition_disks(disks); + partition_disks(); - if (!write_disks(disks)) { - make_filesystems(disks); + if (!write_disks()) { + int scroll, choice, curr, max; + + make_filesystems(); + scroll = choice = curr = max = 0; + dmenuOpen(&MenuInstall, &choice, &scroll, &curr, &max); cpio_extract(); - extract_dists(disks); - install_configuration_files(disks); - do_final_setup(disks); + extract_dists(); + install_configuration_files(); + do_final_setup(); SystemWasInstalled = TRUE; break; } else { dialog_clear(); if (msgYesNo("Would you like to go back to the Master Partition Editor?")) { - for (i = 0; disks[i]; i++) - Free_Disk(disks[i]); + for (i = 0; Disks[i]; i++) + Free_Disk(Disks[i]); break; } } @@ -155,17 +160,17 @@ installMaint(char *str) /* Go newfs and/or mount all the filesystems we've been asked to */ void -make_filesystems(struct disk **disks) +make_filesystems(void) { int i; command_clear(); - for (i = 0; disks[i]; i++) { + for (i = 0; Disks[i]; i++) { struct chunk *c1; - if (!disks[i]->chunks) - msgFatal("No chunk list found for %s!", disks[i]->name); - c1 = disks[i]->chunks->part; + if (!Disks[i]->chunks) + msgFatal("No chunk list found for %s!", Disks[i]->name); + c1 = Disks[i]->chunks->part; while (c1) { if (c1->type == freebsd) { struct chunk *c2 = c1->part; @@ -238,17 +243,17 @@ cpio_extract(void) } void -extract_dists(struct disk **disks) +extract_dists(void) { } void -install_configuration_files(struct disk **disks) +install_configuration_files(void) { } void -do_final_setup(struct disk **disks) +do_final_setup(void) { } diff --git a/usr.sbin/sysinstall/menus.c b/usr.sbin/sysinstall/menus.c index aa55d40..57dd0ab 100644 --- a/usr.sbin/sysinstall/menus.c +++ b/usr.sbin/sysinstall/menus.c @@ -4,13 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * -<<<<<<< menus.c - * $Id: menus.c,v 1.5 1995/05/04 03:51:19 jkh Exp $ -||||||| 1.7 - * $Id: menus.c,v 1.6 1995/05/04 19:48:14 jkh Exp $ -======= - * $Id: menus.c,v 1.7 1995/05/04 23:36:20 jkh Exp $ ->>>>>>> /tmp/T4000279 + * $Id: menus.c,v 1.8 1995/05/05 23:47:43 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -74,38 +68,38 @@ first character of the option name you're interested in. Invoke an\n\ option by pressing enter. If you'd like a shell, press ESC", /* prompt */ "Press F1 for usage instructions", /* help line */ "usage.hlp", /* help file */ - { { "Usage", "Quick start - How to use this menu system.", /* U */ - DMENU_DISPLAY_FILE, (void *)"usage.hlp", 0 }, - { "Doc", "More detailed documentation on FreeBSD.", /* D */ - DMENU_SUBMENU, (void *)&MenuDocumentation, 0 }, - { "Lang", "Select natural language options.", /* L */ - DMENU_SUBMENU, (void *)&MenuLanguage, 0 }, - { "Install", "Begin installation", /* I */ - DMENU_CALL, (void *)installCustom, 0 }, - { NULL } }, +{ { "Usage", "Quick start - How to use this menu system.", /* U */ + DMENU_DISPLAY_FILE, (void *)"usage.hlp", 0 }, + { "Doc", "More detailed documentation on FreeBSD.", /* D */ + DMENU_SUBMENU, (void *)&MenuDocumentation, 0 }, + { "Lang", "Select natural language options.", /* L */ + DMENU_SUBMENU, (void *)&MenuLanguage, 0 }, + { "Install", "Begin installation", /* I */ + DMENU_CALL, (void *)installCustom, 0 }, + { NULL } }, }; /* The main documentation menu */ DMenu MenuDocumentation = { - DMENU_NORMAL_TYPE, - "Documentation for FreeBSD 2.0.5", /* Title */ - "If you are at all unsure about the configuration of your hardware\n\ +DMENU_NORMAL_TYPE, +"Documentation for FreeBSD 2.0.5", /* Title */ +"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. If you're having other problems, you may find\n\ answers in the FAQ.", - "Confused? Press F1 for help.", - "usage.hlp", /* help file */ - { { "README", "Read this for a general description of FreeBSD", /* R */ - DMENU_DISPLAY_FILE, (void *)"readme.hlp", 0 }, - { "Hardware", "The FreeBSD survival guide for PC hardware.", /* H */ - DMENU_DISPLAY_FILE, (void *)"hardware.hlp", 0 }, - { "Install", "A step-by-step guide to installing FreeBSD.", /* I */ - DMENU_DISPLAY_FILE, (void *)"install.hlp", 0 }, - { "FAQ", "Frequently Asked Questions about FreeBSD.", /* F */ - DMENU_DISPLAY_FILE, (void *)"faq.hlp", 0 }, - { NULL } }, +"Confused? Press F1 for help.", +"usage.hlp", /* help file */ +{ { "README", "Read this for a general description of FreeBSD", /* R */ + DMENU_DISPLAY_FILE, (void *)"readme.hlp", 0 }, + { "Hardware", "The FreeBSD survival guide for PC hardware.", /* H */ + DMENU_DISPLAY_FILE, (void *)"hardware.hlp", 0 }, + { "Install", "A step-by-step guide to installing FreeBSD.", /* I */ + DMENU_DISPLAY_FILE, (void *)"install.hlp", 0 }, + { "FAQ", "Frequently Asked Questions about FreeBSD.", /* F */ + DMENU_DISPLAY_FILE, (void *)"faq.hlp", 0 }, + { NULL } }, }; /* The language selection menu */ @@ -115,170 +109,261 @@ answers in the FAQ.", * otherwise off. */ DMenu MenuLanguage = { - DMENU_RADIO_TYPE | DMENU_SELECTION_RETURNS, - "Natural language selection", /* title */ - "Please specify the language you'd like to use by default.\n\n\ +DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS, +"Natural language selection", /* title */ +"Please specify the language you'd like to use by default.\n\n\ While almost all of the system's documentation is still written\n\ in english (and may never be translated), there are a few guides\n\ and types of system documentation that may be written in your\n\ preferred language. When such are found, they will be used instead\n\ of the english versions.", /* prompt */ - "Press F1 for more information", /* help line */ - "language.hlp", /* help file */ - { { "Danish", "Danish language and character set (ISO-8859-1)", /* D */ - DMENU_CALL, (void *)lang_set_Danish, 0 }, - { "Dutch", "Dutch language and character set (ISO-8859-1)", /* D */ - DMENU_CALL, (void *)lang_set_Dutch, 0 }, - { "*English", "English language (system default)", /* E */ - DMENU_CALL, (void *)lang_set_English, 0 }, - { "French", "French language and character set (ISO-8859-1)", /* F */ - DMENU_CALL, (void *)lang_set_French, 0 }, - { "German", "German language and character set (ISO-8859-1)", /* G */ - DMENU_CALL, (void *)lang_set_German, 0 }, - { "Italian", "Italian language and character set (ISO-8859-1)", /* I */ - DMENU_CALL, (void *)lang_set_Italian, 0 }, - { "Japanese", "Japanese language and default character set (romaji)",/* J */ - DMENU_CALL, (void *)lang_set_Japanese, 0 }, - { "Norwegian", "Norwegian language and character set (ISO-8859-1)", /* N */ - DMENU_CALL, (void *)lang_set_Norwegian, 0 }, - { "Russian", "Russian language and character set (cp866-8x14)", /* R */ - DMENU_CALL, (void *)lang_set_Russian, 0 }, - { "Spanish", "Spanish language and character set (ISO-8859-1)", /* S */ - DMENU_CALL, (void *)lang_set_Spanish, 0 }, - { "Swedish", "Swedish language and character set (ISO-8859-1)", /* S */ - DMENU_CALL, (void *)lang_set_Swedish, 0 }, - { NULL } }, +"Press F1 for more information", /* help line */ +"language.hlp", /* help file */ +{ { "Danish", "Danish language and character set (ISO-8859-1)", /* D */ + DMENU_CALL, (void *)lang_set_Danish, 0 }, + { "Dutch", "Dutch language and character set (ISO-8859-1)", /* D */ + DMENU_CALL, (void *)lang_set_Dutch, 0 }, + { "English", "English language (system default)", /* E */ + DMENU_CALL, (void *)lang_set_English, 0 }, + { "French", "French language and character set (ISO-8859-1)", /* F */ + DMENU_CALL, (void *)lang_set_French, 0 }, + { "German", "German language and character set (ISO-8859-1)", /* G */ + DMENU_CALL, (void *)lang_set_German, 0 }, + { "Italian", "Italian language and character set (ISO-8859-1)", /* I */ + DMENU_CALL, (void *)lang_set_Italian, 0 }, + { "Japanese", "Japanese language and default character set (romaji)",/* J */ + DMENU_CALL, (void *)lang_set_Japanese, 0 }, + { "Norwegian", "Norwegian language and character set (ISO-8859-1)", /* N */ + DMENU_CALL, (void *)lang_set_Norwegian, 0 }, + { "Russian", "Russian language and character set (cp866-8x14)", /* R */ + DMENU_CALL, (void *)lang_set_Russian, 0 }, + { "Spanish", "Spanish language and character set (ISO-8859-1)", /* S */ + DMENU_CALL, (void *)lang_set_Spanish, 0 }, + { "Swedish", "Swedish language and character set (ISO-8859-1)", /* S */ + DMENU_CALL, (void *)lang_set_Swedish, 0 }, + { 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 2.0.5 distribution. If you're seeing this menu, it's because\n\ +your CDROM drive was not properly auto-detected, or you did not launch\n\ +this installation from the CD under DOS or Windows. If you think you're\n\ +seeing this dialog in error, you may wish to reboot FreeBSD with the\n\ +-c boot flag (.. boot: /kernel -c) and check that your hardware and\n +the kernel agree on reasonable values.", +"Press F1 for more information on CDROM support", +"media_cdrom.hlp", +{ { "Matsushita", "Panasonic \"Sound Blaster\" CDROM.", + DMENU_SET_VARIABLE, (void *)"mediaDevice=/dev/matcd0a", 0 }, + { "Mitsumi", "Mitsumi FX-001 series drive (not IDE)", + DMENU_SET_VARIABLE, (void *)"mediaDevice=/dev/mcd0a", 0 }, + { "SCSI", "SCSI CDROM drive attached to supported SCSI controller", + DMENU_SET_VARIABLE, (void *)"mediaDevice=/dev/cd0a", 0 }, + { "Sony", "Sony CDU31/33A or compatible CDROM drive", + DMENU_SET_VARIABLE, (void *)"mediaDevice=/dev/scd0a", 0 }, + { NULL } }, +}; + +DMenu MenuMediaFTP = { +DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS, +"Please specify an FTP site", +"FreeBSD is distributed from a number of sites on the Internet.\n\ +Please select the site closest to you or \"other\" if you'd like\n\ +to specify another choice. Also note that not all sites carry\n\ +every possible distribution! Distributions other than the basic\n\ +binary set are only guaranteed to be available from the Primary site.\n\ +If the first site selected doesn't respond, try one of the alternates.", +"Select a site that's close!", +"media_ftp.hlp", +{ { "Primary", "ftp.freebsd.org", + DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://ftp.freebsd.org/pub/FreeBSD/2.0.5-ALPHA", 0 }, + { "Secondary", "freefall.cdrom.com", + DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://freefall.cdrom.com/pub/FreeBSD/2.0.5-ALPHA", 0 }, + { "Australia", "ftp.physics.usyd.edu.au", + DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://ftp.physics.usyd.edu.au/FreeBSD/2.0.5-ALPHA", 0 }, + { "Finland", "nic.funet.fi", + DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://nic.funet.fi/pub/unix/FreeBSD/2.0.5-ALPHA", 0 }, + { "France", "ftp.ibp.fr", + DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://ftp.ibp.fr/pub/FreeBSD/2.0.5-ALPHA", 0 }, + { "Germany", "ftp.uni-duisburg.de", + DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://ftp.uni-duisburg.de/pub/unix/FreeBSD/2.0.5-ALPHA", 0 }, + { "Israel", "orgchem.weizmann.ac.il", + DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://orgchem.weizmann.ac.il/pub/FreeBSD-2.0.5-ALPHA", 0 }, + { "Japan", "ftp.sra.co.jp", + DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://ftp.sra.co.jp/pub/os/FreeBSD/distribution/2.0.5-ALPHA", 0 }, + { "Japan-2", "ftp.mei.co.jp", + DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://ftp.mei.co.jp/free/PC-UNIX/FreeBSD/2.0.5-ALPHA", 0 }, + { "Japan-3", "ftp.waseda.ac.jp", + DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://ftp.waseda.ac.jp/pub/FreeBSD/2.0.5-ALPHA", 0 }, + { "Japan-4", "ftp.pu-toyama.ac.jp", + DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://ftp.pu-toyama.ac.jp/pub/FreeBSD/2.0.5-ALPHA", 0 }, + { "Japan-5", "ftpsv1.u-aizu.ac.jp", + DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://ftpsv1.u-aizu.ac.jp/pub/os/FreeBSD/2.0.5-ALPHA", 0 }, + { "Japan-6", "tutserver.tutcc.tut.ac.jp", + DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://tutserver.tutcc.tut.ac.jp/FreeBSD/FreeBSD-2.0.5-ALPHA", 0 }, + { "Japan-7", "ftp.ee.uec.ac.jp", + DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://ftp.ee.uec.ac.jp/pub/os/FreeBSD.other/FreeBSD-2.0.5-ALPHA", 0 }, + { "Korea", "ftp.cau.ac.kr", + DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://ftp.cau.ac.kr/pub/FreeBSD/2.0.5-ALPHA", 0 }, + { "Netherlands", "ftp.nl.net", + DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://ftp.nl.net/pub/os/FreeBSD/2.0.5-ALPHA", 0 }, + { "Russia", "ftp.kiae.su", + DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://ftp.kiae.su/FreeBSD/2.0.5-ALPHA", 0 }, + { "Sweden", "ftp.luth.se", + DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://ftp.luth.se/pub/FreeBSD/2.0.5-ALPHA", 0 }, + { "Taiwan", "netbsd.csie.nctu.edu.tw", + DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://netbsd.csie.nctu.edu.tw/pub/FreeBSD/2.0.5-ALPHA", 0 }, + { "Thailand", "ftp.nectec.or.th", + DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://ftp.nectec.or.th/pub/FreeBSD/2.0.5-ALPHA", 0 }, + { "UK", "ftp.demon.co.uk", + DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://ftp.demon.co.uk/pub/BSD/FreeBSD/2.0.5-ALPHA", 0 }, + { "UK-2", "src.doc.ic.ac.uk", + DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://src.doc.ic.ac.uk/packages/unix/FreeBSD/2.0.5-ALPHA", 0 }, + { "UK-3", "unix.hensa.ac.uk", + DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://unix.hensa.ac.uk/pub/walnut.creek/FreeBSD/2.0.5-ALPHA", 0 }, + { "USA", "ref.tfs.com", + DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://ref.tfs.com/pub/FreeBSD/2.0.5-ALPHA", 0 }, + { "USA-2", "ftp.dataplex.net", + DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://ftp.dataplex.net/pub/FreeBSD/2.0.5-ALPHA", 0 }, + { "USA-3", "kryten.atinc.com", + DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://kryten.atinc.com/pub/FreeBSD/2.0.5-ALPHA", 0 }, + { "USA-4", "ftp.neosoft.com", + DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://ftp.neosoft.com/systems/FreeBSD/2.0.5-ALPHA", 0 }, + { NULL } } }; /* The media selection menu */ DMenu MenuMedia = { - DMENU_NORMAL_TYPE, - "Choose Installation Media", - "FreeBSD can be installed from a variety of different installation\n\ +DMENU_NORMAL_TYPE, +"Choose Installation Media", +"FreeBSD can be installed from a variety of different installation\n\ media, ranging from floppies to the Internet. If you're installing\n\ FreeBSD from a supported CDROM drive then this is generally the best\n\ method to use unless you have some overriding reason for using another\n\ method. Please also note that the DES distribution is NOT available on \n\ CDROM due to U.S. export restrictions.", - "Press F1 for more information on the various media types", - "media.hlp", - { { "CDROM", "Install from a FreeBSD CDROM", - DMENU_CALL, (void *)mediaSetCDROM, 0 }, - { "FLOPPY", "Install from a floppy disk set", - DMENU_CALL, (void *)mediaSetFloppy, 0 }, - { "DOS", "Install from a DOS partition", - DMENU_CALL, (void *)mediaSetDOS, 0 }, - { "TAPE", "Install from SCSI or QIC tape", - DMENU_CALL, (void *)mediaSetTape, 0 }, - { "FTP", "Install from an Internet FTP server", - DMENU_CALL, (void *)mediaSetFTP, 0 }, - { "FILESYSTEM", "Install from a UFS or NFS mounted distribution", - DMENU_CALL, (void *)mediaSetFS, 0 }, - { NULL } }, +"Press F1 for more information on the various media types", +"media.hlp", +{ { "CDROM", "Install from a FreeBSD CDROM", + DMENU_CALL, (void *)mediaSetCDROM, 0 }, + { "FLOPPY", "Install from a floppy disk set", + DMENU_CALL, (void *)mediaSetFloppy, 0 }, + { "DOS", "Install from a DOS partition", + DMENU_CALL, (void *)mediaSetDOS, 0 }, + { "TAPE", "Install from SCSI or QIC tape", + DMENU_CALL, (void *)mediaSetTape, 0 }, + { "FTP", "Install from an Internet FTP server", + DMENU_CALL, (void *)mediaSetFTP, 0 }, + { "FILESYSTEM", "Install from a UFS or NFS mounted distribution", + DMENU_CALL, (void *)mediaSetFS, 0 }, + { NULL } }, }; /* The installation type menu */ DMenu MenuInstallType = { - DMENU_NORMAL_TYPE, - "Choose Installation Type", - "As a convenience, we provide several `canned' installation types. \ +DMENU_NORMAL_TYPE, +"Choose Installation Type", +"As a convenience, we provide several `canned' installation types. \ These pick what we consider to be the most reasonable defaults for the \ type of system in question. If you would prefer to pick and choose \ the list of distributions yourself, simply select `custom'.", - "Press F1 for more information on the various distributions", - "dist_types.hlp", - { { "Developer", "Includes full sources, binaries and doc but no games.", +"Press F1 for more information on the various distributions", +"dist_types.hlp", +{ { "Developer", "Includes full sources, binaries and doc but no games.", DMENU_CALL, (void *)distSetDeveloper, 0 }, - { "X-Developer", "Same as above, but includes XFree86.", + { "X-Developer", "Same as above, but includes XFree86.", DMENU_CALL, (void *)distSetXDeveloper, 0 }, - { "User", "General user. Binaries and doc but no sources.", + { "User", "General user. Binaries and doc but no sources.", DMENU_CALL, (void *)distSetUser, 0 }, - { "X-User", "Same as above, but includes XFree86.", + { "X-User", "Same as above, but includes XFree86.", DMENU_CALL, (void *)distSetXUser, 0 }, - { "Minimal", "The smallest configuration possible.", + { "Minimal", "The smallest configuration possible.", DMENU_CALL, (void *)distSetMinimum, 0 }, - { "Everything", "The entire source and binary distribution.", + { "Everything", "The entire source and binary distribution.", DMENU_CALL, (void *)distSetEverything, 0 }, - { "Custom", "Specify your own distribution set", + { "Custom", "Specify your own distribution set", DMENU_SUBMENU, (void *)&MenuDistributions, 0 }, - { NULL } }, + { NULL } }, }; DMenu MenuDistributions = { - DMENU_MULTIPLE_TYPE, - "Select the distributions you wish to install.", - "Please check off the distributions you wish to install.", - "Press F1 for a more complete description of these distributions.", - "distribution_types.hlp", - { { "*bin", "Binary base distribution (required)", +DMENU_MULTIPLE_TYPE, +"Select the distributions you wish to install.", +"Please check off the distributions you wish to install.", +"Press F1 for a more complete description of these distributions.", +"distribution_types.hlp", +{ { "*bin", "Binary base distribution (required)", DMENU_NOP, NULL, 0 }, - { "commercial", "Commercial demos and shareware", + { "commercial", "Commercial demos and shareware", DMENU_NOP, NULL, 0 }, - { "compat1x", "FreeBSD 1.x binary compatability package", + { "compat1x", "FreeBSD 1.x binary compatability package", DMENU_NOP, NULL, 0 }, - { "DES", "DES encryption code and sources", + { "DES", "DES encryption code and sources", DMENU_NOP, NULL, 0 }, - { "dict", "Spelling checker disctionary files", + { "dict", "Spelling checker disctionary files", DMENU_NOP, NULL, 0 }, - { "games", "Games and other amusements (non-commercial)", + { "games", "Games and other amusements (non-commercial)", DMENU_NOP, NULL, 0 }, - { "info", "GNU info files", + { "info", "GNU info files", DMENU_NOP, NULL, 0 }, - { "man", "System manual pages - strongly recommended", + { "man", "System manual pages - strongly recommended", DMENU_NOP, NULL, 0 }, - { "proflibs", "Profiled versions of the libraries", + { "proflibs", "Profiled versions of the libraries", DMENU_NOP, NULL, 0 }, - { "src", "Sources for everything but DES", + { "src", "Sources for everything but DES", DMENU_NOP, NULL, 0 }, - { "XFree86", "The XFree86 3.1.1 distribution", + { "XFree86", "The XFree86 3.1.1 distribution", DMENU_NOP, NULL, 0 }, - { NULL } }, -}; - -/* The installation options menu */ -DMenu MenuInstallOptions = { - DMENU_NORMAL_TYPE, - "Choose Installation Options", - "blah blah", - NULL, - NULL, - { { NULL } }, + { NULL } }, }; DMenu MenuDiskDevices = { - DMENU_MULTIPLE_TYPE, - "Select Drive(s)", - "Please select the drive, or drives, on which you wish to install\n\ +DMENU_MULTIPLE_TYPE, +"Select Drive(s)", +"Please select the drive, or drives, on which you wish to install\n\ FreeBSD. You need to select at least one drive containing some free\n\ space, though FreeBSD can be installed across several drives if you do\n\ not have the required space on a single drive. If you wish to boot\n\ off a drive that's not a `zero drive', or have multiple operating\n\ systems on your machine, you will have the option to install a boot\n\ manager later.", - "Press F1 for more information on what you see here.", - "drives.hlp", - { { NULL } }, +"Press F1 for more information on what you see here.", +"drives.hlp", +{ { NULL } }, +}; + +/* The installation options menu */ +DMenu MenuInstallOptions = { +DMENU_NORMAL_TYPE, +"Choose Installation Options", +"blah blah", +NULL, +NULL, +{ { NULL } }, }; /* The main installation menu */ DMenu MenuInstall = { - DMENU_NORMAL_TYPE, - "Choose Installation Options", /* title */ - "Before installation can continue, you need to specify a few items\n\ +DMENU_NORMAL_TYPE, +"Choose Installation Options", /* title */ +"Before installation can continue, you need to specify a few items\n\ of information regarding the location of the distribution and the kind\n\ of installation you want to have (and where). There are also a number\n\ of options you can specify in the Options menu. If you do not wish to\n\ install FreeBSD at this time, you may select Cancel to leave this menu", - "You may wish to read the install guide - press F1 to do so", - "install.hlp", - { { "Media", "Choose Installation media type", /* M */ - DMENU_SUBMENU, (void *)&MenuMedia, 0 }, - { "Type", "Choose the type of installation you want", /* T */ - DMENU_SUBMENU, (void *)&MenuInstallType, 0 }, - { "Options", "Specify installation options", /* O */ - DMENU_SUBMENU, (void *)&MenuInstallOptions, 0 }, - { "Proceed", "Proceed with installation", /* P */ - DMENU_CANCEL, (void *)NULL, 0 }, - { NULL } }, +"You may also wish to read the install guide - press F1 to do so", +"install.hlp", +{ { "Media", "Choose Installation media type", /* M */ + DMENU_SUBMENU, (void *)&MenuMedia, 0 }, + { "Type", "Choose the type of installation you want", /* T */ + DMENU_SUBMENU, (void *)&MenuInstallType, 0 }, + { "Options", "Specify installation options", /* O */ + DMENU_SUBMENU, (void *)&MenuInstallOptions, 0 }, + { "Proceed", "Proceed with installation", /* P */ + DMENU_CANCEL, (void *)NULL, 0 }, + { NULL } }, }; diff --git a/usr.sbin/sysinstall/sysinstall.h b/usr.sbin/sysinstall/sysinstall.h index fad3398..f9e3ec7 100644 --- a/usr.sbin/sysinstall/sysinstall.h +++ b/usr.sbin/sysinstall/sysinstall.h @@ -4,7 +4,7 @@ * 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.11 1995/05/07 23:37:34 jkh Exp $ + * $Id: sysinstall.h,v 1.12 1995/05/08 06:06:28 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -199,7 +199,7 @@ extern Boolean OnVTY; /* On a syscons VTY? */ extern Variable *VarHead; /* The head of the variable chain */ extern unsigned int Dists; /* Which distributions we want */ extern unsigned int SrcDists; /* Which src distributions we want */ - +extern struct disk *Disks[]; /* The disks we're working on */ /*** Prototypes ***/ @@ -209,13 +209,18 @@ extern void command_sort(void); extern void command_execute(void); extern void command_add(char *key, char *fmt, ...); -/* globals.c */ -extern void globalsInit(void); +/* devices.c */ +extern struct disk *device_slice_disk(struct disk *d); +extern DMenu *device_create_disk_menu(DMenu *menu, Device **rdevs, int (*hook)()); -/* install.c */ -extern int installCustom(char *str); -extern int installExpress(char *str); -extern int installMaint(char *str); +/* disks.c */ +extern void partition_disks(void); +extern int write_disks(void); +extern void make_filesystems(void); +extern void cpio_extract(void); +extern void extract_dists(void); +extern void install_configuration_files(void); +extern void do_final_setup(void); /* dist.c */ extern int distSetDeveloper(char *str); @@ -225,34 +230,52 @@ extern int distSetXUser(char *str); extern int distSetMinimum(char *str); extern int distSetEverything(char *str); -/* system.c */ -extern void systemInitialize(int argc, char **argv); -extern void systemShutdown(void); -extern void systemWelcome(void); -extern int systemExecute(char *cmd); -extern int systemShellEscape(void); -extern int systemDisplayFile(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 int vsystem(char *fmt, ...); - -/* disks.c */ -extern void partition_disks(struct disk **disks); -extern int write_disks(struct disk **disks); -extern void make_filesystems(struct disk **disks); -extern void cpio_extract(void); -extern void extract_dists(struct disk **disks); -extern void install_configuration_files(struct disk **disks); -extern void do_final_setup(struct disk **disks); - /* dmenu.c */ extern void dmenuOpen(DMenu *menu, int *choice, int *scroll, int *curr, int *max); +/* globals.c */ +extern void globalsInit(void); + +/* install.c */ +extern int installCustom(char *str); +extern int installExpress(char *str); +extern int installMaint(char *str); + +/* lang.c */ +extern void lang_set_Danish(char *str); +extern void lang_set_Dutch(char *str); +extern void lang_set_English(char *str); +extern void lang_set_French(char *str); +extern void lang_set_German(char *str); +extern void lang_set_Italian(char *str); +extern void lang_set_Japanese(char *str); +extern void lang_set_Norwegian(char *str); +extern void lang_set_Russian(char *str); +extern void lang_set_Spanish(char *str); +extern void lang_set_Swedish(char *str); + +/* makedevs.c (auto-generated) */ +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_8x14[]; +extern const u_char font_cp850_8x14[]; +extern const u_char font_koi8_r_8x14[]; +extern const u_char koi8_r2cp866[]; + +/* media.c */ +extern int mediaSetCDROM(char *str); +extern int mediaSetFloppy(char *str); +extern int mediaSetDOS(char *str); +extern int mediaSetTape(char *str); +extern int mediaSetFTP(char *str); +extern int mediaSetFS(char *str); + /* misc.c */ extern Boolean file_readable(char *fname); extern Boolean file_executable(char *fname); @@ -266,9 +289,6 @@ extern char **item_add_pair(char **list, char *item1, char *item2, int *curr, int *max); extern void items_free(char **list, int *curr, int *max); -/* termcap.c */ -extern int set_termcap(void); - /* msg.c */ extern void msgInfo(char *fmt, ...); extern void msgYap(char *fmt, ...); @@ -281,50 +301,28 @@ extern void msgNotify(char *fmt, ...); extern int msgYesNo(char *fmt, ...); extern char *msgGetInput(char *buf, char *fmt, ...); -/* media.c */ -extern int mediaSetCDROM(char *str); -extern int mediaSetFloppy(char *str); -extern int mediaSetDOS(char *str); -extern int mediaSetTape(char *str); -extern int mediaSetFTP(char *str); -extern int mediaSetFS(char *str); +/* system.c */ +extern void systemInitialize(int argc, char **argv); +extern void systemShutdown(void); +extern void systemWelcome(void); +extern int systemExecute(char *cmd); +extern int systemShellEscape(void); +extern int systemDisplayFile(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 int vsystem(char *fmt, ...); -/* devices.c */ -extern Device *device_get_all(DeviceType type, int *ndevs); -extern struct disk *device_slice_disk(struct disk *d); -extern DMenu *device_create_disk_menu(DMenu *menu, Device **rdevs, - int (*func)()); +/* termcap.c */ +extern int set_termcap(void); /* variables.c */ extern void variable_set(char *var); extern void variable_set2(char *name, char *value); -/* lang.c */ -extern void lang_set_Danish(char *str); -extern void lang_set_Dutch(char *str); -extern void lang_set_English(char *str); -extern void lang_set_French(char *str); -extern void lang_set_German(char *str); -extern void lang_set_Italian(char *str); -extern void lang_set_Japanese(char *str); -extern void lang_set_Norwegian(char *str); -extern void lang_set_Russian(char *str); -extern void lang_set_Spanish(char *str); -extern void lang_set_Swedish(char *str); - -/* makedevs.c (auto-generated) */ -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_8x14[]; -extern const u_char font_cp850_8x14[]; -extern const u_char font_koi8_r_8x14[]; -extern const u_char koi8_r2cp866[]; - /* wizard.c */ extern void slice_wizard(struct disk *d); |