Add a final configuration menu and the beginnings of the backing code

for it.  The ftp installation method is working well enough to test.
Many more bug fixes, says Gary.
This commit is contained in:
Jordan K. Hubbard 1995-05-24 01:27:15 +00:00
parent 95e34bfc2e
commit 9b03310b0c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=8715
17 changed files with 292 additions and 117 deletions

View File

@ -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.1 1995/05/23 02:40:50 jkh Exp $
* $Id: config.c,v 1.2 1995/05/23 18:06:12 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -212,3 +212,16 @@ config_resolv(void)
fclose(fp);
alreadyDone = TRUE;
}
int
config_packages(char *str)
{
return 0;
}
int
config_ports(char *str)
{
return 0;
}

View File

@ -119,6 +119,7 @@ FtpOpen(FTP_t ftp, char *host, char *user, char *passwd)
struct sockaddr_in sin;
int s;
char a,*p,buf[BUFSIZ];
unsigned long temp;
if (!user)
user = "ftp";
@ -126,17 +127,28 @@ FtpOpen(FTP_t ftp, char *host, char *user, char *passwd)
if (!passwd)
passwd = "??@??(FreeBSD:libftp)"; /* XXX */
msgDebug("FtpOpen(ftp, %s, %s, %s)\n", host, user, passwd);
temp = inet_addr(host);
if (temp != INADDR_NONE)
{
msgDebug("Using dotted IP address `%s'\n", host);
ftp->addrtype = sin.sin_family = AF_INET;
sin.sin_addr.s_addr = temp;
} else {
msgDebug("Trying to resolve `%s'\n", host);
he = gethostbyname(host);
if (!he)
{
msgDebug("Lookup of `%s' failed!\n", host);
return ENOENT;
se = getservbyname("ftp","tcp");
if (!se)
return ENOENT;
}
ftp->addrtype = sin.sin_family = he->h_addrtype;
bcopy(he->h_addr, (char *)&sin.sin_addr, he->h_length);
sin.sin_port = se->s_port;
}
sin.sin_port = htons(21);
if ((s = socket(he->h_addrtype, SOCK_STREAM, 0)) < 0)
return s;

View File

@ -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.48 1995/05/23 02:41:05 jkh Exp $
* $Id: install.c,v 1.49 1995/05/23 18:06:13 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -435,4 +435,5 @@ cpio_extract(void)
static void
do_final_setup(void)
{
dmenuOpenSimple(&MenuConfigure);
}

View File

