summaryrefslogtreecommitdiff
path: root/release/sysinstall
diff options
context:
space:
mode:
authorJordan K. Hubbard <jkh@FreeBSD.org>1995-11-03 12:02:45 +0000
committerJordan K. Hubbard <jkh@FreeBSD.org>1995-11-03 12:02:45 +0000
commit6161b8559fcce91a5dbe2e659cb6d8bee7cd6843 (patch)
treea41d02c4a2a9ac683b9044b4933fc794b227b0d9 /release/sysinstall
parent50513e23ca7b5f41cfb989bd4142e7d5b965eed7 (diff)
Notes
Diffstat (limited to 'release/sysinstall')
-rw-r--r--release/sysinstall/Makefile2
-rw-r--r--release/sysinstall/cdrom.c6
-rw-r--r--release/sysinstall/config.c101
-rw-r--r--release/sysinstall/decode.c3
-rw-r--r--release/sysinstall/devices.c6
-rw-r--r--release/sysinstall/ftp_strat.c54
-rw-r--r--release/sysinstall/install.c112
-rw-r--r--release/sysinstall/label.c3
-rw-r--r--release/sysinstall/menus.c54
-rw-r--r--release/sysinstall/sysinstall.h18
10 files changed, 215 insertions, 144 deletions
diff --git a/release/sysinstall/Makefile b/release/sysinstall/Makefile
index cae55bd097f0..b19b3b48b704 100644
--- a/release/sysinstall/Makefile
+++ b/release/sysinstall/Makefile
@@ -7,7 +7,7 @@ CLEANFILES= makedevs.c rtermcap
SRCS= apache.c attr.c cdrom.c command.c config.c decode.c devices.c \
disks.c dist.c dmenu.c doc.c dos.c floppy.c ftp.c ftp_strat.c \
globals.c index.c install.c installFinal.c installPreconfig.c \
- installUpgrade.c label.c main.c makedevs.c media.c menus.c \
+ installUpgrade.c label.c lndir.c main.c makedevs.c media.c menus.c \
misc.c msg.c network.c nfs.c options.c package.c system.c \
tape.c tcpip.c termcap.c ufs.c variable.c wizard.c
diff --git a/release/sysinstall/cdrom.c b/release/sysinstall/cdrom.c
index c449005a01d6..f06a90cd28b1 100644
--- a/release/sysinstall/cdrom.c
+++ b/release/sysinstall/cdrom.c
@@ -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: cdrom.c,v 1.7.2.9 1995/10/22 01:32:37 jkh Exp $
+ * $Id: cdrom.c,v 1.7.2.11 1995/10/22 17:38:57 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -58,7 +58,9 @@
#include <sys/mount.h>
#undef CD9660
-static Boolean cdromMounted;
+/* This isn't static, like the others, since it's often useful to know whether or not we have a CDROM
+ available in some of the other installation screens. */
+Boolean cdromMounted;
Boolean
mediaInitCDROM(Device *dev)
diff --git a/release/sysinstall/config.c b/release/sysinstall/config.c
index 4daf4bc96f2f..9aea18a7dc36 100644
--- a/release/sysinstall/config.c
+++ b/release/sysinstall/config.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: config.c,v 1.16.2.30 1995/10/27 03:59:28 jkh Exp $
+ * $Id: config.c,v 1.16.2.31 1995/10/27 16:42:44 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -287,9 +287,11 @@ configSysconfig(void)
fclose(fp);
fp = fopen("/etc/sysconfig", "w");
for (i = 0; i < nlines; i++) {
+ static Boolean firstTime = TRUE;
+
fprintf(fp, lines[i]);
/* Stand by for bogus special case handling - we try to dump the interface specs here */
- if (!strncmp(lines[i], VAR_INTERFACES, strlen(VAR_INTERFACES))) {
+ if (firstTime && !strncmp(lines[i], VAR_INTERFACES, strlen(VAR_INTERFACES))) {
Device **devp;
int j, cnt;
@@ -303,6 +305,7 @@ configSysconfig(void)
fprintf(fp, "%s=\"%s\"\n", iname, cp);
}
}
+ firstTime = FALSE;
}
free(lines[i]);
}
@@ -384,15 +387,6 @@ skip:
}
int
-configNetworking(char *str)
-{
- if (dmenuOpenSimple(&MenuNetworking))
- return installNetworking(str);
- else
- return RET_FAIL;
-}
-
-int
configRoutedFlags(char *str)
{
return variable_get_value(VAR_ROUTEDFLAGS,
@@ -470,47 +464,62 @@ configPorts(char *str)
{
char *cp, *dist = NULL; /* Shut up compiler */
- if (file_executable("/usr/X11R6/bin/lndir")) {
- if (!variable_get(VAR_PORTS_PATH))
- variable_set2(VAR_PORTS_PATH, dist = "/cdrom/ports");
- while (!directoryExists(dist)) {
- dist = variable_get_value(VAR_PORTS_PATH,
- "Unable to locate a ports tree on CDROM. Please specify the\n"
- "location of the master ports directory you wish to create the\n"
- "link tree to.");
- if (!dist)
- break;
+ if (!variable_get(VAR_PORTS_PATH))
+ variable_set2(VAR_PORTS_PATH, dist = "/cdrom/ports");
+ while (!directoryExists(dist)) {
+ dist = variable_get_value(VAR_PORTS_PATH,
+ "Unable to locate a ports tree on CDROM. Please specify the\n"
+ "location of the master ports directory you wish to create the\n"
+ "link tree to.");
+ if (!dist)
+ break;
+ }
+ if (dist) {
+ cp = msgGetInput("/usr/ports",
+ "Where would you like to create the link tree?"
+ "(press [ENTER] for default location). The link tree should\n"
+ "reside in a directory with as much free space as possible,\n"
+ "as you'll need space to compile any ports.");
+ if (!cp || !*cp)
+ return RET_FAIL;
+ if (Mkdir(cp, NULL)) {
+ dialog_clear();
+ msgConfirm("Unable to make the %s directory!", cp);
+ return RET_FAIL;
}
- if (dist) {
- cp = msgGetInput("/usr/ports",
- "Where would you like to create the link tree?"
- "(press [ENTER] for default location).");
- if (!cp || !*cp)
- return RET_FAIL;
- if (Mkdir(cp, NULL)) {
+ else {
+ if (strcmp(cp, "/usr/ports")) {
+ unlink("/usr/ports");
+ if (symlink(cp, "/usr/ports") == -1) {
+ msgConfirm("Unable to create a symlink from /usr/ports to %s!\n"
+ "I can't continue, sorry!");
+ return RET_FAIL;
+ }
+ else {
+ msgConfirm("NOTE: This directory is also now symlinked to /usr/ports\n"
+ "which, for a variety of reasons, is the directory the ports\n"
+ "framework expects to find its files in. You should refer to\n"
+ "/usr/ports instead of %s directly when you're working in the\n"
+ "ports collection.");
+ }
+ }
+ msgNotify("Making a link tree from %s to %s.", dist, cp);
+ if (lndir(dist, cp) != RET_SUCCESS) {
dialog_clear();
- msgConfirm("Unable to make the %s directory!", cp);
- return RET_FAIL;
+ msgConfirm("The lndir function returned an error status and may not have.\n"
+ "successfully generated the link tree. You may wish to inspect\n"
+ "the /usr/ports directory carefully for any missing link files.");
}
else {
- msgNotify("Making link tree from %s to %s area.", dist, cp);
- if (vsystem("/usr/X11R6/bin/lndir %s %s", dist, cp)) {
- dialog_clear();
- msgConfirm("The lndir command returned an error status and may not have.\n"
- "successfully generated the link tree. You may wish to inspect\n"
- "%s carefully for any missing link files.");
- }
+ msgConfirm("The /usr/ports directory is now ready to use. When the system comes\n"
+ "up fully, you can cd to this directory and type `make' in any sub-\n"
+ "directory for which you'd like to compile a port. You can also\n"
+ "cd to /usr/ports and type `make print-index' for a complete list of all\n"
+ "ports in the hierarchy.");
}
}
- else
- return RET_FAIL;
- }
- else {
- dialog_clear();
- msgConfirm("You are missing the lndir command from /usr/X11R6/bin and\n"
- "cannot run this utility. You may wish to do this manually\n"
- "later by extracting just lndir from the X distribution and\n"
- "using it to create the link tree.");
}
+ else
+ return RET_FAIL;
return RET_SUCCESS;
}
diff --git a/release/sysinstall/decode.c b/release/sysinstall/decode.c
index bc5cbd445165..7a73cc747be2 100644
--- a/release/sysinstall/decode.c
+++ b/release/sysinstall/decode.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: decode.c,v 1.6.2.3 1995/10/18 00:11:53 jkh Exp $
+ * $Id: decode.c,v 1.6.2.4 1995/10/19 15:54:54 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -95,6 +95,7 @@ dispatch(DMenuItem *tmp, char *name)
case DMENU_SET_VARIABLE:
variable_set((char *)tmp->ptr);
+ msgInfo("Set %s", tmp->ptr);
break;
case DMENU_SET_FLAG:
diff --git a/release/sysinstall/devices.c b/release/sysinstall/devices.c
index fd7d9451b417..ff80535dfd17 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.36.2.7 1995/10/22 17:39:00 jkh Exp $
+ * $Id: devices.c,v 1.36.2.8 1995/10/30 08:04:44 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -82,8 +82,8 @@ static struct {
{ DEVICE_TYPE_CDROM, "scd1a", "Sony CDROM drive - CDU31/33A type (2nd unit)" },
{ DEVICE_TYPE_CDROM, "matcd0a", "Matsushita CDROM ('sound blaster' type)" },
{ DEVICE_TYPE_CDROM, "matcd1a", "Matsushita CDROM (2nd unit)" },
- { DEVICE_TYPE_CDROM, "wcd0c", "ATAPI IDE CDROM" },
- { DEVICE_TYPE_CDROM, "wcd1c", "ATAPI IDE CDROM (2nd unit)" },
+ { DEVICE_TYPE_CDROM, "wcd0c", "ATAPI IDE CDROM" },
+ { DEVICE_TYPE_CDROM, "wcd1c", "ATAPI IDE CDROM (2nd unit)" },
{ DEVICE_TYPE_TAPE, "rst0", "SCSI tape drive" },
{ DEVICE_TYPE_TAPE, "rst1", "SCSI tape drive (2nd unit)" },
{ DEVICE_TYPE_TAPE, "ft0", "Floppy tape drive (QIC-02)" },
diff --git a/release/sysinstall/ftp_strat.c b/release/sysinstall/ftp_strat.c
index a8e9ee99654c..b74f5b7444b5 100644
--- a/release/sysinstall/ftp_strat.c
+++ b/release/sysinstall/ftp_strat.c
@@ -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: ftp_strat.c,v 1.7.2.33 1995/10/24 02:17:47 jkh Exp $
+ * $Id: ftp_strat.c,v 1.7.2.35 1995/10/26 08:55:42 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -56,7 +56,6 @@ Boolean ftpInitted = FALSE;
static FTP_t ftp;
extern int FtpPort;
-static int reselectCount = 0;
static char *lastRequest;
static Boolean
@@ -70,8 +69,6 @@ get_new_host(Device *dev, Boolean tentative)
if (tentative || (cp && strcmp(cp, "reselect")))
i = TRUE;
else {
- ++reselectCount;
-
i = FALSE;
dialog_clear();
msgConfirm("The %s file failed to load from the FTP site you\n"
@@ -82,29 +79,33 @@ get_new_host(Device *dev, Boolean tentative)
if (j == RET_SUCCESS) {
/* Bounce the link if necessary */
if (ftpInitted) {
+ msgDebug("Bouncing FTP connection before reselecting new host.\n");
dev->shutdown(dev);
i = dev->init(dev);
}
}
+ else {
+ msgDebug("User elected not to reselect, shutting down open connection.\n");
+ dev->shutdown(dev);
+ }
}
return i;
}
/* Should we throw in the towel? */
-static int
+static Boolean
ftpShouldAbort(Device *dev, int retries)
{
char *cp, *cp2;
- int maxretries, rval = 0;
+ int maxretries, rval = FALSE;
cp = variable_get(VAR_FTP_ONERROR);
cp2 = variable_get(VAR_FTP_RETRIES);
- maxretries = cp2 ? atoi(cp2) : MAX_FTP_RETRIES;
- if (retries >= maxretries || (cp && !strcmp(cp, "abort"))) {
- rval = 1;
+ maxretries = atoi(cp2);
+ if (retries > maxretries || (cp && !strcmp(cp, "abort"))) {
+ rval = TRUE;
msgDebug("Aborting FTP connection.\n");
dev->shutdown(dev);
- reselectCount = 0;
}
return rval;
}
@@ -129,9 +130,6 @@ mediaInitFTP(Device *dev)
msgConfirm("FTP initialisation failed!");
return FALSE;
}
- if (isDebug())
- msgDebug("Initialized FTP library.\n");
-
cp = variable_get(VAR_FTP_PATH);
if (!cp) {
dialog_clear();
@@ -181,6 +179,7 @@ mediaInitFTP(Device *dev)
strcpy(password, variable_get(VAR_FTP_PASS) ? variable_get(VAR_FTP_PASS) : login_name);
}
retries = 0;
+
retry:
msgNotify("Logging in as %s..", login_name);
if (FtpOpen(ftp, hostname, login_name, password) != 0) {
@@ -228,7 +227,7 @@ int
mediaGetFTP(Device *dev, char *file, Boolean tentative)
{
int fd;
- int i, nretries;
+ int nretries;
char *fp;
char buf[PATH_MAX];
@@ -246,36 +245,35 @@ mediaGetFTP(Device *dev, char *file, Boolean tentative)
dev->shutdown(dev);
return -2;
}
- else if (tentative)
+ else if (tentative || ftpShouldAbort(dev, ++nretries))
return -1;
- else if ((i = ftpShouldAbort(dev, ++nretries))) {
- if (i == -1) /* hard error */
- return -2;
- else if (!get_new_host(dev, tentative))
- return -1;
- nretries = 0;
- fp = file;
- }
else {
- /* Try some bogus alternatives */
+ /* Try some alternatives */
switch (nretries) {
case 1:
sprintf(buf, "dists/%s", file);
+ fp = buf;
break;
case 2:
sprintf(buf, "%s/%s", variable_get(VAR_RELNAME), file);
+ fp = buf;
break;
case 3:
sprintf(buf, "%s/dists/%s", variable_get(VAR_RELNAME), file);
+ fp = buf;
break;
- default:
- strcpy(buf, file);
- break;
+ case 4:
+ fp = file;
+ if (get_new_host(dev, tentative)) {
+ nretries = 0;
+ continue;
+ }
+ else
+ break;
}
- fp = buf;
}
}
return fd;
diff --git a/release/sysinstall/install.c b/release/sysinstall/install.c
index 6a9a6041609c..fee3dbe04aa7 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.71.2.61 1995/10/27 03:59:33 jkh Exp $
+ * $Id: install.c,v 1.71.2.63 1995/10/27 17:00:21 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -297,6 +297,32 @@ installFixit(char *str)
int
installExpress(char *str)
{
+ if (diskPartitionEditor("express") == RET_FAIL)
+ return RET_FAIL;
+
+ if (diskLabelEditor("express") == RET_FAIL)
+ return RET_FAIL;
+
+ if (!Dists) {
+ if (!dmenuOpenSimple(&MenuDistributions))
+ return RET_FAIL;
+ }
+
+ if (!mediaDevice) {
+ if (!dmenuOpenSimple(&MenuMedia) || !mediaDevice)
+ return RET_FAIL;
+ }
+
+ if (installCommit("express") == RET_FAIL)
+ return RET_FAIL;
+
+ return RET_DONE;
+}
+
+/* Novice mode installation */
+int
+installNovice(char *str)
+{
dialog_clear();
msgConfirm("In the next menu, you will need to set up a DOS-style (\"fdisk\") partitioning\n"
"scheme for your hard disk. If you simply wish to devote all disk space\n"
@@ -305,7 +331,7 @@ installExpress(char *str)
"by a (Q)uit. If you wish to allocate only free space to FreeBSD, move to a\n"
"partition marked \"unused\" and use the (C)reate command.");
- if (diskPartitionEditor("express") == RET_FAIL)
+ if (diskPartitionEditor("novice") == RET_FAIL)
return RET_FAIL;
dialog_clear();
@@ -316,7 +342,7 @@ installExpress(char *str)
"care for the layout chosen by (A)uto, press F1 for more information on\n"
"manual layout.");
- if (diskLabelEditor("express") == RET_FAIL)
+ if (diskLabelEditor("novice") == RET_FAIL)
return RET_FAIL;
if (!Dists) {
@@ -341,7 +367,7 @@ installExpress(char *str)
return RET_FAIL;
}
- if (installCommit("express") == RET_FAIL)
+ if (installCommit("novice") == RET_FAIL)
return RET_FAIL;
return RET_DONE;
@@ -359,6 +385,7 @@ int
installCommit(char *str)
{
int i;
+ extern Boolean cdromMounted;
if (!mediaVerify())
return RET_FAIL;
@@ -383,26 +410,51 @@ installCommit(char *str)
if (installFixup(NULL) == RET_FAIL)
i = RET_FAIL;
- if (i != RET_FAIL && str && !strcmp(str, "express")) {
+ if (i != RET_FAIL && !strcmp(str, "novice")) {
+ dialog_clear();
+ msgConfirm("Since you're running the novice installation, a few post-configuration\n"
+ "questions will be asked at this point. For any option you do not wish\n"
+ "to configure, select Cancel.");
+
dialog_clear();
- if (!msgYesNo("Since you're running the express installation, a few post-configuration\n"
- "questions will be asked at this point.\n\n"
- "The FreeBSD package collection is a collection of over 300 ready-to-run\n"
+ if (cdromMounted && !msgYesNo("Would you like to link to the ports tree on your CDROM?\n\n"
+ "This will require that you have your FreeBSD CD in the CDROM\n"
+ "drive to use the ports collection, but at substantial savings\n"
+ "in disk space."))
+ configPorts(NULL);
+
+ dialog_clear();
+ if (!msgYesNo("Would you like to configure Samba for connecting NETBUI clients to this\n"
+ "machine? (that is Windows 95, Windows NT or Windows for Workgroups\n"
+ "machines or others using compatible protocols)."))
+ configSamba(NULL);
+
+ dialog_clear();
+ if (!msgYesNo("Will this machine be an IP gateway (e.g. will it forward packets\n"
+ "between interfaces)?"))
+ variable_set2("gateway", "YES");
+
+ dialog_clear();
+ if (!msgYesNo("Do you want to allow anonymous FTP connections to this machine?"))
+ configNFSServer(NULL);
+
+ dialog_clear();
+ if (!msgYesNo("Do you wish to install a WEB server on this machine?"))
+ configApache(NULL);
+
+ dialog_clear();
+ if (!msgYesNo("The FreeBSD package collection is a collection of over 300 ready-to-run\n"
"applications, from text editors to games to WEB servers. If you've never\n"
"done so, it's definitely worth browsing through.\n\n"
"Would you like to do so now?"))
configPackages(NULL);
- dialog_clear();
- if (!msgYesNo("Would you like to configure any additional network devices or services?"))
- configNetworking(NULL);
-
/* XXX Put whatever other nice configuration questions you'd like to ask the user here XXX */
/* Final menu of last resort */
dialog_clear();
if (!msgYesNo("Would you like to go to the general configuration menu for any last\n"
- "additional configuration options?"))
+ "configuration options (some of which you may have already answered)?"))
dmenuOpenSimple(&MenuConfigure);
}
@@ -411,9 +463,9 @@ installCommit(char *str)
configSysconfig();
variable_set2(SYSTEM_STATE, i == RET_FAIL ? "installed+errors" : "installed");
- dialog_clear();
- /* Don't print this if we're express installing */
- if (strcmp(str, "express")) {
+
+ /* Don't print this if we're express or novice installing */
+ if (strcmp(str, "express") && strcmp(str, "novice")) {
if (Dists || i == RET_FAIL) {
dialog_clear();
msgConfirm("Installation completed with some errors. You may wish to\n"
@@ -438,7 +490,7 @@ installFixup(char *str)
if (!file_readable("/kernel")) {
if (file_readable("/kernel.GENERIC")) {
- if (vsystem("ln -f /kernel.GENERIC /kernel")) {
+ if (vsystem("cp -p /kernel.GENERIC /kernel")) {
dialog_clear();
msgConfirm("Unable to link /kernel into place!");
return RET_FAIL;
@@ -513,7 +565,7 @@ installFilesystems(char *str)
Chunk *c1, *c2, *rootdev, *swapdev, *usrdev;
Device **devs;
PartInfo *root;
- char dname[40];
+ char dname[80];
extern int MakeDevChunk(Chunk *c, char *n);
Boolean upgrade = FALSE;
@@ -524,12 +576,13 @@ installFilesystems(char *str)
command_clear();
upgrade = str && !strcmp(str, "upgrade");
- /* First, create and mount the root device */
- sprintf(dname, "/dev/%s", rootdev->name);
+ /* First, create and/or mount the root device */
+ sprintf(dname, "/dev/r%sa", rootdev->disk->name);
+
if (!MakeDevChunk(rootdev, "/dev") || !file_readable(dname)) {
dialog_clear();
msgConfirm("Unable to make device node for %s in /dev!\n"
- "The writing of filesystems will be aborted.", rootdev->name);
+ "The writing of filesystems will be aborted.", dname);
return RET_FAIL;
}
@@ -541,12 +594,12 @@ installFilesystems(char *str)
if (root->newfs) {
int i;
- msgNotify("Making a new root filesystem on %s", rootdev->name);
- i = vsystem("%s /dev/r%s", root->newfs_cmd, rootdev->name);
+ msgNotify("Making a new root filesystem on %s", dname);
+ i = vsystem("%s %s", root->newfs_cmd, dname);
if (i) {
dialog_clear();
- msgConfirm("Unable to make new root filesystem on /dev/r%s!\n"
- "Command returned status %d", rootdev->name, i);
+ msgConfirm("Unable to make new root filesystem on %s!\n"
+ "Command returned status %d", dname, i);
return RET_FAIL;
}
}
@@ -556,12 +609,12 @@ installFilesystems(char *str)
msgConfirm("Warning: Root device is selected read-only. It will be assumed\n"
"that you have the appropriate device entries already in /dev.\n");
}
- msgNotify("Checking integrity of existing %s filesystem.", rootdev->name);
- i = vsystem("fsck -y /dev/r%s", rootdev->name);
+ msgNotify("Checking integrity of existing %s filesystem.", dname);
+ i = vsystem("fsck -y %s", dname);
if (i) {
dialog_clear();
- msgConfirm("Warning: fsck returned status of %d for /dev/r%s.\n"
- "This partition may be unsafe to use.", i, rootdev->name);
+ msgConfirm("Warning: fsck returned status of %d for %s.\n"
+ "This partition may be unsafe to use.", i, dname);
}
}
if (Mount("/mnt", dname)) {
@@ -654,6 +707,7 @@ installVarDefaults(char *unused)
variable_set2(VAR_CONFIG_FILE, "freebsd.cfg");
variable_set2(VAR_FTP_STATE, "passive");
variable_set2(VAR_FTP_ONERROR, "abort");
+ variable_set2(VAR_FTP_RETRIES, MAX_FTP_RETRIES);
if (getpid() != 1)
variable_set2(SYSTEM_STATE, "update");
else
diff --git a/release/sysinstall/label.c b/release/sysinstall/label.c
index 6fa1c477466d..39a0f33adb7c 100644
--- a/release/sysinstall/label.c
+++ b/release/sysinstall/label.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: label.c,v 1.32.2.23 1995/10/24 02:18:11 jkh Exp $
+ * $Id: label.c,v 1.32.2.25 1995/10/26 08:55:52 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -249,6 +249,7 @@ record_label_chunks(Device **devs)
}
}
}
+
/* Now run through again and get the FreeBSD partition entries */
for (i = 0; devs[i]; i++) {
if (!devs[i]->enabled)
diff --git a/release/sysinstall/menus.c b/release/sysinstall/menus.c
index fc010593dd86..7cf8fedc8d4c 100644
--- a/release/sysinstall/menus.c
+++ b/release/sysinstall/menus.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: menus.c,v 1.42.2.37 1995/10/27 02:12:52 jkh Exp $
+ * $Id: menus.c,v 1.42.2.38 1995/10/30 08:04:48 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -66,9 +66,11 @@ option by pressing [ENTER].", /* prompt */
DMENU_SUBMENU, &MenuDocumentation, 0, 0 },
{ "Options", "Go to options editor", /* O */
DMENU_CALL, optionsEditor, 0, 0 },
- { "Express", "Begin a quick installation", /* E */
+ { "Novice", "Begin a novice installation (for beginners)", /* N */
+ DMENU_CALL, installNovice, 0, 0 },
+ { "Express", "Begin a quick installation (for the impatient)", /* E */
DMENU_CALL, installExpress, 0, 0 },
- { "Custom", "Begin a custom installation", /* C */
+ { "Custom", "Begin a custom installation (for experts)", /* C */
DMENU_SUBMENU, &MenuInstallCustom, 0, 0 },
{ "Fixit", "Mount fixit floppy and go into repair mode", /* F */
DMENU_CALL, installFixit, 0, 0 },
@@ -217,22 +219,18 @@ guaranteed to carry the full range of possible distributions.",
DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp.internet-eireann.ie/pub/FreeBSD/", 0, 0 },
{ "Israel", "orgchem.weizmann.ac.il",
DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://orgchem.weizmann.ac.il/pub/FreeBSD/", 0, 0 },
- { "Japan", "ftp.sra.co.jp",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp.sra.co.jp/pub/os/FreeBSD/", 0, 0 },
- { "Japan #2", "ftp.mei.co.jp",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp.mei.co.jp/free/PC-UNIX/FreeBSD/", 0, 0 },
- { "Japan #3", "ftp.waseda.ac.jp",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp.waseda.ac.jp/pub/FreeBSD/", 0, 0 },
- { "Japan #4", "ftp.pu-toyama.ac.jp",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp.pu-toyama.ac.jp/pub/FreeBSD/", 0, 0 },
- { "Japan #5", "ftpsv1.u-aizu.ac.jp",
- DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftpsv1.u-aizu.ac.jp/pub/os/FreeBSD/", 0, 0 },
- { "Japan #6", "ftp.tut.ac.jp",
- DMENU_SET_VARIABLE, "ftp://ftp.tut.ac.jp/FreeBSD/", 0, 0 },
- { "Japan #7", "ftp.ee.uec.ac.jp",
+ { "Japan", "ftp.tokyonet.ad.jp",
+ DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp.tokyonet.ad.jp/pub/FreeBSD/", 0, 0 },
+ { "Japan #2", "ftp.nisiq.net",
+ DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp.nisiq.net/pub/os/FreeBSD/", 0, 0 },
+ { "Japan #3", "ftp.iij.ad.jp",
+ DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp.iij.ad.jp/pub/FreeBSD/", 0, 0 },
+ { "Japan #4", "ftp.kuis.kyoto-u.ac.jp",
+ DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp.kuis.kyoto-u.ac.jp/BSD/FreeBSD/", 0, 0 },
+ { "Japan #5", "ftp.ee.uec.ac.jp",
DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp.ee.uec.ac.jp/pub/os/mirror/ftp.freebsd.org/", 0, 0 },
- { "Japan #8", "ftp.tokyonet.ad.jp",
- DMENU_SET_VARIABLE, "ftp://ftp.tokyonet.ad.jp/pub/FreeBSD/", 0, 0 },
+ { "Japan #6", "ftp.u-aizu.ac.jp",
+ DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp.u-aizu.ac.jp/pub/os/FreeBSD/", 0, 0 },
{ "Korea", "ftp.cau.ac.kr",
DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp.cau.ac.kr/pub/FreeBSD/", 0, 0 },
{ "Netherlands", "ftp.nl.net",
@@ -713,7 +711,7 @@ software not provided in the base distributions.",
{ "Mouse", "Select the type of mouse you have",
DMENU_SUBMENU, &MenuMouse, 0, 0 },
{ "Networking", "Configure additional network services",
- DMENU_CALL, configNetworking, 0, 0 },
+ DMENU_SUBMENU, &MenuNetworking, 0, 0 },
{ "Options", "Go to options editor.",
DMENU_CALL, optionsEditor, 0, 0 },
{ "Packages", "Install pre-packaged software for FreeBSD",
@@ -732,7 +730,7 @@ software not provided in the base distributions.",
};
DMenu MenuNetworking = {
- DMENU_MULTIPLE_TYPE | DMENU_SELECTION_RETURNS,
+ DMENU_NORMAL_TYPE,
"Network Services Menu",
"You may have already configured one network device (and the other\n\
various hostname/gateway/name server parameters) in the process\n\
@@ -743,13 +741,13 @@ aspects of your system's network configuration.",
{ { "Interfaces", "Configure additional network interfaces",
DMENU_CALL, tcpMenuSelect, 0, 0 },
{ "NFS client", "This machine will be an NFS client",
- DMENU_SET_VARIABLE, "nfs_client=YES", 0, 0, dmenuVarCheck },
+ DMENU_SET_VARIABLE, "nfs_client=YES", 0, 0, 0 },
{ "NFS server", "This machine will be an NFS server",
- DMENU_SET_VARIABLE, "nfs_server=YES", 0, 0, dmenuVarCheck },
+ DMENU_CALL, configNFSServer, 0, 0, 0 },
{ "Gateway", "This machine will route packets between interfaces",
- DMENU_SET_VARIABLE, "gateway=YES", 0, 0, dmenuVarCheck },
+ DMENU_SET_VARIABLE, "gateway=YES", 0, 0, 0 },
{ "Gated", "This machine wants to run gated",
- DMENU_SET_VARIABLE, "gated=YES", 0, 0, dmenuVarCheck },
+ DMENU_SET_VARIABLE, "gated=YES", 0, 0, 0 },
{ "Ntpdate", "Select a clock-syncronization server",
DMENU_SUBMENU, &MenuNTP, (int)"ntpdate", 0, dmenuVarCheck },
{ "Routed", "Set flags for routed (default: -q)",
@@ -757,13 +755,13 @@ aspects of your system's network configuration.",
{ "Rwhod", "This machine wants to run the rwho daemon",
DMENU_SET_VARIABLE, "rwhod=YES", 0, 0, dmenuVarCheck },
{ "Anon FTP", "This machine wishes to allow anonymous FTP.",
- DMENU_SET_VARIABLE, "anon_ftp=YES", 0, 0, dmenuVarCheck },
+ DMENU_CALL, configAnonFTP, 0, 0, 0 },
{ "WEB Server", "This machine wishes to be a WWW server.",
- DMENU_SET_VARIABLE, "apache_httpd=YES", 0, 0, dmenuVarCheck },
+ DMENU_CALL, configApache, 0, 0, 0 },
{ "Samba", "Install Samba for LanManager (NETBUI) access.",
- DMENU_SET_VARIABLE, "samba=YES", 0, 0, dmenuVarCheck },
+ DMENU_CALL, configSamba, 0, 0, 0 },
{ "PCNFSD", "Run authentication server for clients with PC-NFS.",
- DMENU_SET_VARIABLE, "pcnfsd=YES", 0, 0, dmenuVarCheck },
+ DMENU_SET_VARIABLE, "pcnfsd=YES", 0, 0, 0 },
{ NULL } },
};
diff --git a/release/sysinstall/sysinstall.h b/release/sysinstall/sysinstall.h
index 5db1292401c8..d8f5ba8277d2 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.42.2.40 1995/10/26 08:56:10 jkh Exp $
+ * $Id: sysinstall.h,v 1.42.2.41 1995/10/27 17:00:27 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -72,7 +72,7 @@
#define DEV_NAME_MAX 64 /* The maximum length of a device name */
#define DEV_MAX 100 /* The maximum number of devices we'll deal with */
#define INTERFACE_MAX 50 /* Maximum number of network interfaces we'll deal with */
-#define MAX_FTP_RETRIES 3 /* How many times to beat our heads against the wall */
+#define MAX_FTP_RETRIES "4" /* How many times to beat our heads against the wall */
#define RET_FAIL -1
#define RET_SUCCESS 0
@@ -357,7 +357,7 @@ extern DMenu MenuHTMLDoc; /* HTML Documentation menu */
/*** Prototypes ***/
/* apache.c */
-extern int installApache(char *str);
+extern int configApache(char *str);
/* attrs.c */
extern char *attr_match(Attribs *attr, char *name);
@@ -380,7 +380,6 @@ extern void command_func_add(char *key, commandFunc func, void *data);
extern int configFstab(void);
extern void configSysconfig(void);
extern void configResolv(void);
-extern int configNetworking(char *str);
extern int configPorts(char *str);
extern int configPackages(char *str);
extern int configSaverTimeout(char *str);
@@ -473,18 +472,27 @@ int index_extract(Device *dev, PkgNodePtr plist);
/* install.c */
extern int installCommit(char *str);
extern int installExpress(char *str);
+extern int installNovice(char *str);
extern int installFixit(char *str);
extern int installFixup(char *str);
extern int installUpgrade(char *str);
extern int installPreconfig(char *str);
-extern int installNetworking(char *str);
extern int installFilesystems(char *str);
extern int installVarDefaults(char *str);
+/* installFinal.c */
+extern int configGated(char *unused);
+extern int configAnonFTP(char *unused);
+extern int configSamba(char *unused);
+extern int configNFSServer(char *unused);
+
/* label.c */
extern int diskLabelEditor(char *str);
extern int diskLabelCommit(char *str);
+/* lndir.c */
+extern int lndir(char *from, char *to);
+
/* makedevs.c (auto-generated) */
extern const char termcap_vt100[];
extern const char termcap_cons25[];