1. Start syncing up the network strategy code so that folks like Poul and
Justin can see it. 2. Attempt to fix the redisplay problems in label.c some more. Not clearing the screen each time is certainly faster, but it's causing all sorts of problems.
This commit is contained in:
parent
01610d47f2
commit
23cb914708
@ -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.24 1995/05/20 15:49:53 jkh Exp $
|
||||
* $Id: devices.c,v 1.25 1995/05/20 16:22:41 jkh Exp $
|
||||
*
|
||||
* Copyright (c) 1995
|
||||
* Jordan Hubbard. All rights reserved.
|
||||
@ -236,7 +236,7 @@ deviceGetAll(void)
|
||||
close(fd);
|
||||
/* The only network devices that have fds associated are serial ones */
|
||||
deviceRegister("ppp0", device_names[i].description, strdup(try),
|
||||
DEVICE_TYPE_NETWORK, TRUE, mediaInitNetwork, mediaGetNetwork, mediaCloseNetwork, NULL);
|
||||
DEVICE_TYPE_NETWORK, TRUE, mediaInitNetwork, NULL, mediaCloseNetwork, NULL);
|
||||
msgDebug("Found a device of type network named: %s\n", device_names[i].name);
|
||||
}
|
||||
break;
|
||||
@ -270,7 +270,7 @@ deviceGetAll(void)
|
||||
|| !strncmp(ifptr->ifr_name, "lo0", 3))
|
||||
continue;
|
||||
deviceRegister(ifptr->ifr_name, ifptr->ifr_name, ifptr->ifr_name,
|
||||
DEVICE_TYPE_NETWORK, TRUE, mediaInitNetwork, mediaGetNetwork, mediaCloseNetwork, NULL);
|
||||
DEVICE_TYPE_NETWORK, TRUE, mediaInitNetwork, NULL, mediaCloseNetwork, NULL);
|
||||
msgDebug("Found a device of type network named: %s\n", ifptr->ifr_name);
|
||||
close(s);
|
||||
if ((s = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
|
||||
|
@ -4,7 +4,7 @@
|
||||
* This is probably the last program in the `sysinstall' line - the next
|
||||
* generation being essentially a complete rewrite.
|
||||
*
|
||||
* $Id: dist.c,v 1.13 1995/05/20 19:22:19 jkh Exp $
|
||||
* $Id: dist.c,v 1.14 1995/05/21 10:05:17 jkh Exp $
|
||||
*
|
||||
* Copyright (c) 1995
|
||||
* Jordan Hubbard. All rights reserved.
|
||||
@ -117,6 +117,7 @@ distSetXF86(char *str)
|
||||
|
||||
typedef struct _dist {
|
||||
char *my_name;
|
||||
char *my_dir;
|
||||
unsigned int *my_mask;
|
||||
unsigned int my_bit;
|
||||
struct _dist *my_dist;
|
||||
@ -130,79 +131,79 @@ extern Distribution XF86ServerDistTable[];
|
||||
|
||||
/* The top-level distribution categories */
|
||||
static Distribution DistTable[] = {
|
||||
{ "bin", &Dists, DIST_BIN, NULL },
|
||||
{ "games", &Dists, DIST_GAMES, NULL },
|
||||
{ "manpages", &Dists, DIST_MANPAGES, NULL },
|
||||
{ "proflibs", &Dists, DIST_PROFLIBS, NULL },
|
||||
{ "dict", &Dists, DIST_DICT, NULL },
|
||||
{ "src/", &Dists, DIST_SRC, SrcDistTable },
|
||||
{ "des", &Dists, DIST_DES, NULL },
|
||||
{ "compat1x", &Dists, DIST_COMPAT1X, NULL },
|
||||
{ "compat20", &Dists, DIST_COMPAT20, NULL },
|
||||
{ "xf86311/", &Dists, DIST_XF86, XF86DistTable },
|
||||
{ "bin", "/", &Dists, DIST_BIN, NULL },
|
||||
{ "games", "/", &Dists, DIST_GAMES, NULL },
|
||||
{ "manpages", "/", &Dists, DIST_MANPAGES, NULL },
|
||||
{ "proflibs", "/", &Dists, DIST_PROFLIBS, NULL },
|
||||
{ "dict", "/", &Dists, DIST_DICT, NULL },
|
||||
{ "src/", "/", &Dists, DIST_SRC, SrcDistTable },
|
||||
{ "des", "/", &Dists, DIST_DES, NULL },
|
||||
{ "compat1x", "/", &Dists, DIST_COMPAT1X, NULL },
|
||||
{ "compat20", "/", &Dists, DIST_COMPAT20, NULL },
|
||||
{ "xf86311/", "/usr", &Dists, DIST_XF86, XF86DistTable },
|
||||
{ NULL },
|
||||
};
|
||||
|
||||
/* The /usr/src distribution */
|
||||
static Distribution SrcDistTable[] = {
|
||||
{ "base", &SrcDists, DIST_SRC_BASE, NULL },
|
||||
{ "gnu", &SrcDists, DIST_SRC_GNU, NULL },
|
||||
{ "etc", &SrcDists, DIST_SRC_ETC, NULL },
|
||||
{ "games", &SrcDists, DIST_SRC_GAMES, NULL },
|
||||
{ "include", &SrcDists, DIST_SRC_INCLUDE, NULL },
|
||||
{ "lib", &SrcDists, DIST_SRC_LIB, NULL },
|
||||
{ "libexec", &SrcDists, DIST_SRC_LIBEXEC, NULL },
|
||||
{ "lkm", &SrcDists, DIST_SRC_LKM, NULL },
|
||||
{ "release", &SrcDists, DIST_SRC_RELEASE, NULL },
|
||||
{ "sbin", &SrcDists, DIST_SRC_SBIN, NULL },
|
||||
{ "share", &SrcDists, DIST_SRC_SHARE, NULL },
|
||||
{ "sys", &SrcDists, DIST_SRC_SYS, NULL },
|
||||
{ "ubin", &SrcDists, DIST_SRC_UBIN, NULL },
|
||||
{ "usbin", &SrcDists, DIST_SRC_USBIN, NULL },
|
||||
{ "xf86", &SrcDists, DIST_SRC_XF86, NULL },
|
||||
{ "base", "/", &SrcDists, DIST_SRC_BASE, NULL },
|
||||
{ "gnu", "/", &SrcDists, DIST_SRC_GNU, NULL },
|
||||
{ "etc", "/", &SrcDists, DIST_SRC_ETC, NULL },
|
||||
{ "games", "/", &SrcDists, DIST_SRC_GAMES, NULL },
|
||||
{ "include", "/", &SrcDists, DIST_SRC_INCLUDE, NULL },
|
||||
{ "lib", "/", &SrcDists, DIST_SRC_LIB, NULL },
|
||||
{ "libexec", "/", &SrcDists, DIST_SRC_LIBEXEC, NULL },
|
||||
{ "lkm", "/", &SrcDists, DIST_SRC_LKM, NULL },
|
||||
{ "release", "/", &SrcDists, DIST_SRC_RELEASE, NULL },
|
||||
{ "sbin", "/", &SrcDists, DIST_SRC_SBIN, NULL },
|
||||
{ "share", "/", &SrcDists, DIST_SRC_SHARE, NULL },
|
||||
{ "sys", "/", &SrcDists, DIST_SRC_SYS, NULL },
|
||||
{ "ubin", "/", &SrcDists, DIST_SRC_UBIN, NULL },
|
||||
{ "usbin", "/", &SrcDists, DIST_SRC_USBIN, NULL },
|
||||
{ "xf86", "/usr", &SrcDists, DIST_SRC_XF86, NULL },
|
||||
{ NULL },
|
||||
};
|
||||
|
||||
/* The XFree86 distribution */
|
||||
static Distribution XF86DistTable[] = {
|
||||
{ "bin", &XF86Dists, DIST_XF86_BIN, NULL },
|
||||
{ "lib", &XF86Dists, DIST_XF86_LIB, NULL },
|
||||
{ "doc", &XF86Dists, DIST_XF86_DOC, NULL },
|
||||
{ "xf86311/", &XF86Dists, DIST_XF86_FONTS, XF86FontDistTable },
|
||||
{ "man", &XF86Dists, DIST_XF86_MAN, NULL },
|
||||
{ "prog", &XF86Dists, DIST_XF86_PROG, NULL },
|
||||
{ "link", &XF86Dists, DIST_XF86_LINK, NULL },
|
||||
{ "pex", &XF86Dists, DIST_XF86_PEX, NULL },
|
||||
{ "lbx", &XF86Dists, DIST_XF86_LBX, NULL },
|
||||
{ "xicf", &XF86Dists, DIST_XF86_XINIT, NULL },
|
||||
{ "xdmcf", &XF86Dists, DIST_XF86_XDMCF, NULL },
|
||||
{ "xf86311/", &XF86Dists, DIST_XF86_SERVER, XF86ServerDistTable },
|
||||
{ "bin", "/usr", &XF86Dists, DIST_XF86_BIN, NULL },
|
||||
{ "lib", "/usr", &XF86Dists, DIST_XF86_LIB, NULL },
|
||||
{ "doc", "/usr", &XF86Dists, DIST_XF86_DOC, NULL },
|
||||
{ "xf86311/", "/usr", &XF86Dists, DIST_XF86_FONTS, XF86FontDistTable },
|
||||
{ "man", "/usr", &XF86Dists, DIST_XF86_MAN, NULL },
|
||||
{ "prog", "/usr", &XF86Dists, DIST_XF86_PROG, NULL },
|
||||
{ "link", "/usr", &XF86Dists, DIST_XF86_LINK, NULL },
|
||||
{ "pex", "/usr", &XF86Dists, DIST_XF86_PEX, NULL },
|
||||
{ "lbx", "/usr", &XF86Dists, DIST_XF86_LBX, NULL },
|
||||
{ "xicf", "/usr", &XF86Dists, DIST_XF86_XINIT, NULL },
|
||||
{ "xdmcf", "/usr", &XF86Dists, DIST_XF86_XDMCF, NULL },
|
||||
{ "xf86311/", "/usr", &XF86Dists, DIST_XF86_SERVER, XF86ServerDistTable },
|
||||
{ NULL },
|
||||
};
|
||||
|
||||
/* The XFree86 server distribution */
|
||||
static Distribution XF86ServerDistTable[] = {
|
||||
{ "X3118514", &XF86ServerDists, DIST_XF86_SERVER_8514, NULL },
|
||||
{ "X311AGX", &XF86ServerDists, DIST_XF86_SERVER_AGX, NULL },
|
||||
{ "X311Mch3", &XF86ServerDists, DIST_XF86_SERVER_MACH32,NULL },
|
||||
{ "X311Mch8", &XF86ServerDists, DIST_XF86_SERVER_MACH8, NULL },
|
||||
{ "X311Mono", &XF86ServerDists, DIST_XF86_SERVER_MONO, NULL },
|
||||
{ "X311P9K", &XF86ServerDists, DIST_XF86_SERVER_P9000, NULL },
|
||||
{ "X311S3", &XF86ServerDists, DIST_XF86_SERVER_S3, NULL },
|
||||
{ "X311SVGA", &XF86ServerDists, DIST_XF86_SERVER_SVGA, NULL },
|
||||
{ "X311VG16", &XF86ServerDists, DIST_XF86_SERVER_VGA16, NULL },
|
||||
{ "X311W32", &XF86ServerDists, DIST_XF86_SERVER_W32, NULL },
|
||||
{ "X311nest", &XF86ServerDists, DIST_XF86_SERVER_NEST, NULL },
|
||||
{ "X3118514", "/usr", &XF86ServerDists, DIST_XF86_SERVER_8514, NULL },
|
||||
{ "X311AGX", "/usr", &XF86ServerDists, DIST_XF86_SERVER_AGX, NULL },
|
||||
{ "X311Mch3", "/usr", &XF86ServerDists, DIST_XF86_SERVER_MACH32,NULL },
|
||||
{ "X311Mch8", "/usr", &XF86ServerDists, DIST_XF86_SERVER_MACH8, NULL },
|
||||
{ "X311Mono", "/usr", &XF86ServerDists, DIST_XF86_SERVER_MONO, NULL },
|
||||
{ "X311P9K", "/usr", &XF86ServerDists, DIST_XF86_SERVER_P9000, NULL },
|
||||
{ "X311S3", "/usr", &XF86ServerDists, DIST_XF86_SERVER_S3, NULL },
|
||||
{ "X311SVGA", "/usr", &XF86ServerDists, DIST_XF86_SERVER_SVGA, NULL },
|
||||
{ "X311VG16", "/usr", &XF86ServerDists, DIST_XF86_SERVER_VGA16, NULL },
|
||||
{ "X311W32", "/usr", &XF86ServerDists, DIST_XF86_SERVER_W32, NULL },
|
||||
{ "X311nest", "/usr", &XF86ServerDists, DIST_XF86_SERVER_NEST, NULL },
|
||||
{ NULL },
|
||||
};
|
||||
|
||||
/* The XFree86 font distribution */
|
||||
static Distribution XF86FontDistTable[] = {
|
||||
{ "X311fnts", &XF86FontDists, DIST_XF86_FONTS_MISC, NULL },
|
||||
{ "X311f100", &XF86FontDists, DIST_XF86_FONTS_100, NULL },
|
||||
{ "X311fscl", &XF86FontDists, DIST_XF86_FONTS_SCALE, NULL },
|
||||
{ "X311fnon", &XF86FontDists, DIST_XF86_FONTS_NON, NULL },
|
||||
{ "X311fsrv", &XF86FontDists, DIST_XF86_FONTS_SERVER, NULL },
|
||||
{ "X311fnts", "/usr", &XF86FontDists, DIST_XF86_FONTS_MISC, NULL },
|
||||
{ "X311f100", "/usr", &XF86FontDists, DIST_XF86_FONTS_100, NULL },
|
||||
{ "X311fscl", "/usr", &XF86FontDists, DIST_XF86_FONTS_SCALE, NULL },
|
||||
{ "X311fnon", "/usr", &XF86FontDists, DIST_XF86_FONTS_NON, NULL },
|
||||
{ "X311fsrv", "/usr", &XF86FontDists, DIST_XF86_FONTS_SERVER, NULL },
|
||||
{ NULL },
|
||||
};
|
||||
|
||||
@ -210,7 +211,7 @@ static int
|
||||
distExtract(char *parent, Distribution *me)
|
||||
{
|
||||
int i, status;
|
||||
FILE *fp;
|
||||
int fd;
|
||||
|
||||
status = 0;
|
||||
for (i = 0; me[i].my_name; i++) {
|
||||
@ -219,11 +220,11 @@ distExtract(char *parent, Distribution *me)
|
||||
status = distExtract(me[i].my_name, me[i].my_dist);
|
||||
else {
|
||||
msgNotify("Attempting to open %s%s distribution", parent ? parent : "", me[i].my_name);
|
||||
fp = mediaOpen(parent, me[i].my_name);
|
||||
if (fp) {
|
||||
fd = mediaOpen(parent, me[i].my_name);
|
||||
if (fd != -1) {
|
||||
msgNotify("Extracting %s%s distribution", parent ? parent : "", me[i].my_name);
|
||||
status = mediaExtractDist(fp);
|
||||
fclose(fp);
|
||||
status = mediaExtractDist(me[i].my_dir, fd);
|
||||
close(fd);
|
||||
}
|
||||
else {
|
||||
if (getenv(NO_CONFIRMATION))
|
||||
|
@ -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.44 1995/05/20 23:33:13 phk Exp $
|
||||
* $Id: install.c,v 1.45 1995/05/21 01:56:01 phk Exp $
|
||||
*
|
||||
* Copyright (c) 1995
|
||||
* Jordan Hubbard. All rights reserved.
|
||||
@ -56,25 +56,6 @@ static void cpio_extract(void);
|
||||
static void install_configuration_files(void);
|
||||
static void do_final_setup(void);
|
||||
|
||||
static Boolean
|
||||
preInstallCheck(void)
|
||||
{
|
||||
if (!getenv(DISK_PARTITIONED)) {
|
||||
msgConfirm("You need to partition your disk before you can proceed with\nthe installation.");
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
if (!getenv(DISK_LABELLED)) {
|
||||
msgConfirm("You need to assign disk labels before you can proceed with\nthe installation.");
|
||||
return FALSE;
|
||||
}
|
||||
if (!Dists) {
|
||||
msgConfirm("You haven't told me what distributions to load yet!\nPlease select a distribution from the Distributions menu.");
|
||||
return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
installInitial(void)
|
||||
{
|
||||
@ -89,6 +70,16 @@ installInitial(void)
|
||||
if (alreadyDone)
|
||||
return;
|
||||
|
||||
if (!getenv(DISK_PARTITIONED)) {
|
||||
msgConfirm("You need to partition your disk before you can proceed with\nthe installation.");
|
||||
return;
|
||||
}
|
||||
if (!getenv(DISK_LABELLED)) {
|
||||
msgConfirm("You need to assign disk labels before you can proceed with\nthe installation.");
|
||||
return;
|
||||
}
|
||||
|
||||
/* Figure out what kind of MBR the user wants */
|
||||
dmenuOpenSimple(&MenuMBRType);
|
||||
mbrContents = NULL;
|
||||
cp = getenv("bootManager");
|
||||
@ -99,9 +90,8 @@ installInitial(void)
|
||||
mbrContents = mbr;
|
||||
}
|
||||
|
||||
/* If things aren't kosher, or we refuse to proceed, bail. */
|
||||
if (!preInstallCheck()
|
||||
|| msgYesNo("Last Chance! Are you SURE you want continue the installation?\n\nIf you're running this on an existing system, we STRONGLY\nencourage you to make proper backups before proceeding.\nWe take no responsibility for lost disk contents!"))
|
||||
/* If we refuse to proceed, bail. */
|
||||
if (msgYesNo("Last Chance! Are you SURE you want continue the installation?\n\nIf you're running this on an existing system, we STRONGLY\nencourage you to make proper backups before proceeding.\nWe take no responsibility for lost disk contents!"))
|
||||
return;
|
||||
|
||||
devs = deviceFind(NULL, DEVICE_TYPE_DISK);
|
||||
@ -158,12 +148,23 @@ installFinal(void)
|
||||
alreadyDone = TRUE;
|
||||
}
|
||||
|
||||
/*
|
||||
* What happens when we select "GO". This is broken into a 3 stage installation so that
|
||||
* the user can do a full installation but come back here again to load more distributions,
|
||||
* perhaps from a different media type. This would allow, for example, the user to load the
|
||||
* majority of the system from CDROM and then use ftp to load just the DES dist.
|
||||
*/
|
||||
int
|
||||
installCommit(char *str)
|
||||
{
|
||||
installInitial();
|
||||
if (!Dists) {
|
||||
msgConfirm("You haven't told me what distributions to load yet!\nPlease select a distribution from the Distributions menu.");
|
||||
return 0;
|
||||
}
|
||||
if (!mediaVerify())
|
||||
return 0;
|
||||
|
||||
installInitial();
|
||||
distExtractAll();
|
||||
installFinal();
|
||||
return 0;
|
||||
|
@ -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.16 1995/05/21 06:12:43 phk Exp $
|
||||
* $Id: label.c,v 1.17 1995/05/21 10:16:10 jkh Exp $
|
||||
*
|
||||
* Copyright (c) 1995
|
||||
* Jordan Hubbard. All rights reserved.
|
||||
@ -210,9 +210,9 @@ get_mountpoint(struct chunk *old)
|
||||
char *val;
|
||||
PartInfo *tmp;
|
||||
|
||||
dialog_clear(); clear();
|
||||
val = msgGetInput(old && old->private ? ((PartInfo *)old->private)->mountpoint : NULL,
|
||||
"Please specify a mount point for the partition");
|
||||
clear();
|
||||
if (!val)
|
||||
return NULL;
|
||||
|
||||
|
@ -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.c,v 1.10 1995/05/20 11:10:33 jkh Exp $
|
||||
* $Id: media.c,v 1.11 1995/05/20 11:13:58 jkh Exp $
|
||||
*
|
||||
* Copyright (c) 1995
|
||||
* Jordan Hubbard. All rights reserved.
|
||||
@ -42,6 +42,10 @@
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <sys/errno.h>
|
||||
#include <sys/fcntl.h>
|
||||
#include <sys/wait.h>
|
||||
#include <unistd.h>
|
||||
#include "sysinstall.h"
|
||||
|
||||
static int
|
||||
@ -77,7 +81,15 @@ mediaSetCDROM(char *str)
|
||||
int cnt;
|
||||
|
||||
if (OnCDROM == TRUE) {
|
||||
/* XXX point mediaDevice at something meaningful here - perhaps a static device structure */
|
||||
static Device bootCD;
|
||||
|
||||
/* This may need to be extended a little, but the basic idea is sound */
|
||||
strcpy(bootCD.name, "bootCD");
|
||||
bootCD.type = DEVICE_TYPE_CDROM;
|
||||
bootCD.init = NULL;
|
||||
bootCD.get = mediaGetCDROM;
|
||||
bootCD.close = NULL;
|
||||
mediaDevice = &bootCD;
|
||||
return 1;
|
||||
}
|
||||
else {
|
||||
@ -138,6 +150,12 @@ mediaSetFloppy(char *str)
|
||||
return mediaDevice ? 1 : 0;
|
||||
}
|
||||
|
||||
static int
|
||||
DOSHook(char *str)
|
||||
{
|
||||
return genericHook(str, DEVICE_TYPE_DOS);
|
||||
}
|
||||
|
||||
/*
|
||||
* Return 1 if we successfully found and set the installation type to
|
||||
* be a DOS partition.
|
||||
@ -148,32 +166,41 @@ mediaSetDOS(char *str)
|
||||
Device **devs;
|
||||
Disk *d;
|
||||
Chunk *c1;
|
||||
int i;
|
||||
int i, cnt;
|
||||
|
||||
devs = deviceFind(NULL, DEVICE_TYPE_DOS);
|
||||
if (devs) {
|
||||
/* XXX If count > 1 then at some point then we should put up a menu and allow the user to choose XXX */
|
||||
cnt = deviceCount(devs);
|
||||
if (cnt > 1) {
|
||||
DMenu *menu;
|
||||
|
||||
menu = deviceCreateMenu(&MenuMediaDOS, DEVICE_TYPE_DOS, DOSHook);
|
||||
if (!menu)
|
||||
msgFatal("Unable to create DOS menu! Something is seriously wrong.");
|
||||
dmenuOpenSimple(menu);
|
||||
free(menu);
|
||||
}
|
||||
else if (cnt) {
|
||||
mediaDevice = devs[0];
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
else {
|
||||
devs = deviceFind(NULL, DEVICE_TYPE_DISK);
|
||||
if (!devs) {
|
||||
msgConfirm("No disk devices found!");
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Now go chewing through looking for a DOS FAT partition */
|
||||
for (i = 0; devs[i]; i++) {
|
||||
d = (Disk *)devs[i]->private;
|
||||
/* Now try to find a DOS partition */
|
||||
for (c1 = d->chunks->part; c1; c1 = c1->next) {
|
||||
if (c1->type == fat) {
|
||||
/* Got one! */
|
||||
mediaDevice = deviceRegister(c1->name, c1->name, c1->name, DEVICE_TYPE_DOS, TRUE,
|
||||
mediaInitDOS, mediaGetDOS, mediaCloseDOS, NULL);
|
||||
msgDebug("Found a DOS partition %s on drive %s\n", c1->name, d->name);
|
||||
break;
|
||||
if (!devs) {
|
||||
msgConfirm("No disk devices found!");
|
||||
return 0;
|
||||
}
|
||||
/* Now go chewing through looking for a DOS FAT partition */
|
||||
for (i = 0; devs[i]; i++) {
|
||||
d = (Disk *)devs[i]->private;
|
||||
/* Now try to find a DOS partition */
|
||||
for (c1 = d->chunks->part; c1; c1 = c1->next) {
|
||||
if (c1->type == fat) {
|
||||
/* Got one! */
|
||||
mediaDevice = deviceRegister(c1->name, c1->name, c1->name, DEVICE_TYPE_DOS, TRUE,
|
||||
mediaInitDOS, mediaGetDOS, mediaCloseDOS, NULL);
|
||||
msgDebug("Found a DOS partition %s on drive %s\n", c1->name, d->name);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -182,6 +209,12 @@ mediaSetDOS(char *str)
|
||||
return mediaDevice ? 1 : 0;
|
||||
}
|
||||
|
||||
static int
|
||||
tapeHook(char *str)
|
||||
{
|
||||
return genericHook(str, DEVICE_TYPE_TAPE);
|
||||
}
|
||||
|
||||
/*
|
||||
* Return 1 if we successfully found and set the installation type to
|
||||
* be a tape drive.
|
||||
@ -189,7 +222,27 @@ mediaSetDOS(char *str)
|
||||
int
|
||||
mediaSetTape(char *str)
|
||||
{
|
||||
return 0;
|
||||
Device **devs;
|
||||
int cnt;
|
||||
|
||||
devs = deviceFind(NULL, DEVICE_TYPE_TAPE);
|
||||
cnt = deviceCount(devs);
|
||||
if (!cnt) {
|
||||
msgConfirm("No tape drive devices found! Please check that your system's\nconfiguration is correct. For more information, consult the hardware guide\nin the Doc menu.");
|
||||
return 0;
|
||||
}
|
||||
else if (cnt > 1) {
|
||||
DMenu *menu;
|
||||
|
||||
menu = deviceCreateMenu(&MenuMediaTape, DEVICE_TYPE_TAPE, tapeHook);
|
||||
if (!menu)
|
||||
msgFatal("Unable to create tape drive menu! Something is seriously wrong.");
|
||||
dmenuOpenSimple(menu);
|
||||
free(menu);
|
||||
}
|
||||
else
|
||||
mediaDevice = devs[0];
|
||||
return mediaDevice ? 1 : 0;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -199,8 +252,25 @@ mediaSetTape(char *str)
|
||||
int
|
||||
mediaSetFTP(char *str)
|
||||
{
|
||||
static Device ftpDevice;
|
||||
Device *devp;
|
||||
char *cp;
|
||||
|
||||
devp = tcpDeviceSelect();
|
||||
if (!devp)
|
||||
return 0;
|
||||
dmenuOpenSimple(&MenuMediaFTP);
|
||||
return 0;
|
||||
cp = getenv("ftp");
|
||||
if (!cp)
|
||||
return 0;
|
||||
strcpy(ftpDevice.name, cp);
|
||||
ftpDevice.type = DEVICE_TYPE_NETWORK;
|
||||
ftpDevice.init = mediaInitFTP;
|
||||
ftpDevice.get = mediaGetFTP;
|
||||
ftpDevice.close = mediaCloseFTP;
|
||||
ftpDevice.private = devp;
|
||||
mediaDevice = &ftpDevice;
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -213,25 +283,89 @@ mediaSetFS(char *str)
|
||||
return 0;
|
||||
}
|
||||
|
||||
FILE *
|
||||
int
|
||||
mediaOpen(char *parent, char *me)
|
||||
{
|
||||
char fname[FILENAME_MAX];
|
||||
char distname[FILENAME_MAX];
|
||||
int fd;
|
||||
|
||||
if (parent)
|
||||
snprintf(fname, FILENAME_MAX, "%s%s", parent, me);
|
||||
snprintf(distname, FILENAME_MAX, "%s%s", parent, me);
|
||||
else
|
||||
snprintf(fname, FILENAME_MAX, "%s/%s", me, me);
|
||||
#if 0
|
||||
strncpy(fname, me, FILENAME_MAX);
|
||||
#endif
|
||||
/* XXX mediaDevice points to where we want to get it from */
|
||||
return NULL;
|
||||
snprintf(distname, FILENAME_MAX, "%s/%s", me, me);
|
||||
if (mediaDevice->init)
|
||||
(*mediaDevice->init)(mediaDevice);
|
||||
fd = (*mediaDevice->get)(distname);
|
||||
return fd;
|
||||
}
|
||||
|
||||
void
|
||||
mediaClose(void)
|
||||
{
|
||||
if (mediaDevice->close)
|
||||
(*mediaDevice->close)(mediaDevice);
|
||||
mediaDevice = NULL;
|
||||
}
|
||||
|
||||
Boolean
|
||||
mediaExtractDist(FILE *fp)
|
||||
mediaExtractDist(char *dir, int fd)
|
||||
{
|
||||
int i, j, zpid, cpid, pfd[2];
|
||||
|
||||
if (!dir)
|
||||
dir = "/";
|
||||
j = fork();
|
||||
if (!j) {
|
||||
chdir(dir);
|
||||
pipe(pfd);
|
||||
zpid = fork();
|
||||
if (!zpid) {
|
||||
dup2(fd, 0); close(fd);
|
||||
dup2(pfd[1], 1); close(pfd[1]);
|
||||
close(pfd[0]);
|
||||
i = execl("/stand/gunzip", "/stand/gunzip", 0);
|
||||
msgDebug("/stand/gunzip command returns %d status\n", i);
|
||||
exit(i);
|
||||
}
|
||||
cpid = fork();
|
||||
if (!cpid) {
|
||||
dup2(pfd[0], 0); close(pfd[0]);
|
||||
close(fd);
|
||||
close(pfd[1]);
|
||||
if (DebugFD != -1) {
|
||||
dup2(DebugFD, 1);
|
||||
dup2(DebugFD, 2);
|
||||
}
|
||||
else {
|
||||
close(1); open("/dev/null", O_WRONLY);
|
||||
dup2(1, 2);
|
||||
}
|
||||
i = execl("/stand/cpio", "/stand/cpio", "-iduvm", "-H", "tar", 0);
|
||||
msgDebug("/stand/cpio command returns %d status\n", i);
|
||||
exit(i);
|
||||
}
|
||||
close(pfd[0]);
|
||||
close(pfd[1]);
|
||||
close(fd);
|
||||
|
||||
i = waitpid(zpid, &j, 0);
|
||||
if (i < 0 || _WSTATUS(j)) {
|
||||
dialog_clear();
|
||||
msgConfirm("gunzip returned error status of %d!", _WSTATUS(j));
|
||||
exit(1);
|
||||
}
|
||||
i = waitpid(cpid, &j, 0);
|
||||
if (i < 0 || _WSTATUS(j)) {
|
||||
dialog_clear();
|
||||
msgConfirm("cpio returned error status of %d!", _WSTATUS(j));
|
||||
exit(2);
|
||||
}
|
||||
exit(0);
|
||||
}
|
||||
else
|
||||
i = wait(&j);
|
||||
if (i < 0 || _WSTATUS(j))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@ -252,8 +386,3 @@ mediaVerify(void)
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void
|
||||
mediaClose(void)
|
||||
{
|
||||
}
|
||||
|
@ -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.1 1995/05/17 14:39:53 jkh Exp $
|
||||
* $Id: media_strategy.c,v 1.4 1995/05/20 18:38:39 gpalmer Exp $
|
||||
*
|
||||
* Copyright (c) 1995
|
||||
* Jordan Hubbard. All rights reserved.
|
||||
@ -87,7 +87,7 @@ attr_parse(struct attribs **attr, char *file)
|
||||
|
||||
if ((fp=fopen(file, "r")) == NULL)
|
||||
{
|
||||
msgFatal("Cannot open the information file `%s': %s (%d)", file, strerror(errno), errno);
|
||||
msgConfirm("Cannot open the information file `%s': %s (%d)", file, strerror(errno), errno);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -108,10 +108,8 @@ attr_parse(struct attribs **attr, char *file)
|
||||
hold_n[n++] = ch;
|
||||
state = NAME;
|
||||
}
|
||||
else {
|
||||
msgConfirm("Invalid character '%c' at line %d\n", ch, lno);
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
msgFatal("Invalid character '%c' at line %d\n", ch, lno);
|
||||
break;
|
||||
|
||||
case COMMENT:
|
||||
@ -141,16 +139,11 @@ attr_parse(struct attribs **attr, char *file)
|
||||
else if (ch == '{') {
|
||||
/* multiline value */
|
||||
while ((ch = fgetc(fp)) != '}') {
|
||||
if (ch == EOF) {
|
||||
msgConfirm("Unexpected EOF on line %d", lno);
|
||||
return 0;
|
||||
}
|
||||
if (ch == EOF)
|
||||
msgFatal("Unexpected EOF on line %d", lno);
|
||||
else {
|
||||
if (v == MAX_VALUE) {
|
||||
msgConfirm("Value length overflow at line %d",
|
||||
lno);
|
||||
return 0;
|
||||
}
|
||||
if (v == MAX_VALUE)
|
||||
msgFatal("Value length overflow at line %d", lno);
|
||||
hold_v[v++] = ch;
|
||||
}
|
||||
}
|
||||
@ -162,10 +155,8 @@ attr_parse(struct attribs **attr, char *file)
|
||||
state = COMMIT;
|
||||
}
|
||||
else {
|
||||
if (v == MAX_VALUE) {
|
||||
msgConfirm("Value length overflow at line %d", lno);
|
||||
return 0;
|
||||
}
|
||||
if (v == MAX_VALUE)
|
||||
msgFatal("Value length overflow at line %d", lno);
|
||||
else
|
||||
hold_v[v++] = ch;
|
||||
}
|
||||
@ -179,8 +170,7 @@ attr_parse(struct attribs **attr, char *file)
|
||||
break;
|
||||
|
||||
default:
|
||||
msgConfirm("Unknown state at line %d??\n", lno);
|
||||
return 0;
|
||||
msgFatal("Unknown state at line %d??\n", lno);
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
@ -345,6 +335,12 @@ mediaInitTape(Device *dev)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
Boolean
|
||||
mediaInitNetwork(Device *dev)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
Boolean
|
||||
mediaGetTape(char *dist)
|
||||
{
|
||||
@ -357,20 +353,26 @@ mediaCloseTape(Device *dev)
|
||||
return;
|
||||
}
|
||||
|
||||
void
|
||||
mediaCloseNetwork(Device *dev)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Boolean
|
||||
mediaInitNetwork(Device *dev)
|
||||
mediaInitFTP(Device *dev)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
Boolean
|
||||
mediaGetNetwork(char *dist)
|
||||
mediaGetFTP(char *dist)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void
|
||||
mediaCloseNetwork(Device *dev)
|
||||
mediaCloseFTP(Device *dev)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -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.21 1995/05/20 13:36:44 jkh Exp $
|
||||
* $Id: menus.c,v 1.22 1995/05/20 20:30:11 jkh Exp $
|
||||
*
|
||||
* Copyright (c) 1995
|
||||
* Jordan Hubbard. All rights reserved.
|
||||
@ -168,8 +168,23 @@ procedure (available on the FreeBSD CDROM or the net under the\n\
|
||||
tools/dos directory) or have otherwise prepared a set of diskettes\n\
|
||||
for each distribution that properly contains all the components of\n\
|
||||
the distribution plus the extraction and checksumming scripts.",
|
||||
"Please select which floppy drive you want to use",
|
||||
NULL,
|
||||
"Press F1 to read the installation guide",
|
||||
"install.hlp",
|
||||
{ { NULL } },
|
||||
};
|
||||
|
||||
DMenu MenuMediaDOS = {
|
||||
DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
|
||||
"Choose a DOS partition",
|
||||
"FreeBSD can be installed directly from a DOS partition,\n\
|
||||
assuming of course that you've copied the relevant distributions\n\
|
||||
into your DOS partition before starting this installation. If\n\
|
||||
such is not the case, then you should reboot DOS at this time\n\
|
||||
and copy the distributions you want to install into a subdirectory\n\
|
||||
on one of your DOS partitions. Otherwise, please select the\n\
|
||||
DOS partition containing the FreeBSD distribution files.",
|
||||
"Press F1 to read the installation guide",
|
||||
"install.hlp",
|
||||
{ { NULL } },
|
||||
};
|
||||
|
||||
@ -184,64 +199,97 @@ available from the Primary site.\n\n\
|
||||
If the first site selected doesn't respond, try one of the alternates.\n\
|
||||
You may also wish to investigate the Ftp options menu in case of trouble.",
|
||||
"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, 0 },
|
||||
{ "Secondary", "freefall.cdrom.com",
|
||||
DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://freefall.cdrom.com/pub/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
"install.hlp",
|
||||
{ { "Primary Site", "ftp.freebsd.org",
|
||||
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 },
|
||||
{ "Australia", "ftp.physics.usyd.edu.au",
|
||||
DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://ftp.physics.usyd.edu.au/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
DMENU_SET_VARIABLE, (void *)"ftp=ftp://ftp.physics.usyd.edu.au/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
{ "Finland", "nic.funet.fi",
|
||||
DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://nic.funet.fi/pub/unix/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
DMENU_SET_VARIABLE, (void *)"ftp=ftp://nic.funet.fi/pub/unix/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
{ "France", "ftp.ibp.fr",
|
||||
DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://ftp.ibp.fr/pub/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
DMENU_SET_VARIABLE, (void *)"ftp=ftp://ftp.ibp.fr/pub/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
{ "Germany", "ftp.uni-duisburg.de",
|
||||
DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://ftp.uni-duisburg.de/pub/unix/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
DMENU_SET_VARIABLE, (void *)"ftp=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, 0 },
|
||||
DMENU_SET_VARIABLE, (void *)"ftp=ftp://orgchem.weizmann.ac.il/pub/FreeBSD-2.0.5-ALPHA", 0, 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, 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, 0 },
|
||||
{ "Japan-3", "ftp.waseda.ac.jp",
|
||||
DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://ftp.waseda.ac.jp/pub/FreeBSD/2.0.5-ALPHA", 0, 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, 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, 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, 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, 0 },
|
||||
DMENU_SET_VARIABLE, (void *)"ftp=ftp://ftp.sra.co.jp/pub/os/FreeBSD/distribution/2.0.5-ALPHA", 0, 0 },
|
||||
{ "Japan #2", "ftp.mei.co.jp",
|
||||
DMENU_SET_VARIABLE, (void *)"ftp=ftp://ftp.mei.co.jp/free/PC-UNIX/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
{ "Japan #3", "ftp.waseda.ac.jp",
|
||||
DMENU_SET_VARIABLE, (void *)"ftp=ftp://ftp.waseda.ac.jp/pub/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
{ "Japan #4", "ftp.pu-toyama.ac.jp",
|
||||
DMENU_SET_VARIABLE, (void *)"ftp=ftp://ftp.pu-toyama.ac.jp/pub/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
{ "Japan #5", "ftpsv1.u-aizu.ac.jp",
|
||||
DMENU_SET_VARIABLE, (void *)"ftp=ftp://ftpsv1.u-aizu.ac.jp/pub/os/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
{ "Japan #6", "tutserver.tutcc.tut.ac.jp",
|
||||
DMENU_SET_VARIABLE, (void *)"ftp=ftp://tutserver.tutcc.tut.ac.jp/FreeBSD/FreeBSD-2.0.5-ALPHA", 0, 0 },
|
||||
{ "Japan #7", "ftp.ee.uec.ac.jp",
|
||||
DMENU_SET_VARIABLE, (void *)"ftp=ftp://ftp.ee.uec.ac.jp/pub/os/FreeBSD.other/FreeBSD-2.0.5-ALPHA", 0, 0 },
|
||||
{ "Korea", "ftp.cau.ac.kr",
|
||||
DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://ftp.cau.ac.kr/pub/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
DMENU_SET_VARIABLE, (void *)"ftp=ftp://ftp.cau.ac.kr/pub/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
{ "Netherlands", "ftp.nl.net",
|
||||
DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://ftp.nl.net/pub/os/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
DMENU_SET_VARIABLE, (void *)"ftp=ftp://ftp.nl.net/pub/os/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
{ "Russia", "ftp.kiae.su",
|
||||
DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://ftp.kiae.su/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
DMENU_SET_VARIABLE, (void *)"ftp=ftp://ftp.kiae.su/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
{ "Sweden", "ftp.luth.se",
|
||||
DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://ftp.luth.se/pub/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
DMENU_SET_VARIABLE, (void *)"ftp=ftp://ftp.luth.se/pub/FreeBSD/2.0.5-ALPHA", 0, 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, 0 },
|
||||
DMENU_SET_VARIABLE, (void *)"ftp=ftp://netbsd.csie.nctu.edu.tw/pub/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
{ "Thailand", "ftp.nectec.or.th",
|
||||
DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://ftp.nectec.or.th/pub/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
DMENU_SET_VARIABLE, (void *)"ftp=ftp://ftp.nectec.or.th/pub/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
{ "UK", "ftp.demon.co.uk",
|
||||
DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://ftp.demon.co.uk/pub/BSD/FreeBSD/2.0.5-ALPHA", 0, 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, 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, 0 },
|
||||
DMENU_SET_VARIABLE, (void *)"ftp=ftp://ftp.demon.co.uk/pub/BSD/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
{ "UK #2", "src.doc.ic.ac.uk",
|
||||
DMENU_SET_VARIABLE, (void *)"ftp=ftp://src.doc.ic.ac.uk/packages/unix/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
{ "UK #3", "unix.hensa.ac.uk",
|
||||
DMENU_SET_VARIABLE, (void *)"ftp=ftp://unix.hensa.ac.uk/pub/walnut.creek/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
{ "USA", "ref.tfs.com",
|
||||
DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://ref.tfs.com/pub/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
{ "USA-2", "ftp.dataplex.net",
|
||||
DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://ftp.dataplex.net/pub/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
{ "USA-3", "kryten.atinc.com",
|
||||
DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://kryten.atinc.com/pub/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
{ "USA-4", "ftp.neosoft.com",
|
||||
DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://ftp.neosoft.com/systems/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
DMENU_SET_VARIABLE, (void *)"ftp=ftp://ref.tfs.com/pub/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
{ "USA #2", "ftp.dataplex.net",
|
||||
DMENU_SET_VARIABLE, (void *)"ftp=ftp://ftp.dataplex.net/pub/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
{ "USA #3", "kryten.atinc.com",
|
||||
DMENU_SET_VARIABLE, (void *)"ftp=ftp://kryten.atinc.com/pub/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
{ "USA #4", "ftp.neosoft.com",
|
||||
DMENU_SET_VARIABLE, (void *)"ftp=ftp://ftp.neosoft.com/systems/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
{ NULL } }
|
||||
};
|
||||
|
||||
DMenu MenuMediaTape = {
|
||||
DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
|
||||
"Choose a tape drive type",
|
||||
"FreeBSD can be installed from tape drive, though this installation\n\
|
||||
method requires a certain amount of temporary storage in addition\n\
|
||||
to the space required by the distribution itself (tape drives make\n\
|
||||
poor random-access devices, so we extract _everything_ on the tape\n\
|
||||
in one pass). If you have sufficient space for this, then you should\n\
|
||||
select one of the following tape devices detected on your system.",
|
||||
"Press F1 to read the installation guide",
|
||||
"install.hlp",
|
||||
{ { NULL } },
|
||||
};
|
||||
|
||||
DMenu MenuNetworkDevice = {
|
||||
DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
|
||||
"Choose a network interface type",
|
||||
"FreeBSD can be installed directly over a network, using NFS\n\
|
||||
or FTP. If you're using an ethernet card to talk to the world\n\
|
||||
then setup is pretty straight-forward. If you are using PPP over\n\
|
||||
a serial device (cuaa0 or cuaa1) then you may need to dial your service\n\
|
||||
provider using a special PPP utility we provide for that purpose.\n\
|
||||
You can also install over your parallel port using a special \"laplink\"\n\
|
||||
cable, though this only works if you have another FreeBSD machine running\n\
|
||||
a fairly recent (2.0R or later) release to talk to.\n\n\
|
||||
To use PPP, select one of the serial devices, otherwise select lp0\n\
|
||||
for the parallel port or one of the ethernet controllers (if you have one)\n\
|
||||
for an ethernet installation.",
|
||||
"Press F1 to read PPP user manual",
|
||||
"ppp.0",
|
||||
{ { NULL } },
|
||||
};
|
||||
|
||||
/* The media selection menu */
|
||||
DMenu MenuMedia = {
|
||||
DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
|
||||
@ -533,8 +581,11 @@ When you're done setting options, please select Cancel.",
|
||||
DMenu MenuOptionsFTP = {
|
||||
DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
|
||||
"Choose FTP Options",
|
||||
"In case of ftp failure, how would you like this installation\n\
|
||||
to deal with it? You have several choices:",
|
||||
"Please indicate how you would like FTP to deal with potential error\n\
|
||||
conditions, the default behavior being to Abort on transfer errors. If you\n\
|
||||
are behind an IP firewall, you will also probably wish to select passive\n\
|
||||
mode transfers (it's generally OK to set this in any case as almost all\n\
|
||||
servers support it, firewall or no).",
|
||||
NULL,
|
||||
NULL,
|
||||
{ { "FTP Retry", "On transfer failure, retry same host",
|
||||
|
@ -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.24 1995/05/20 11:10:35 jkh Exp $
|
||||
* $Id: sysinstall.h,v 1.25 1995/05/20 20:30:12 jkh Exp $
|
||||
*
|
||||
* Copyright (c) 1995
|
||||
* Jordan Hubbard. All rights reserved.
|
||||
@ -200,8 +200,11 @@ extern DMenu MenuOptionsLanguage; /* Language options menu */
|
||||
extern DMenu MenuOptionsFTP; /* FTP options menu */
|
||||
extern DMenu MenuMedia; /* Media type menu */
|
||||
extern DMenu MenuMediaCDROM; /* CDROM media menu */
|
||||
extern DMenu MenuMediaDOS; /* DOS media menu */
|
||||
extern DMenu MenuMediaFloppy; /* Floppy media menu */
|
||||
extern DMenu MenuMediaFTP; /* FTP media menu */
|
||||
extern DMenu MenuMediaTape; /* Tape media menu */
|
||||
extern DMenu MenuNetworkDevice; /* Network device menu */
|
||||
extern DMenu MenuInstall; /* Installation menu */
|
||||
extern DMenu MenuInstallType; /* Installation type menu */
|
||||
extern DMenu MenuDistributions; /* Distribution menu */
|
||||
@ -299,9 +302,9 @@ extern int mediaSetDOS(char *str);
|
||||
extern int mediaSetTape(char *str);
|
||||
extern int mediaSetFTP(char *str);
|
||||
extern int mediaSetFS(char *str);
|
||||
extern FILE *mediaOpen(char *parent, char *me);
|
||||
extern int mediaOpen(char *parent, char *me);
|
||||
extern Boolean mediaGetType(void);
|
||||
extern Boolean mediaExtractDist(FILE *fp);
|
||||
extern Boolean mediaExtractDist(char *dir, int fd);
|
||||
extern Boolean mediaVerify(void);
|
||||
extern void mediaClose(void);
|
||||
|
||||
@ -316,13 +319,15 @@ extern Boolean mediaGetCDROM(char *dist);
|
||||
extern Boolean mediaGetDOS(char *dist);
|
||||
extern Boolean mediaInitTape(Device *dev);
|
||||
extern Boolean mediaGetTape(char *dist);
|
||||
extern Boolean mediaInitFTP(Device *dev);
|
||||
extern Boolean mediaInitNetwork(Device *dev);
|
||||
extern Boolean mediaGetNetwork(char *dist);
|
||||
extern Boolean mediaGetFTP(char *dist);
|
||||
extern void mediaCloseTape(Device *dev);
|
||||
extern void mediaCloseCDROM(Device *dev);
|
||||
extern void mediaCloseDOS(Device *dev);
|
||||
extern void mediaCloseNetwork(Device *dev);
|
||||
extern void mediaCloseFTP(Device *dev);
|
||||
extern void mediaCloseFloppy(Device *dev);
|
||||
extern void mediaCloseNetwork(Device *dev);
|
||||
|
||||
/* misc.c */
|
||||
extern Boolean file_readable(char *fname);
|
||||
@ -369,6 +374,7 @@ extern int vsystem(char *fmt, ...);
|
||||
|
||||
/* tcpip.c */
|
||||
extern int tcpOpenDialog(char *);
|
||||
extern Device *tcpDeviceSelect(void);
|
||||
|
||||
/* termcap.c */
|
||||
extern int set_termcap(void);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: tcpip.c,v 1.8 1995/05/18 16:36:14 gpalmer Exp $
|
||||
* $Id: tcpip.c,v 1.9 1995/05/18 16:44:41 gpalmer Exp $
|
||||
*
|
||||
* Copyright (c) 1995
|
||||
* Gary J Palmer. All rights reserved.
|
||||
@ -17,22 +17,21 @@
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by Gary J Palmer
|
||||
* for the FreeBSD Project.
|
||||
* 4. The name of Gary J Palmer or the FreeBSD Project may not be used to
|
||||
* endorse or promote products derived from this software without specific
|
||||
* prior written permission.
|
||||
* for the FreeBSD Project.
|
||||
* 4. The name of Gary J Palmer or the FreeBSD Project may
|
||||
* not be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY GARY J PALMER ``AS IS'' AND ANY EXPRESS
|
||||
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL GARY J PALMER BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, LIFE OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
* THIS SOFTWARE IS PROVIDED BY GARY J PALMER ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL GARY J PALMER BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, LIFE OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
|
||||
@ -171,18 +170,10 @@ verifySettings(void)
|
||||
{
|
||||
if (!hostname[0])
|
||||
feepout("Must specify a host name of some sort!");
|
||||
#if 0
|
||||
else if (!verifyIP(ipaddr))
|
||||
feepout("Invalid or missing value for IP address");
|
||||
#endif
|
||||
else if (gateway[0] && !verifyIP(gateway))
|
||||
feepout("Invalid gateway IP address specified");
|
||||
else if (nameserver[0] && !verifyIP(nameserver))
|
||||
feepout("Invalid name server IP address specified");
|
||||
#if 0
|
||||
else if (netmask[0] < '0' || netmask[0] > '9')
|
||||
feepout("Invalid or missing netmask");
|
||||
#endif
|
||||
else
|
||||
return 1;
|
||||
return 0;
|
||||
@ -436,7 +427,7 @@ tcpOpenDialog(char *str)
|
||||
|
||||
/* Loop back to the interface list from the extras box -
|
||||
now we handle the case of saving out the data the user
|
||||
typed in (and also do basic verification of it's
|
||||
typed in (and also do basic verification of its
|
||||
sanity) */
|
||||
if (n == LAYOUT_EXTRAS) {
|
||||
n = LAYOUT_IFACE;
|
||||
@ -480,14 +471,13 @@ tcpOpenDialog(char *str)
|
||||
n = 0;
|
||||
break;
|
||||
|
||||
/* This doesn't seem to work anymore - dunno why. Foo */
|
||||
|
||||
case SEL_BACKTAB:
|
||||
if (n)
|
||||
--n;
|
||||
else
|
||||
n = max;
|
||||
break;
|
||||
|
||||
case KEY_F(1):
|
||||
display_helpfile();
|
||||
|
||||
@ -537,3 +527,47 @@ tcpOpenDialog(char *str)
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static Device *netDevice;
|
||||
|
||||
static int
|
||||
netHook(char *str)
|
||||
{
|
||||
Device **devs;
|
||||
|
||||
/* Clip garbage off the ends */
|
||||
string_prune(str);
|
||||
str = string_skipwhite(str);
|
||||
if (!*str)
|
||||
return 0;
|
||||
devs = deviceFind(str, DEVICE_TYPE_NETWORK);
|
||||
if (devs)
|
||||
netDevice = devs[0];
|
||||
return devs ? 1 : 0;
|
||||
}
|
||||
|
||||
/* Get a network device */
|
||||
Device *
|
||||
tcpDeviceSelect(void)
|
||||
{
|
||||
DMenu *menu;
|
||||
|
||||
/* If we can't find a hostname, ask user to set up TCP/IP */
|
||||
if (!getenv(VAR_HOSTNAME))
|
||||
tcpOpenDialog(NULL);
|
||||
|
||||
/* If we still can't, user is a bonehead */
|
||||
if (!getenv(VAR_HOSTNAME)) {
|
||||
msgConfirm("Sorry, I can't do this if you don't set up your networking first!");
|
||||
return 0;
|
||||
}
|
||||
menu = deviceCreateMenu(&MenuNetworkDevice, DEVICE_TYPE_NETWORK, netHook);
|
||||
if (!menu)
|
||||
msgFatal("Unable to create network device menu! Argh!");
|
||||
dmenuOpenSimple(menu);
|
||||
free(menu);
|
||||
if (netDevice->init)
|
||||
(*netDevice->init)(netDevice);
|
||||
return netDevice;
|
||||
}
|
||||
|
||||
|
@ -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.24 1995/05/20 15:49:53 jkh Exp $
|
||||
* $Id: devices.c,v 1.25 1995/05/20 16:22:41 jkh Exp $
|
||||
*
|
||||
* Copyright (c) 1995
|
||||
* Jordan Hubbard. All rights reserved.
|
||||
@ -236,7 +236,7 @@ deviceGetAll(void)
|
||||
close(fd);
|
||||
/* The only network devices that have fds associated are serial ones */
|
||||
deviceRegister("ppp0", device_names[i].description, strdup(try),
|
||||
DEVICE_TYPE_NETWORK, TRUE, mediaInitNetwork, mediaGetNetwork, mediaCloseNetwork, NULL);
|
||||
DEVICE_TYPE_NETWORK, TRUE, mediaInitNetwork, NULL, mediaCloseNetwork, NULL);
|
||||
msgDebug("Found a device of type network named: %s\n", device_names[i].name);
|
||||
}
|
||||
break;
|
||||
@ -270,7 +270,7 @@ deviceGetAll(void)
|
||||
|| !strncmp(ifptr->ifr_name, "lo0", 3))
|
||||
continue;
|
||||
deviceRegister(ifptr->ifr_name, ifptr->ifr_name, ifptr->ifr_name,
|
||||
DEVICE_TYPE_NETWORK, TRUE, mediaInitNetwork, mediaGetNetwork, mediaCloseNetwork, NULL);
|
||||
DEVICE_TYPE_NETWORK, TRUE, mediaInitNetwork, NULL, mediaCloseNetwork, NULL);
|
||||
msgDebug("Found a device of type network named: %s\n", ifptr->ifr_name);
|
||||
close(s);
|
||||
if ((s = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
|
||||
|
@ -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.44 1995/05/20 23:33:13 phk Exp $
|
||||
* $Id: install.c,v 1.45 1995/05/21 01:56:01 phk Exp $
|
||||
*
|
||||
* Copyright (c) 1995
|
||||
* Jordan Hubbard. All rights reserved.
|
||||
@ -56,25 +56,6 @@ static void cpio_extract(void);
|
||||
static void install_configuration_files(void);
|
||||
static void do_final_setup(void);
|
||||
|
||||
static Boolean
|
||||
preInstallCheck(void)
|
||||
{
|
||||
if (!getenv(DISK_PARTITIONED)) {
|
||||
msgConfirm("You need to partition your disk before you can proceed with\nthe installation.");
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
if (!getenv(DISK_LABELLED)) {
|
||||
msgConfirm("You need to assign disk labels before you can proceed with\nthe installation.");
|
||||
return FALSE;
|
||||
}
|
||||
if (!Dists) {
|
||||
msgConfirm("You haven't told me what distributions to load yet!\nPlease select a distribution from the Distributions menu.");
|
||||
return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
installInitial(void)
|
||||
{
|
||||
@ -89,6 +70,16 @@ installInitial(void)
|
||||
if (alreadyDone)
|
||||
return;
|
||||
|
||||
if (!getenv(DISK_PARTITIONED)) {
|
||||
msgConfirm("You need to partition your disk before you can proceed with\nthe installation.");
|
||||
return;
|
||||
}
|
||||
if (!getenv(DISK_LABELLED)) {
|
||||
msgConfirm("You need to assign disk labels before you can proceed with\nthe installation.");
|
||||
return;
|
||||
}
|
||||
|
||||
/* Figure out what kind of MBR the user wants */
|
||||
dmenuOpenSimple(&MenuMBRType);
|
||||
mbrContents = NULL;
|
||||
cp = getenv("bootManager");
|
||||
@ -99,9 +90,8 @@ installInitial(void)
|
||||
mbrContents = mbr;
|
||||
}
|
||||
|
||||
/* If things aren't kosher, or we refuse to proceed, bail. */
|
||||
if (!preInstallCheck()
|
||||
|| msgYesNo("Last Chance! Are you SURE you want continue the installation?\n\nIf you're running this on an existing system, we STRONGLY\nencourage you to make proper backups before proceeding.\nWe take no responsibility for lost disk contents!"))
|
||||
/* If we refuse to proceed, bail. */
|
||||
if (msgYesNo("Last Chance! Are you SURE you want continue the installation?\n\nIf you're running this on an existing system, we STRONGLY\nencourage you to make proper backups before proceeding.\nWe take no responsibility for lost disk contents!"))
|
||||
return;
|
||||
|
||||
devs = deviceFind(NULL, DEVICE_TYPE_DISK);
|
||||
@ -158,12 +148,23 @@ installFinal(void)
|
||||
alreadyDone = TRUE;
|
||||
}
|
||||
|
||||
/*
|
||||
* What happens when we select "GO". This is broken into a 3 stage installation so that
|
||||
* the user can do a full installation but come back here again to load more distributions,
|
||||
* perhaps from a different media type. This would allow, for example, the user to load the
|
||||
* majority of the system from CDROM and then use ftp to load just the DES dist.
|
||||
*/
|
||||
int
|
||||
installCommit(char *str)
|
||||
{
|
||||
installInitial();
|
||||
if (!Dists) {
|
||||
msgConfirm("You haven't told me what distributions to load yet!\nPlease select a distribution from the Distributions menu.");
|
||||
return 0;
|
||||
}
|
||||
if (!mediaVerify())
|
||||
return 0;
|
||||
|
||||
installInitial();
|
||||
distExtractAll();
|
||||
installFinal();
|
||||
return 0;
|
||||
|
@ -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.16 1995/05/21 06:12:43 phk Exp $
|
||||
* $Id: label.c,v 1.17 1995/05/21 10:16:10 jkh Exp $
|
||||
*
|
||||
* Copyright (c) 1995
|
||||
* Jordan Hubbard. All rights reserved.
|
||||
@ -210,9 +210,9 @@ get_mountpoint(struct chunk *old)
|
||||
char *val;
|
||||
PartInfo *tmp;
|
||||
|
||||
dialog_clear(); clear();
|
||||
val = msgGetInput(old && old->private ? ((PartInfo *)old->private)->mountpoint : NULL,
|
||||
"Please specify a mount point for the partition");
|
||||
clear();
|
||||
if (!val)
|
||||
return NULL;
|
||||
|
||||
|
@ -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.21 1995/05/20 13:36:44 jkh Exp $
|
||||
* $Id: menus.c,v 1.22 1995/05/20 20:30:11 jkh Exp $
|
||||
*
|
||||
* Copyright (c) 1995
|
||||
* Jordan Hubbard. All rights reserved.
|
||||
@ -168,8 +168,23 @@ procedure (available on the FreeBSD CDROM or the net under the\n\
|
||||
tools/dos directory) or have otherwise prepared a set of diskettes\n\
|
||||
for each distribution that properly contains all the components of\n\
|
||||
the distribution plus the extraction and checksumming scripts.",
|
||||
"Please select which floppy drive you want to use",
|
||||
NULL,
|
||||
"Press F1 to read the installation guide",
|
||||
"install.hlp",
|
||||
{ { NULL } },
|
||||
};
|
||||
|
||||
DMenu MenuMediaDOS = {
|
||||
DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
|
||||
"Choose a DOS partition",
|
||||
"FreeBSD can be installed directly from a DOS partition,\n\
|
||||
assuming of course that you've copied the relevant distributions\n\
|
||||
into your DOS partition before starting this installation. If\n\
|
||||
such is not the case, then you should reboot DOS at this time\n\
|
||||
and copy the distributions you want to install into a subdirectory\n\
|
||||
on one of your DOS partitions. Otherwise, please select the\n\
|
||||
DOS partition containing the FreeBSD distribution files.",
|
||||
"Press F1 to read the installation guide",
|
||||
"install.hlp",
|
||||
{ { NULL } },
|
||||
};
|
||||
|
||||
@ -184,64 +199,97 @@ available from the Primary site.\n\n\
|
||||
If the first site selected doesn't respond, try one of the alternates.\n\
|
||||
You may also wish to investigate the Ftp options menu in case of trouble.",
|
||||
"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, 0 },
|
||||
{ "Secondary", "freefall.cdrom.com",
|
||||
DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://freefall.cdrom.com/pub/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
"install.hlp",
|
||||
{ { "Primary Site", "ftp.freebsd.org",
|
||||
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 },
|
||||
{ "Australia", "ftp.physics.usyd.edu.au",
|
||||
DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://ftp.physics.usyd.edu.au/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
DMENU_SET_VARIABLE, (void *)"ftp=ftp://ftp.physics.usyd.edu.au/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
{ "Finland", "nic.funet.fi",
|
||||
DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://nic.funet.fi/pub/unix/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
DMENU_SET_VARIABLE, (void *)"ftp=ftp://nic.funet.fi/pub/unix/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
{ "France", "ftp.ibp.fr",
|
||||
DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://ftp.ibp.fr/pub/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
DMENU_SET_VARIABLE, (void *)"ftp=ftp://ftp.ibp.fr/pub/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
{ "Germany", "ftp.uni-duisburg.de",
|
||||
DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://ftp.uni-duisburg.de/pub/unix/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
DMENU_SET_VARIABLE, (void *)"ftp=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, 0 },
|
||||
DMENU_SET_VARIABLE, (void *)"ftp=ftp://orgchem.weizmann.ac.il/pub/FreeBSD-2.0.5-ALPHA", 0, 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, 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, 0 },
|
||||
{ "Japan-3", "ftp.waseda.ac.jp",
|
||||
DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://ftp.waseda.ac.jp/pub/FreeBSD/2.0.5-ALPHA", 0, 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, 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, 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, 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, 0 },
|
||||
DMENU_SET_VARIABLE, (void *)"ftp=ftp://ftp.sra.co.jp/pub/os/FreeBSD/distribution/2.0.5-ALPHA", 0, 0 },
|
||||
{ "Japan #2", "ftp.mei.co.jp",
|
||||
DMENU_SET_VARIABLE, (void *)"ftp=ftp://ftp.mei.co.jp/free/PC-UNIX/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
{ "Japan #3", "ftp.waseda.ac.jp",
|
||||
DMENU_SET_VARIABLE, (void *)"ftp=ftp://ftp.waseda.ac.jp/pub/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
{ "Japan #4", "ftp.pu-toyama.ac.jp",
|
||||
DMENU_SET_VARIABLE, (void *)"ftp=ftp://ftp.pu-toyama.ac.jp/pub/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
{ "Japan #5", "ftpsv1.u-aizu.ac.jp",
|
||||
DMENU_SET_VARIABLE, (void *)"ftp=ftp://ftpsv1.u-aizu.ac.jp/pub/os/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
{ "Japan #6", "tutserver.tutcc.tut.ac.jp",
|
||||
DMENU_SET_VARIABLE, (void *)"ftp=ftp://tutserver.tutcc.tut.ac.jp/FreeBSD/FreeBSD-2.0.5-ALPHA", 0, 0 },
|
||||
{ "Japan #7", "ftp.ee.uec.ac.jp",
|
||||
DMENU_SET_VARIABLE, (void *)"ftp=ftp://ftp.ee.uec.ac.jp/pub/os/FreeBSD.other/FreeBSD-2.0.5-ALPHA", 0, 0 },
|
||||
{ "Korea", "ftp.cau.ac.kr",
|
||||
DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://ftp.cau.ac.kr/pub/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
DMENU_SET_VARIABLE, (void *)"ftp=ftp://ftp.cau.ac.kr/pub/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
{ "Netherlands", "ftp.nl.net",
|
||||
DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://ftp.nl.net/pub/os/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
DMENU_SET_VARIABLE, (void *)"ftp=ftp://ftp.nl.net/pub/os/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
{ "Russia", "ftp.kiae.su",
|
||||
DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://ftp.kiae.su/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
DMENU_SET_VARIABLE, (void *)"ftp=ftp://ftp.kiae.su/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
{ "Sweden", "ftp.luth.se",
|
||||
DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://ftp.luth.se/pub/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
DMENU_SET_VARIABLE, (void *)"ftp=ftp://ftp.luth.se/pub/FreeBSD/2.0.5-ALPHA", 0, 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, 0 },
|
||||
DMENU_SET_VARIABLE, (void *)"ftp=ftp://netbsd.csie.nctu.edu.tw/pub/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
{ "Thailand", "ftp.nectec.or.th",
|
||||
DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://ftp.nectec.or.th/pub/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
DMENU_SET_VARIABLE, (void *)"ftp=ftp://ftp.nectec.or.th/pub/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
{ "UK", "ftp.demon.co.uk",
|
||||
DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://ftp.demon.co.uk/pub/BSD/FreeBSD/2.0.5-ALPHA", 0, 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, 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, 0 },
|
||||
DMENU_SET_VARIABLE, (void *)"ftp=ftp://ftp.demon.co.uk/pub/BSD/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
{ "UK #2", "src.doc.ic.ac.uk",
|
||||
DMENU_SET_VARIABLE, (void *)"ftp=ftp://src.doc.ic.ac.uk/packages/unix/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
{ "UK #3", "unix.hensa.ac.uk",
|
||||
DMENU_SET_VARIABLE, (void *)"ftp=ftp://unix.hensa.ac.uk/pub/walnut.creek/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
{ "USA", "ref.tfs.com",
|
||||
DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://ref.tfs.com/pub/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
{ "USA-2", "ftp.dataplex.net",
|
||||
DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://ftp.dataplex.net/pub/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
{ "USA-3", "kryten.atinc.com",
|
||||
DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://kryten.atinc.com/pub/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
{ "USA-4", "ftp.neosoft.com",
|
||||
DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://ftp.neosoft.com/systems/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
DMENU_SET_VARIABLE, (void *)"ftp=ftp://ref.tfs.com/pub/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
{ "USA #2", "ftp.dataplex.net",
|
||||
DMENU_SET_VARIABLE, (void *)"ftp=ftp://ftp.dataplex.net/pub/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
{ "USA #3", "kryten.atinc.com",
|
||||
DMENU_SET_VARIABLE, (void *)"ftp=ftp://kryten.atinc.com/pub/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
{ "USA #4", "ftp.neosoft.com",
|
||||
DMENU_SET_VARIABLE, (void *)"ftp=ftp://ftp.neosoft.com/systems/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
{ NULL } }
|
||||
};
|
||||
|
||||
DMenu MenuMediaTape = {
|
||||
DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
|
||||
"Choose a tape drive type",
|
||||
"FreeBSD can be installed from tape drive, though this installation\n\
|
||||
method requires a certain amount of temporary storage in addition\n\
|
||||
to the space required by the distribution itself (tape drives make\n\
|
||||
poor random-access devices, so we extract _everything_ on the tape\n\
|
||||
in one pass). If you have sufficient space for this, then you should\n\
|
||||
select one of the following tape devices detected on your system.",
|
||||
"Press F1 to read the installation guide",
|
||||
"install.hlp",
|
||||
{ { NULL } },
|
||||
};
|
||||
|
||||
DMenu MenuNetworkDevice = {
|
||||
DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
|
||||
"Choose a network interface type",
|
||||
"FreeBSD can be installed directly over a network, using NFS\n\
|
||||
or FTP. If you're using an ethernet card to talk to the world\n\
|
||||
then setup is pretty straight-forward. If you are using PPP over\n\
|
||||
a serial device (cuaa0 or cuaa1) then you may need to dial your service\n\
|
||||
provider using a special PPP utility we provide for that purpose.\n\
|
||||
You can also install over your parallel port using a special \"laplink\"\n\
|
||||
cable, though this only works if you have another FreeBSD machine running\n\
|
||||
a fairly recent (2.0R or later) release to talk to.\n\n\
|
||||
To use PPP, select one of the serial devices, otherwise select lp0\n\
|
||||
for the parallel port or one of the ethernet controllers (if you have one)\n\
|
||||
for an ethernet installation.",
|
||||
"Press F1 to read PPP user manual",
|
||||
"ppp.0",
|
||||
{ { NULL } },
|
||||
};
|
||||
|
||||
/* The media selection menu */
|
||||
DMenu MenuMedia = {
|
||||
DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
|
||||
@ -533,8 +581,11 @@ When you're done setting options, please select Cancel.",
|
||||
DMenu MenuOptionsFTP = {
|
||||
DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
|
||||
"Choose FTP Options",
|
||||
"In case of ftp failure, how would you like this installation\n\
|
||||
to deal with it? You have several choices:",
|
||||
"Please indicate how you would like FTP to deal with potential error\n\
|
||||
conditions, the default behavior being to Abort on transfer errors. If you\n\
|
||||
are behind an IP firewall, you will also probably wish to select passive\n\
|
||||
mode transfers (it's generally OK to set this in any case as almost all\n\
|
||||
servers support it, firewall or no).",
|
||||
NULL,
|
||||
NULL,
|
||||
{ { "FTP Retry", "On transfer failure, retry same host",
|
||||
|
@ -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.24 1995/05/20 11:10:35 jkh Exp $
|
||||
* $Id: sysinstall.h,v 1.25 1995/05/20 20:30:12 jkh Exp $
|
||||
*
|
||||
* Copyright (c) 1995
|
||||
* Jordan Hubbard. All rights reserved.
|
||||
@ -200,8 +200,11 @@ extern DMenu MenuOptionsLanguage; /* Language options menu */
|
||||
extern DMenu MenuOptionsFTP; /* FTP options menu */
|
||||
extern DMenu MenuMedia; /* Media type menu */
|
||||
extern DMenu MenuMediaCDROM; /* CDROM media menu */
|
||||
extern DMenu MenuMediaDOS; /* DOS media menu */
|
||||
extern DMenu MenuMediaFloppy; /* Floppy media menu */
|
||||
extern DMenu MenuMediaFTP; /* FTP media menu */
|
||||
extern DMenu MenuMediaTape; /* Tape media menu */
|
||||
extern DMenu MenuNetworkDevice; /* Network device menu */
|
||||
extern DMenu MenuInstall; /* Installation menu */
|
||||
extern DMenu MenuInstallType; /* Installation type menu */
|
||||
extern DMenu MenuDistributions; /* Distribution menu */
|
||||
@ -299,9 +302,9 @@ extern int mediaSetDOS(char *str);
|
||||
extern int mediaSetTape(char *str);
|
||||
extern int mediaSetFTP(char *str);
|
||||
extern int mediaSetFS(char *str);
|
||||
extern FILE *mediaOpen(char *parent, char *me);
|
||||
extern int mediaOpen(char *parent, char *me);
|
||||
extern Boolean mediaGetType(void);
|
||||
extern Boolean mediaExtractDist(FILE *fp);
|
||||
extern Boolean mediaExtractDist(char *dir, int fd);
|
||||
extern Boolean mediaVerify(void);
|
||||
extern void mediaClose(void);
|
||||
|
||||
@ -316,13 +319,15 @@ extern Boolean mediaGetCDROM(char *dist);
|
||||
extern Boolean mediaGetDOS(char *dist);
|
||||
extern Boolean mediaInitTape(Device *dev);
|
||||
extern Boolean mediaGetTape(char *dist);
|
||||
extern Boolean mediaInitFTP(Device *dev);
|
||||
extern Boolean mediaInitNetwork(Device *dev);
|
||||
extern Boolean mediaGetNetwork(char *dist);
|
||||
extern Boolean mediaGetFTP(char *dist);
|
||||
extern void mediaCloseTape(Device *dev);
|
||||
extern void mediaCloseCDROM(Device *dev);
|
||||
extern void mediaCloseDOS(Device *dev);
|
||||
extern void mediaCloseNetwork(Device *dev);
|
||||
extern void mediaCloseFTP(Device *dev);
|
||||
extern void mediaCloseFloppy(Device *dev);
|
||||
extern void mediaCloseNetwork(Device *dev);
|
||||
|
||||
/* misc.c */
|
||||
extern Boolean file_readable(char *fname);
|
||||
@ -369,6 +374,7 @@ extern int vsystem(char *fmt, ...);
|
||||
|
||||
/* tcpip.c */
|
||||
extern int tcpOpenDialog(char *);
|
||||
extern Device *tcpDeviceSelect(void);
|
||||
|
||||
/* termcap.c */
|
||||
extern int set_termcap(void);
|
||||
|
@ -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.24 1995/05/20 15:49:53 jkh Exp $
|
||||
* $Id: devices.c,v 1.25 1995/05/20 16:22:41 jkh Exp $
|
||||
*
|
||||
* Copyright (c) 1995
|
||||
* Jordan Hubbard. All rights reserved.
|
||||
@ -236,7 +236,7 @@ deviceGetAll(void)
|
||||
close(fd);
|
||||
/* The only network devices that have fds associated are serial ones */
|
||||
deviceRegister("ppp0", device_names[i].description, strdup(try),
|
||||
DEVICE_TYPE_NETWORK, TRUE, mediaInitNetwork, mediaGetNetwork, mediaCloseNetwork, NULL);
|
||||
DEVICE_TYPE_NETWORK, TRUE, mediaInitNetwork, NULL, mediaCloseNetwork, NULL);
|
||||
msgDebug("Found a device of type network named: %s\n", device_names[i].name);
|
||||
}
|
||||
break;
|
||||
@ -270,7 +270,7 @@ deviceGetAll(void)
|
||||
|| !strncmp(ifptr->ifr_name, "lo0", 3))
|
||||
continue;
|
||||
deviceRegister(ifptr->ifr_name, ifptr->ifr_name, ifptr->ifr_name,
|
||||
DEVICE_TYPE_NETWORK, TRUE, mediaInitNetwork, mediaGetNetwork, mediaCloseNetwork, NULL);
|
||||
DEVICE_TYPE_NETWORK, TRUE, mediaInitNetwork, NULL, mediaCloseNetwork, NULL);
|
||||
msgDebug("Found a device of type network named: %s\n", ifptr->ifr_name);
|
||||
close(s);
|
||||
if ((s = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
|
||||
|
@ -4,7 +4,7 @@
|
||||
* This is probably the last program in the `sysinstall' line - the next
|
||||
* generation being essentially a complete rewrite.
|
||||
*
|
||||
* $Id: dist.c,v 1.13 1995/05/20 19:22:19 jkh Exp $
|
||||
* $Id: dist.c,v 1.14 1995/05/21 10:05:17 jkh Exp $
|
||||
*
|
||||
* Copyright (c) 1995
|
||||
* Jordan Hubbard. All rights reserved.
|
||||
@ -117,6 +117,7 @@ distSetXF86(char *str)
|
||||
|
||||
typedef struct _dist {
|
||||
char *my_name;
|
||||
char *my_dir;
|
||||
unsigned int *my_mask;
|
||||
unsigned int my_bit;
|
||||
struct _dist *my_dist;
|
||||
@ -130,79 +131,79 @@ extern Distribution XF86ServerDistTable[];
|
||||
|
||||
/* The top-level distribution categories */
|
||||
static Distribution DistTable[] = {
|
||||
{ "bin", &Dists, DIST_BIN, NULL },
|
||||
{ "games", &Dists, DIST_GAMES, NULL },
|
||||
{ "manpages", &Dists, DIST_MANPAGES, NULL },
|
||||
{ "proflibs", &Dists, DIST_PROFLIBS, NULL },
|
||||
{ "dict", &Dists, DIST_DICT, NULL },
|
||||
{ "src/", &Dists, DIST_SRC, SrcDistTable },
|
||||
{ "des", &Dists, DIST_DES, NULL },
|
||||
{ "compat1x", &Dists, DIST_COMPAT1X, NULL },
|
||||
{ "compat20", &Dists, DIST_COMPAT20, NULL },
|
||||
{ "xf86311/", &Dists, DIST_XF86, XF86DistTable },
|
||||
{ "bin", "/", &Dists, DIST_BIN, NULL },
|
||||
{ "games", "/", &Dists, DIST_GAMES, NULL },
|
||||
{ "manpages", "/", &Dists, DIST_MANPAGES, NULL },
|
||||
{ "proflibs", "/", &Dists, DIST_PROFLIBS, NULL },
|
||||
{ "dict", "/", &Dists, DIST_DICT, NULL },
|
||||
{ "src/", "/", &Dists, DIST_SRC, SrcDistTable },
|
||||
{ "des", "/", &Dists, DIST_DES, NULL },
|
||||
{ "compat1x", "/", &Dists, DIST_COMPAT1X, NULL },
|
||||
{ "compat20", "/", &Dists, DIST_COMPAT20, NULL },
|
||||
{ "xf86311/", "/usr", &Dists, DIST_XF86, XF86DistTable },
|
||||
{ NULL },
|
||||
};
|
||||
|
||||
/* The /usr/src distribution */
|
||||
static Distribution SrcDistTable[] = {
|
||||
{ "base", &SrcDists, DIST_SRC_BASE, NULL },
|
||||
{ "gnu", &SrcDists, DIST_SRC_GNU, NULL },
|
||||
{ "etc", &SrcDists, DIST_SRC_ETC, NULL },
|
||||
{ "games", &SrcDists, DIST_SRC_GAMES, NULL },
|
||||
{ "include", &SrcDists, DIST_SRC_INCLUDE, NULL },
|
||||
{ "lib", &SrcDists, DIST_SRC_LIB, NULL },
|
||||
{ "libexec", &SrcDists, DIST_SRC_LIBEXEC, NULL },
|
||||
{ "lkm", &SrcDists, DIST_SRC_LKM, NULL },
|
||||
{ "release", &SrcDists, DIST_SRC_RELEASE, NULL },
|
||||
{ "sbin", &SrcDists, DIST_SRC_SBIN, NULL },
|
||||
{ "share", &SrcDists, DIST_SRC_SHARE, NULL },
|
||||
{ "sys", &SrcDists, DIST_SRC_SYS, NULL },
|
||||
{ "ubin", &SrcDists, DIST_SRC_UBIN, NULL },
|
||||
{ "usbin", &SrcDists, DIST_SRC_USBIN, NULL },
|
||||
{ "xf86", &SrcDists, DIST_SRC_XF86, NULL },
|
||||
{ "base", "/", &SrcDists, DIST_SRC_BASE, NULL },
|
||||
{ "gnu", "/", &SrcDists, DIST_SRC_GNU, NULL },
|
||||
{ "etc", "/", &SrcDists, DIST_SRC_ETC, NULL },
|
||||
{ "games", "/", &SrcDists, DIST_SRC_GAMES, NULL },
|
||||
{ "include", "/", &SrcDists, DIST_SRC_INCLUDE, NULL },
|
||||
{ "lib", "/", &SrcDists, DIST_SRC_LIB, NULL },
|
||||
{ "libexec", "/", &SrcDists, DIST_SRC_LIBEXEC, NULL },
|
||||
{ "lkm", "/", &SrcDists, DIST_SRC_LKM, NULL },
|
||||
{ "release", "/", &SrcDists, DIST_SRC_RELEASE, NULL },
|
||||
{ "sbin", "/", &SrcDists, DIST_SRC_SBIN, NULL },
|
||||
{ "share", "/", &SrcDists, DIST_SRC_SHARE, NULL },
|
||||
{ "sys", "/", &SrcDists, DIST_SRC_SYS, NULL },
|
||||
{ "ubin", "/", &SrcDists, DIST_SRC_UBIN, NULL },
|
||||
{ "usbin", "/", &SrcDists, DIST_SRC_USBIN, NULL },
|
||||
{ "xf86", "/usr", &SrcDists, DIST_SRC_XF86, NULL },
|
||||
{ NULL },
|
||||
};
|
||||
|
||||
/* The XFree86 distribution */
|
||||
static Distribution XF86DistTable[] = {
|
||||
{ "bin", &XF86Dists, DIST_XF86_BIN, NULL },
|
||||
{ "lib", &XF86Dists, DIST_XF86_LIB, NULL },
|
||||
{ "doc", &XF86Dists, DIST_XF86_DOC, NULL },
|
||||
{ "xf86311/", &XF86Dists, DIST_XF86_FONTS, XF86FontDistTable },
|
||||
{ "man", &XF86Dists, DIST_XF86_MAN, NULL },
|
||||
{ "prog", &XF86Dists, DIST_XF86_PROG, NULL },
|
||||
{ "link", &XF86Dists, DIST_XF86_LINK, NULL },
|
||||
{ "pex", &XF86Dists, DIST_XF86_PEX, NULL },
|
||||
{ "lbx", &XF86Dists, DIST_XF86_LBX, NULL },
|
||||
{ "xicf", &XF86Dists, DIST_XF86_XINIT, NULL },
|
||||
{ "xdmcf", &XF86Dists, DIST_XF86_XDMCF, NULL },
|
||||
{ "xf86311/", &XF86Dists, DIST_XF86_SERVER, XF86ServerDistTable },
|
||||
{ "bin", "/usr", &XF86Dists, DIST_XF86_BIN, NULL },
|
||||
{ "lib", "/usr", &XF86Dists, DIST_XF86_LIB, NULL },
|
||||
{ "doc", "/usr", &XF86Dists, DIST_XF86_DOC, NULL },
|
||||
{ "xf86311/", "/usr", &XF86Dists, DIST_XF86_FONTS, XF86FontDistTable },
|
||||
{ "man", "/usr", &XF86Dists, DIST_XF86_MAN, NULL },
|
||||
{ "prog", "/usr", &XF86Dists, DIST_XF86_PROG, NULL },
|
||||
{ "link", "/usr", &XF86Dists, DIST_XF86_LINK, NULL },
|
||||
{ "pex", "/usr", &XF86Dists, DIST_XF86_PEX, NULL },
|
||||
{ "lbx", "/usr", &XF86Dists, DIST_XF86_LBX, NULL },
|
||||
{ "xicf", "/usr", &XF86Dists, DIST_XF86_XINIT, NULL },
|
||||
{ "xdmcf", "/usr", &XF86Dists, DIST_XF86_XDMCF, NULL },
|
||||
{ "xf86311/", "/usr", &XF86Dists, DIST_XF86_SERVER, XF86ServerDistTable },
|
||||
{ NULL },
|
||||
};
|
||||
|
||||
/* The XFree86 server distribution */
|
||||
static Distribution XF86ServerDistTable[] = {
|
||||
{ "X3118514", &XF86ServerDists, DIST_XF86_SERVER_8514, NULL },
|
||||
{ "X311AGX", &XF86ServerDists, DIST_XF86_SERVER_AGX, NULL },
|
||||
{ "X311Mch3", &XF86ServerDists, DIST_XF86_SERVER_MACH32,NULL },
|
||||
{ "X311Mch8", &XF86ServerDists, DIST_XF86_SERVER_MACH8, NULL },
|
||||
{ "X311Mono", &XF86ServerDists, DIST_XF86_SERVER_MONO, NULL },
|
||||
{ "X311P9K", &XF86ServerDists, DIST_XF86_SERVER_P9000, NULL },
|
||||
{ "X311S3", &XF86ServerDists, DIST_XF86_SERVER_S3, NULL },
|
||||
{ "X311SVGA", &XF86ServerDists, DIST_XF86_SERVER_SVGA, NULL },
|
||||
{ "X311VG16", &XF86ServerDists, DIST_XF86_SERVER_VGA16, NULL },
|
||||
{ "X311W32", &XF86ServerDists, DIST_XF86_SERVER_W32, NULL },
|
||||
{ "X311nest", &XF86ServerDists, DIST_XF86_SERVER_NEST, NULL },
|
||||
{ "X3118514", "/usr", &XF86ServerDists, DIST_XF86_SERVER_8514, NULL },
|
||||
{ "X311AGX", "/usr", &XF86ServerDists, DIST_XF86_SERVER_AGX, NULL },
|
||||
{ "X311Mch3", "/usr", &XF86ServerDists, DIST_XF86_SERVER_MACH32,NULL },
|
||||
{ "X311Mch8", "/usr", &XF86ServerDists, DIST_XF86_SERVER_MACH8, NULL },
|
||||
{ "X311Mono", "/usr", &XF86ServerDists, DIST_XF86_SERVER_MONO, NULL },
|
||||
{ "X311P9K", "/usr", &XF86ServerDists, DIST_XF86_SERVER_P9000, NULL },
|
||||
{ "X311S3", "/usr", &XF86ServerDists, DIST_XF86_SERVER_S3, NULL },
|
||||
{ "X311SVGA", "/usr", &XF86ServerDists, DIST_XF86_SERVER_SVGA, NULL },
|
||||
{ "X311VG16", "/usr", &XF86ServerDists, DIST_XF86_SERVER_VGA16, NULL },
|
||||
{ "X311W32", "/usr", &XF86ServerDists, DIST_XF86_SERVER_W32, NULL },
|
||||
{ "X311nest", "/usr", &XF86ServerDists, DIST_XF86_SERVER_NEST, NULL },
|
||||
{ NULL },
|
||||
};
|
||||
|
||||
/* The XFree86 font distribution */
|
||||
static Distribution XF86FontDistTable[] = {
|
||||
{ "X311fnts", &XF86FontDists, DIST_XF86_FONTS_MISC, NULL },
|
||||
{ "X311f100", &XF86FontDists, DIST_XF86_FONTS_100, NULL },
|
||||
{ "X311fscl", &XF86FontDists, DIST_XF86_FONTS_SCALE, NULL },
|
||||
{ "X311fnon", &XF86FontDists, DIST_XF86_FONTS_NON, NULL },
|
||||
{ "X311fsrv", &XF86FontDists, DIST_XF86_FONTS_SERVER, NULL },
|
||||
{ "X311fnts", "/usr", &XF86FontDists, DIST_XF86_FONTS_MISC, NULL },
|
||||
{ "X311f100", "/usr", &XF86FontDists, DIST_XF86_FONTS_100, NULL },
|
||||
{ "X311fscl", "/usr", &XF86FontDists, DIST_XF86_FONTS_SCALE, NULL },
|
||||
{ "X311fnon", "/usr", &XF86FontDists, DIST_XF86_FONTS_NON, NULL },
|
||||
{ "X311fsrv", "/usr", &XF86FontDists, DIST_XF86_FONTS_SERVER, NULL },
|
||||
{ NULL },
|
||||
};
|
||||
|
||||
@ -210,7 +211,7 @@ static int
|
||||
distExtract(char *parent, Distribution *me)
|
||||
{
|
||||
int i, status;
|
||||
FILE *fp;
|
||||
int fd;
|
||||
|
||||
status = 0;
|
||||
for (i = 0; me[i].my_name; i++) {
|
||||
@ -219,11 +220,11 @@ distExtract(char *parent, Distribution *me)
|
||||
status = distExtract(me[i].my_name, me[i].my_dist);
|
||||
else {
|
||||
msgNotify("Attempting to open %s%s distribution", parent ? parent : "", me[i].my_name);
|
||||
fp = mediaOpen(parent, me[i].my_name);
|
||||
if (fp) {
|
||||
fd = mediaOpen(parent, me[i].my_name);
|
||||
if (fd != -1) {
|
||||
msgNotify("Extracting %s%s distribution", parent ? parent : "", me[i].my_name);
|
||||
status = mediaExtractDist(fp);
|
||||
fclose(fp);
|
||||
status = mediaExtractDist(me[i].my_dir, fd);
|
||||
close(fd);
|
||||
}
|
||||
else {
|
||||
if (getenv(NO_CONFIRMATION))
|
||||
|
@ -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.44 1995/05/20 23:33:13 phk Exp $
|
||||
* $Id: install.c,v 1.45 1995/05/21 01:56:01 phk Exp $
|
||||
*
|
||||
* Copyright (c) 1995
|
||||
* Jordan Hubbard. All rights reserved.
|
||||
@ -56,25 +56,6 @@ static void cpio_extract(void);
|
||||
static void install_configuration_files(void);
|
||||
static void do_final_setup(void);
|
||||
|
||||
static Boolean
|
||||
preInstallCheck(void)
|
||||
{
|
||||
if (!getenv(DISK_PARTITIONED)) {
|
||||
msgConfirm("You need to partition your disk before you can proceed with\nthe installation.");
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
if (!getenv(DISK_LABELLED)) {
|
||||
msgConfirm("You need to assign disk labels before you can proceed with\nthe installation.");
|
||||
return FALSE;
|
||||
}
|
||||
if (!Dists) {
|
||||
msgConfirm("You haven't told me what distributions to load yet!\nPlease select a distribution from the Distributions menu.");
|
||||
return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
installInitial(void)
|
||||
{
|
||||
@ -89,6 +70,16 @@ installInitial(void)
|
||||
if (alreadyDone)
|
||||
return;
|
||||
|
||||
if (!getenv(DISK_PARTITIONED)) {
|
||||
msgConfirm("You need to partition your disk before you can proceed with\nthe installation.");
|
||||
return;
|
||||
}
|
||||
if (!getenv(DISK_LABELLED)) {
|
||||
msgConfirm("You need to assign disk labels before you can proceed with\nthe installation.");
|
||||
return;
|
||||
}
|
||||
|
||||
/* Figure out what kind of MBR the user wants */
|
||||
dmenuOpenSimple(&MenuMBRType);
|
||||
mbrContents = NULL;
|
||||
cp = getenv("bootManager");
|
||||
@ -99,9 +90,8 @@ installInitial(void)
|
||||
mbrContents = mbr;
|
||||
}
|
||||
|
||||
/* If things aren't kosher, or we refuse to proceed, bail. */
|
||||
if (!preInstallCheck()
|
||||
|| msgYesNo("Last Chance! Are you SURE you want continue the installation?\n\nIf you're running this on an existing system, we STRONGLY\nencourage you to make proper backups before proceeding.\nWe take no responsibility for lost disk contents!"))
|
||||
/* If we refuse to proceed, bail. */
|
||||
if (msgYesNo("Last Chance! Are you SURE you want continue the installation?\n\nIf you're running this on an existing system, we STRONGLY\nencourage you to make proper backups before proceeding.\nWe take no responsibility for lost disk contents!"))
|
||||
return;
|
||||
|
||||
devs = deviceFind(NULL, DEVICE_TYPE_DISK);
|
||||
@ -158,12 +148,23 @@ installFinal(void)
|
||||
alreadyDone = TRUE;
|
||||
}
|
||||
|
||||
/*
|
||||
* What happens when we select "GO". This is broken into a 3 stage installation so that
|
||||
* the user can do a full installation but come back here again to load more distributions,
|
||||
* perhaps from a different media type. This would allow, for example, the user to load the
|
||||
* majority of the system from CDROM and then use ftp to load just the DES dist.
|
||||
*/
|
||||
int
|
||||
installCommit(char *str)
|
||||
{
|
||||
installInitial();
|
||||
if (!Dists) {
|
||||
msgConfirm("You haven't told me what distributions to load yet!\nPlease select a distribution from the Distributions menu.");
|
||||
return 0;
|
||||
}
|
||||
if (!mediaVerify())
|
||||
return 0;
|
||||
|
||||
installInitial();
|
||||
distExtractAll();
|
||||
installFinal();
|
||||
return 0;
|
||||
|
@ -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.16 1995/05/21 06:12:43 phk Exp $
|
||||
* $Id: label.c,v 1.17 1995/05/21 10:16:10 jkh Exp $
|
||||
*
|
||||
* Copyright (c) 1995
|
||||
* Jordan Hubbard. All rights reserved.
|
||||
@ -210,9 +210,9 @@ get_mountpoint(struct chunk *old)
|
||||
char *val;
|
||||
PartInfo *tmp;
|
||||
|
||||
dialog_clear(); clear();
|
||||
val = msgGetInput(old && old->private ? ((PartInfo *)old->private)->mountpoint : NULL,
|
||||
"Please specify a mount point for the partition");
|
||||
clear();
|
||||
if (!val)
|
||||
return NULL;
|
||||
|
||||
|
@ -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.c,v 1.10 1995/05/20 11:10:33 jkh Exp $
|
||||
* $Id: media.c,v 1.11 1995/05/20 11:13:58 jkh Exp $
|
||||
*
|
||||
* Copyright (c) 1995
|
||||
* Jordan Hubbard. All rights reserved.
|
||||
@ -42,6 +42,10 @@
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <sys/errno.h>
|
||||
#include <sys/fcntl.h>
|
||||
#include <sys/wait.h>
|
||||
#include <unistd.h>
|
||||
#include "sysinstall.h"
|
||||
|
||||
static int
|
||||
@ -77,7 +81,15 @@ mediaSetCDROM(char *str)
|
||||
int cnt;
|
||||
|
||||
if (OnCDROM == TRUE) {
|
||||
/* XXX point mediaDevice at something meaningful here - perhaps a static device structure */
|
||||
static Device bootCD;
|
||||
|
||||
/* This may need to be extended a little, but the basic idea is sound */
|
||||
strcpy(bootCD.name, "bootCD");
|
||||
bootCD.type = DEVICE_TYPE_CDROM;
|
||||
bootCD.init = NULL;
|
||||
bootCD.get = mediaGetCDROM;
|
||||
bootCD.close = NULL;
|
||||
mediaDevice = &bootCD;
|
||||
return 1;
|
||||
}
|
||||
else {
|
||||
@ -138,6 +150,12 @@ mediaSetFloppy(char *str)
|
||||
return mediaDevice ? 1 : 0;
|
||||
}
|
||||
|
||||
static int
|
||||
DOSHook(char *str)
|
||||
{
|
||||
return genericHook(str, DEVICE_TYPE_DOS);
|
||||
}
|
||||
|
||||
/*
|
||||
* Return 1 if we successfully found and set the installation type to
|
||||
* be a DOS partition.
|
||||
@ -148,32 +166,41 @@ mediaSetDOS(char *str)
|
||||
Device **devs;
|
||||
Disk *d;
|
||||
Chunk *c1;
|
||||
int i;
|
||||
int i, cnt;
|
||||
|
||||
devs = deviceFind(NULL, DEVICE_TYPE_DOS);
|
||||
if (devs) {
|
||||
/* XXX If count > 1 then at some point then we should put up a menu and allow the user to choose XXX */
|
||||
cnt = deviceCount(devs);
|
||||
if (cnt > 1) {
|
||||
DMenu *menu;
|
||||
|
||||
menu = deviceCreateMenu(&MenuMediaDOS, DEVICE_TYPE_DOS, DOSHook);
|
||||
if (!menu)
|
||||
msgFatal("Unable to create DOS menu! Something is seriously wrong.");
|
||||
dmenuOpenSimple(menu);
|
||||
free(menu);
|
||||
}
|
||||
else if (cnt) {
|
||||
mediaDevice = devs[0];
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
else {
|
||||
devs = deviceFind(NULL, DEVICE_TYPE_DISK);
|
||||
if (!devs) {
|
||||
msgConfirm("No disk devices found!");
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Now go chewing through looking for a DOS FAT partition */
|
||||
for (i = 0; devs[i]; i++) {
|
||||
d = (Disk *)devs[i]->private;
|
||||
/* Now try to find a DOS partition */
|
||||
for (c1 = d->chunks->part; c1; c1 = c1->next) {
|
||||
if (c1->type == fat) {
|
||||
/* Got one! */
|
||||
mediaDevice = deviceRegister(c1->name, c1->name, c1->name, DEVICE_TYPE_DOS, TRUE,
|
||||
mediaInitDOS, mediaGetDOS, mediaCloseDOS, NULL);
|
||||
msgDebug("Found a DOS partition %s on drive %s\n", c1->name, d->name);
|
||||
break;
|
||||
if (!devs) {
|
||||
msgConfirm("No disk devices found!");
|
||||
return 0;
|
||||
}
|
||||
/* Now go chewing through looking for a DOS FAT partition */
|
||||
for (i = 0; devs[i]; i++) {
|
||||
d = (Disk *)devs[i]->private;
|
||||
/* Now try to find a DOS partition */
|
||||
for (c1 = d->chunks->part; c1; c1 = c1->next) {
|
||||
if (c1->type == fat) {
|
||||
/* Got one! */
|
||||
mediaDevice = deviceRegister(c1->name, c1->name, c1->name, DEVICE_TYPE_DOS, TRUE,
|
||||
mediaInitDOS, mediaGetDOS, mediaCloseDOS, NULL);
|
||||
msgDebug("Found a DOS partition %s on drive %s\n", c1->name, d->name);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -182,6 +209,12 @@ mediaSetDOS(char *str)
|
||||
return mediaDevice ? 1 : 0;
|
||||
}
|
||||
|
||||
static int
|
||||
tapeHook(char *str)
|
||||
{
|
||||
return genericHook(str, DEVICE_TYPE_TAPE);
|
||||
}
|
||||
|
||||
/*
|
||||
* Return 1 if we successfully found and set the installation type to
|
||||
* be a tape drive.
|
||||
@ -189,7 +222,27 @@ mediaSetDOS(char *str)
|
||||
int
|
||||
mediaSetTape(char *str)
|
||||
{
|
||||
return 0;
|
||||
Device **devs;
|
||||
int cnt;
|
||||
|
||||
devs = deviceFind(NULL, DEVICE_TYPE_TAPE);
|
||||
cnt = deviceCount(devs);
|
||||
if (!cnt) {
|
||||
msgConfirm("No tape drive devices found! Please check that your system's\nconfiguration is correct. For more information, consult the hardware guide\nin the Doc menu.");
|
||||
return 0;
|
||||
}
|
||||
else if (cnt > 1) {
|
||||
DMenu *menu;
|
||||
|
||||
menu = deviceCreateMenu(&MenuMediaTape, DEVICE_TYPE_TAPE, tapeHook);
|
||||
if (!menu)
|
||||
msgFatal("Unable to create tape drive menu! Something is seriously wrong.");
|
||||
dmenuOpenSimple(menu);
|
||||
free(menu);
|
||||
}
|
||||
else
|
||||
mediaDevice = devs[0];
|
||||
return mediaDevice ? 1 : 0;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -199,8 +252,25 @@ mediaSetTape(char *str)
|
||||
int
|
||||
mediaSetFTP(char *str)
|
||||
{
|
||||
static Device ftpDevice;
|
||||
Device *devp;
|
||||
char *cp;
|
||||
|
||||
devp = tcpDeviceSelect();
|
||||
if (!devp)
|
||||
return 0;
|
||||
dmenuOpenSimple(&MenuMediaFTP);
|
||||
return 0;
|
||||
cp = getenv("ftp");
|
||||
if (!cp)
|
||||
return 0;
|
||||
strcpy(ftpDevice.name, cp);
|
||||
ftpDevice.type = DEVICE_TYPE_NETWORK;
|
||||
ftpDevice.init = mediaInitFTP;
|
||||
ftpDevice.get = mediaGetFTP;
|
||||
ftpDevice.close = mediaCloseFTP;
|
||||
ftpDevice.private = devp;
|
||||
mediaDevice = &ftpDevice;
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -213,25 +283,89 @@ mediaSetFS(char *str)
|
||||
return 0;
|
||||
}
|
||||
|
||||
FILE *
|
||||
int
|
||||
mediaOpen(char *parent, char *me)
|
||||
{
|
||||
char fname[FILENAME_MAX];
|
||||
char distname[FILENAME_MAX];
|
||||
int fd;
|
||||
|
||||
if (parent)
|
||||
snprintf(fname, FILENAME_MAX, "%s%s", parent, me);
|
||||
snprintf(distname, FILENAME_MAX, "%s%s", parent, me);
|
||||
else
|
||||
snprintf(fname, FILENAME_MAX, "%s/%s", me, me);
|
||||
#if 0
|
||||
strncpy(fname, me, FILENAME_MAX);
|
||||
#endif
|
||||
/* XXX mediaDevice points to where we want to get it from */
|
||||
return NULL;
|
||||
snprintf(distname, FILENAME_MAX, "%s/%s", me, me);
|
||||
if (mediaDevice->init)
|
||||
(*mediaDevice->init)(mediaDevice);
|
||||
fd = (*mediaDevice->get)(distname);
|
||||
return fd;
|
||||
}
|
||||
|
||||
void
|
||||
mediaClose(void)
|
||||
{
|
||||
if (mediaDevice->close)
|
||||
(*mediaDevice->close)(mediaDevice);
|
||||
mediaDevice = NULL;
|
||||
}
|
||||
|
||||
Boolean
|
||||
mediaExtractDist(FILE *fp)
|
||||
mediaExtractDist(char *dir, int fd)
|
||||
{
|
||||
int i, j, zpid, cpid, pfd[2];
|
||||
|
||||
if (!dir)
|
||||
dir = "/";
|
||||
j = fork();
|
||||
if (!j) {
|
||||
chdir(dir);
|
||||
pipe(pfd);
|
||||
zpid = fork();
|
||||
if (!zpid) {
|
||||
dup2(fd, 0); close(fd);
|
||||
dup2(pfd[1], 1); close(pfd[1]);
|
||||
close(pfd[0]);
|
||||
i = execl("/stand/gunzip", "/stand/gunzip", 0);
|
||||
msgDebug("/stand/gunzip command returns %d status\n", i);
|
||||
exit(i);
|
||||
}
|
||||
cpid = fork();
|
||||
if (!cpid) {
|
||||
dup2(pfd[0], 0); close(pfd[0]);
|
||||
close(fd);
|
||||
close(pfd[1]);
|
||||
if (DebugFD != -1) {
|
||||
dup2(DebugFD, 1);
|
||||
dup2(DebugFD, 2);
|
||||
}
|
||||
else {
|
||||
close(1); open("/dev/null", O_WRONLY);
|
||||
dup2(1, 2);
|
||||
}
|
||||
i = execl("/stand/cpio", "/stand/cpio", "-iduvm", "-H", "tar", 0);
|
||||
msgDebug("/stand/cpio command returns %d status\n", i);
|
||||
exit(i);
|
||||
}
|
||||
close(pfd[0]);
|
||||
close(pfd[1]);
|
||||
close(fd);
|
||||
|
||||
i = waitpid(zpid, &j, 0);
|
||||
if (i < 0 || _WSTATUS(j)) {
|
||||
dialog_clear();
|
||||
msgConfirm("gunzip returned error status of %d!", _WSTATUS(j));
|
||||
exit(1);
|
||||
}
|
||||
i = waitpid(cpid, &j, 0);
|
||||
if (i < 0 || _WSTATUS(j)) {
|
||||
dialog_clear();
|
||||
msgConfirm("cpio returned error status of %d!", _WSTATUS(j));
|
||||
exit(2);
|
||||
}
|
||||
exit(0);
|
||||
}
|
||||
else
|
||||
i = wait(&j);
|
||||
if (i < 0 || _WSTATUS(j))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@ -252,8 +386,3 @@ mediaVerify(void)
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void
|
||||
mediaClose(void)
|
||||
{
|
||||
}
|
||||
|
@ -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.21 1995/05/20 13:36:44 jkh Exp $
|
||||
* $Id: menus.c,v 1.22 1995/05/20 20:30:11 jkh Exp $
|
||||
*
|
||||
* Copyright (c) 1995
|
||||
* Jordan Hubbard. All rights reserved.
|
||||
@ -168,8 +168,23 @@ procedure (available on the FreeBSD CDROM or the net under the\n\
|
||||
tools/dos directory) or have otherwise prepared a set of diskettes\n\
|
||||
for each distribution that properly contains all the components of\n\
|
||||
the distribution plus the extraction and checksumming scripts.",
|
||||
"Please select which floppy drive you want to use",
|
||||
NULL,
|
||||
"Press F1 to read the installation guide",
|
||||
"install.hlp",
|
||||
{ { NULL } },
|
||||
};
|
||||
|
||||
DMenu MenuMediaDOS = {
|
||||
DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
|
||||
"Choose a DOS partition",
|
||||
"FreeBSD can be installed directly from a DOS partition,\n\
|
||||
assuming of course that you've copied the relevant distributions\n\
|
||||
into your DOS partition before starting this installation. If\n\
|
||||
such is not the case, then you should reboot DOS at this time\n\
|
||||
and copy the distributions you want to install into a subdirectory\n\
|
||||
on one of your DOS partitions. Otherwise, please select the\n\
|
||||
DOS partition containing the FreeBSD distribution files.",
|
||||
"Press F1 to read the installation guide",
|
||||
"install.hlp",
|
||||
{ { NULL } },
|
||||
};
|
||||
|
||||
@ -184,64 +199,97 @@ available from the Primary site.\n\n\
|
||||
If the first site selected doesn't respond, try one of the alternates.\n\
|
||||
You may also wish to investigate the Ftp options menu in case of trouble.",
|
||||
"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, 0 },
|
||||
{ "Secondary", "freefall.cdrom.com",
|
||||
DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://freefall.cdrom.com/pub/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
"install.hlp",
|
||||
{ { "Primary Site", "ftp.freebsd.org",
|
||||
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 },
|
||||
{ "Australia", "ftp.physics.usyd.edu.au",
|
||||
DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://ftp.physics.usyd.edu.au/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
DMENU_SET_VARIABLE, (void *)"ftp=ftp://ftp.physics.usyd.edu.au/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
{ "Finland", "nic.funet.fi",
|
||||
DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://nic.funet.fi/pub/unix/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
DMENU_SET_VARIABLE, (void *)"ftp=ftp://nic.funet.fi/pub/unix/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
{ "France", "ftp.ibp.fr",
|
||||
DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://ftp.ibp.fr/pub/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
DMENU_SET_VARIABLE, (void *)"ftp=ftp://ftp.ibp.fr/pub/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
{ "Germany", "ftp.uni-duisburg.de",
|
||||
DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://ftp.uni-duisburg.de/pub/unix/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
DMENU_SET_VARIABLE, (void *)"ftp=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, 0 },
|
||||
DMENU_SET_VARIABLE, (void *)"ftp=ftp://orgchem.weizmann.ac.il/pub/FreeBSD-2.0.5-ALPHA", 0, 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, 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, 0 },
|
||||
{ "Japan-3", "ftp.waseda.ac.jp",
|
||||
DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://ftp.waseda.ac.jp/pub/FreeBSD/2.0.5-ALPHA", 0, 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, 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, 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, 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, 0 },
|
||||
DMENU_SET_VARIABLE, (void *)"ftp=ftp://ftp.sra.co.jp/pub/os/FreeBSD/distribution/2.0.5-ALPHA", 0, 0 },
|
||||
{ "Japan #2", "ftp.mei.co.jp",
|
||||
DMENU_SET_VARIABLE, (void *)"ftp=ftp://ftp.mei.co.jp/free/PC-UNIX/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
{ "Japan #3", "ftp.waseda.ac.jp",
|
||||
DMENU_SET_VARIABLE, (void *)"ftp=ftp://ftp.waseda.ac.jp/pub/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
{ "Japan #4", "ftp.pu-toyama.ac.jp",
|
||||
DMENU_SET_VARIABLE, (void *)"ftp=ftp://ftp.pu-toyama.ac.jp/pub/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
{ "Japan #5", "ftpsv1.u-aizu.ac.jp",
|
||||
DMENU_SET_VARIABLE, (void *)"ftp=ftp://ftpsv1.u-aizu.ac.jp/pub/os/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
{ "Japan #6", "tutserver.tutcc.tut.ac.jp",
|
||||
DMENU_SET_VARIABLE, (void *)"ftp=ftp://tutserver.tutcc.tut.ac.jp/FreeBSD/FreeBSD-2.0.5-ALPHA", 0, 0 },
|
||||
{ "Japan #7", "ftp.ee.uec.ac.jp",
|
||||
DMENU_SET_VARIABLE, (void *)"ftp=ftp://ftp.ee.uec.ac.jp/pub/os/FreeBSD.other/FreeBSD-2.0.5-ALPHA", 0, 0 },
|
||||
{ "Korea", "ftp.cau.ac.kr",
|
||||
DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://ftp.cau.ac.kr/pub/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
DMENU_SET_VARIABLE, (void *)"ftp=ftp://ftp.cau.ac.kr/pub/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
{ "Netherlands", "ftp.nl.net",
|
||||
DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://ftp.nl.net/pub/os/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
DMENU_SET_VARIABLE, (void *)"ftp=ftp://ftp.nl.net/pub/os/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
{ "Russia", "ftp.kiae.su",
|
||||
DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://ftp.kiae.su/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
DMENU_SET_VARIABLE, (void *)"ftp=ftp://ftp.kiae.su/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
{ "Sweden", "ftp.luth.se",
|
||||
DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://ftp.luth.se/pub/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
DMENU_SET_VARIABLE, (void *)"ftp=ftp://ftp.luth.se/pub/FreeBSD/2.0.5-ALPHA", 0, 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, 0 },
|
||||
DMENU_SET_VARIABLE, (void *)"ftp=ftp://netbsd.csie.nctu.edu.tw/pub/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
{ "Thailand", "ftp.nectec.or.th",
|
||||
DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://ftp.nectec.or.th/pub/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
DMENU_SET_VARIABLE, (void *)"ftp=ftp://ftp.nectec.or.th/pub/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
{ "UK", "ftp.demon.co.uk",
|
||||
DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://ftp.demon.co.uk/pub/BSD/FreeBSD/2.0.5-ALPHA", 0, 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, 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, 0 },
|
||||
DMENU_SET_VARIABLE, (void *)"ftp=ftp://ftp.demon.co.uk/pub/BSD/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
{ "UK #2", "src.doc.ic.ac.uk",
|
||||
DMENU_SET_VARIABLE, (void *)"ftp=ftp://src.doc.ic.ac.uk/packages/unix/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
{ "UK #3", "unix.hensa.ac.uk",
|
||||
DMENU_SET_VARIABLE, (void *)"ftp=ftp://unix.hensa.ac.uk/pub/walnut.creek/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
{ "USA", "ref.tfs.com",
|
||||
DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://ref.tfs.com/pub/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
{ "USA-2", "ftp.dataplex.net",
|
||||
DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://ftp.dataplex.net/pub/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
{ "USA-3", "kryten.atinc.com",
|
||||
DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://kryten.atinc.com/pub/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
{ "USA-4", "ftp.neosoft.com",
|
||||
DMENU_SET_VARIABLE, (void *)"mediaDevice=ftp://ftp.neosoft.com/systems/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
DMENU_SET_VARIABLE, (void *)"ftp=ftp://ref.tfs.com/pub/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
{ "USA #2", "ftp.dataplex.net",
|
||||
DMENU_SET_VARIABLE, (void *)"ftp=ftp://ftp.dataplex.net/pub/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
{ "USA #3", "kryten.atinc.com",
|
||||
DMENU_SET_VARIABLE, (void *)"ftp=ftp://kryten.atinc.com/pub/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
{ "USA #4", "ftp.neosoft.com",
|
||||
DMENU_SET_VARIABLE, (void *)"ftp=ftp://ftp.neosoft.com/systems/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
{ NULL } }
|
||||
};
|
||||
|
||||
DMenu MenuMediaTape = {
|
||||
DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
|
||||
"Choose a tape drive type",
|
||||
"FreeBSD can be installed from tape drive, though this installation\n\
|
||||
method requires a certain amount of temporary storage in addition\n\
|
||||
to the space required by the distribution itself (tape drives make\n\
|
||||
poor random-access devices, so we extract _everything_ on the tape\n\
|
||||
in one pass). If you have sufficient space for this, then you should\n\
|
||||
select one of the following tape devices detected on your system.",
|
||||
"Press F1 to read the installation guide",
|
||||
"install.hlp",
|
||||
{ { NULL } },
|
||||
};
|
||||
|
||||
DMenu MenuNetworkDevice = {
|
||||
DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
|
||||
"Choose a network interface type",
|
||||
"FreeBSD can be installed directly over a network, using NFS\n\
|
||||
or FTP. If you're using an ethernet card to talk to the world\n\
|
||||
then setup is pretty straight-forward. If you are using PPP over\n\
|
||||
a serial device (cuaa0 or cuaa1) then you may need to dial your service\n\
|
||||
provider using a special PPP utility we provide for that purpose.\n\
|
||||
You can also install over your parallel port using a special \"laplink\"\n\
|
||||
cable, though this only works if you have another FreeBSD machine running\n\
|
||||
a fairly recent (2.0R or later) release to talk to.\n\n\
|
||||
To use PPP, select one of the serial devices, otherwise select lp0\n\
|
||||
for the parallel port or one of the ethernet controllers (if you have one)\n\
|
||||
for an ethernet installation.",
|
||||
"Press F1 to read PPP user manual",
|
||||
"ppp.0",
|
||||
{ { NULL } },
|
||||
};
|
||||
|
||||
/* The media selection menu */
|
||||
DMenu MenuMedia = {
|
||||
DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
|
||||
@ -533,8 +581,11 @@ When you're done setting options, please select Cancel.",
|
||||
DMenu MenuOptionsFTP = {
|
||||
DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
|
||||
"Choose FTP Options",
|
||||
"In case of ftp failure, how would you like this installation\n\
|
||||
to deal with it? You have several choices:",
|
||||
"Please indicate how you would like FTP to deal with potential error\n\
|
||||
conditions, the default behavior being to Abort on transfer errors. If you\n\
|
||||
are behind an IP firewall, you will also probably wish to select passive\n\
|
||||
mode transfers (it's generally OK to set this in any case as almost all\n\
|
||||
servers support it, firewall or no).",
|
||||
NULL,
|
||||
NULL,
|
||||
{ { "FTP Retry", "On transfer failure, retry same host",
|
||||
|
@ -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.24 1995/05/20 11:10:35 jkh Exp $
|
||||
* $Id: sysinstall.h,v 1.25 1995/05/20 20:30:12 jkh Exp $
|
||||
*
|
||||
* Copyright (c) 1995
|
||||
* Jordan Hubbard. All rights reserved.
|
||||
@ -200,8 +200,11 @@ extern DMenu MenuOptionsLanguage; /* Language options menu */
|
||||
extern DMenu MenuOptionsFTP; /* FTP options menu */
|
||||
extern DMenu MenuMedia; /* Media type menu */
|
||||
extern DMenu MenuMediaCDROM; /* CDROM media menu */
|
||||
extern DMenu MenuMediaDOS; /* DOS media menu */
|
||||
extern DMenu MenuMediaFloppy; /* Floppy media menu */
|
||||
extern DMenu MenuMediaFTP; /* FTP media menu */
|
||||
extern DMenu MenuMediaTape; /* Tape media menu */
|
||||
extern DMenu MenuNetworkDevice; /* Network device menu */
|
||||
extern DMenu MenuInstall; /* Installation menu */
|
||||
extern DMenu MenuInstallType; /* Installation type menu */
|
||||
extern DMenu MenuDistributions; /* Distribution menu */
|
||||
@ -299,9 +302,9 @@ extern int mediaSetDOS(char *str);
|
||||
extern int mediaSetTape(char *str);
|
||||
extern int mediaSetFTP(char *str);
|
||||
extern int mediaSetFS(char *str);
|
||||
extern FILE *mediaOpen(char *parent, char *me);
|
||||
extern int mediaOpen(char *parent, char *me);
|
||||
extern Boolean mediaGetType(void);
|
||||
extern Boolean mediaExtractDist(FILE *fp);
|
||||
extern Boolean mediaExtractDist(char *dir, int fd);
|
||||
extern Boolean mediaVerify(void);
|
||||
extern void mediaClose(void);
|
||||
|
||||
@ -316,13 +319,15 @@ extern Boolean mediaGetCDROM(char *dist);
|
||||
extern Boolean mediaGetDOS(char *dist);
|
||||
extern Boolean mediaInitTape(Device *dev);
|
||||
extern Boolean mediaGetTape(char *dist);
|
||||
extern Boolean mediaInitFTP(Device *dev);
|
||||
extern Boolean mediaInitNetwork(Device *dev);
|
||||
extern Boolean mediaGetNetwork(char *dist);
|
||||
extern Boolean mediaGetFTP(char *dist);
|
||||
extern void mediaCloseTape(Device *dev);
|
||||
extern void mediaCloseCDROM(Device *dev);
|
||||
extern void mediaCloseDOS(Device *dev);
|
||||
extern void mediaCloseNetwork(Device *dev);
|
||||
extern void mediaCloseFTP(Device *dev);
|
||||
extern void mediaCloseFloppy(Device *dev);
|
||||
extern void mediaCloseNetwork(Device *dev);
|
||||
|
||||
/* misc.c */
|
||||
extern Boolean file_readable(char *fname);
|
||||
@ -369,6 +374,7 @@ extern int vsystem(char *fmt, ...);
|
||||
|
||||
/* tcpip.c */
|
||||
extern int tcpOpenDialog(char *);
|
||||
extern Device *tcpDeviceSelect(void);
|
||||
|
||||
/* termcap.c */
|
||||
extern int set_termcap(void);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: tcpip.c,v 1.8 1995/05/18 16:36:14 gpalmer Exp $
|
||||
* $Id: tcpip.c,v 1.9 1995/05/18 16:44:41 gpalmer Exp $
|
||||
*
|
||||
* Copyright (c) 1995
|
||||
* Gary J Palmer. All rights reserved.
|
||||
@ -17,22 +17,21 @@
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by Gary J Palmer
|
||||
* for the FreeBSD Project.
|
||||
* 4. The name of Gary J Palmer or the FreeBSD Project may not be used to
|
||||
* endorse or promote products derived from this software without specific
|
||||
* prior written permission.
|
||||
* for the FreeBSD Project.
|
||||
* 4. The name of Gary J Palmer or the FreeBSD Project may
|
||||
* not be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY GARY J PALMER ``AS IS'' AND ANY EXPRESS
|
||||
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL GARY J PALMER BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, LIFE OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
* THIS SOFTWARE IS PROVIDED BY GARY J PALMER ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL GARY J PALMER BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, LIFE OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
|
||||
@ -171,18 +170,10 @@ verifySettings(void)
|
||||
{
|
||||
if (!hostname[0])
|
||||
feepout("Must specify a host name of some sort!");
|
||||
#if 0
|
||||
else if (!verifyIP(ipaddr))
|
||||
feepout("Invalid or missing value for IP address");
|
||||
#endif
|
||||
else if (gateway[0] && !verifyIP(gateway))
|
||||
feepout("Invalid gateway IP address specified");
|
||||
else if (nameserver[0] && !verifyIP(nameserver))
|
||||
feepout("Invalid name server IP address specified");
|
||||
#if 0
|
||||
else if (netmask[0] < '0' || netmask[0] > '9')
|
||||
feepout("Invalid or missing netmask");
|
||||
#endif
|
||||
else
|
||||
return 1;
|
||||
return 0;
|
||||
@ -436,7 +427,7 @@ tcpOpenDialog(char *str)
|
||||
|
||||
/* Loop back to the interface list from the extras box -
|
||||
now we handle the case of saving out the data the user
|
||||
typed in (and also do basic verification of it's
|
||||
typed in (and also do basic verification of its
|
||||
sanity) */
|
||||
if (n == LAYOUT_EXTRAS) {
|
||||
n = LAYOUT_IFACE;
|
||||
@ -480,14 +471,13 @@ tcpOpenDialog(char *str)
|
||||
n = 0;
|
||||
break;
|
||||
|
||||
/* This doesn't seem to work anymore - dunno why. Foo */
|
||||
|
||||
case SEL_BACKTAB:
|
||||
if (n)
|
||||
--n;
|
||||
else
|
||||
n = max;
|
||||
break;
|
||||
|
||||
case KEY_F(1):
|
||||
display_helpfile();
|
||||
|
||||
@ -537,3 +527,47 @@ tcpOpenDialog(char *str)
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static Device *netDevice;
|
||||
|
||||
static int
|
||||
netHook(char *str)
|
||||
{
|
||||
Device **devs;
|
||||
|
||||
/* Clip garbage off the ends */
|
||||
string_prune(str);
|
||||
str = string_skipwhite(str);
|
||||
if (!*str)
|
||||
return 0;
|
||||
devs = deviceFind(str, DEVICE_TYPE_NETWORK);
|
||||
if (devs)
|
||||
netDevice = devs[0];
|
||||
return devs ? 1 : 0;
|
||||
}
|
||||
|
||||
/* Get a network device */
|
||||
Device *
|
||||
tcpDeviceSelect(void)
|
||||
{
|
||||
DMenu *menu;
|
||||
|
||||
/* If we can't find a hostname, ask user to set up TCP/IP */
|
||||
if (!getenv(VAR_HOSTNAME))
|
||||
tcpOpenDialog(NULL);
|
||||
|
||||
/* If we still can't, user is a bonehead */
|
||||
if (!getenv(VAR_HOSTNAME)) {
|
||||
msgConfirm("Sorry, I can't do this if you don't set up your networking first!");
|
||||
return 0;
|
||||
}
|
||||
menu = deviceCreateMenu(&MenuNetworkDevice, DEVICE_TYPE_NETWORK, netHook);
|
||||
if (!menu)
|
||||
msgFatal("Unable to create network device menu! Argh!");
|
||||
dmenuOpenSimple(menu);
|
||||
free(menu);
|
||||
if (netDevice->init)
|
||||
(*netDevice->init)(netDevice);
|
||||
return netDevice;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user