@ -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: media_strategy.c,v 1.12 1995/05/23 02:41:11 jkh Exp $
* $Id: media_strategy.c,v 1.13 1995/05/23 18:06:14 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -54,6 +54,9 @@
#include <sys/param.h>
#include <sys/dkbad.h>
#include <sys/mman.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
#include "ftp.h"
@ -400,6 +403,7 @@ Boolean
mediaInitNetwork(Device *dev)
{
int i;
char *rp;
if (!strncmp("cuaa", dev->name, 4)) {
if (tcpStartPPP()) {
@ -413,18 +417,26 @@ mediaInitNetwork(Device *dev)
else {
char *cp, ifconfig[64];
sprintf(ifconfig, "%s%s", VAR_IFCONFIG, dev->name);
snprintf(ifconfig, 64, "%s%s", VAR_IFCONFIG, dev->name);
cp = getenv(ifconfig);
if (!cp) {
msgConfirm("The %s device is not configured. You will need to do so\nin the Networking configuration menu before proceeding.");
return FALSE;
}
i = vsystem("ifconfig %s", ifconfig);
i = vsystem("ifconfig %s %s", dev->name, cp);
if (i) {
msgConfirm("Unable to configure the %s interface!\nThis installation method cannot be used.");
msgConfirm("Unable to configure the %s interface!\nThis installation method cannot be used.", dev->name);
return FALSE;
}
}
rp = getenv(VAR_GATEWAY);
if (!rp)
msgConfirm("No gateway has been set. You will not be able to access machines\n
not on the local network\n");
else
vsystem("route add default %s", rp);
config_resolv();
return TRUE;
}
@ -455,6 +467,10 @@ mediaInitFTP(Device *dev)
int i;
char *url, *hostname, *dir, *dir_p;
char *my_name, email[BUFSIZ];
Device *netDevice = (Device *)dev->private;
if (netDevice->init)
(*netDevice->init)(netDevice);
if ((ftp = FtpInit()) == NULL) {
msgConfirm("FTP initialisation failed!");
@ -476,18 +492,22 @@ mediaInitFTP(Device *dev)
return FALSE;
}
msgDebug("Using URL `%s'\n", url);
hostname = url + 6;
dir = index(hostname, '/');
*(dir++) = '\0';
if (gethostbyname(hostname) == NULL) {
msgDebug("hostname = `%s'\n", hostname);
msgDebug("dir = `%s'\n", dir);
if ((gethostbyname(hostname) == NULL) && (inet_addr(hostname) == INADDR_NONE)) {
msgConfirm("Cannot resolve hostname `%s'!\n", hostname);
return FALSE;
}
snprintf(email, BUFSIZ, "installer@%s", my_name);
msgDebug("Using fake e-mail `%s'\n", email);
if ((i = FtpOpen(ftp, hostname, "anonymous", email)) != 0) {
msgConfirm("Couldn't open FTP connection to %s (%u)\n", strerror(i), i);
msgConfirm("Couldn't open FTP connection to %s: %s (%u)\n", hostname, strerror(i), i);
return FALSE;
}
@ -506,9 +526,75 @@ mediaInitFTP(Device *dev)
int
mediaGetFTP(char *dist)
{
int fd;
char buf[512];
int pfd[2], pid, numchunks;
const char *tmp;
struct attribs *dist_attr;
dist_attr = safe_malloc(sizeof(struct attribs) * MAX_ATTRIBS);
snprintf(buf, PATH_MAX, "/stand/info/%s.inf", dist);
if (attr_parse(&dist_attr, buf) == 0)
{
msgConfirm("Cannot load information file for distribution\n");
return -1;
}
tmp = attr_match(dist_attr, "pieces");
numchunks = atoi(tmp);
msgDebug("Attempting to extract distribution from %u files\n", numchunks);
if (numchunks == 1)
{
snprintf(buf, 512, "%s.aa", dist);
return(FtpGet(ftp, buf));
}
pipe(pfd);
pid = fork();
if (!pid)
{
int chunk = 0;
int retval;
dup2(pfd[1], 1); close(pfd[1]);
close(pfd[0]);
while (chunk < numchunks)
{
int n;
char *buffer;
buffer = safe_malloc(1024);
snprintf(buf, 512, "%s.%c%c", dist, (chunk / 26) + 'a', (chunk % 26) + 'a');
fd = FtpGet(ftp, buf);
while ((n = read(fd, buffer, 1024))>0)
{
retval = write(1, buffer, n);
if (retval != n)
{
msgConfirm("write didn't write out the complete file!\n
(wrote %d bytes of %d bytes)\n", retval, n);
exit(1);
}
close(fd);
++chunk;
}
FtpEOF(ftp);
}
close(1);
msgDebug("Extract of %s finished!!!\n", dist);
exit(0);
}
close(pfd[1]);
return(pfd[0]);
}
void
mediaCloseFTP(Device *dev)
{

View File

@ -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.24 1995/05/21 18:24:34 jkh Exp $
* $Id: menus.c,v 1.25 1995/05/23 02:41:13 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -205,7 +205,7 @@ To specify a URL not in this list, chose \"other\".",
DMENU_SET_VARIABLE, (void *)"ftp=ftp://ftp.freebsd.org/pub/FreeBSD/2.0.5-ALPHA", 0, 0 },
{ "Secondary Site", "freefall.cdrom.com",
DMENU_SET_VARIABLE, (void *)"ftp=ftp://freefall.cdrom.com/pub/FreeBSD/2.0.5-ALPHA", 0, 0 },
{ "Other", "Specify another ftp site by URL (e.g. ftp://some.site/pub/FreeBSD/..)",
{ "Other", "Specify some other ftp site by URL",
DMENU_SET_VARIABLE, (void *)"ftp=other", 0, 0 },
{ "Australia", "ftp.physics.usyd.edu.au",
DMENU_SET_VARIABLE, (void *)"ftp=ftp://ftp.physics.usyd.edu.au/FreeBSD/2.0.5-ALPHA", 0, 0 },
@ -377,7 +377,7 @@ selecting OK at this stage will chose them as defaults.",
{ "src", "Sources for everything but DES [120MB]",
DMENU_CALL, (void *)distSetSrc, 0 },
{ "XFree86", "The XFree86 3.1.1L distribution [?]",
DMENU_SUBMENU, (void *)&MenuXF86, 0 },
DMENU_SUBMENU, (void *)&MenuXF86Select, 0 },
{ NULL } },
};
@ -421,26 +421,6 @@ you wish to install.",
{ NULL } },
};
DMenu MenuXF86 = {
DMENU_NORMAL_TYPE,
"XFree86 3.1.1u1 Distribution",
"Welcome to the XFree86 3.1.1u1 distribution from The XFree86\n\
Project, Inc. Our recommended sequence is to Select the desired\n\
release components, Configure XFree86 and then (optionally)\n\
Start it up!",
"Press F1 to read the XFree86 release notes for FreeBSD",
"XFree86.hlp",
{ { "Select", "Select and load components of the XFree86 distribution",
DMENU_SUBMENU, &MenuXF86Select, 0, 0 },
{ "Configure", "Configure an installed XFree86 distribution",
DMENU_SYSTEM_COMMAND, "PATH=/usr/bin:/bin:/usr/X11R6/bin xf86config",
0, 0 },
{ "Start", "Try to start the server up",
DMENU_SYSTEM_COMMAND, "PATH=/usr/bin:/bin:/usr/X11R6/bin startx",
0, 0 },
{ NULL } }
};
DMenu MenuXF86Select = {
DMENU_NORMAL_TYPE,
"XFree86 3.1.1u1 Distribution",
@ -652,3 +632,29 @@ boot record to be untouched, then select \"none\".",
DMENU_CALL, (void *)diskPartitionEditor, 0, 0 },
{ NULL } },
};
/* Final configuration menu */
DMenu MenuConfigure = {
DMENU_NORMAL_TYPE,
"FreeBSD Configuration Menu", /* title */
"Congradulations! If you're seeing this menu, FreeBSD is now\n\
installed on your hard disk and just about ready to boot. There\n\
are a last few things you may wish to set up at this point to make\n\
your FreeBSD system more generally usable and which may be selected\n\
from the menu below. When you're done, select Cancel.",
"Press F1 for more information on these options",
"configure.hlp",
{ { "Time Zone", "Set which time zone you're in",
DMENU_SYSTEM_COMMAND, "tzsetup", 0, 0 },
{ "Add User", "Add users to the system",
DMENU_SYSTEM_COMMAND, "adduser", 0, 0 },
{ "Root Pass", "Set the system manager's password",
DMENU_SYSTEM_COMMAND, "passwd root", 0, 0 },
{ "Packages", "Install extra FreeBSD packaged software",
DMENU_CALL, config_packages, 0, 1 },
{ "Ports", "Enable the FreeBSD Ports Collection from CD",
DMENU_CALL, config_ports, 0, 1 },
{ "XFree86", "Configure XFree86 (if installed)",
DMENU_SYSTEM_COMMAND, "PATH=/usr/bin:/bin:/usr/X11R6/bin xf86config", 0, 0 },
{ NULL } },
};

View File

@ -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.27 1995/05/23 02:41:16 jkh Exp $
* $Id: sysinstall.h,v 1.28 1995/05/23 18:06:16 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -204,6 +204,7 @@ extern unsigned int XF86FontDists; /* The XFree86 fonts we want */
extern DMenu MenuInitial; /* Initial installation menu */
extern DMenu MenuMBRType; /* Type of MBR to write on the disk */
extern DMenu MenuConfigure; /* Final configuration menu */
extern DMenu MenuDocumentation; /* Documentation menu */
extern DMenu MenuOptions; /* Installation options */
extern DMenu MenuOptionsLanguage; /* Language options menu */
@ -240,6 +241,8 @@ extern void command_func_add(char *key, commandFunc func, void *data);
extern void config_fstab(void);
extern void config_sysconfig(void);
extern void config_resolv(void);
extern int config_ports(char *str);
extern int config_packages(char *str);
/* decode.c */
extern DMenuItem *decode(DMenu *menu, char *name);

View File

@ -1,5 +1,5 @@
/*
* $Id: tcpip.c,v 1.10 1995/05/21 15:40:54 jkh Exp $
* $Id: tcpip.c,v 1.11 1995/05/23 18:06:16 jkh Exp $
*
* Copyright (c) 1995
* Gary J Palmer. All rights reserved.
@ -566,8 +566,6 @@ tcpDeviceSelect(void)
msgFatal("Unable to create network device menu! Argh!");
dmenuOpenSimple(menu);
free(menu);
if (netDevice->init)
(*netDevice->init)(netDevice);
return netDevice;
}

View File

@ -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.1 1995/05/23 02:40:50 jkh Exp $
* $Id: config.c,v 1.2 1995/05/23 18:06:12 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -212,3 +212,16 @@ config_resolv(void)
fclose(fp);
alreadyDone = TRUE;
}
int
config_packages(char *str)
{
return 0;
}
int
config_ports(char *str)
{
return 0;
}

View File

@ -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.48 1995/05/23 02:41:05 jkh Exp $
* $Id: install.c,v 1.49 1995/05/23 18:06:13 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -435,4 +435,5 @@ cpio_extract(void)
static void
do_final_setup(void)
{
dmenuOpenSimple(&MenuConfigure);
}

View File

@ -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.24 1995/05/21 18:24:34 jkh Exp $
* $Id: menus.c,v 1.25 1995/05/23 02:41:13 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -205,7 +205,7 @@ To specify a URL not in this list, chose \"other\".",
DMENU_SET_VARIABLE, (void *)"ftp=ftp://ftp.freebsd.org/pub/FreeBSD/2.0.5-ALPHA", 0, 0 },
{ "Secondary Site", "freefall.cdrom.com",
DMENU_SET_VARIABLE, (void *)"ftp=ftp://freefall.cdrom.com/pub/FreeBSD/2.0.5-ALPHA", 0, 0 },
{ "Other", "Specify another ftp site by URL (e.g. ftp://some.site/pub/FreeBSD/..)",
{ "Other", "Specify some other ftp site by URL",
DMENU_SET_VARIABLE, (void *)"ftp=other", 0, 0 },
{ "Australia", "ftp.physics.usyd.edu.au",
DMENU_SET_VARIABLE, (void *)"ftp=ftp://ftp.physics.usyd.edu.au/FreeBSD/2.0.5-ALPHA", 0, 0 },
@ -377,7 +377,7 @@ selecting OK at this stage will chose them as defaults.",
{ "src", "Sources for everything but DES [120MB]",
DMENU_CALL, (void *)distSetSrc, 0 },
{ "XFree86", "The XFree86 3.1.1L distribution [?]",
DMENU_SUBMENU, (void *)&MenuXF86, 0 },
DMENU_SUBMENU, (void *)&MenuXF86Select, 0 },
{ NULL } },
};
@ -421,26 +421,6 @@ you wish to install.",
{ NULL } },
};
DMenu MenuXF86 = {
DMENU_NORMAL_TYPE,
"XFree86 3.1.1u1 Distribution",
"Welcome to the XFree86 3.1.1u1 distribution from The XFree86\n\
Project, Inc. Our recommended sequence is to Select the desired\n\
release components, Configure XFree86 and then (optionally)\n\
Start it up!",
"Press F1 to read the XFree86 release notes for FreeBSD",
"XFree86.hlp",
{ { "Select", "Select and load components of the XFree86 distribution",
DMENU_SUBMENU, &MenuXF86Select, 0, 0 },
{ "Configure", "Configure an installed XFree86 distribution",
DMENU_SYSTEM_COMMAND, "PATH=/usr/bin:/bin:/usr/X11R6/bin xf86config",
0, 0 },
{ "Start", "Try to start the server up",
DMENU_SYSTEM_COMMAND, "PATH=/usr/bin:/bin:/usr/X11R6/bin startx",
0, 0 },
{ NULL } }
};
DMenu MenuXF86Select = {
DMENU_NORMAL_TYPE,
"XFree86 3.1.1u1 Distribution",
@ -652,3 +632,29 @@ boot record to be untouched, then select \"none\".",
DMENU_CALL, (void *)diskPartitionEditor, 0, 0 },
{ NULL } },
};
/* Final configuration menu */
DMenu MenuConfigure = {
DMENU_NORMAL_TYPE,
"FreeBSD Configuration Menu", /* title */
"Congradulations! If you're seeing this menu, FreeBSD is now\n\
installed on your hard disk and just about ready to boot. There\n\
are a last few things you may wish to set up at this point to make\n\
your FreeBSD system more generally usable and which may be selected\n\
from the menu below. When you're done, select Cancel.",
"Press F1 for more information on these options",
"configure.hlp",
{ { "Time Zone", "Set which time zone you're in",
DMENU_SYSTEM_COMMAND, "tzsetup", 0, 0 },
{ "Add User", "Add users to the system",
DMENU_SYSTEM_COMMAND, "adduser", 0, 0 },
{ "Root Pass", "Set the system manager's password",
DMENU_SYSTEM_COMMAND, "passwd root", 0, 0 },
{ "Packages", "Install extra FreeBSD packaged software",
DMENU_CALL, config_packages, 0, 1 },
{ "Ports", "Enable the FreeBSD Ports Collection from CD",
DMENU_CALL, config_ports, 0, 1 },
{ "XFree86", "Configure XFree86 (if installed)",
DMENU_SYSTEM_COMMAND, "PATH=/usr/bin:/bin:/usr/X11R6/bin xf86config", 0, 0 },
{ NULL } },
};

View File

@ -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.27 1995/05/23 02:41:16 jkh Exp $
* $Id: sysinstall.h,v 1.28 1995/05/23 18:06:16 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -204,6 +204,7 @@ extern unsigned int XF86FontDists; /* The XFree86 fonts we want */
extern DMenu MenuInitial; /* Initial installation menu */
extern DMenu MenuMBRType; /* Type of MBR to write on the disk */
extern DMenu MenuConfigure; /* Final configuration menu */
extern DMenu MenuDocumentation; /* Documentation menu */
extern DMenu MenuOptions; /* Installation options */
extern DMenu MenuOptionsLanguage; /* Language options menu */
@ -240,6 +241,8 @@ extern void command_func_add(char *key, commandFunc func, void *data);
extern void config_fstab(void);
extern void config_sysconfig(void);
extern void config_resolv(void);
extern int config_ports(char *str);
extern int config_packages(char *str);
/* decode.c */
extern DMenuItem *decode(DMenu *menu, char *name);

View File

@ -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.1 1995/05/23 02:40:50 jkh Exp $
* $Id: config.c,v 1.2 1995/05/23 18:06:12 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -212,3 +212,16 @@ config_resolv(void)
fclose(fp);
alreadyDone = TRUE;
}
int
config_packages(char *str)
{
return 0;
}
int
config_ports(char *str)
{
return 0;
}

View File

@ -119,6 +119,7 @@ FtpOpen(FTP_t ftp, char *host, char *user, char *passwd)
struct sockaddr_in sin;
int s;
char a,*p,buf[BUFSIZ];
unsigned long temp;
if (!user)
user = "ftp";
@ -126,17 +127,28 @@ FtpOpen(FTP_t ftp, char *host, char *user, char *passwd)
if (!passwd)
passwd = "??@??(FreeBSD:libftp)"; /* XXX */
msgDebug("FtpOpen(ftp, %s, %s, %s)\n", host, user, passwd);
temp = inet_addr(host);
if (temp != INADDR_NONE)
{
msgDebug("Using dotted IP address `%s'\n", host);
ftp->addrtype = sin.sin_family = AF_INET;
sin.sin_addr.s_addr = temp;
} else {
msgDebug("Trying to resolve `%s'\n", host);
he = gethostbyname(host);
if (!he)
{
msgDebug("Lookup of `%s' failed!\n", host);
return ENOENT;
se = getservbyname("ftp","tcp");
if (!se)
return ENOENT;
}
ftp->addrtype = sin.sin_family = he->h_addrtype;
bcopy(he->h_addr, (char *)&sin.sin_addr, he->h_length);
sin.sin_port = se->s_port;
}
sin.sin_port = htons(21);
if ((s = socket(he->h_addrtype, SOCK_STREAM, 0)) < 0)
return s;

View File

@ -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.48 1995/05/23 02:41:05 jkh Exp $
* $Id: install.c,v 1.49 1995/05/23 18:06:13 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -435,4 +435,5 @@ cpio_extract(void)
static void
do_final_setup(void)
{
dmenuOpenSimple(&MenuConfigure);
}

View File

@ -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.24 1995/05/21 18:24:34 jkh Exp $
* $Id: menus.c,v 1.25 1995/05/23 02:41:13 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -205,7 +205,7 @@ To specify a URL not in this list, chose \"other\".",
DMENU_SET_VARIABLE, (void *)"ftp=ftp://ftp.freebsd.org/pub/FreeBSD/2.0.5-ALPHA", 0, 0 },
{ "Secondary Site", "freefall.cdrom.com",
DMENU_SET_VARIABLE, (void *)"ftp=ftp://freefall.cdrom.com/pub/FreeBSD/2.0.5-ALPHA", 0, 0 },
{ "Other", "Specify another ftp site by URL (e.g. ftp://some.site/pub/FreeBSD/..)",
{ "Other", "Specify some other ftp site by URL",
DMENU_SET_VARIABLE, (void *)"ftp=other", 0, 0 },
{ "Australia", "ftp.physics.usyd.edu.au",
DMENU_SET_VARIABLE, (void *)"ftp=ftp://ftp.physics.usyd.edu.au/FreeBSD/2.0.5-ALPHA", 0, 0 },
@ -377,7 +377,7 @@ selecting OK at this stage will chose them as defaults.",
{ "src", "Sources for everything but DES [120MB]",
DMENU_CALL, (void *)distSetSrc, 0 },
{ "XFree86", "The XFree86 3.1.1L distribution [?]",
DMENU_SUBMENU, (void *)&MenuXF86, 0 },
DMENU_SUBMENU, (void *)&MenuXF86Select, 0 },
{ NULL } },
};
@ -421,26 +421,6 @@ you wish to install.",
{ NULL } },
};
DMenu MenuXF86 = {
DMENU_NORMAL_TYPE,
"XFree86 3.1.1u1 Distribution",
"Welcome to the XFree86 3.1.1u1 distribution from The XFree86\n\
Project, Inc. Our recommended sequence is to Select the desired\n\
release components, Configure XFree86 and then (optionally)\n\
Start it up!",
"Press F1 to read the XFree86 release notes for FreeBSD",
"XFree86.hlp",
{ { "Select", "Select and load components of the XFree86 distribution",
DMENU_SUBMENU, &MenuXF86Select, 0, 0 },
{ "Configure", "Configure an installed XFree86 distribution",
DMENU_SYSTEM_COMMAND, "PATH=/usr/bin:/bin:/usr/X11R6/bin xf86config",
0, 0 },
{ "Start", "Try to start the server up",
DMENU_SYSTEM_COMMAND, "PATH=/usr/bin:/bin:/usr/X11R6/bin startx",
0, 0 },
{ NULL } }
};
DMenu MenuXF86Select = {
DMENU_NORMAL_TYPE,
"XFree86 3.1.1u1 Distribution",
@ -652,3 +632,29 @@ boot record to be untouched, then select \"none\".",
DMENU_CALL, (void *)diskPartitionEditor, 0, 0 },
{ NULL } },
};
/* Final configuration menu */
DMenu MenuConfigure = {
DMENU_NORMAL_TYPE,
"FreeBSD Configuration Menu", /* title */
"Congradulations! If you're seeing this menu, FreeBSD is now\n\
installed on your hard disk and just about ready to boot. There\n\
are a last few things you may wish to set up at this point to make\n\
your FreeBSD system more generally usable and which may be selected\n\
from the menu below. When you're done, select Cancel.",
"Press F1 for more information on these options",
"configure.hlp",
{ { "Time Zone", "Set which time zone you're in",
DMENU_SYSTEM_COMMAND, "tzsetup", 0, 0 },
{ "Add User", "Add users to the system",
DMENU_SYSTEM_COMMAND, "adduser", 0, 0 },
{ "Root Pass", "Set the system manager's password",
DMENU_SYSTEM_COMMAND, "passwd root", 0, 0 },
{ "Packages", "Install extra FreeBSD packaged software",
DMENU_CALL, config_packages, 0, 1 },
{ "Ports", "Enable the FreeBSD Ports Collection from CD",
DMENU_CALL, config_ports, 0, 1 },
{ "XFree86", "Configure XFree86 (if installed)",
DMENU_SYSTEM_COMMAND, "PATH=/usr/bin:/bin:/usr/X11R6/bin xf86config", 0, 0 },
{ NULL } },
};

View File

@ -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.27 1995/05/23 02:41:16 jkh Exp $
* $Id: sysinstall.h,v 1.28 1995/05/23 18:06:16 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -204,6 +204,7 @@ extern unsigned int XF86FontDists; /* The XFree86 fonts we want */
extern DMenu MenuInitial; /* Initial installation menu */
extern DMenu MenuMBRType; /* Type of MBR to write on the disk */
extern DMenu MenuConfigure; /* Final configuration menu */
extern DMenu MenuDocumentation; /* Documentation menu */
extern DMenu MenuOptions; /* Installation options */
extern DMenu MenuOptionsLanguage; /* Language options menu */
@ -240,6 +241,8 @@ extern void command_func_add(char *key, commandFunc func, void *data);
extern void config_fstab(void);
extern void config_sysconfig(void);
extern void config_resolv(void);
extern int config_ports(char *str);
extern int config_packages(char *str);
/* decode.c */
extern DMenuItem *decode(DMenu *menu, char *name);

View File

@ -1,5 +1,5 @@
/*
* $Id: tcpip.c,v 1.10 1995/05/21 15:40:54 jkh Exp $
* $Id: tcpip.c,v 1.11 1995/05/23 18:06:16 jkh Exp $
*
* Copyright (c) 1995
* Gary J Palmer. All rights reserved.
@ -566,8 +566,6 @@ tcpDeviceSelect(void)
msgFatal("Unable to create network device menu! Argh!");
dmenuOpenSimple(menu);
free(menu);
if (netDevice->init)
(*netDevice->init)(netDevice);
return netDevice;
}