Merge RELENG_2_0_5 into HEAD
This commit is contained in:
parent
67eb1e0ed1
commit
d3628763db
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=9202
@ -1,5 +1,5 @@
|
||||
# From: @(#)Makefile 5.1 (Berkeley) 6/25/90
|
||||
# $Id: Makefile,v 1.10 1995/01/20 22:40:02 wollman Exp $
|
||||
# $Id: Makefile,v 1.11.2.1 1995/06/07 05:49:26 jkh Exp $
|
||||
|
||||
SUBDIR= include des acl kdb krb libkadm
|
||||
|
||||
@ -12,22 +12,26 @@ SUBDIR+= ext_srvtab kdb_destroy kdb_edit \
|
||||
|
||||
SDIR= ${.CURDIR}/..
|
||||
|
||||
CODAI?= ${MAKE} ${MFLAGS} cleandir; \
|
||||
${MAKE} ${MFLAGS} obj; ${MAKE} ${MFLAGS} depend all install
|
||||
CODAI= ${MAKE} ${MFLAGS} cleandir; \
|
||||
${MAKE} ${MFLAGS} obj; \
|
||||
${MAKE} ${MFLAGS} depend all install
|
||||
|
||||
CODAD= ${MAKE} ${MFLAGS} MAKE_EBONES=yes cleandir; \
|
||||
${MAKE} ${MFLAGS} MAKE_EBONES=yes obj; \
|
||||
${MAKE} ${MFLAGS} MAKE_EBONES=yes depend all distribute
|
||||
|
||||
# These are the programs which depend on kerberos
|
||||
# It's nice to know who they are
|
||||
kprog:
|
||||
cd ${SDIR}/bin/rcp; ${CODAI}
|
||||
cd ${SDIR}/libexec/rlogind; ${CODAI}
|
||||
cd ${SDIR}/libexec/rshd; ${CODAI}
|
||||
cd ${SDIR}/sbin/mount_nfs; ${CODAI}
|
||||
cd ${SDIR}/sbin/nfsd; ${CODAI}
|
||||
cd ${SDIR}/usr.bin/login; ${CODAI}
|
||||
cd ${SDIR}/usr.bin/passwd; ${CODAI}
|
||||
cd ${SDIR}/usr.bin/rlogin; ${CODAI}
|
||||
cd ${SDIR}/usr.bin/rsh; ${CODAI}
|
||||
cd ${SDIR}/usr.bin/su; ${CODAI}
|
||||
cd ${SDIR}/usr.bin/passwd; ${CODAI}
|
||||
cd ${SDIR}/libexec/kpasswdd; ${CODAI}
|
||||
|
||||
bootstrap:
|
||||
cd include; ${MAKE} ${MFLAGS} install
|
||||
@ -40,17 +44,16 @@ bootstrap:
|
||||
${MAKE} ${MFLAGS} depend all install kprog
|
||||
|
||||
help-distribute: distribute
|
||||
cd ${SDIR}/bin/rcp; ${MAKE} ${MFLAGS} distribute
|
||||
cd ${SDIR}/libexec/rlogind; ${MAKE} ${MFLAGS} distribute
|
||||
cd ${SDIR}/libexec/rshd; ${MAKE} ${MFLAGS} distribute
|
||||
cd ${SDIR}/usr.bin/login; ${MAKE} ${MFLAGS} distribute
|
||||
cd ${SDIR}/usr.bin/passwd; ${MAKE} ${MFLAGS} distribute
|
||||
cd ${SDIR}/usr.bin/rlogin; ${MAKE} ${MFLAGS} distribute
|
||||
cd ${SDIR}/usr.bin/rsh; ${MAKE} ${MFLAGS} distribute
|
||||
cd ${SDIR}/usr.bin/su; ${MAKE} ${MFLAGS} distribute
|
||||
cd ${SDIR}/usr.bin/passwd; ${MAKE} ${MFLAGS} distribute
|
||||
cd ${SDIR}/libexec/kpasswdd; ${MAKE} ${MFLAGS} distribute
|
||||
|
||||
cd ${SDIR}/bin/rcp; ${CODAD}
|
||||
cd ${SDIR}/libexec/rlogind; ${CODAD}
|
||||
cd ${SDIR}/libexec/rshd; ${CODAD}
|
||||
cd ${SDIR}/sbin/mount_nfs; ${CODAD}
|
||||
cd ${SDIR}/sbin/nfsd; ${CODAD}
|
||||
cd ${SDIR}/usr.bin/login; ${CODAD}
|
||||
cd ${SDIR}/usr.bin/passwd; ${CODAD}
|
||||
cd ${SDIR}/usr.bin/rlogin; ${CODAD}
|
||||
cd ${SDIR}/usr.bin/rsh; ${CODAD}
|
||||
cd ${SDIR}/usr.bin/su; ${CODAD}
|
||||
|
||||
.include <bsd.subdir.mk>
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
Modified for use with FreeBSD 2.x by Bill Paul (wpaul@ctr.columbia.edu)
|
||||
|
||||
$Id: yppush.c,v 1.5 1995/04/02 20:01:50 wpaul Exp $
|
||||
$Id: yppush.c,v 1.6.2.1 1995/06/04 17:15:49 davidg Exp $
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
@ -203,7 +203,7 @@ _svc_run( void)
|
||||
perror("svc_run: - select failed");
|
||||
return;
|
||||
case 0:
|
||||
fprintf(stderr, "%sh: callback timed out\n, progname");
|
||||
fprintf(stderr, "%s: callback timed out\n", progname);
|
||||
exit(0);
|
||||
default:
|
||||
svc_getreqset(&readfds);
|
||||
@ -421,16 +421,16 @@ main(int argc, char **argv)
|
||||
|
||||
if (DomainName==NULL) {
|
||||
if (yp_get_default_domain(&DomainName)!=0) {
|
||||
fprintf(stderr, "%s: cannot get default domain\n,
|
||||
progname");
|
||||
fprintf(stderr, "%s: cannot get default domain\n",
|
||||
progname);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
ThisHost=getHostName();
|
||||
if (ThisHost==NULL) {
|
||||
fprintf(stderr, "%s: cannot determine local hostname\n,
|
||||
progname");
|
||||
fprintf(stderr, "%s: cannot determine local hostname\n",
|
||||
progname);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
@ -496,6 +496,15 @@ static void
|
||||
_pw_breakout_yp(struct passwd *pw, char *result, int master)
|
||||
{
|
||||
char *s;
|
||||
static char name[UT_NAMESIZE+2], passwd[_PASSWORD_LEN], class[1024];
|
||||
static char gecos[1024], dir[MAXPATHLEN], shell[MAXPATHLEN];
|
||||
|
||||
strcpy(name, pw->pw_name); pw->pw_name = (char *)&name;
|
||||
strcpy(passwd, pw->pw_passwd); pw->pw_passwd = (char *)&passwd;
|
||||
strcpy(class, pw->pw_class); pw->pw_class = (char *)&class;
|
||||
strcpy(gecos, pw->pw_gecos); pw->pw_gecos = (char *)&gecos;
|
||||
strcpy(dir, pw->pw_dir); pw->pw_dir = (char *)&dir;
|
||||
strcpy(shell, pw->pw_shell); pw->pw_shell = (char *)&shell;
|
||||
|
||||
s = strsep(&result, ":"); /* name */
|
||||
if(!(pw->pw_fields & _PWF_NAME) || (pw->pw_name[0] == '+')) {
|
||||
|
@ -6,7 +6,7 @@
|
||||
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
|
||||
* ----------------------------------------------------------------------------
|
||||
*
|
||||
* $Id: change.c,v 1.7 1995/05/25 06:14:45 phk Exp $
|
||||
* $Id: change.c,v 1.8.2.1 1995/06/05 02:24:20 jkh Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
@ -19,6 +19,7 @@
|
||||
#include <sys/types.h>
|
||||
#include "libdisk.h"
|
||||
|
||||
#if 0
|
||||
struct disk *
|
||||
Set_Phys_Geom(struct disk *disk, u_long cyl, u_long hd, u_long sect)
|
||||
{
|
||||
@ -33,6 +34,7 @@ Set_Phys_Geom(struct disk *disk, u_long cyl, u_long hd, u_long sect)
|
||||
Free_Disk(disk);
|
||||
return d;
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
Set_Bios_Geom(struct disk *disk, u_long cyl, u_long hd, u_long sect)
|
||||
|
@ -6,7 +6,7 @@
|
||||
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
|
||||
* ----------------------------------------------------------------------------
|
||||
*
|
||||
* $Id: chunk.c,v 1.13 1995/05/25 06:14:47 phk Exp $
|
||||
* $Id: chunk.c,v 1.14.2.2 1995/06/05 02:24:25 jkh Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
@ -261,6 +261,22 @@ Add_Chunk(struct disk *d, long offset, u_long size, char *name, chunk_e type,
|
||||
return __LINE__;
|
||||
}
|
||||
|
||||
char *
|
||||
ShowChunkFlags(struct chunk *c)
|
||||
{
|
||||
static char ret[10];
|
||||
|
||||
int i=0;
|
||||
if (c->flags & CHUNK_BSD_COMPAT) ret[i++] = 'C';
|
||||
if (c->flags & CHUNK_ACTIVE) ret[i++] = 'A';
|
||||
if (c->flags & CHUNK_ALIGN) ret[i++] = '=';
|
||||
if (c->flags & CHUNK_PAST_1024) ret[i++] = '>';
|
||||
if (c->flags & CHUNK_IS_ROOT) ret[i++] = 'R';
|
||||
if (c->flags & CHUNK_BAD144) ret[i++] = 'B';
|
||||
ret[i++] = '\0';
|
||||
return ret;
|
||||
}
|
||||
|
||||
void
|
||||
Print_Chunk(struct chunk *c1,int offset)
|
||||
{
|
||||
@ -270,14 +286,10 @@ Print_Chunk(struct chunk *c1,int offset)
|
||||
for(;i<offset;i++) putchar('-');
|
||||
putchar('>');
|
||||
for(;i<10;i++) putchar(' ');
|
||||
printf("%p %8ld %8lu %8lu %-8s %-8s 0x%02x ",
|
||||
printf("%p %8ld %8lu %8lu %-8s %-8s 0x%02x %s",
|
||||
c1, c1->offset, c1->size, c1->end, c1->name,
|
||||
chunk_n[c1->type],c1->subtype);
|
||||
if (c1->flags & CHUNK_ALIGN) putchar('=');
|
||||
if (c1->flags & CHUNK_PAST_1024) putchar('>');
|
||||
if (c1->flags & CHUNK_IS_ROOT) putchar('R');
|
||||
if (c1->flags & CHUNK_BAD144) putchar('B');
|
||||
if (c1->flags & CHUNK_BSD_COMPAT) putchar('C');
|
||||
chunk_n[c1->type],c1->subtype,
|
||||
ShowChunkFlags(c1));
|
||||
putchar('\n');
|
||||
Print_Chunk(c1->part,offset + 2);
|
||||
Print_Chunk(c1->next,offset);
|
||||
@ -354,6 +366,7 @@ Delete_Chunk(struct disk *d, struct chunk *c)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if 0
|
||||
int
|
||||
Collapse_Chunk(struct disk *d, struct chunk *c1)
|
||||
{
|
||||
@ -417,3 +430,4 @@ Collapse_Chunk(struct disk *d, struct chunk *c1)
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
@ -6,7 +6,7 @@
|
||||
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
|
||||
* ----------------------------------------------------------------------------
|
||||
*
|
||||
* $Id: create_chunk.c,v 1.19 1995/05/24 08:59:38 jkh Exp $
|
||||
* $Id: create_chunk.c,v 1.20.2.1 1995/05/31 23:53:45 jkh Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
@ -190,7 +190,7 @@ Create_Chunk_DWIM(struct disk *d, struct chunk *parent , u_long size, chunk_e ty
|
||||
warn("Not enough unused space");
|
||||
return 0;
|
||||
found:
|
||||
if (c1->flags & CHUNK_BAD144) {
|
||||
if (parent->flags & CHUNK_BAD144) {
|
||||
edge = c1->end - d->bios_sect - 127;
|
||||
if (offset > edge)
|
||||
return 0;
|
||||
|
@ -6,7 +6,7 @@
|
||||
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
|
||||
* ----------------------------------------------------------------------------
|
||||
*
|
||||
* $Id: disk.c,v 1.18 1995/05/08 02:08:28 phk Exp $
|
||||
* $Id: disk.c,v 1.19.2.2 1995/06/05 02:24:27 jkh Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
@ -199,6 +199,7 @@ Int_Open_Disk(char *name, u_long size)
|
||||
}
|
||||
close(fd);
|
||||
Fixup_Names(d);
|
||||
Bios_Limit_Chunk(d->chunks,1024*d->bios_hd*d->bios_sect);
|
||||
return d;
|
||||
}
|
||||
|
||||
@ -207,7 +208,9 @@ Debug_Disk(struct disk *d)
|
||||
{
|
||||
printf("Debug_Disk(%s)",d->name);
|
||||
printf(" flags=%lx",d->flags);
|
||||
#if 0
|
||||
printf(" real_geom=%lu/%lu/%lu",d->real_cyl,d->real_hd,d->real_sect);
|
||||
#endif
|
||||
printf(" bios_geom=%lu/%lu/%lu\n",d->bios_cyl,d->bios_hd,d->bios_sect);
|
||||
printf(" boot1=%p, boot2=%p, bootmgr=%p\n",
|
||||
d->boot1,d->boot2,d->bootmgr);
|
||||
@ -250,6 +253,7 @@ Clone_Disk(struct disk *d)
|
||||
return d2;
|
||||
}
|
||||
|
||||
#if 0
|
||||
void
|
||||
Collapse_Disk(struct disk *d)
|
||||
{
|
||||
@ -257,6 +261,7 @@ Collapse_Disk(struct disk *d)
|
||||
while(Collapse_Chunk(d,d->chunks))
|
||||
;
|
||||
}
|
||||
#endif
|
||||
|
||||
static char * device_list[] = {"wd","sd",0};
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
|
||||
* ----------------------------------------------------------------------------
|
||||
*
|
||||
* $Id: libdisk.h,v 1.17 1995/05/25 06:14:49 phk Exp $
|
||||
* $Id: libdisk.h,v 1.18.2.2 1995/06/05 02:24:32 jkh Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
@ -29,9 +29,11 @@ struct disk {
|
||||
char *name;
|
||||
u_long flags;
|
||||
# define DISK_ON_TRACK 1
|
||||
#if 0
|
||||
u_long real_cyl;
|
||||
u_long real_hd;
|
||||
u_long real_sect;
|
||||
#endif
|
||||
u_long bios_cyl;
|
||||
u_long bios_hd;
|
||||
u_long bios_sect;
|
||||
@ -103,11 +105,13 @@ Debug_Disk(struct disk *disk);
|
||||
/* Print the content of the tree to stdout
|
||||
*/
|
||||
|
||||
#if 0
|
||||
struct disk *
|
||||
Set_Phys_Geom(struct disk *disk, u_long cyl, u_long heads, u_long sects);
|
||||
/* Use a different physical geometry. Makes sense for ST506 disks only.
|
||||
* The tree returned is read from the disk, using this geometry.
|
||||
*/
|
||||
#endif
|
||||
|
||||
void
|
||||
Set_Bios_Geom(struct disk *disk, u_long cyl, u_long heads, u_long sects);
|
||||
@ -211,6 +215,14 @@ void
|
||||
MakeDevDisk(struct disk *d,char *path);
|
||||
/* Make device nodes for all chunks on this disk */
|
||||
|
||||
char *
|
||||
ShowChunkFlags(struct chunk *c);
|
||||
/* Return string to show flags. */
|
||||
|
||||
char *
|
||||
ChunkCanBeRoot(struct chunk *c);
|
||||
/* Return NULL if chunk can be /, explanation otherwise */
|
||||
|
||||
/*
|
||||
* Implementation details >>> DO NOT USE <<<
|
||||
*/
|
||||
|
@ -6,7 +6,7 @@
|
||||
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
|
||||
* ----------------------------------------------------------------------------
|
||||
*
|
||||
* $Id: rules.c,v 1.9 1995/05/08 01:34:31 phk Exp $
|
||||
* $Id: rules.c,v 1.10.2.1 1995/06/03 08:40:33 jkh Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
@ -179,22 +179,44 @@ Rule_003(struct disk *d, struct chunk *c, char *msg)
|
||||
/*
|
||||
* Rule#4:
|
||||
* Max seven 'part' as children of 'freebsd'
|
||||
* Max one FS_SWAP child per 'freebsd'
|
||||
* Max one CHUNK_IS_ROOT child per 'freebsd'
|
||||
* If Bad144, space for table must exist.
|
||||
* If Bad144 & root, bad144 table must be inside 1024
|
||||
*/
|
||||
void
|
||||
Rule_004(struct disk *d, struct chunk *c, char *msg)
|
||||
{
|
||||
int i=0,j=0,k=0;
|
||||
int i=0,k=0;
|
||||
struct chunk *c1;
|
||||
u_long l;
|
||||
|
||||
if (c->type != freebsd)
|
||||
return;
|
||||
|
||||
if (c->flags & CHUNK_BAD144) {
|
||||
l = c->end - 127 - d->bios_sect + 1;
|
||||
for (c1=c->part; c1; c1=c1->next) {
|
||||
if (c1->end < l || c1->type == unused)
|
||||
continue;
|
||||
sprintf(msg+strlen(msg),
|
||||
"Blocks %lu to %lu are needed for bad144 information, but isn't unused.\n",
|
||||
l, c->end);
|
||||
break;
|
||||
}
|
||||
if (c->flags & CHUNK_PAST_1024) {
|
||||
for (c1=c->part; c1; c1=c1->next) {
|
||||
if (c1->flags & CHUNK_IS_ROOT) {
|
||||
sprintf(msg+strlen(msg),
|
||||
"You have assigned root to a slice which uses bad144, and\n extends past the first 1023 cylinders, and thus cannot be booted from.\n");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (c1=c->part; c1; c1=c1->next) {
|
||||
if (c1->type != part)
|
||||
continue;
|
||||
if (c1->subtype == FS_SWAP)
|
||||
j++;
|
||||
if (c1->flags & CHUNK_IS_ROOT) {
|
||||
k++;
|
||||
if (c1->flags & CHUNK_PAST_1024)
|
||||
@ -205,15 +227,11 @@ Rule_004(struct disk *d, struct chunk *c, char *msg)
|
||||
}
|
||||
if (i > 7) {
|
||||
sprintf(msg+strlen(msg),
|
||||
"Max seven 'part' per 'freebsd' chunk\n");
|
||||
}
|
||||
if (j > 1) {
|
||||
sprintf(msg+strlen(msg),
|
||||
"Max one subtype=FS_SWAP child per 'freebsd' chunk\n");
|
||||
"Max seven partitions per freebsd slice\n");
|
||||
}
|
||||
if (k > 1) {
|
||||
sprintf(msg+strlen(msg),
|
||||
"Max one CHUNK_IS_ROOT child per 'freebsd' chunk\n");
|
||||
"Max one root partition child per freebsd slice\n");
|
||||
}
|
||||
}
|
||||
|
||||
@ -247,3 +265,52 @@ CheckRules(struct disk *d)
|
||||
return strdup(msg);
|
||||
return 0;
|
||||
}
|
||||
|
||||
char *
|
||||
ChunkCanBeRoot(struct chunk *c)
|
||||
{
|
||||
struct chunk *c1;
|
||||
struct disk *d = c->disk;
|
||||
char msg[BUFSIZ];
|
||||
|
||||
*msg = '\0';
|
||||
if (c->flags & CHUNK_PAST_1024) {
|
||||
strcat(msg,
|
||||
"The root partition must end before cylinder 1024 seen from\n");
|
||||
strcat(msg,
|
||||
"the BIOS' point of view, or it cannot be booted from.\n");
|
||||
return strdup(msg);
|
||||
}
|
||||
for (c1=d->chunks->part;;) {
|
||||
for (; c1; c1=c1->next)
|
||||
if (c1->offset <= c->offset && c1->end >= c->end)
|
||||
break;
|
||||
if (!c1) {
|
||||
strcat(msg,
|
||||
"Internal trouble, cannot find this chunk in the chunk-tree\n");
|
||||
return strdup(msg);
|
||||
}
|
||||
if (c1->type == freebsd)
|
||||
break;
|
||||
c1 = c1->part;
|
||||
}
|
||||
|
||||
if (c1->type != freebsd) {
|
||||
strcat(msg,
|
||||
"The root partition must be in a FreeBSD slice, otherwise\n");
|
||||
strcat(msg,
|
||||
"the kernel cannot be booted from it\n");
|
||||
return strdup(msg);
|
||||
}
|
||||
|
||||
if ((c1->flags & CHUNK_BAD144) && (c1->flags & CHUNK_PAST_1024)) {
|
||||
strcat(msg,
|
||||
"This partition is unsuitable for root, because the FreeBSD slice\n");
|
||||
strcat(msg,
|
||||
"it is inside has bad144 enabled, but the badblock data lives past\n");
|
||||
strcat(msg,
|
||||
"the 1024th cylinder, and the bootblocks cannot get to it there.\n");
|
||||
return strdup(msg);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
@ -6,7 +6,7 @@
|
||||
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
|
||||
* ----------------------------------------------------------------------------
|
||||
*
|
||||
* $Id: tst01.c,v 1.13 1995/05/12 18:50:00 phk Exp $
|
||||
* $Id: tst01.c,v 1.14.2.1 1995/06/05 02:24:35 jkh Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
@ -199,6 +199,7 @@ main(int argc, char **argv)
|
||||
strtol(cmds[3],0,0));
|
||||
continue;
|
||||
}
|
||||
#if 0
|
||||
if (!strcasecmp(*cmds,"phys") && ncmd == 4) {
|
||||
d = Set_Phys_Geom(d,
|
||||
strtol(cmds[1],0,0),
|
||||
@ -206,6 +207,8 @@ main(int argc, char **argv)
|
||||
strtol(cmds[3],0,0));
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
#if 0
|
||||
if (!strcasecmp(*cmds,"collapse")) {
|
||||
if (cmds[1])
|
||||
while (Collapse_Chunk(d,
|
||||
@ -215,6 +218,7 @@ main(int argc, char **argv)
|
||||
Collapse_Disk(d);
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
if (!strcasecmp(*cmds,"list")) {
|
||||
cp = Disk_Names();
|
||||
printf("Disks:");
|
||||
@ -279,13 +283,17 @@ main(int argc, char **argv)
|
||||
printf("\tbios cyl hd sect\n");
|
||||
printf("\tboot\n");
|
||||
printf("\tbteasy17\n");
|
||||
#if 0
|
||||
printf("\tcollapse [pointer]\n");
|
||||
#endif
|
||||
printf("\tcreate offset size enum subtype flags\n");
|
||||
printf("\t\tsubtype(part): swap=1, ffs=7\n");
|
||||
printf("\tdelete pointer\n");
|
||||
printf("\tlist\n");
|
||||
printf("\tmbr\n");
|
||||
#if 0
|
||||
printf("\tphys cyl hd sect\n");
|
||||
#endif
|
||||
printf("\tquit\n");
|
||||
printf("\tread [disk]\n");
|
||||
printf("\tscan\n");
|
||||
|
@ -6,7 +6,7 @@
|
||||
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
|
||||
* ----------------------------------------------------------------------------
|
||||
*
|
||||
* $Id: write_disk.c,v 1.12 1995/05/24 08:59:40 jkh Exp $
|
||||
* $Id: write_disk.c,v 1.13.2.1 1995/06/05 02:24:37 jkh Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
@ -69,9 +69,15 @@ Write_FreeBSD(int fd, struct disk *new, struct disk *old, struct chunk *c1)
|
||||
|
||||
dl->d_secsize = 512;
|
||||
dl->d_secperunit = new->chunks->size;
|
||||
#if 0
|
||||
dl->d_secpercyl = new->real_cyl ? new->real_cyl : new->bios_cyl;
|
||||
dl->d_ntracks = new->real_hd ? new->real_hd : new->bios_hd;
|
||||
dl->d_nsectors = new->real_sect ? new->real_sect : new->bios_sect;
|
||||
#else
|
||||
dl->d_secpercyl = new->bios_cyl;
|
||||
dl->d_ntracks = new->bios_hd;
|
||||
dl->d_nsectors = new->bios_sect;
|
||||
#endif
|
||||
dl->d_secpercyl = dl->d_ntracks * dl->d_nsectors;
|
||||
|
||||
dl->d_npartitions = MAXPARTITIONS;
|
||||
|
@ -20,7 +20,7 @@ int pwok;
|
||||
|
||||
/* Try s/key authentication even when the UNIX password is permitted. */
|
||||
|
||||
if (pwd != 0 && skeylookup(&skey, pwd->pw_name) == 0
|
||||
if (pwd != 0 && skeyinfo(&skey, pwd->pw_name, (char *) 0) == 0
|
||||
&& skeyverify(&skey, pp) == 0) {
|
||||
/* s/key authentication succeeded */
|
||||
return (pwd->pw_passwd);
|
||||
|
@ -16,7 +16,7 @@ int pwok;
|
||||
int sflag;
|
||||
|
||||
/* Attempt an s/key challenge. */
|
||||
sflag = skeychallenge(&skey, username, buf);
|
||||
sflag = skeyinfo(&skey, username, buf);
|
||||
if (!sflag)
|
||||
printf("%s\n", buf);
|
||||
|
||||
|
@ -69,6 +69,10 @@ static struct in_addr *lookup_internet_addr();
|
||||
#define PERMIT 1
|
||||
#define DENY 0
|
||||
|
||||
#ifndef CONSOLE
|
||||
#define CONSOLE "console"
|
||||
#endif
|
||||
|
||||
struct login_info {
|
||||
char *host_name; /* host name */
|
||||
struct in_addr *internet_addr; /* null terminated list */
|
||||
@ -163,7 +167,7 @@ struct login_info *login_info;
|
||||
int permission;
|
||||
|
||||
#ifdef PERMIT_CONSOLE
|
||||
if (login_info->port != 0 && strcasecmp(login_info->port, "console") == 0)
|
||||
if (login_info->port != 0 && strcasecmp(login_info->port, CONSOLE) == 0)
|
||||
return (1);
|
||||
#endif
|
||||
|
||||
|
@ -26,29 +26,30 @@ int skeylookup __P((struct skey *mp,char *name));
|
||||
|
||||
#define setpriority(x,y,z) /* nothing */
|
||||
|
||||
/* Issue a skey challenge for user 'name'. If successful,
|
||||
* fill in the caller's skey structure and return 0. If unsuccessful
|
||||
* (e.g., if name is unknown) return -1.
|
||||
/* Look up skey info for user 'name'. If successful, fill in the caller's
|
||||
* skey structure and return 0. If unsuccessful (e.g., if name is unknown)
|
||||
* return -1. If an optional challenge string buffer is given, update it.
|
||||
*
|
||||
* The file read/write pointer is left at the start of the
|
||||
* record.
|
||||
*/
|
||||
int
|
||||
getskeyprompt(mp,name,prompt)
|
||||
skeyinfo(mp,name,ss)
|
||||
struct skey *mp;
|
||||
char *name;
|
||||
char *prompt;
|
||||
char *ss;
|
||||
{
|
||||
int rval;
|
||||
|
||||
sevenbit(name);
|
||||
rval = skeylookup(mp,name);
|
||||
strcpy(prompt,"s/key 55 latour1\n");
|
||||
switch(rval){
|
||||
case -1: /* File error */
|
||||
return -1;
|
||||
case 0: /* Lookup succeeded, return challenge */
|
||||
sprintf(prompt,"s/key %d %s\n",mp->n - 1,mp->seed);
|
||||
case 0: /* Lookup succeeded */
|
||||
if (ss != 0) {
|
||||
sprintf(ss, "s/key %d %s",mp->n - 1,mp->seed);
|
||||
fclose(mp->keyfile);
|
||||
}
|
||||
return 0;
|
||||
case 1: /* User not found */
|
||||
fclose(mp->keyfile);
|
||||
@ -173,7 +174,6 @@ char *response;
|
||||
{
|
||||
struct timeval startval;
|
||||
struct timeval endval;
|
||||
long microsec;
|
||||
char key[8];
|
||||
char fkey[8];
|
||||
char filekey[8];
|
||||
@ -211,9 +211,6 @@ long microsec;
|
||||
*/
|
||||
|
||||
setpriority(PRIO_PROCESS, 0, -4);
|
||||
/*
|
||||
gettimeofday(&startval, (char *)0 );
|
||||
*/
|
||||
|
||||
/* reread the file record NOW*/
|
||||
|
||||
@ -256,12 +253,6 @@ long microsec;
|
||||
fseek(mp->keyfile,mp->recstart,0);
|
||||
fprintf(mp->keyfile,"%s %04d %-16s %s %-21s\n",mp->logname,mp->n,mp->seed,
|
||||
mp->val, tbuf);
|
||||
/*
|
||||
gettimeofday(&endval, (char *)0 );
|
||||
microsec = (endval.tv_sec - startval.tv_sec) * 1000000 + (endval.tv_usec - startval.tv_usec);
|
||||
fprintf(stderr, "window= %d micro seconds \n" , microsec);
|
||||
*/
|
||||
|
||||
|
||||
fclose(mp->keyfile);
|
||||
|
||||
|
@ -1,20 +1,15 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#ifdef __MSDOS__
|
||||
#include <dos.h>
|
||||
#endif
|
||||
#ifdef unix
|
||||
#include <fcntl.h>
|
||||
#include <termios.h>
|
||||
#include <signal.h>
|
||||
#endif
|
||||
|
||||
#include "skey.h"
|
||||
#include "mdx.h"
|
||||
|
||||
/* Crunch a key:
|
||||
* concatenate the seed and the password, run through MD4 and
|
||||
* concatenate the seed and the password, run through MDX and
|
||||
* collapse to 64 bits. This is defined as the user's starting key.
|
||||
*/
|
||||
int
|
||||
@ -64,7 +59,6 @@ char *x;
|
||||
results[0] ^= results[2];
|
||||
results[1] ^= results[3];
|
||||
|
||||
/* Only works on byte-addressed little-endian machines!! */
|
||||
memcpy(x,(char *)results,8);
|
||||
}
|
||||
|
||||
@ -73,36 +67,13 @@ void
|
||||
rip(buf)
|
||||
char *buf;
|
||||
{
|
||||
char *cp;
|
||||
|
||||
if((cp = strchr(buf,'\r')) != NULL)
|
||||
*cp = '\0';
|
||||
|
||||
if((cp = strchr(buf,'\n')) != NULL)
|
||||
*cp = '\0';
|
||||
buf[strcspn(buf, "\r\n")] = 0;
|
||||
}
|
||||
/************************/
|
||||
#ifdef __MSDOS__
|
||||
char *
|
||||
readpass(buf,n)
|
||||
char *buf;
|
||||
int n;
|
||||
{
|
||||
int i;
|
||||
char *cp;
|
||||
|
||||
for(cp=buf,i = 0; i < n ; i++)
|
||||
if ((*cp++ = bdos(7,0,0)) == '\r')
|
||||
break;
|
||||
*cp = '\0';
|
||||
printf("\n");
|
||||
rip(buf);
|
||||
return buf;
|
||||
}
|
||||
#else
|
||||
static struct termios saved_ttymode;
|
||||
|
||||
static void interrupt()
|
||||
static void interrupt(sig)
|
||||
int sig;
|
||||
{
|
||||
tcsetattr(0, TCSANOW, &saved_ttymode);
|
||||
exit(1);
|
||||
@ -147,14 +118,12 @@ int n;
|
||||
return buf;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
sevenbit(s)
|
||||
char *s;
|
||||
{
|
||||
/* make sure there are only 7 bit code in the line*/
|
||||
while(*s){
|
||||
*s = 0x7f & ( *s);
|
||||
*s &= 0x7f;
|
||||
s++;
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $Id: Makefile,v 1.191 1995/05/29 10:56:33 jkh Exp $
|
||||
# $Id: Makefile,v 1.192.2.16 1995/06/10 14:19:56 jkh Exp $
|
||||
#
|
||||
# How to roll a release:
|
||||
#
|
||||
@ -19,12 +19,12 @@
|
||||
# Things which without too much trouble can be considered variables
|
||||
|
||||
EXPORT_DISTS= games manpages proflibs dict info
|
||||
EXTRA_DISTS= des ${EXPORT_DISTS}
|
||||
EXTRA_DISTS= krb des ${EXPORT_DISTS}
|
||||
ALL_DISTS= bin ${EXTRA_DISTS}
|
||||
|
||||
BOOT1= etc/services etc/protocols etc/sysconfig
|
||||
BOOT1= etc/protocols etc/sysconfig
|
||||
|
||||
FAQS= README MIRROR.SITES
|
||||
FAQS= MIRROR.SITES
|
||||
|
||||
# define this to use a vn device instead of the floppy drive
|
||||
VNDEVICE= vn0
|
||||
@ -45,7 +45,7 @@ ZIPNSPLIT= gzip --no-name -9 -c | split -b 240640 -
|
||||
# Size of the mfs to put in the kernel we boot.
|
||||
# You want to keep this as small as possible, it costs dearly in RAM.
|
||||
BOOTMFSSIZE= 1075
|
||||
MFSINODE= 70000
|
||||
MFSINODE= 80000
|
||||
|
||||
# Things which will get you into trouble if you change them
|
||||
DISTRIBUTIONS= bin ${EXTRA_DISTS}
|
||||
@ -73,26 +73,23 @@ release:
|
||||
cd ${.CURDIR}/.. ; ${MAKE} install DESTDIR=${CHROOTDIR}
|
||||
echo "#!/bin/sh" > ${CHROOTDIR}/mk
|
||||
echo "set -ex" >> ${CHROOTDIR}/mk
|
||||
echo "CFLAGS='-O2 -pipe'" >> ${CHROOTDIR}/mk
|
||||
echo "export CFLAGS" >> ${CHROOTDIR}/mk
|
||||
echo "RELEASEDIR=/R" >> ${CHROOTDIR}/mk
|
||||
echo "export RELEASEDIR" >> ${CHROOTDIR}/mk
|
||||
echo "cd /usr/src" >> ${CHROOTDIR}/mk
|
||||
echo "make world" >> ${CHROOTDIR}/mk
|
||||
echo "cd /usr/src/release/libdisk" >> ${CHROOTDIR}/mk
|
||||
echo "make obj depend" >> ${CHROOTDIR}/mk
|
||||
echo "make all" >> ${CHROOTDIR}/mk
|
||||
echo "cd /usr/src/release/sysinstall" >> ${CHROOTDIR}/mk
|
||||
echo "make obj depend" >> ${CHROOTDIR}/mk
|
||||
echo "make all" >> ${CHROOTDIR}/mk
|
||||
echo "cd /usr/src/release" >> ${CHROOTDIR}/mk
|
||||
echo "make obj" >> ${CHROOTDIR}/mk
|
||||
echo "make doRELEASE" >> ${CHROOTDIR}/mk
|
||||
echo "RELEASEDIR=/R" >> ${CHROOTDIR}/etc/make.conf
|
||||
.if !defined(RELEASETAG)
|
||||
cd ${CHROOTDIR}/usr ; cvs co -P src
|
||||
.else
|
||||
cd ${CHROOTDIR}/usr ; cvs export -r ${RELEASETAG} src
|
||||
cd ${CHROOTDIR}/usr ; cvs co -P -r ${RELEASETAG} src
|
||||
.endif
|
||||
( cd ${CHROOTDIR}/usr/src/sys/conf && \
|
||||
mv newvers.sh foo && \
|
||||
sed "s/^RELEASE=.*/RELEASE=${BUILDNAME}/" foo > newvers.sh )
|
||||
sed "s/^RELEASE=.*/RELEASE=${BUILDNAME}/" foo > newvers.sh; rm foo )
|
||||
# To be used in development...
|
||||
#find ${.CURDIR} -print | cpio -dumpv ${CHROOTDIR}
|
||||
chmod 755 ${CHROOTDIR}/mk
|
||||
@ -110,6 +107,10 @@ rerelease:
|
||||
cd ${.CURDIR}/.. ; ${MAKE} -k install DESTDIR=${CHROOTDIR}
|
||||
echo "#!/bin/sh" > ${CHROOTDIR}/mk
|
||||
echo "set -ex" >> ${CHROOTDIR}/mk
|
||||
echo "CFLAGS='-O2 -pipe'" >> ${CHROOTDIR}/mk
|
||||
echo "export CFLAGS" >> ${CHROOTDIR}/mk
|
||||
echo "RELEASEDIR=/R" >> ${CHROOTDIR}/mk
|
||||
echo "export RELEASEDIR" >> ${CHROOTDIR}/mk
|
||||
echo "cd /usr/src" >> ${CHROOTDIR}/mk
|
||||
echo "make all install" >> ${CHROOTDIR}/mk
|
||||
echo "cd /usr/src/release/libdisk" >> ${CHROOTDIR}/mk
|
||||
@ -121,17 +122,16 @@ rerelease:
|
||||
echo "cd /usr/src/release" >> ${CHROOTDIR}/mk
|
||||
echo "make obj" >> ${CHROOTDIR}/mk
|
||||
echo "make doRELEASE" >> ${CHROOTDIR}/mk
|
||||
echo "RELEASEDIR=/R" >> ${CHROOTDIR}/etc/make.conf
|
||||
.if !defined(RELEASENOUPDATE)
|
||||
.if !defined(RELEASETAG)
|
||||
cd ${CHROOTDIR}/usr ; cvs update -P -d -q src
|
||||
.else
|
||||
cd ${CHROOTDIR}/usr ; cvs export -r ${RELEASETAG} -P -d -q src
|
||||
cd ${CHROOTDIR}/usr ; cvs update -P -d -q -r ${RELEASETAG} src
|
||||
.endif
|
||||
.endif
|
||||
( cd ${CHROOTDIR}/usr/src/sys/conf && \
|
||||
mv newvers.sh foo && \
|
||||
sed "s/^RELEASE=.*/RELEASE=${BUILDNAME}/" foo > newvers.sh )
|
||||
sed "s/^RELEASE=.*/RELEASE=${BUILDNAME}/" foo > newvers.sh; rm foo )
|
||||
# To be used in development...
|
||||
#find ${.CURDIR} -print | cpio -dumpv ${CHROOTDIR}
|
||||
chmod 755 ${CHROOTDIR}/mk
|
||||
@ -169,6 +169,10 @@ release.2:
|
||||
@cd ${.CURDIR} ; $(MAKE) ckRELEASEDIR
|
||||
cd ${.CURDIR}/../etc && make distrib-dirs DESTDIR=${RD}/trees/bin
|
||||
cd ${.CURDIR}/.. ; make distribute DISTDIR=${RD}/trees
|
||||
cd ${.CURDIR}/../eBones && ( \
|
||||
make obj all help-distribute DISTDIR=${RD}/trees ;\
|
||||
make bootstrap \
|
||||
)
|
||||
chflags -R noschg ${RD}/trees
|
||||
uudecode ${.CURDIR}/compat20/libgcc.so.261.0.uu
|
||||
install -m 444 -o bin -g bin libgcc.so.261.0 ${RD}/trees/bin/usr/lib
|
||||
@ -199,6 +203,8 @@ release.3:
|
||||
# Make and install the three crunched binaries which live on the floppies.
|
||||
# You are not supposed to like this :-)
|
||||
release.4:
|
||||
cd ${.CURDIR}/libdisk && make obj && make depend && make all
|
||||
cd ${.CURDIR}/sysinstall && make obj && make depend && make all
|
||||
@cd ${.CURDIR} ; $(MAKE) ckRELEASEDIR
|
||||
rm -rf ${RD}/crunch
|
||||
mkdir -p ${RD}/crunch
|
||||
@ -280,7 +286,7 @@ release.6:
|
||||
touch release.6
|
||||
|
||||
|
||||
# Make source dists, and finish of DES too
|
||||
# Make source dists, and finish off DES too
|
||||
release.7:
|
||||
@cd ${.CURDIR} ; $(MAKE) ckRELEASEDIR
|
||||
@cd ${.CURDIR} ; $(MAKE) doTARBALL SD=/usr/src \
|
||||
@ -294,9 +300,11 @@ release.7:
|
||||
fi ; \
|
||||
done
|
||||
( cd ${RD}/dists/src && \
|
||||
if [ -f sdes.aa ] ; then mv sdes.* ../des ; fi && \
|
||||
if [ -f ssecure.aa ] ; then mv ssecure.* ../des ; fi && \
|
||||
if [ -f sebones.aa ] ; then mv sebones.* ../des ; fi )
|
||||
@echo "src distribution is finished."
|
||||
mv ${RD}/dists/krb/* ${RD}/dists/des
|
||||
rmdir ${RD}/dists/krb
|
||||
touch release.7
|
||||
|
||||
# Complete the bootfd
|
||||
@ -329,12 +337,14 @@ release.8: write_mfs_in_kernel
|
||||
cpio -dump ${RD}/mfsfd/dev )
|
||||
( cd ${RD}/mfsfd/dev && rm -f *[sw]d*[bdefgh] )
|
||||
cd ${RD}/trees/bin && ls ${BOOT1} | cpio -dump ${RD}/mfsfd/stand
|
||||
echo "nameserver 42/tcp name" > ${RD}/mfsfd/stand/etc/services
|
||||
echo "ftp 21/tcp" >> ${RD}/mfsfd/stand/etc/services
|
||||
echo "domain 53/tcp nameserver" >> ${RD}/mfsfd/stand/etc/services
|
||||
echo "domain 53/udp nameserver" >> ${RD}/mfsfd/stand/etc/services
|
||||
rm -rf ${.CURDIR}/sysinstall/help/ja_JP.JIS
|
||||
tar --exclude CVS -cf - -C ${.CURDIR}/sysinstall help | \
|
||||
tar xvf - -C ${RD}/mfsfd/stand
|
||||
install -c ${.CURDIR}/../COPYRIGHT ${RD}/mfsfd/stand/help/en_US.ISO8859-1/COPYRIGHT
|
||||
cd ${RD}/trees/bin/usr/share/FAQ/Text && \
|
||||
install -c RELNOTES.FreeBSD ${RD}/mfsfd/stand/help/en_US.ISO8859-1/RELNOTES && \
|
||||
install -c README ${RD}/mfsfd/stand/help/en_US.ISO8859-1/README
|
||||
(cd ${RD}/mfsfd/stand/help && tar cf - * | gzip -9 > ../help.tgz)
|
||||
(cd ${RD}/mfsfd/stand && rm -rf help)
|
||||
( \
|
||||
@ -354,6 +364,7 @@ release.8: write_mfs_in_kernel
|
||||
cp ${RD}/kernels/BOOTMFS ${RD}/bootfd/kernel
|
||||
./write_mfs_in_kernel ${RD}/bootfd/kernel fs-image
|
||||
kzip ${RD}/bootfd/kernel
|
||||
mv ${RD}/bootfd/kernel ${RD}/kernels/MFSKERNEL
|
||||
mv ${RD}/bootfd/kernel.kz ${RD}/bootfd/kernel
|
||||
ls -l ${RD}/bootfd/kernel
|
||||
cd ${.CURDIR} && ${MAKE} doFLOPPY FLOPPY=boot
|
||||
@ -369,6 +380,11 @@ release.9:
|
||||
@cd ${.CURDIR} && $(MAKE) installCRUNCH CRUNCH=root \
|
||||
DIR=${RD}/rootfd/stand ZIP=false
|
||||
tar --exclude CVS -cf - -C ${RD} info | tar xvf - -C ${RD}/rootfd/stand
|
||||
mv ${RD}/rootfd/stand/info/krb/* ${RD}/rootfd/stand/info/des
|
||||
rmdir ${RD}/rootfd/stand/info/krb
|
||||
mv ${RD}/rootfd/stand/info/src/ssecure.inf ${RD}/rootfd/stand/info/des
|
||||
mv ${RD}/rootfd/stand/info/src/sebones.inf ${RD}/rootfd/stand/info/des
|
||||
tar -cf - -C ${RD}/trees/bin/dev MAKEDEV | tar xvf - -C ${RD}/rootfd/stand
|
||||
cd ${RD}/rootfd && ( rm -f OK && find . -print && touch OK && echo OK ) | cpio -H tar -oa | gzip -9 -c | dd conv=osync > ${RD}/floppies/root.tmp
|
||||
mv ${RD}/floppies/root.tmp ${RD}/floppies/root.flp
|
||||
touch release.9
|
||||
@ -416,7 +432,7 @@ cdrom.1:
|
||||
mkdir ${CD}
|
||||
mkdir ${CD}/filesys
|
||||
cd ${RD} && find floppies dists -print | cpio -dumpl ${CD}
|
||||
ln -f ${RD}/bootfd/kernel ${CD}
|
||||
ln -f ${RD}/kernels/MFSKERNEL ${CD}/kernel
|
||||
ln -f ${RD}/trees/bin/usr/mdec/fbsdboot.exe ${CD}
|
||||
for i in ${DISTRIBUTIONS} ; \
|
||||
do \
|
||||
|
@ -1,10 +1,10 @@
|
||||
# $Id: boot_crunch.conf,v 1.18 1995/05/29 00:49:54 jkh Exp $
|
||||
# $Id: boot_crunch.conf,v 1.19.2.1 1995/06/04 11:52:44 jkh Exp $
|
||||
|
||||
srcdirs /usr/src/bin /usr/src/sbin /usr/src/release /usr/src/usr.bin
|
||||
srcdirs /usr/src/gnu/usr.bin /usr/src/usr.sbin /usr/src/sbin/i386
|
||||
|
||||
progs sh find
|
||||
progs ping ppp
|
||||
progs ft ppp
|
||||
progs sysinstall newfs gzip cpio bad144 fsck ifconfig route slattach
|
||||
progs mount_nfs
|
||||
ln gzip gunzip
|
||||
|
@ -1,10 +1,10 @@
|
||||
# $Id: boot_crunch.conf,v 1.18 1995/05/29 00:49:54 jkh Exp $
|
||||
# $Id: boot_crunch.conf,v 1.19.2.1 1995/06/04 11:52:44 jkh Exp $
|
||||
|
||||
srcdirs /usr/src/bin /usr/src/sbin /usr/src/release /usr/src/usr.bin
|
||||
srcdirs /usr/src/gnu/usr.bin /usr/src/usr.sbin /usr/src/sbin/i386
|
||||
|
||||
progs sh find
|
||||
progs ping ppp
|
||||
progs ft ppp
|
||||
progs sysinstall newfs gzip cpio bad144 fsck ifconfig route slattach
|
||||
progs mount_nfs
|
||||
ln gzip gunzip
|
||||
|
@ -1,10 +1,10 @@
|
||||
# $Id: boot_crunch.conf,v 1.18 1995/05/29 00:49:54 jkh Exp $
|
||||
# $Id: boot_crunch.conf,v 1.19.2.1 1995/06/04 11:52:44 jkh Exp $
|
||||
|
||||
srcdirs /usr/src/bin /usr/src/sbin /usr/src/release /usr/src/usr.bin
|
||||
srcdirs /usr/src/gnu/usr.bin /usr/src/usr.sbin /usr/src/sbin/i386
|
||||
|
||||
progs sh find
|
||||
progs ping ppp
|
||||
progs ft ppp
|
||||
progs sysinstall newfs gzip cpio bad144 fsck ifconfig route slattach
|
||||
progs mount_nfs
|
||||
ln gzip gunzip
|
||||
|
@ -1,10 +1,10 @@
|
||||
# $Id: boot_crunch.conf,v 1.18 1995/05/29 00:49:54 jkh Exp $
|
||||
# $Id: boot_crunch.conf,v 1.19.2.1 1995/06/04 11:52:44 jkh Exp $
|
||||
|
||||
srcdirs /usr/src/bin /usr/src/sbin /usr/src/release /usr/src/usr.bin
|
||||
srcdirs /usr/src/gnu/usr.bin /usr/src/usr.sbin /usr/src/sbin/i386
|
||||
|
||||
progs sh find
|
||||
progs ping ppp
|
||||
progs ft ppp
|
||||
progs sysinstall newfs gzip cpio bad144 fsck ifconfig route slattach
|
||||
progs mount_nfs
|
||||
ln gzip gunzip
|
||||
|
@ -1,2 +1,7 @@
|
||||
#!/bin/sh
|
||||
ls $1.* | wc | awk '{ print "Pieces = ",$1 }'
|
||||
for FILE in $1.*; do \
|
||||
PIECE=`echo $FILE | cut -d . -f 2` ; \
|
||||
echo -n "cksum.$PIECE = "; \
|
||||
cksum $FILE | awk ' { print $1,$2 } '
|
||||
done
|
||||
|
@ -6,7 +6,7 @@
|
||||
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
|
||||
* ----------------------------------------------------------------------------
|
||||
*
|
||||
* $Id: change.c,v 1.7 1995/05/25 06:14:45 phk Exp $
|
||||
* $Id: change.c,v 1.8.2.1 1995/06/05 02:24:20 jkh Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
@ -19,6 +19,7 @@
|
||||
#include <sys/types.h>
|
||||
#include "libdisk.h"
|
||||
|
||||
#if 0
|
||||
struct disk *
|
||||
Set_Phys_Geom(struct disk *disk, u_long cyl, u_long hd, u_long sect)
|
||||
{
|
||||
@ -33,6 +34,7 @@ Set_Phys_Geom(struct disk *disk, u_long cyl, u_long hd, u_long sect)
|
||||
Free_Disk(disk);
|
||||
return d;
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
Set_Bios_Geom(struct disk *disk, u_long cyl, u_long hd, u_long sect)
|
||||
|
@ -6,7 +6,7 @@
|
||||
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
|
||||
* ----------------------------------------------------------------------------
|
||||
*
|
||||
* $Id: chunk.c,v 1.13 1995/05/25 06:14:47 phk Exp $
|
||||
* $Id: chunk.c,v 1.14.2.2 1995/06/05 02:24:25 jkh Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
@ -261,6 +261,22 @@ Add_Chunk(struct disk *d, long offset, u_long size, char *name, chunk_e type,
|
||||
return __LINE__;
|
||||
}
|
||||
|
||||
char *
|
||||
ShowChunkFlags(struct chunk *c)
|
||||
{
|
||||
static char ret[10];
|
||||
|
||||
int i=0;
|
||||
if (c->flags & CHUNK_BSD_COMPAT) ret[i++] = 'C';
|
||||
if (c->flags & CHUNK_ACTIVE) ret[i++] = 'A';
|
||||
if (c->flags & CHUNK_ALIGN) ret[i++] = '=';
|
||||
if (c->flags & CHUNK_PAST_1024) ret[i++] = '>';
|
||||
if (c->flags & CHUNK_IS_ROOT) ret[i++] = 'R';
|
||||
if (c->flags & CHUNK_BAD144) ret[i++] = 'B';
|
||||
ret[i++] = '\0';
|
||||
return ret;
|
||||
}
|
||||
|
||||
void
|
||||
Print_Chunk(struct chunk *c1,int offset)
|
||||
{
|
||||
@ -270,14 +286,10 @@ Print_Chunk(struct chunk *c1,int offset)
|
||||
for(;i<offset;i++) putchar('-');
|
||||
putchar('>');
|
||||
for(;i<10;i++) putchar(' ');
|
||||
printf("%p %8ld %8lu %8lu %-8s %-8s 0x%02x ",
|
||||
printf("%p %8ld %8lu %8lu %-8s %-8s 0x%02x %s",
|
||||
c1, c1->offset, c1->size, c1->end, c1->name,
|
||||
chunk_n[c1->type],c1->subtype);
|
||||
if (c1->flags & CHUNK_ALIGN) putchar('=');
|
||||
if (c1->flags & CHUNK_PAST_1024) putchar('>');
|
||||
if (c1->flags & CHUNK_IS_ROOT) putchar('R');
|
||||
if (c1->flags & CHUNK_BAD144) putchar('B');
|
||||
if (c1->flags & CHUNK_BSD_COMPAT) putchar('C');
|
||||
chunk_n[c1->type],c1->subtype,
|
||||
ShowChunkFlags(c1));
|
||||
putchar('\n');
|
||||
Print_Chunk(c1->part,offset + 2);
|
||||
Print_Chunk(c1->next,offset);
|
||||
@ -354,6 +366,7 @@ Delete_Chunk(struct disk *d, struct chunk *c)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if 0
|
||||
int
|
||||
Collapse_Chunk(struct disk *d, struct chunk *c1)
|
||||
{
|
||||
@ -417,3 +430,4 @@ Collapse_Chunk(struct disk *d, struct chunk *c1)
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
@ -6,7 +6,7 @@
|
||||
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
|
||||
* ----------------------------------------------------------------------------
|
||||
*
|
||||
* $Id: create_chunk.c,v 1.19 1995/05/24 08:59:38 jkh Exp $
|
||||
* $Id: create_chunk.c,v 1.20.2.1 1995/05/31 23:53:45 jkh Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
@ -190,7 +190,7 @@ Create_Chunk_DWIM(struct disk *d, struct chunk *parent , u_long size, chunk_e ty
|
||||
warn("Not enough unused space");
|
||||
return 0;
|
||||
found:
|
||||
if (c1->flags & CHUNK_BAD144) {
|
||||
if (parent->flags & CHUNK_BAD144) {
|
||||
edge = c1->end - d->bios_sect - 127;
|
||||
if (offset > edge)
|
||||
return 0;
|
||||
|
@ -6,7 +6,7 @@
|
||||
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
|
||||
* ----------------------------------------------------------------------------
|
||||
*
|
||||
* $Id: disk.c,v 1.18 1995/05/08 02:08:28 phk Exp $
|
||||
* $Id: disk.c,v 1.19.2.2 1995/06/05 02:24:27 jkh Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
@ -199,6 +199,7 @@ Int_Open_Disk(char *name, u_long size)
|
||||
}
|
||||
close(fd);
|
||||
Fixup_Names(d);
|
||||
Bios_Limit_Chunk(d->chunks,1024*d->bios_hd*d->bios_sect);
|
||||
return d;
|
||||
}
|
||||
|
||||
@ -207,7 +208,9 @@ Debug_Disk(struct disk *d)
|
||||
{
|
||||
printf("Debug_Disk(%s)",d->name);
|
||||
printf(" flags=%lx",d->flags);
|
||||
#if 0
|
||||
printf(" real_geom=%lu/%lu/%lu",d->real_cyl,d->real_hd,d->real_sect);
|
||||
#endif
|
||||
printf(" bios_geom=%lu/%lu/%lu\n",d->bios_cyl,d->bios_hd,d->bios_sect);
|
||||
printf(" boot1=%p, boot2=%p, bootmgr=%p\n",
|
||||
d->boot1,d->boot2,d->bootmgr);
|
||||
@ -250,6 +253,7 @@ Clone_Disk(struct disk *d)
|
||||
return d2;
|
||||
}
|
||||
|
||||
#if 0
|
||||
void
|
||||
Collapse_Disk(struct disk *d)
|
||||
{
|
||||
@ -257,6 +261,7 @@ Collapse_Disk(struct disk *d)
|
||||
while(Collapse_Chunk(d,d->chunks))
|
||||
;
|
||||
}
|
||||
#endif
|
||||
|
||||
static char * device_list[] = {"wd","sd",0};
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
|
||||
* ----------------------------------------------------------------------------
|
||||
*
|
||||
* $Id: libdisk.h,v 1.17 1995/05/25 06:14:49 phk Exp $
|
||||
* $Id: libdisk.h,v 1.18.2.2 1995/06/05 02:24:32 jkh Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
@ -29,9 +29,11 @@ struct disk {
|
||||
char *name;
|
||||
u_long flags;
|
||||
# define DISK_ON_TRACK 1
|
||||
#if 0
|
||||
u_long real_cyl;
|
||||
u_long real_hd;
|
||||
u_long real_sect;
|
||||
#endif
|
||||
u_long bios_cyl;
|
||||
u_long bios_hd;
|
||||
u_long bios_sect;
|
||||
@ -103,11 +105,13 @@ Debug_Disk(struct disk *disk);
|
||||
/* Print the content of the tree to stdout
|
||||
*/
|
||||
|
||||
#if 0
|
||||
struct disk *
|
||||
Set_Phys_Geom(struct disk *disk, u_long cyl, u_long heads, u_long sects);
|
||||
/* Use a different physical geometry. Makes sense for ST506 disks only.
|
||||
* The tree returned is read from the disk, using this geometry.
|
||||
*/
|
||||
#endif
|
||||
|
||||
void
|
||||
Set_Bios_Geom(struct disk *disk, u_long cyl, u_long heads, u_long sects);
|
||||
@ -211,6 +215,14 @@ void
|
||||
MakeDevDisk(struct disk *d,char *path);
|
||||
/* Make device nodes for all chunks on this disk */
|
||||
|
||||
char *
|
||||
ShowChunkFlags(struct chunk *c);
|
||||
/* Return string to show flags. */
|
||||
|
||||
char *
|
||||
ChunkCanBeRoot(struct chunk *c);
|
||||
/* Return NULL if chunk can be /, explanation otherwise */
|
||||
|
||||
/*
|
||||
* Implementation details >>> DO NOT USE <<<
|
||||
*/
|
||||
|
@ -6,7 +6,7 @@
|
||||
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
|
||||
* ----------------------------------------------------------------------------
|
||||
*
|
||||
* $Id: rules.c,v 1.9 1995/05/08 01:34:31 phk Exp $
|
||||
* $Id: rules.c,v 1.10.2.1 1995/06/03 08:40:33 jkh Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
@ -179,22 +179,44 @@ Rule_003(struct disk *d, struct chunk *c, char *msg)
|
||||
/*
|
||||
* Rule#4:
|
||||
* Max seven 'part' as children of 'freebsd'
|
||||
* Max one FS_SWAP child per 'freebsd'
|
||||
* Max one CHUNK_IS_ROOT child per 'freebsd'
|
||||
* If Bad144, space for table must exist.
|
||||
* If Bad144 & root, bad144 table must be inside 1024
|
||||
*/
|
||||
void
|
||||
Rule_004(struct disk *d, struct chunk *c, char *msg)
|
||||
{
|
||||
int i=0,j=0,k=0;
|
||||
int i=0,k=0;
|
||||
struct chunk *c1;
|
||||
u_long l;
|
||||
|
||||
if (c->type != freebsd)
|
||||
return;
|
||||
|
||||
if (c->flags & CHUNK_BAD144) {
|
||||
l = c->end - 127 - d->bios_sect + 1;
|
||||
for (c1=c->part; c1; c1=c1->next) {
|
||||
if (c1->end < l || c1->type == unused)
|
||||
continue;
|
||||
sprintf(msg+strlen(msg),
|
||||
"Blocks %lu to %lu are needed for bad144 information, but isn't unused.\n",
|
||||
l, c->end);
|
||||
break;
|
||||
}
|
||||
if (c->flags & CHUNK_PAST_1024) {
|
||||
for (c1=c->part; c1; c1=c1->next) {
|
||||
if (c1->flags & CHUNK_IS_ROOT) {
|
||||
sprintf(msg+strlen(msg),
|
||||
"You have assigned root to a slice which uses bad144, and\n extends past the first 1023 cylinders, and thus cannot be booted from.\n");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (c1=c->part; c1; c1=c1->next) {
|
||||
if (c1->type != part)
|
||||
continue;
|
||||
if (c1->subtype == FS_SWAP)
|
||||
j++;
|
||||
if (c1->flags & CHUNK_IS_ROOT) {
|
||||
k++;
|
||||
if (c1->flags & CHUNK_PAST_1024)
|
||||
@ -205,15 +227,11 @@ Rule_004(struct disk *d, struct chunk *c, char *msg)
|
||||
}
|
||||
if (i > 7) {
|
||||
sprintf(msg+strlen(msg),
|
||||
"Max seven 'part' per 'freebsd' chunk\n");
|
||||
}
|
||||
if (j > 1) {
|
||||
sprintf(msg+strlen(msg),
|
||||
"Max one subtype=FS_SWAP child per 'freebsd' chunk\n");
|
||||
"Max seven partitions per freebsd slice\n");
|
||||
}
|
||||
if (k > 1) {
|
||||
sprintf(msg+strlen(msg),
|
||||
"Max one CHUNK_IS_ROOT child per 'freebsd' chunk\n");
|
||||
"Max one root partition child per freebsd slice\n");
|
||||
}
|
||||
}
|
||||
|
||||
@ -247,3 +265,52 @@ CheckRules(struct disk *d)
|
||||
return strdup(msg);
|
||||
return 0;
|
||||
}
|
||||
|
||||
char *
|
||||
ChunkCanBeRoot(struct chunk *c)
|
||||
{
|
||||
struct chunk *c1;
|
||||
struct disk *d = c->disk;
|
||||
char msg[BUFSIZ];
|
||||
|
||||
*msg = '\0';
|
||||
if (c->flags & CHUNK_PAST_1024) {
|
||||
strcat(msg,
|
||||
"The root partition must end before cylinder 1024 seen from\n");
|
||||
strcat(msg,
|
||||
"the BIOS' point of view, or it cannot be booted from.\n");
|
||||
return strdup(msg);
|
||||
}
|
||||
for (c1=d->chunks->part;;) {
|
||||
for (; c1; c1=c1->next)
|
||||
if (c1->offset <= c->offset && c1->end >= c->end)
|
||||
break;
|
||||
if (!c1) {
|
||||
strcat(msg,
|
||||
"Internal trouble, cannot find this chunk in the chunk-tree\n");
|
||||
return strdup(msg);
|
||||
}
|
||||
if (c1->type == freebsd)
|
||||
break;
|
||||
c1 = c1->part;
|
||||
}
|
||||
|
||||
if (c1->type != freebsd) {
|
||||
strcat(msg,
|
||||
"The root partition must be in a FreeBSD slice, otherwise\n");
|
||||
strcat(msg,
|
||||
"the kernel cannot be booted from it\n");
|
||||
return strdup(msg);
|
||||
}
|
||||
|
||||
if ((c1->flags & CHUNK_BAD144) && (c1->flags & CHUNK_PAST_1024)) {
|
||||
strcat(msg,
|
||||
"This partition is unsuitable for root, because the FreeBSD slice\n");
|
||||
strcat(msg,
|
||||
"it is inside has bad144 enabled, but the badblock data lives past\n");
|
||||
strcat(msg,
|
||||
"the 1024th cylinder, and the bootblocks cannot get to it there.\n");
|
||||
return strdup(msg);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
@ -6,7 +6,7 @@
|
||||
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
|
||||
* ----------------------------------------------------------------------------
|
||||
*
|
||||
* $Id: tst01.c,v 1.13 1995/05/12 18:50:00 phk Exp $
|
||||
* $Id: tst01.c,v 1.14.2.1 1995/06/05 02:24:35 jkh Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
@ -199,6 +199,7 @@ main(int argc, char **argv)
|
||||
strtol(cmds[3],0,0));
|
||||
continue;
|
||||
}
|
||||
#if 0
|
||||
if (!strcasecmp(*cmds,"phys") && ncmd == 4) {
|
||||
d = Set_Phys_Geom(d,
|
||||
strtol(cmds[1],0,0),
|
||||
@ -206,6 +207,8 @@ main(int argc, char **argv)
|
||||
strtol(cmds[3],0,0));
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
#if 0
|
||||
if (!strcasecmp(*cmds,"collapse")) {
|
||||
if (cmds[1])
|
||||
while (Collapse_Chunk(d,
|
||||
@ -215,6 +218,7 @@ main(int argc, char **argv)
|
||||
Collapse_Disk(d);
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
if (!strcasecmp(*cmds,"list")) {
|
||||
cp = Disk_Names();
|
||||
printf("Disks:");
|
||||
@ -279,13 +283,17 @@ main(int argc, char **argv)
|
||||
printf("\tbios cyl hd sect\n");
|
||||
printf("\tboot\n");
|
||||
printf("\tbteasy17\n");
|
||||
#if 0
|
||||
printf("\tcollapse [pointer]\n");
|
||||
#endif
|
||||
printf("\tcreate offset size enum subtype flags\n");
|
||||
printf("\t\tsubtype(part): swap=1, ffs=7\n");
|
||||
printf("\tdelete pointer\n");
|
||||
printf("\tlist\n");
|
||||
printf("\tmbr\n");
|
||||
#if 0
|
||||
printf("\tphys cyl hd sect\n");
|
||||
#endif
|
||||
printf("\tquit\n");
|
||||
printf("\tread [disk]\n");
|
||||
printf("\tscan\n");
|
||||
|
@ -6,7 +6,7 @@
|
||||
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
|
||||
* ----------------------------------------------------------------------------
|
||||
*
|
||||
* $Id: write_disk.c,v 1.12 1995/05/24 08:59:40 jkh Exp $
|
||||
* $Id: write_disk.c,v 1.13.2.1 1995/06/05 02:24:37 jkh Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
@ -69,9 +69,15 @@ Write_FreeBSD(int fd, struct disk *new, struct disk *old, struct chunk *c1)
|
||||
|
||||
dl->d_secsize = 512;
|
||||
dl->d_secperunit = new->chunks->size;
|
||||
#if 0
|
||||
dl->d_secpercyl = new->real_cyl ? new->real_cyl : new->bios_cyl;
|
||||
dl->d_ntracks = new->real_hd ? new->real_hd : new->bios_hd;
|
||||
dl->d_nsectors = new->real_sect ? new->real_sect : new->bios_sect;
|
||||
#else
|
||||
dl->d_secpercyl = new->bios_cyl;
|
||||
dl->d_ntracks = new->bios_hd;
|
||||
dl->d_nsectors = new->bios_sect;
|
||||
#endif
|
||||
dl->d_secpercyl = dl->d_ntracks * dl->d_nsectors;
|
||||
|
||||
dl->d_npartitions = MAXPARTITIONS;
|
||||
|
@ -1,10 +1,10 @@
|
||||
# $Id: boot_crunch.conf,v 1.18 1995/05/29 00:49:54 jkh Exp $
|
||||
# $Id: boot_crunch.conf,v 1.19.2.1 1995/06/04 11:52:44 jkh Exp $
|
||||
|
||||
srcdirs /usr/src/bin /usr/src/sbin /usr/src/release /usr/src/usr.bin
|
||||
srcdirs /usr/src/gnu/usr.bin /usr/src/usr.sbin /usr/src/sbin/i386
|
||||
|
||||
progs sh find
|
||||
progs ping ppp
|
||||
progs ft ppp
|
||||
progs sysinstall newfs gzip cpio bad144 fsck ifconfig route slattach
|
||||
progs mount_nfs
|
||||
ln gzip gunzip
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $Id: root_crunch.conf,v 1.3 1995/05/27 20:49:59 jkh Exp $
|
||||
# $Id: root_crunch.conf,v 1.4.2.2 1995/06/01 05:54:37 jkh Exp $
|
||||
|
||||
# first, we list the source dirs that our programs reside in. These are
|
||||
# searched in order listed to find the dir containing each program.
|
||||
@ -28,9 +28,7 @@ ln reboot halt
|
||||
|
||||
# /usr/bin stuff
|
||||
|
||||
progs tar ncftp rsh sed telnet rlogin
|
||||
#progs tip
|
||||
#ln tip cu
|
||||
progs tar ftp rsh sed telnet rlogin
|
||||
|
||||
# finally, we specify the libraries to link in with our binary
|
||||
libs -lcrypt -ltelnet -lutil -ll -ledit
|
||||
|
@ -1,2 +1,7 @@
|
||||
#!/bin/sh
|
||||
ls $1.* | wc | awk '{ print "Pieces = ",$1 }'
|
||||
for FILE in $1.*; do \
|
||||
PIECE=`echo $FILE | cut -d . -f 2` ; \
|
||||
echo -n "cksum.$PIECE = "; \
|
||||
cksum $FILE | awk ' { print $1,$2 } '
|
||||
done
|
||||
|
@ -4,13 +4,13 @@ CLEANFILES= makedevs.c rtermcap
|
||||
|
||||
.PATH: ${.CURDIR}/../disklabel ${.CURDIR}/../../usr.bin/cksum
|
||||
|
||||
SRCS= attr.c cdrom.c command.c config.c crc.c decode.c devices.c disks.c dist.c \
|
||||
SRCS= attr.c cdrom.c command.c config.c decode.c devices.c disks.c dist.c \
|
||||
dmenu.c dos.c floppy.c ftp.c ftp_strat.c globals.c install.c label.c lang.c \
|
||||
main.c makedevs.c media.c menus.c misc.c msg.c network.c nfs.c system.c tape.c \
|
||||
tcpip.c termcap.c ufs.c variable.c wizard.c
|
||||
|
||||
|
||||
CFLAGS+= -Wall -g -I${.CURDIR}/../libdisk \
|
||||
CFLAGS+= -Wall -I${.CURDIR}/../libdisk \
|
||||
-I${.CURDIR}/../../gnu/lib/libdialog
|
||||
|
||||
LDADD= -ldialog -lncurses -lmytinfo -lutil
|
||||
@ -22,30 +22,15 @@ LDADD+= -L${.CURDIR}/../libdisk -ldisk
|
||||
|
||||
DPADD= ${LIBDIALOG} ${LIBNCURSES} ${LIBMYTINFO} ${LIBUTIL}
|
||||
|
||||
.if exists(${.CURDIR}/../../sys/i386/boot/biosboot/obj)
|
||||
BOOTS=${.CURDIR}/../../sys/i386/boot/biosboot/obj
|
||||
.else
|
||||
BOOTS=${.CURDIR}/../../sys/i386/boot/biosboot
|
||||
.endif
|
||||
|
||||
.if exists(${.CURDIR}/../../share/syscons/scrnmaps/obj)
|
||||
MKSCRNMAP=${.CURDIR}/../../share/syscons/scrnmaps/obj/koi8-r2cp866.mk
|
||||
.else
|
||||
MKSCRNMAP=${.CURDIR}/../../share/syscons/scrnmaps/koi8-r2cp866.mk
|
||||
.endif
|
||||
|
||||
makedevs.c: dev2c.sh Makefile rtermcap
|
||||
makedevs.c: Makefile rtermcap
|
||||
rm -f makedevs.tmp
|
||||
mkdir -p dev
|
||||
echo '#include <sys/types.h>' > makedevs.tmp
|
||||
cp ${.CURDIR}/../../etc/etc.i386/MAKEDEV dev
|
||||
( cd dev; sh ./MAKEDEV all )
|
||||
sh ${.CURDIR}/dev2c.sh dev > makedevs.tmp
|
||||
rm -rf dev
|
||||
uudecode < ${.CURDIR}/bteasy17.uu
|
||||
file2c 'const unsigned char boot0[] = {' '};' \
|
||||
< bteasy17 >> makedevs.tmp
|
||||
rm -rf bteasy17
|
||||
./rtermcap cons25 | \
|
||||
file2c 'const char termcap_cons25[] = {' ',0};' \
|
||||
>> makedevs.tmp
|
||||
|
@ -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: attr.c,v 1.1 1995/05/27 10:38:41 jkh Exp $
|
||||
* $Id: attr.c,v 1.2.2.4 1995/06/06 00:44:51 jkh Exp $
|
||||
*
|
||||
* Copyright (c) 1995
|
||||
* Jordan Hubbard. All rights reserved.
|
||||
@ -157,11 +157,23 @@ attr_match(Attribs *attr, char *name)
|
||||
{
|
||||
int n = 0;
|
||||
|
||||
while((strcasecmp(attr[n].name, name)!=0) && (n < num_attribs) && (n < 20))
|
||||
n++;
|
||||
if (isDebug())
|
||||
msgDebug("Trying to match attribute `%s'\n", name);
|
||||
|
||||
if (strcasecmp(attr[n].name, name)==0)
|
||||
while ((n < num_attribs) && (strcasecmp(attr[n].name, name) != 0)) {
|
||||
if (isDebug())
|
||||
msgDebug("Skipping attribute %u\n", n);
|
||||
n++;
|
||||
}
|
||||
|
||||
if (isDebug())
|
||||
msgDebug("Stopped on attribute %u\n", n);
|
||||
|
||||
if (n < num_attribs) {
|
||||
if (isDebug())
|
||||
msgDebug("Returning `%s'\n", attr[n].value);
|
||||
return((const char *) attr[n].value);
|
||||
}
|
||||
|
||||
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: cdrom.c,v 1.5 1995/05/29 11:01:03 jkh Exp $
|
||||
* $Id: cdrom.c,v 1.6.2.3 1995/06/05 12:03:44 jkh Exp $
|
||||
*
|
||||
* Copyright (c) 1995
|
||||
* Jordan Hubbard. All rights reserved.
|
||||
@ -101,7 +101,7 @@ mediaInitCDROM(Device *dev)
|
||||
}
|
||||
|
||||
int
|
||||
mediaGetCDROM(char *file)
|
||||
mediaGetCDROM(Device *dev, char *file, Attribs *dist_attrs)
|
||||
{
|
||||
char buf[PATH_MAX];
|
||||
|
||||
@ -118,7 +118,7 @@ mediaShutdownCDROM(Device *dev)
|
||||
if (!cdromMounted)
|
||||
return;
|
||||
msgDebug("Unmounting /cdrom\n");
|
||||
if (unmount("/cdrom", 0) != 0)
|
||||
if (unmount("/cdrom", MNT_FORCE) != 0)
|
||||
msgConfirm("Could not unmount the CDROM: %s\n", strerror(errno));
|
||||
msgDebug("Unmount returned\n");
|
||||
cdromMounted = FALSE;
|
||||
|
@ -4,7 +4,7 @@
|
||||
* This is probably the last program in the `sysinstall' line - the next
|
||||
* generation being essentially a complete rewrite.
|
||||
*
|
||||
* $Id: config.c,v 1.14 1995/05/29 13:37:41 jkh Exp $
|
||||
* $Id: config.c,v 1.15.2.28 1995/06/10 08:24:28 jkh Exp $
|
||||
*
|
||||
* Copyright (c) 1995
|
||||
* Jordan Hubbard. All rights reserved.
|
||||
@ -83,10 +83,10 @@ nameof(Chunk *c1)
|
||||
static char *
|
||||
mount_point(Chunk *c1)
|
||||
{
|
||||
if (c1->type == fat || (c1->type == part && c1->subtype != FS_SWAP))
|
||||
return ((PartInfo *)c1->private)->mountpoint;
|
||||
else if (c1->type == part && c1->subtype == FS_SWAP)
|
||||
if (c1->type == part && c1->subtype == FS_SWAP)
|
||||
return "none";
|
||||
else if (c1->type == part || c1->type == fat)
|
||||
return ((PartInfo *)c1->private)->mountpoint;
|
||||
return "/bogus";
|
||||
}
|
||||
|
||||
@ -101,7 +101,7 @@ fstype(Chunk *c1)
|
||||
else
|
||||
return "swap";
|
||||
}
|
||||
return "bogfs";
|
||||
return "bogus";
|
||||
}
|
||||
|
||||
static char *
|
||||
@ -121,14 +121,10 @@ fstype_short(Chunk *c1)
|
||||
static int
|
||||
seq_num(Chunk *c1)
|
||||
{
|
||||
if (c1->type == part) {
|
||||
if (c1->subtype != FS_SWAP)
|
||||
if (c1->type == part && c1->subtype != FS_SWAP)
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
void
|
||||
configFstab(void)
|
||||
@ -139,6 +135,12 @@ configFstab(void)
|
||||
int i, cnt;
|
||||
Chunk *c1, *c2;
|
||||
|
||||
if (!RunningAsInit) {
|
||||
if (file_readable("/etc/fstab"))
|
||||
return;
|
||||
else
|
||||
msgConfirm("Attempting to rebuild your /etc/fstab file.\nWarning: If you had any CD devices in use before running\nsysinstall then they may NOT be found in this run!");
|
||||
}
|
||||
devs = deviceFind(NULL, DEVICE_TYPE_DISK);
|
||||
if (!devs) {
|
||||
msgConfirm("No disks found!");
|
||||
@ -146,6 +148,7 @@ configFstab(void)
|
||||
}
|
||||
|
||||
/* Record all the chunks */
|
||||
nchunks = 0;
|
||||
for (i = 0; devs[i]; i++) {
|
||||
if (!devs[i]->enabled)
|
||||
continue;
|
||||
@ -155,11 +158,11 @@ configFstab(void)
|
||||
for (c1 = disk->chunks->part; c1; c1 = c1->next) {
|
||||
if (c1->type == freebsd) {
|
||||
for (c2 = c1->part; c2; c2 = c2->next) {
|
||||
if (c2->type == part && c2->private)
|
||||
if (c2->type == part && (c2->subtype == FS_SWAP || c2->private))
|
||||
chunk_list[nchunks++] = c2;
|
||||
}
|
||||
}
|
||||
else if (c1->type == fat)
|
||||
else if (c1->type == fat && c1->private)
|
||||
chunk_list[nchunks++] = c1;
|
||||
}
|
||||
}
|
||||
@ -175,14 +178,11 @@ configFstab(void)
|
||||
|
||||
/* Go for the burn */
|
||||
msgDebug("Generating /etc/fstab file\n");
|
||||
for (i = 0; i < nchunks; i++) {
|
||||
fprintf(fstab, "/dev/%s\t\t\t%s\t\t%s %s %d %d\n", nameof(chunk_list[i]), mount_point(chunk_list[i]),
|
||||
fstype(chunk_list[i]), fstype_short(chunk_list[i]), seq_num(chunk_list[i]),
|
||||
seq_num(chunk_list[i]));
|
||||
}
|
||||
|
||||
for (i = 0; i < nchunks; i++)
|
||||
fprintf(fstab, "/dev/%s\t\t\t%s\t\t%s\t%s %d %d\n", nameof(chunk_list[i]), mount_point(chunk_list[i]),
|
||||
fstype(chunk_list[i]), fstype_short(chunk_list[i]), seq_num(chunk_list[i]), seq_num(chunk_list[i]));
|
||||
Mkdir("/proc", NULL);
|
||||
fprintf(fstab, "proc\t\t\t\t/proc\t\tprocfs rw 0 0\n");
|
||||
fprintf(fstab, "proc\t\t\t\t/proc\t\tprocfs\trw 0 0\n");
|
||||
|
||||
/* Now look for the CDROMs */
|
||||
devs = deviceFind(NULL, DEVICE_TYPE_CDROM);
|
||||
@ -191,7 +191,7 @@ configFstab(void)
|
||||
/* Write the first one out as /cdrom */
|
||||
if (cnt) {
|
||||
Mkdir("/cdrom", NULL);
|
||||
fprintf(fstab, "/dev/%s\t\t\t/cdrom\t\tcd9660 ro 0 0\n", devs[0]->name);
|
||||
fprintf(fstab, "/dev/%s\t\t\t/cdrom\t\tcd9660\tro 0 0\n", devs[0]->name);
|
||||
}
|
||||
|
||||
/* Write the others out as /cdrom<n> */
|
||||
@ -200,9 +200,11 @@ configFstab(void)
|
||||
|
||||
sprintf(cdname, "/cdrom%d", i);
|
||||
Mkdir(cdname, NULL);
|
||||
fprintf(fstab, "/dev/%s\t\t\t%s\t\tcd9660 ro 0 0\n", devs[i]->name, cdname);
|
||||
fprintf(fstab, "/dev/%s\t\t\t%s\t\tcd9660\tro 0 0\n", devs[i]->name, cdname);
|
||||
}
|
||||
fclose(fstab);
|
||||
if (isDebug())
|
||||
msgDebug("Wrote out /etc/fstab file\n");
|
||||
}
|
||||
|
||||
/*
|
||||
@ -266,7 +268,7 @@ configSysconfig(void)
|
||||
devp = deviceFind(NULL, DEVICE_TYPE_NETWORK);
|
||||
cnt = deviceCount(devp);
|
||||
for (j = 0; j < cnt; j++) {
|
||||
if (devp[j]->private) {
|
||||
if (devp[j]->private && strncmp(devp[j]->name, "cuaa", 4)) {
|
||||
char iname[64];
|
||||
|
||||
snprintf(iname, 64, "%s%s", VAR_IFCONFIG, devp[j]->name);
|
||||
@ -277,6 +279,12 @@ configSysconfig(void)
|
||||
}
|
||||
}
|
||||
fclose(fp);
|
||||
|
||||
/* If we're an NFS server, we need an exports file */
|
||||
if (getenv("nfs_server") && !file_readable("/etc/exports")) {
|
||||
msgConfirm("You have chosen to be an NFS server but have not yet configured\nthe /etc/exports file. The format for an exports entry is:\n <mountpoint> <opts> <host [..host]>\nWhere <mounpoint> is the name of a filesystem as specified\nin the Label editor, <opts> is a list of special options we\nwon't concern ourselves with here (``man exports'' when the\nsystem is fully installed) and <host> is one or more host\nnames who are allowed to mount this file system. Press\n[ENTER] now to invoke the editor on /etc/exports");
|
||||
systemExecute("vi /etc/exports");
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
@ -290,14 +298,30 @@ configSaverTimeout(char *str)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
configNTP(char *str)
|
||||
{
|
||||
char *val;
|
||||
|
||||
val = msgGetInput(NULL, "Enter the name of an NTP server");
|
||||
if (val)
|
||||
variable_set2("ntpdate", val);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
configResolv(void)
|
||||
{
|
||||
FILE *fp;
|
||||
char *cp;
|
||||
|
||||
if (!getenv(VAR_DOMAINNAME) || !getenv(VAR_NAMESERVER)) {
|
||||
msgConfirm("Warning: You haven't set a domain name or nameserver. You will need\nto configure your /etc/resolv.conf file manually to fully use network services.");
|
||||
if (!RunningAsInit && file_readable("/etc/resolv.conf"))
|
||||
return;
|
||||
|
||||
if (!getenv(VAR_NAMESERVER)) {
|
||||
if (mediaDevice && (mediaDevice->type == DEVICE_TYPE_NFS || mediaDevice->type == DEVICE_TYPE_FTP))
|
||||
msgConfirm("Warning: Missing name server value - network operations\nmay fail as a result!");
|
||||
goto skip;
|
||||
}
|
||||
Mkdir("/etc", NULL);
|
||||
fp = fopen("/etc/resolv.conf", "w");
|
||||
@ -305,9 +329,34 @@ configResolv(void)
|
||||
msgConfirm("Unable to open /etc/resolv.conf! You will need to do this manually.");
|
||||
return;
|
||||
}
|
||||
if (getenv(VAR_DOMAINNAME))
|
||||
fprintf(fp, "domain\t%s\n", getenv(VAR_DOMAINNAME));
|
||||
fprintf(fp, "nameserver\t%s\n", getenv(VAR_NAMESERVER));
|
||||
fclose(fp);
|
||||
if (isDebug())
|
||||
msgDebug("Wrote out /etc/resolv.conf\n");
|
||||
|
||||
skip:
|
||||
/* Tack ourselves at the end of /etc/hosts */
|
||||
cp = getenv(VAR_IPADDR);
|
||||
if (cp && *cp != '0' && getenv(VAR_HOSTNAME)) {
|
||||
fp = fopen("/etc/hosts", "a");
|
||||
fprintf(fp, "%s\t\t%s\n", cp, getenv(VAR_HOSTNAME));
|
||||
fclose(fp);
|
||||
if (isDebug())
|
||||
msgDebug("Appended entry for %s to /etc/hosts\n", cp);
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
configRoutedFlags(char *str)
|
||||
{
|
||||
char *val;
|
||||
|
||||
val = msgGetInput("-q", "Specify the flags for routed; -q is the default, -s is\na good choice for gateway machines.");
|
||||
if (val)
|
||||
variable_set2("routedflags", val);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
@ -317,40 +366,27 @@ configPackages(char *str)
|
||||
pid_t pid;
|
||||
Boolean onCD;
|
||||
|
||||
onCD = FALSE;
|
||||
msgConfirm("Warning: This utility (pkg_manage) is still somewhat experimental\nand may not function for all packages. If it fails to load the\npackages you want, try running it directly once the system is up or use the\npkg_add, pkg_info and pkg_delete utilities directly.");
|
||||
i = -1;
|
||||
if (!mediaDevice || mediaDevice->type != DEVICE_TYPE_CDROM) {
|
||||
if (getpid() == 1) {
|
||||
if (!mediaSetCDROM(NULL))
|
||||
onCD = FALSE;
|
||||
else
|
||||
/* If we're running as init, we know that a CD in the drive is probably ours */
|
||||
onCD = file_readable("/cdrom/packages");
|
||||
if (!onCD && RunningAsInit) {
|
||||
if (mediaSetCDROM(NULL)) {
|
||||
if ((*mediaDevice->init)(mediaDevice))
|
||||
onCD = TRUE;
|
||||
}
|
||||
else
|
||||
onCD = FALSE;
|
||||
}
|
||||
else if (mediaDevice && mediaDevice->type == DEVICE_TYPE_CDROM)
|
||||
onCD = TRUE;
|
||||
if (onCD) {
|
||||
|
||||
if (!(pid = fork())) {
|
||||
execl("/stand/sh", "sh", "-c", "pkg_manage /cdrom", (char *)NULL);
|
||||
if (onCD && chdir("/cdrom/packages/All"))
|
||||
exit(1);
|
||||
execl("/usr/sbin/pkg_manage", "/usr/sbin/pkg_manage", (char *)NULL);
|
||||
exit(1);
|
||||
}
|
||||
else {
|
||||
pid = waitpid(pid, (int *)&pstat, 0);
|
||||
i = (pid == -1) ? -1 : WEXITSTATUS(pstat);
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (!(pid = fork())) {
|
||||
execl("/stand/sh", "sh", "-c", "pkg_manage", (char *)NULL);
|
||||
exit(1);
|
||||
}
|
||||
else {
|
||||
pid = waitpid(pid, (int *)&pstat, 0);
|
||||
i = (pid == -1) ? -1 : WEXITSTATUS(pstat);
|
||||
}
|
||||
}
|
||||
if (i != 0 && isDebug())
|
||||
msgDebug("pkg_manage returns status of %d\n", i);
|
||||
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: decode.c,v 1.4 1995/05/17 14:39:35 jkh Exp $
|
||||
* $Id: decode.c,v 1.5.2.3 1995/06/02 15:30:47 jkh Exp $
|
||||
*
|
||||
* Copyright (c) 1995
|
||||
* Jordan Hubbard. All rights reserved.
|
||||
@ -49,7 +49,7 @@ decode(DMenu *menu, char *name)
|
||||
DMenuItem *tmp;
|
||||
|
||||
for (tmp = menu->items; tmp->title; tmp++)
|
||||
if (!strcmp(name, (*tmp->title == '*') ? tmp->title + 1 : tmp->title))
|
||||
if (!strcmp(name, tmp->title))
|
||||
break;
|
||||
if (!tmp->title)
|
||||
return NULL;
|
||||
@ -62,11 +62,6 @@ dispatch(DMenuItem *tmp, char *name)
|
||||
Boolean failed = FALSE;
|
||||
|
||||
switch (tmp->type) {
|
||||
/* User whapped ESC twice and wants a sub-shell */
|
||||
case DMENU_SHELL_ESCAPE:
|
||||
systemShellEscape();
|
||||
break;
|
||||
|
||||
/* We want to simply display a file */
|
||||
case DMENU_DISPLAY_FILE:
|
||||
systemDisplayFile((char *)tmp->ptr);
|
||||
@ -74,7 +69,7 @@ dispatch(DMenuItem *tmp, char *name)
|
||||
|
||||
/* It's a sub-menu; recurse on it */
|
||||
case DMENU_SUBMENU:
|
||||
dmenuOpenSimple((DMenu *)tmp->ptr);
|
||||
(void)dmenuOpenSimple((DMenu *)tmp->ptr);
|
||||
break;
|
||||
|
||||
/* Execute it as a system command */
|
||||
@ -105,6 +100,10 @@ dispatch(DMenuItem *tmp, char *name)
|
||||
*((unsigned int *)tmp->ptr) |= tmp->parm;
|
||||
break;
|
||||
|
||||
case DMENU_SET_VALUE:
|
||||
*((unsigned int *)tmp->ptr) = tmp->parm;
|
||||
break;
|
||||
|
||||
case DMENU_NOP:
|
||||
break;
|
||||
|
||||
@ -122,6 +121,15 @@ decode_and_dispatch_multiple(DMenu *menu, char *names)
|
||||
|
||||
string_prune(names);
|
||||
names = string_skipwhite(names);
|
||||
|
||||
/* KLUDGE ALERT:
|
||||
* To make multi-choice flag arrays work this assumes that ALL items in
|
||||
* a menu appear in the same mask!! If you need mixed masks, use
|
||||
* submenus.
|
||||
*/
|
||||
if (menu->items[0].type == DMENU_SET_FLAG)
|
||||
*((unsigned int *)menu->items[0].ptr) = 0;
|
||||
|
||||
while (names) {
|
||||
char *cp;
|
||||
|
||||
|
@ -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.34 1995/05/29 11:01:08 jkh Exp $
|
||||
* $Id: devices.c,v 1.35.2.9 1995/06/05 12:03:46 jkh Exp $
|
||||
*
|
||||
* Copyright (c) 1995
|
||||
* Jordan Hubbard. All rights reserved.
|
||||
@ -88,14 +88,15 @@ static struct {
|
||||
{ DEVICE_TYPE_TAPE, "wt0", "Wangtek tape drive" },
|
||||
{ DEVICE_TYPE_DISK, "sd", "SCSI disk device" },
|
||||
{ DEVICE_TYPE_DISK, "wd", "IDE/ESDI/MFM/ST506 disk device" },
|
||||
{ DEVICE_TYPE_FLOPPY, "rfd0", "floppy drive unit A" },
|
||||
{ DEVICE_TYPE_FLOPPY, "rfd1", "floppy drive unit B" },
|
||||
{ DEVICE_TYPE_FLOPPY, "fd0", "floppy drive unit A" },
|
||||
{ DEVICE_TYPE_FLOPPY, "fd1", "floppy drive unit B" },
|
||||
{ DEVICE_TYPE_NETWORK, "cuaa0", "Serial port (COM1) - possible PPP/SLIP device" },
|
||||
{ DEVICE_TYPE_NETWORK, "cuaa1", "Serial port (COM2) - possible PPP/SLIP device" },
|
||||
{ DEVICE_TYPE_NETWORK, "lp0", "Parallel Port IP (PLIP) using laplink cable" },
|
||||
{ DEVICE_TYPE_NETWORK, "lo", "Loop-back (local) network interface" },
|
||||
{ DEVICE_TYPE_NETWORK, "sl", "Serial-line IP (SLIP) interface" },
|
||||
{ DEVICE_TYPE_NETWORK, "ppp", "Point-to-Point Protocol (PPP) interface" },
|
||||
{ DEVICE_TYPE_NETWORK, "de", "DEC DE435 PCI NIC or other DC21040-AA based card" },
|
||||
{ DEVICE_TYPE_NETWORK, "ed", "WD/SMC 80xx; Novell NE1000/2000; 3Com 3C503 cards" },
|
||||
{ DEVICE_TYPE_NETWORK, "ep", "3Com 3C509 ethernet card" },
|
||||
{ DEVICE_TYPE_NETWORK, "el", "3Com 3C501 ethernet card" },
|
||||
@ -115,13 +116,39 @@ new_device(char *name)
|
||||
Device *dev;
|
||||
|
||||
dev = safe_malloc(sizeof(Device));
|
||||
bzero(dev, sizeof(Device));
|
||||
if (name)
|
||||
strcpy(dev->name, name);
|
||||
else
|
||||
dev->name[0] = '\0';
|
||||
return dev;
|
||||
}
|
||||
|
||||
/* Stubs for unimplemented strategy routines */
|
||||
Boolean
|
||||
dummyInit(Device *dev)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
int
|
||||
dummyGet(Device *dev, char *dist, Attribs *dist_attrs)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
Boolean
|
||||
dummyClose(Device *dev, int fd)
|
||||
{
|
||||
if (!close(fd))
|
||||
return TRUE;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void
|
||||
dummyShutdown(Device *dev)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
static int
|
||||
deviceTry(char *name, char *try)
|
||||
{
|
||||
@ -136,17 +163,11 @@ deviceTry(char *name, char *try)
|
||||
return fd;
|
||||
}
|
||||
|
||||
static void
|
||||
deviceDiskFree(Device *dev)
|
||||
{
|
||||
Free_Disk(dev->private);
|
||||
}
|
||||
|
||||
/* Register a new device in the devices array */
|
||||
Device *
|
||||
deviceRegister(char *name, char *desc, char *devname, DeviceType type, Boolean enabled,
|
||||
Boolean (*init)(Device *), int (*get)(char *), Boolean (*close)(Device *, int),
|
||||
void (*shutdown)(Device *), void *private)
|
||||
Boolean (*init)(Device *), int (*get)(Device *, char *, Attribs *),
|
||||
Boolean (*close)(Device *, int), void (*shutdown)(Device *), void *private)
|
||||
{
|
||||
Device *newdev;
|
||||
|
||||
@ -157,10 +178,10 @@ deviceRegister(char *name, char *desc, char *devname, DeviceType type, Boolean e
|
||||
newdev->devname = devname;
|
||||
newdev->type = type;
|
||||
newdev->enabled = enabled;
|
||||
newdev->init = init;
|
||||
newdev->get = get;
|
||||
newdev->close = close;
|
||||
newdev->shutdown = shutdown;
|
||||
newdev->init = init ? init : dummyInit;
|
||||
newdev->get = get ? get : dummyGet;
|
||||
newdev->close = close ? close : dummyClose;
|
||||
newdev->shutdown = shutdown ? shutdown : dummyShutdown;
|
||||
newdev->private = private;
|
||||
Devices[numDevs] = newdev;
|
||||
Devices[++numDevs] = NULL;
|
||||
@ -197,9 +218,11 @@ deviceGetAll(void)
|
||||
for (c1 = d->chunks->part; c1; c1 = c1->next) {
|
||||
if (c1->type == fat) {
|
||||
Device *dev;
|
||||
char devname[80];
|
||||
|
||||
/* Got one! */
|
||||
dev = deviceRegister(c1->name, c1->name, c1->name, DEVICE_TYPE_DOS, TRUE,
|
||||
sprintf(devname, "/dev/%s", c1->name);
|
||||
dev = deviceRegister(c1->name, c1->name, strdup(devname), DEVICE_TYPE_DOS, TRUE,
|
||||
mediaInitDOS, mediaGetDOS, NULL, mediaShutdownDOS, NULL);
|
||||
dev->private = c1;
|
||||
msgDebug("Found a DOS partition %s on drive %s\n", c1->name, d->name);
|
||||
@ -355,8 +378,7 @@ deviceCreateMenu(DMenu *menu, DeviceType type, int (*hook)())
|
||||
for (i = 0; devs[i]; i++) {
|
||||
tmp->items[i].title = devs[i]->name;
|
||||
for (j = 0; device_names[j].name; j++) {
|
||||
if (!strncmp(devs[i]->name, device_names[j].name,
|
||||
strlen(device_names[j].name))) {
|
||||
if (!strncmp(devs[i]->name, device_names[j].name, strlen(device_names[j].name))) {
|
||||
tmp->items[i].prompt = device_names[j].description;
|
||||
break;
|
||||
}
|
||||
@ -366,6 +388,7 @@ deviceCreateMenu(DMenu *menu, DeviceType type, int (*hook)())
|
||||
tmp->items[i].type = DMENU_CALL;
|
||||
tmp->items[i].ptr = hook;
|
||||
tmp->items[i].disabled = FALSE;
|
||||
tmp->items[i].check = NULL;
|
||||
}
|
||||
tmp->items[i].type = DMENU_NOP;
|
||||
tmp->items[i].title = NULL;
|
||||
|
@ -4,7 +4,7 @@
|
||||
* This is probably the last program in the `sysinstall' line - the next
|
||||
* generation being essentially a complete rewrite.
|
||||
*
|
||||
* $Id: disks.c,v 1.29 1995/05/28 20:28:09 jkh Exp $
|
||||
* $Id: disks.c,v 1.30.2.7 1995/06/08 09:48:31 jkh Exp $
|
||||
*
|
||||
* Copyright (c) 1995
|
||||
* Jordan Hubbard. All rights reserved.
|
||||
@ -79,11 +79,14 @@ print_chunks(Disk *d)
|
||||
int row;
|
||||
int i;
|
||||
|
||||
if ((!d->bios_cyl || d->bios_cyl > 65536) || (!d->bios_hd || d->bios_hd > 256) || (!d->bios_sect || d->bios_sect >= 64))
|
||||
msgConfirm("WARNING: The detected geometry is incorrect! Please adjust it to\nthe correct values manually with the (G)eometry command. If you are\nunsure about the correct geometry (which may be \"translated\"), please\nconsult the Hardware Guide in the Documentation submenu.");
|
||||
|
||||
attrset(A_NORMAL);
|
||||
mvaddstr(0, 0, "Disk name:\t");
|
||||
clrtobot();
|
||||
attrset(A_REVERSE); addstr(d->name); attrset(A_NORMAL);
|
||||
attrset(A_REVERSE); mvaddstr(0, 55, "Master Partition Editor"); attrset(A_NORMAL);
|
||||
attrset(A_REVERSE); mvaddstr(0, 55, "FDISK Partition Editor"); attrset(A_NORMAL);
|
||||
mvprintw(1, 0,
|
||||
"BIOS Geometry:\t%lu cyls/%lu heads/%lu sectors",
|
||||
d->bios_cyl, d->bios_hd, d->bios_sect);
|
||||
@ -93,11 +96,11 @@ print_chunks(Disk *d)
|
||||
for (i = 0, row = CHUNK_START_ROW; chunk_info[i]; i++, row++) {
|
||||
if (i == current_chunk)
|
||||
attrset(A_REVERSE);
|
||||
mvprintw(row, 2, "%10ld %10lu %10lu %8s %8d %8s %8d %6lx",
|
||||
mvprintw(row, 2, "%10ld %10lu %10lu %8s %8d %8s %8d\t%-6s",
|
||||
chunk_info[i]->offset, chunk_info[i]->size,
|
||||
chunk_info[i]->end, chunk_info[i]->name,
|
||||
chunk_info[i]->type, chunk_n[chunk_info[i]->type],
|
||||
chunk_info[i]->subtype, chunk_info[i]->flags);
|
||||
chunk_info[i]->subtype, ShowChunkFlags(chunk_info[i]));
|
||||
if (i == current_chunk)
|
||||
attrset(A_NORMAL);
|
||||
}
|
||||
@ -109,7 +112,7 @@ print_command_summary()
|
||||
mvprintw(14, 0, "The following commands are supported (in upper or lower case):");
|
||||
mvprintw(16, 0, "A = Use Entire Disk B = Bad Block Scan C = Create Partition");
|
||||
mvprintw(17, 0, "D = Delete Partition G = Set BIOS Geometry S = Set Bootable");
|
||||
mvprintw(18, 0, "U = Undo All Changes ESC = Exit this screen");
|
||||
mvprintw(18, 0, "U = Undo All Changes Q = Finish");
|
||||
mvprintw(20, 0, "The currently selected partition is displayed in ");
|
||||
attrset(A_REVERSE); addstr("reverse"); attrset(A_NORMAL); addstr(" video.");
|
||||
mvprintw(21, 0, "Use F1 or ? to get more help, arrow keys to move.");
|
||||
@ -265,7 +268,7 @@ diskPartition(Disk *d)
|
||||
msg = "Wise choice!";
|
||||
break;
|
||||
|
||||
case 27: /* ESC */
|
||||
case 'Q':
|
||||
chunking = FALSE;
|
||||
break;
|
||||
|
||||
@ -322,14 +325,27 @@ int
|
||||
diskPartitionEditor(char *str)
|
||||
{
|
||||
DMenu *menu;
|
||||
Device **devs;
|
||||
int cnt;
|
||||
|
||||
menu = deviceCreateMenu(&MenuDiskDevices, DEVICE_TYPE_DISK, partitionHook);
|
||||
if (!menu) {
|
||||
msgConfirm("No devices suitable for installation found!\n\nPlease verify that your disk controller (and attached drives) were detected properly. This can be done by selecting the ``Bootmsg'' option on the main menu and reviewing the boot messages carefully.");
|
||||
devs = deviceFind(NULL, DEVICE_TYPE_DISK);
|
||||
cnt = deviceCount(devs);
|
||||
if (!cnt) {
|
||||
msgConfirm("No disks found! Please verify that your disk controller is being\nproperly probed at boot time. See the Hardware Guide on the Documentation menu\nfor clues on diagnosing this type of problem.");
|
||||
return 0;
|
||||
}
|
||||
else if (cnt == 1) {
|
||||
devs[0]->private = diskPartition((Disk *)devs[0]->private);
|
||||
devs[0]->enabled = TRUE;
|
||||
}
|
||||
else {
|
||||
menu = deviceCreateMenu(&MenuDiskDevices, DEVICE_TYPE_DISK, partitionHook);
|
||||
if (!menu)
|
||||
msgConfirm("No devices suitable for installation found!\n\nPlease verify that your disk controller (and attached drives) were detected properly. This can be done by selecting the ``Bootmsg'' option on the main menu and reviewing the boot messages carefully.");
|
||||
else {
|
||||
dmenuOpenSimple(menu);
|
||||
free(menu);
|
||||
}
|
||||
}
|
||||
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: dist.c,v 1.34 1995/05/29 14:38:31 jkh Exp $
|
||||
* $Id: dist.c,v 1.35.2.35 1995/06/10 14:20:10 jkh Exp $
|
||||
*
|
||||
* Copyright (c) 1995
|
||||
* Jordan Hubbard. All rights reserved.
|
||||
@ -44,88 +44,12 @@
|
||||
#include "sysinstall.h"
|
||||
|
||||
unsigned int Dists;
|
||||
unsigned int DESDists;
|
||||
unsigned int SrcDists;
|
||||
unsigned int XF86Dists;
|
||||
unsigned int XF86ServerDists;
|
||||
unsigned int XF86FontDists;
|
||||
|
||||
static int distSetXF86(char *str);
|
||||
|
||||
int
|
||||
distReset(char *str)
|
||||
{
|
||||
Dists = 0;
|
||||
SrcDists = 0;
|
||||
XF86Dists = 0;
|
||||
XF86ServerDists = 0;
|
||||
XF86FontDists = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
distSetDeveloper(char *str)
|
||||
{
|
||||
Dists = _DIST_DEVELOPER;
|
||||
SrcDists = DIST_SRC_ALL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
distSetXDeveloper(char *str)
|
||||
{
|
||||
Dists = _DIST_XDEVELOPER;
|
||||
SrcDists = DIST_SRC_ALL;
|
||||
distSetXF86(NULL);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
distSetUser(char *str)
|
||||
{
|
||||
Dists = _DIST_USER;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
distSetXUser(char *str)
|
||||
{
|
||||
Dists = _DIST_XUSER;
|
||||
distSetXF86(NULL);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
distSetMinimum(char *str)
|
||||
{
|
||||
Dists = DIST_BIN;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
distSetEverything(char *str)
|
||||
{
|
||||
Dists = DIST_ALL;
|
||||
SrcDists = DIST_SRC_ALL;
|
||||
distSetXF86(NULL);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
distSetSrc(char *str)
|
||||
{
|
||||
dmenuOpenSimple(&MenuSrcDistributions);
|
||||
if (SrcDists)
|
||||
Dists |= DIST_SRC;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
distSetXF86(char *str)
|
||||
{
|
||||
dmenuOpenSimple(&MenuXF86Select);
|
||||
return 0;
|
||||
}
|
||||
|
||||
typedef struct _dist {
|
||||
char *my_name;
|
||||
char *my_dir;
|
||||
@ -134,27 +58,41 @@ typedef struct _dist {
|
||||
struct _dist *my_dist;
|
||||
} Distribution;
|
||||
|
||||
extern Distribution DistTable[];
|
||||
extern Distribution DESDistTable[];
|
||||
extern Distribution SrcDistTable[];
|
||||
extern Distribution XF86DistTable[];
|
||||
extern Distribution XF86FontDistTable[];
|
||||
extern Distribution XF86ServerDistTable[];
|
||||
|
||||
|
||||
/* The top-level distribution categories */
|
||||
static Distribution DistTable[] = {
|
||||
{ "bin", "/", &Dists, DIST_BIN, NULL },
|
||||
{ "games", "/", &Dists, DIST_GAMES, NULL },
|
||||
{ "help", NULL, &Dists, DIST_HELP, NULL },
|
||||
{ "manpages", "/", &Dists, DIST_MANPAGES, NULL },
|
||||
{ "proflibs", "/", &Dists, DIST_PROFLIBS, NULL },
|
||||
{ "dict", "/", &Dists, DIST_DICT, NULL },
|
||||
{ "info", "/", &Dists, DIST_INFO, NULL },
|
||||
{ "src", "/", &Dists, DIST_SRC, SrcDistTable },
|
||||
{ "des", "/", &Dists, DIST_DES, NULL },
|
||||
{ "des", "/", &Dists, DIST_DES, DESDistTable },
|
||||
{ "compat1x", "/", &Dists, DIST_COMPAT1X, NULL },
|
||||
{ "compat20", "/", &Dists, DIST_COMPAT20, NULL },
|
||||
{ "commerce", "/usr/local", &Dists, DIST_COMMERCIAL, NULL },
|
||||
{ "xperimnt", "/usr/local", &Dists, DIST_EXPERIMENTAL, NULL },
|
||||
{ "XF86311", "/usr", &Dists, DIST_XF86, XF86DistTable },
|
||||
{ NULL },
|
||||
};
|
||||
|
||||
/* The DES distribution (not for export!) */
|
||||
static Distribution DESDistTable[] = {
|
||||
{ "des", "/", &DESDists, DIST_DES_DES, NULL },
|
||||
{ "krb", "/", &DESDists, DIST_DES_KERBEROS, NULL },
|
||||
{ "ssecure", "/usr/src", &DESDists, DIST_DES_SSECURE, NULL },
|
||||
{ "sebones", "/usr/src", &DESDists, DIST_DES_SEBONES, NULL },
|
||||
{ NULL },
|
||||
};
|
||||
|
||||
/* The /usr/src distribution */
|
||||
static Distribution SrcDistTable[] = {
|
||||
{ "sbase", "/usr/src", &SrcDists, DIST_SRC_BASE, NULL },
|
||||
@ -171,8 +109,6 @@ static Distribution SrcDistTable[] = {
|
||||
{ "ssys", "/usr/src", &SrcDists, DIST_SRC_SYS, NULL },
|
||||
{ "subin", "/usr/src", &SrcDists, DIST_SRC_UBIN, NULL },
|
||||
{ "susbin", "/usr/src", &SrcDists, DIST_SRC_USBIN, NULL },
|
||||
{ "XF86-xc", "/usr/X11R6/src", &SrcDists, DIST_SRC_XF86, NULL },
|
||||
{ "XF86-co", "/usr/X11R6/src", &SrcDists, DIST_SRC_XF86, NULL },
|
||||
{ NULL },
|
||||
};
|
||||
|
||||
@ -181,15 +117,17 @@ static Distribution XF86DistTable[] = {
|
||||
{ "X311bin", "/usr", &XF86Dists, DIST_XF86_BIN, NULL },
|
||||
{ "X311lib", "/usr", &XF86Dists, DIST_XF86_LIB, NULL },
|
||||
{ "X311doc", "/usr", &XF86Dists, DIST_XF86_DOC, NULL },
|
||||
{ "Xf86311", "/usr", &XF86Dists, DIST_XF86_FONTS, XF86FontDistTable },
|
||||
{ "XF86311", "/usr", &XF86Dists, DIST_XF86_FONTS, XF86FontDistTable },
|
||||
{ "X311man", "/usr", &XF86Dists, DIST_XF86_MAN, NULL },
|
||||
{ "X311prog", "/usr", &XF86Dists, DIST_XF86_PROG, NULL },
|
||||
{ "X311link", "/usr", &XF86Dists, DIST_XF86_LINK, NULL },
|
||||
{ "X311pex", "/usr", &XF86Dists, DIST_XF86_PEX, NULL },
|
||||
{ "X311lbx", "/usr", &XF86Dists, DIST_XF86_LBX, NULL },
|
||||
{ "X311xicf", "/usr", &XF86Dists, DIST_XF86_XINIT, NULL },
|
||||
{ "X311xdmcf", "/usr", &XF86Dists, DIST_XF86_XDMCF, NULL },
|
||||
{ "Xf86311", "/usr", &XF86Dists, DIST_XF86_SERVER, XF86ServerDistTable },
|
||||
{ "X311xdcf", "/usr", &XF86Dists, DIST_XF86_XDMCF, NULL },
|
||||
{ "XF86311", "/usr", &XF86Dists, DIST_XF86_SERVER, XF86ServerDistTable },
|
||||
{ "XF86-xc", "/usr/X11R6/src", &XF86Dists, DIST_XF86_SRC, NULL },
|
||||
{ "XF86-co", "/usr/X11R6/src", &XF86Dists, DIST_XF86_SRC, NULL },
|
||||
{ NULL },
|
||||
};
|
||||
|
||||
@ -197,8 +135,9 @@ static Distribution XF86DistTable[] = {
|
||||
static Distribution XF86ServerDistTable[] = {
|
||||
{ "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 },
|
||||
{ "X311Ma8", "/usr", &XF86ServerDists, DIST_XF86_SERVER_MACH8, NULL },
|
||||
{ "X311Ma32", "/usr", &XF86ServerDists, DIST_XF86_SERVER_MACH32,NULL },
|
||||
{ "X311Ma64", "/usr", &XF86ServerDists, DIST_XF86_SERVER_MACH64,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 },
|
||||
@ -219,6 +158,121 @@ static Distribution XF86FontDistTable[] = {
|
||||
{ NULL },
|
||||
};
|
||||
|
||||
int
|
||||
distReset(char *str)
|
||||
{
|
||||
Dists = 0;
|
||||
SrcDists = 0;
|
||||
XF86Dists = 0;
|
||||
XF86ServerDists = 0;
|
||||
XF86FontDists = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
distSetDeveloper(char *str)
|
||||
{
|
||||
distReset(NULL);
|
||||
Dists = _DIST_DEVELOPER;
|
||||
SrcDists = DIST_SRC_ALL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
distSetXDeveloper(char *str)
|
||||
{
|
||||
distReset(NULL);
|
||||
Dists = _DIST_DEVELOPER | DIST_XF86;
|
||||
SrcDists = DIST_SRC_ALL;
|
||||
XF86Dists = DIST_XF86_BIN | DIST_XF86_LIB | DIST_XF86_PROG | DIST_XF86_MAN | DIST_XF86_SERVER | DIST_XF86_FONTS;
|
||||
XF86ServerDists = DIST_XF86_SERVER_SVGA;
|
||||
XF86FontDists = DIST_XF86_FONTS_MISC;
|
||||
distSetXF86(NULL);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
distSetKernDeveloper(char *str)
|
||||
{
|
||||
distReset(NULL);
|
||||
Dists = _DIST_DEVELOPER;
|
||||
SrcDists = DIST_SRC_SYS;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
distSetUser(char *str)
|
||||
{
|
||||
distReset(NULL);
|
||||
Dists = _DIST_USER;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
distSetXUser(char *str)
|
||||
{
|
||||
distReset(NULL);
|
||||
Dists = _DIST_USER;
|
||||
XF86Dists = DIST_XF86_BIN | DIST_XF86_LIB | DIST_XF86_MAN | DIST_XF86_SERVER | DIST_XF86_FONTS;
|
||||
XF86ServerDists = DIST_XF86_SERVER_SVGA;
|
||||
XF86FontDists = DIST_XF86_FONTS_MISC;
|
||||
distSetXF86(NULL);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
distSetMinimum(char *str)
|
||||
{
|
||||
distReset(NULL);
|
||||
Dists = DIST_BIN;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
distSetEverything(char *str)
|
||||
{
|
||||
Dists = DIST_ALL;
|
||||
SrcDists = DIST_SRC_ALL;
|
||||
XF86Dists = DIST_XF86_ALL;
|
||||
XF86ServerDists = DIST_XF86_SERVER_ALL;
|
||||
XF86FontDists = DIST_XF86_FONTS_ALL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
distSetDES(char *str)
|
||||
{
|
||||
dmenuOpenSimple(&MenuDESDistributions);
|
||||
if (DESDists)
|
||||
Dists |= DIST_DES;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
distSetSrc(char *str)
|
||||
{
|
||||
dmenuOpenSimple(&MenuSrcDistributions);
|
||||
if (SrcDists)
|
||||
Dists |= DIST_SRC;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
distSetXF86(char *str)
|
||||
{
|
||||
dmenuOpenSimple(&MenuXF86Select);
|
||||
if (XF86ServerDists)
|
||||
XF86Dists |= DIST_XF86_SERVER;
|
||||
if (XF86FontDists)
|
||||
XF86Dists |= DIST_XF86_FONTS;
|
||||
if (XF86Dists)
|
||||
Dists |= DIST_XF86;
|
||||
if (isDebug())
|
||||
msgDebug("SetXF86 Masks: Server: %0x, Fonts: %0x, XDists: %0x, Dists: %0x\n",
|
||||
XF86ServerDists, XF86FontDists, XF86Dists, Dists);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static Boolean
|
||||
distExtract(char *parent, Distribution *me)
|
||||
{
|
||||
@ -228,37 +282,49 @@ distExtract(char *parent, Distribution *me)
|
||||
const char *tmp;
|
||||
Attribs *dist_attr;
|
||||
|
||||
status = FALSE;
|
||||
if (mediaDevice->init)
|
||||
if (!(*mediaDevice->init)(mediaDevice))
|
||||
return FALSE;
|
||||
status = TRUE;
|
||||
if (isDebug())
|
||||
msgDebug("distExtract: parent: %s, me: %s\n", parent ? parent : "(none)", me->my_name);
|
||||
|
||||
/* Loop through to see if we're in our parent's plans */
|
||||
for (i = 0; me[i].my_name; i++) {
|
||||
/* If we're not doing it, we're not doing it */
|
||||
dist = me[i].my_name;
|
||||
path = parent ? parent : dist;
|
||||
|
||||
/* If our bit isn't set, go to the next */
|
||||
if (!(me[i].my_bit & *(me[i].my_mask)))
|
||||
continue;
|
||||
|
||||
/* This is shorthand for "dist currently disabled" */
|
||||
if (!me[i].my_dir) {
|
||||
*(me[i].my_mask) &= ~(me[i].my_bit);
|
||||
continue;
|
||||
}
|
||||
|
||||
/* Recurse if actually have a sub-distribution */
|
||||
if (me[i].my_dist) {
|
||||
status = distExtract(me[i].my_name, me[i].my_dist);
|
||||
status = distExtract(dist, me[i].my_dist);
|
||||
goto done;
|
||||
}
|
||||
|
||||
dist = me[i].my_name;
|
||||
path = parent ? parent : me[i].my_name;
|
||||
|
||||
/* First try to get the distribution as a single file */
|
||||
snprintf(buf, 512, "%s/%s.tgz", path, dist);
|
||||
fd = (*mediaDevice->get)(buf);
|
||||
if (fd != -1) {
|
||||
if (isDebug())
|
||||
msgDebug("Trying to get large piece: %s\n", buf);
|
||||
/* Set it as an "exploratory get" so that we don't loop unnecessarily on it */
|
||||
mediaDevice->flags |= OPT_EXPLORATORY_GET;
|
||||
fd = (*mediaDevice->get)(mediaDevice, buf, NULL);
|
||||
mediaDevice->flags &= ~OPT_EXPLORATORY_GET;
|
||||
if (fd >= 0) {
|
||||
msgNotify("Extracting %s into %s directory...", me[i].my_name, me[i].my_dir);
|
||||
status = mediaExtractDist(me[i].my_dir, fd);
|
||||
if (mediaDevice->close)
|
||||
(*mediaDevice->close)(mediaDevice, fd);
|
||||
else
|
||||
close(fd);
|
||||
goto done;
|
||||
}
|
||||
else if (fd == -2) /* Hard error, can't continue */
|
||||
return FALSE;
|
||||
|
||||
/* If we couldn't get it as one file then we need to get multiple pieces; get info file telling us how many */
|
||||
snprintf(buf, sizeof buf, "/stand/info/%s/%s.inf", path, dist);
|
||||
if (!access(buf, R_OK)) {
|
||||
if (isDebug())
|
||||
@ -273,56 +339,42 @@ distExtract(char *parent, Distribution *me)
|
||||
msgDebug("Looking for attribute `pieces'\n");
|
||||
tmp = attr_match(dist_attr, "pieces");
|
||||
if (tmp)
|
||||
numchunks = atoi(tmp);
|
||||
numchunks = strtol(tmp, 0, 0);
|
||||
else
|
||||
numchunks = 0;
|
||||
}
|
||||
else
|
||||
else {
|
||||
if (isDebug())
|
||||
msgDebug("Couldn't open attributes file: %s\n", buf);
|
||||
numchunks = 0;
|
||||
}
|
||||
if (!numchunks)
|
||||
continue;
|
||||
|
||||
if (isDebug())
|
||||
msgDebug("Attempting to extract distribution from %u chunks.\n", numchunks);
|
||||
|
||||
if (numchunks < 2 ) {
|
||||
snprintf(buf, 512, "%s/%s", path, dist);
|
||||
if (numchunks)
|
||||
strcat(buf,".aa");
|
||||
fd = (*mediaDevice->get)(buf);
|
||||
if (fd == -1) {
|
||||
status = FALSE;
|
||||
} else {
|
||||
msgNotify("Extracting %s into %s directory...", me[i].my_name, me[i].my_dir);
|
||||
status = mediaExtractDist(me[i].my_dir, fd);
|
||||
if (mediaDevice->close)
|
||||
(*mediaDevice->close)(mediaDevice, fd);
|
||||
else
|
||||
close(fd);
|
||||
}
|
||||
goto done;
|
||||
}
|
||||
|
||||
/* We have one or more chunks, go pick them up */
|
||||
mediaExtractDistBegin(me[i].my_dir, &fd2, &zpid, &cpid);
|
||||
dialog_clear();
|
||||
for (chunk = 0; chunk < numchunks; chunk++) {
|
||||
int n, retval;
|
||||
char prompt[80];
|
||||
int retries = 0;
|
||||
|
||||
snprintf(buf, 512, "%s/%s.%c%c", path, dist, (chunk / 26) + 'a', (chunk % 26) + 'a');
|
||||
retry:
|
||||
fd = (*mediaDevice->get)(buf);
|
||||
if (isDebug())
|
||||
msgDebug("trying for piece %d of %d: %s\n", chunk, numchunks, buf);
|
||||
fd = (*mediaDevice->get)(mediaDevice, buf, dist_attr);
|
||||
if (fd < 0) {
|
||||
if (++retries < 5)
|
||||
goto retry;
|
||||
msgConfirm("failed to retreive piece file %s after 5 retries!\nAborting the transfer", buf);
|
||||
dialog_clear();
|
||||
msgConfirm("failed to retreive piece file %s!\nAborting the transfer", buf);
|
||||
goto punt;
|
||||
}
|
||||
snprintf(prompt, 80, "Extracting %s into %s directory...", me[i].my_name, me[i].my_dir);
|
||||
dialog_gauge("Progress", prompt, 8, 15, 6, 50, (int)((float)(chunk + 1) / numchunks * 100));
|
||||
while ((n = read(fd, buf, sizeof buf)) > 0) {
|
||||
retval = write(fd2, buf, n);
|
||||
if (retval != n)
|
||||
{
|
||||
if (retval != n) {
|
||||
if (mediaDevice->close)
|
||||
(*mediaDevice->close)(mediaDevice, fd);
|
||||
else
|
||||
@ -331,10 +383,7 @@ distExtract(char *parent, Distribution *me)
|
||||
goto punt;
|
||||
}
|
||||
}
|
||||
if (mediaDevice->close)
|
||||
(*mediaDevice->close)(mediaDevice, fd);
|
||||
else
|
||||
close(fd);
|
||||
}
|
||||
close(fd2);
|
||||
status = mediaExtractDistEnd(zpid, cpid);
|
||||
@ -347,20 +396,21 @@ distExtract(char *parent, Distribution *me)
|
||||
|
||||
done:
|
||||
if (!status) {
|
||||
if (getenv(NO_CONFIRMATION))
|
||||
if (OptFlags & OPT_NO_CONFIRM)
|
||||
status = TRUE;
|
||||
else {
|
||||
if (me[i].my_dist) {
|
||||
msgConfirm("Unable to transfer all components of the %s distribution.\nIf this is a CDROM install, it may be because export restrictions prohibit\nDES code from being shipped from the U.S. Try to get this code from a\nlocal FTP site instead!");
|
||||
status = TRUE;
|
||||
}
|
||||
else
|
||||
status = msgYesNo("Unable to transfer the %s distribution from %s.\nDo you want to retry this distribution later?", me[i].my_name, mediaDevice->name);
|
||||
status = msgYesNo("Unable to transfer the %s distribution from %s.\nDo you want to try to retrieve it again?", me[i].my_name, mediaDevice->name);
|
||||
}
|
||||
}
|
||||
if (status) {
|
||||
/* Extract was successful, remove ourselves from further consideration */
|
||||
if (status)
|
||||
*(me[i].my_mask) &= ~(me[i].my_bit);
|
||||
}
|
||||
}
|
||||
if (mediaDevice->shutdown && parent == NULL) {
|
||||
(*mediaDevice->shutdown)(mediaDevice);
|
||||
mediaDevice = NULL;
|
||||
}
|
||||
return status;
|
||||
}
|
||||
|
||||
@ -369,9 +419,18 @@ distExtractAll(void)
|
||||
{
|
||||
int retries = 0;
|
||||
|
||||
/* First try to initialize the state of things */
|
||||
if (!(*mediaDevice->init)(mediaDevice))
|
||||
return;
|
||||
|
||||
/* Try for 3 times around the loop, then give up. */
|
||||
while (Dists && ++retries < 3)
|
||||
distExtract(NULL, DistTable);
|
||||
|
||||
/* Anything left? */
|
||||
if (Dists)
|
||||
msgConfirm("Couldn't extract all of the dists. Residue: %0x", Dists);
|
||||
msgConfirm("Couldn't extract all of the distributions. This may\nbe because the specified distributions are not available from the\ninstallation media you've chosen (residue: %0x)", Dists);
|
||||
|
||||
/* Close up shop and go home */
|
||||
(*mediaDevice->shutdown)(mediaDevice);
|
||||
}
|
||||
|
@ -8,27 +8,28 @@
|
||||
#define DIST_PROFLIBS 0x0008
|
||||
#define DIST_DICT 0x0010
|
||||
#define DIST_SRC 0x0020
|
||||
#define DIST_DES 0x0040
|
||||
#define DIST_HELP 0x0040 /* Not yet used; reserved */
|
||||
#define DIST_INFO 0x0080
|
||||
#define DIST_COMPAT1X 0x0100
|
||||
#define DIST_COMPAT20 0x0200
|
||||
#define DIST_XF86 0x0400
|
||||
#define DIST_COMMERCIAL 0x0800
|
||||
#define DIST_DES 0x1000
|
||||
#define DIST_EXPERIMENTAL 0x2000
|
||||
#define DIST_ALL 0x0FFF
|
||||
|
||||
/* Canned distribution sets */
|
||||
#define _DIST_DEVELOPER \
|
||||
(DIST_BIN | DIST_MANPAGES | DIST_DICT | DIST_PROFLIBS | DIST_SRC)
|
||||
|
||||
#define _DIST_XDEVELOPER \
|
||||
(_DIST_DEVELOPER | DIST_XF86)
|
||||
(DIST_BIN | DIST_MANPAGES | DIST_DICT | DIST_PROFLIBS | DIST_INFO | DIST_SRC)
|
||||
|
||||
#define _DIST_USER \
|
||||
(DIST_BIN | DIST_MANPAGES | DIST_DICT | DIST_COMPAT1X | DIST_COMPAT20)
|
||||
|
||||
#define _DIST_XUSER \
|
||||
(_DIST_USER | DIST_XF86)
|
||||
|
||||
/* Subtypes for DES distribution */
|
||||
#define DIST_DES_DES 0x0001
|
||||
#define DIST_DES_SEBONES 0x0002
|
||||
#define DIST_DES_SSECURE 0x0004
|
||||
#define DIST_DES_KERBEROS 0x0008
|
||||
|
||||
/* Subtypes for SRC distribution */
|
||||
#define DIST_SRC_BASE 0x0001
|
||||
@ -45,38 +46,41 @@
|
||||
#define DIST_SRC_SYS 0x0800
|
||||
#define DIST_SRC_UBIN 0x1000
|
||||
#define DIST_SRC_USBIN 0x2000
|
||||
#define DIST_SRC_XF86 0x4000
|
||||
#define DIST_SRC_ALL 0x3FFF /* Don't include XFree86 source by default */
|
||||
#define DIST_SRC_ALL 0xFFFF
|
||||
|
||||
/* Subtypes for XFree86 distribution */
|
||||
#define DIST_XF86_BIN 0x0001
|
||||
#define DIST_XF86_LIB 0x0004
|
||||
#define DIST_XF86_DOC 0x0008
|
||||
#define DIST_XF86_MAN 0x0010
|
||||
#define DIST_XF86_PROG 0x0020
|
||||
#define DIST_XF86_LINK 0x0040
|
||||
#define DIST_XF86_PEX 0x0080
|
||||
#define DIST_XF86_LBX 0x0100
|
||||
#define DIST_XF86_SERVER 0x0200
|
||||
#define DIST_XF86_LIB 0x0002
|
||||
#define DIST_XF86_DOC 0x0004
|
||||
#define DIST_XF86_MAN 0x0008
|
||||
#define DIST_XF86_PROG 0x0010
|
||||
#define DIST_XF86_LINK 0x0020
|
||||
#define DIST_XF86_PEX 0x0040
|
||||
#define DIST_XF86_LBX 0x0080
|
||||
#define DIST_XF86_XINIT 0x0100
|
||||
#define DIST_XF86_XDMCF 0x0200
|
||||
#define DIST_XF86_SRC 0x0400
|
||||
#define DIST_XF86_SERVER 0x0800
|
||||
#define DIST_XF86_SERVER_8514 0x0001
|
||||
#define DIST_XF86_SERVER_AGX 0x0002
|
||||
#define DIST_XF86_SERVER_MACH32 0x0004
|
||||
#define DIST_XF86_SERVER_MACH8 0x0008
|
||||
#define DIST_XF86_SERVER_MONO 0x0010
|
||||
#define DIST_XF86_SERVER_P9000 0x0020
|
||||
#define DIST_XF86_SERVER_S3 0x0040
|
||||
#define DIST_XF86_SERVER_SVGA 0x0080
|
||||
#define DIST_XF86_SERVER_VGA16 0x0100
|
||||
#define DIST_XF86_SERVER_W32 0x0200
|
||||
#define DIST_XF86_SERVER_NEST 0x0400
|
||||
#define DIST_XF86_XINIT 0x0400
|
||||
#define DIST_XF86_XDMCF 0x0800
|
||||
#define DIST_XF86_SERVER_MACH8 0x0004
|
||||
#define DIST_XF86_SERVER_MACH32 0x0008
|
||||
#define DIST_XF86_SERVER_MACH64 0x0010
|
||||
#define DIST_XF86_SERVER_MONO 0x0020
|
||||
#define DIST_XF86_SERVER_P9000 0x0040
|
||||
#define DIST_XF86_SERVER_S3 0x0080
|
||||
#define DIST_XF86_SERVER_SVGA 0x0100
|
||||
#define DIST_XF86_SERVER_VGA16 0x0200
|
||||
#define DIST_XF86_SERVER_W32 0x0400
|
||||
#define DIST_XF86_SERVER_NEST 0x0800
|
||||
#define DIST_XF86_SERVER_ALL 0x0FFF
|
||||
#define DIST_XF86_FONTS 0x1000
|
||||
#define DIST_XF86_FONTS_MISC 0x0001
|
||||
#define DIST_XF86_FONTS_100 0x0002
|
||||
#define DIST_XF86_FONTS_SCALE 0x0004
|
||||
#define DIST_XF86_FONTS_NON 0x0008
|
||||
#define DIST_XF86_FONTS_SERVER 0x0010
|
||||
#define DIST_XF86_FONTS_ALL 0x00FF
|
||||
#define DIST_XF86_ALL 0xFFFF
|
||||
|
||||
#endif
|
||||
|
@ -4,7 +4,7 @@
|
||||
* This is probably the last attempt in the `sysinstall' line, the next
|
||||
* generation being slated for what's essentially a complete rewrite.
|
||||
*
|
||||
* $Id: dmenu.c,v 1.10 1995/05/24 17:49:13 jkh Exp $
|
||||
* $Id: dmenu.c,v 1.11.2.11 1995/06/10 19:44:54 jkh Exp $
|
||||
*
|
||||
* Copyright (c) 1995
|
||||
* Jordan Hubbard. All rights reserved.
|
||||
@ -42,23 +42,66 @@
|
||||
*/
|
||||
|
||||
#include "sysinstall.h"
|
||||
#include <sys/types.h>
|
||||
|
||||
#define MAX_MENU 10
|
||||
|
||||
static DMenuItem shellAction = { NULL, NULL, DMENU_SHELL_ESCAPE, NULL, 0 };
|
||||
#define MAX_MENU 8
|
||||
|
||||
/* Traverse menu but give user no control over positioning */
|
||||
void
|
||||
Boolean
|
||||
dmenuOpenSimple(DMenu *menu)
|
||||
{
|
||||
int choice, scroll, curr, max;
|
||||
|
||||
choice = scroll = curr = max = 0;
|
||||
dmenuOpen(menu, &choice, &scroll, &curr, &max);
|
||||
return dmenuOpen(menu, &choice, &scroll, &curr, &max);
|
||||
}
|
||||
|
||||
/* Work functions for the state hook */
|
||||
char *
|
||||
dmenuFlagCheck(DMenuItem *item)
|
||||
{
|
||||
if (*((unsigned int *)item->ptr) & item->parm)
|
||||
return "ON";
|
||||
return "OFF";
|
||||
}
|
||||
|
||||
char *
|
||||
dmenuVarCheck(DMenuItem *item)
|
||||
{
|
||||
char *cp, *cp2, tmp[256];
|
||||
|
||||
strncpy(tmp, (char *)item->ptr, 256);
|
||||
if ((cp = index(tmp, '=')) != NULL) {
|
||||
*(cp++) = '\0';
|
||||
cp2 = getenv(tmp);
|
||||
if (cp2)
|
||||
return !strcmp(cp, cp2) ? "ON" : "OFF";
|
||||
else
|
||||
return "OFF";
|
||||
}
|
||||
else
|
||||
return getenv(tmp) ? "ON" : "OFF";
|
||||
}
|
||||
|
||||
char *
|
||||
dmenuRadioCheck(DMenuItem *item)
|
||||
{
|
||||
if (*((unsigned int *)item->ptr) == item->parm)
|
||||
return "ON";
|
||||
return "OFF";
|
||||
}
|
||||
|
||||
static char *
|
||||
checkHookVal(DMenuItem *item)
|
||||
{
|
||||
|
||||
if (!item->check)
|
||||
return "OFF";
|
||||
return (*item->check)(item);
|
||||
}
|
||||
|
||||
/* Traverse over an internal menu */
|
||||
void
|
||||
Boolean
|
||||
dmenuOpen(DMenu *menu, int *choice, int *scroll, int *curr, int *max)
|
||||
{
|
||||
char result[FILENAME_MAX];
|
||||
@ -69,21 +112,9 @@ dmenuOpen(DMenu *menu, int *choice, int *scroll, int *curr, int *max)
|
||||
/* First, construct the menu */
|
||||
for (tmp = menu->items; tmp->title; tmp++) {
|
||||
if (!tmp->disabled) {
|
||||
char *addme = NULL;
|
||||
char *title = tmp->title;
|
||||
char *prompt = tmp->prompt;
|
||||
|
||||
if (menu->options & (DMENU_RADIO_TYPE | DMENU_MULTIPLE_TYPE)) {
|
||||
if (*title == '*') {
|
||||
addme = "ON";
|
||||
++title;
|
||||
}
|
||||
else
|
||||
addme = "OFF";
|
||||
}
|
||||
nitems = item_add_pair(nitems, title, prompt, curr, max);
|
||||
if (addme)
|
||||
nitems = item_add(nitems, addme, curr, max);
|
||||
nitems = item_add_pair(nitems, tmp->title, tmp->prompt, curr, max);
|
||||
if (menu->options & (DMENU_RADIO_TYPE | DMENU_MULTIPLE_TYPE))
|
||||
nitems = item_add(nitems, checkHookVal(tmp), curr, max);
|
||||
++n;
|
||||
}
|
||||
}
|
||||
@ -98,32 +129,16 @@ dmenuOpen(DMenu *menu, int *choice, int *scroll, int *curr, int *max)
|
||||
|
||||
/* Pop up that dialog! */
|
||||
if (menu->options & DMENU_NORMAL_TYPE) {
|
||||
rval = dialog_menu((unsigned char *)menu->title,
|
||||
(unsigned char *)menu->prompt,
|
||||
-1, -1,
|
||||
n > MAX_MENU ? MAX_MENU : n,
|
||||
n,
|
||||
(unsigned char **)nitems,
|
||||
(unsigned char *)result,
|
||||
choice, scroll);
|
||||
rval = dialog_menu((u_char *)menu->title, (u_char *)menu->prompt, -1, -1,
|
||||
n > MAX_MENU ? MAX_MENU : n, n, (u_char **)nitems, (u_char *)result, choice, scroll);
|
||||
}
|
||||
else if (menu->options & DMENU_RADIO_TYPE) {
|
||||
rval = dialog_radiolist((unsigned char *)menu->title,
|
||||
(unsigned char *)menu->prompt,
|
||||
-1, -1,
|
||||
n > MAX_MENU ? MAX_MENU : n,
|
||||
n,
|
||||
(unsigned char **)nitems,
|
||||
(unsigned char *)result);
|
||||
rval = dialog_radiolist((u_char *)menu->title, (u_char *)menu->prompt, -1, -1,
|
||||
n > MAX_MENU ? MAX_MENU : n, n, (u_char **)nitems, (u_char *)result);
|
||||
}
|
||||
else if (menu->options & DMENU_MULTIPLE_TYPE) {
|
||||
rval = dialog_checklist((unsigned char *)menu->title,
|
||||
(unsigned char *)menu->prompt,
|
||||
-1, -1,
|
||||
n > MAX_MENU ? MAX_MENU : n,
|
||||
n,
|
||||
(unsigned char **)nitems,
|
||||
(unsigned char *)result);
|
||||
rval = dialog_checklist((u_char *)menu->title, (u_char *)menu->prompt, -1, -1,
|
||||
n > MAX_MENU ? MAX_MENU : n, n, (u_char **)nitems, (u_char *)result);
|
||||
}
|
||||
|
||||
/* This seems to be the only technique that works for getting the display to look right */
|
||||
@ -137,25 +152,22 @@ dmenuOpen(DMenu *menu, int *choice, int *scroll, int *curr, int *max)
|
||||
if (decode_and_dispatch_multiple(menu, result) ||
|
||||
menu->options & DMENU_SELECTION_RETURNS) {
|
||||
items_free(nitems, curr, max);
|
||||
return;
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
if ((tmp = decode(menu, result)) == NULL)
|
||||
msgFatal("Menu item `%s' not found??", result);
|
||||
return FALSE;
|
||||
}
|
||||
if (dispatch(tmp, result) || (menu->options & DMENU_SELECTION_RETURNS)) {
|
||||
items_free(nitems, curr, max);
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
else if (rval == -1)
|
||||
tmp = &shellAction;
|
||||
else {
|
||||
items_free(nitems, curr, max);
|
||||
return;
|
||||
}
|
||||
if (dispatch(tmp, result) ||
|
||||
menu->options & DMENU_SELECTION_RETURNS) {
|
||||
items_free(nitems, curr, max);
|
||||
return;
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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: dos.c,v 1.4 1995/05/29 11:01:11 jkh Exp $
|
||||
* $Id: dos.c,v 1.5.2.4 1995/06/05 16:59:03 jkh Exp $
|
||||
*
|
||||
* Copyright (c) 1995
|
||||
* Jordan Hubbard. All rights reserved.
|
||||
@ -69,12 +69,13 @@ mediaInitDOS(Device *dev)
|
||||
if (Mkdir("/dos", NULL))
|
||||
return FALSE;
|
||||
|
||||
bzero(&args, sizeof(args));
|
||||
memset(&args, 0, sizeof(args));
|
||||
args.fspec = dev->devname;
|
||||
args.uid = args.gid = 0;
|
||||
args.mask = 0777;
|
||||
|
||||
if (mount(MOUNT_MSDOS, "/dos", MNT_RDONLY, (caddr_t)&args) == -1) {
|
||||
msgConfirm("Error mounting %s on /dos: %s (%u)\n", dev, strerror(errno), errno);
|
||||
msgConfirm("Error mounting %s on /dos: %s (%u)\n", args.fspec, strerror(errno), errno);
|
||||
return FALSE;
|
||||
}
|
||||
DOSMounted = TRUE;
|
||||
@ -82,7 +83,7 @@ mediaInitDOS(Device *dev)
|
||||
}
|
||||
|
||||
int
|
||||
mediaGetDOS(char *file)
|
||||
mediaGetDOS(Device *dev, char *file, Attribs *dist_attrs)
|
||||
{
|
||||
char buf[PATH_MAX];
|
||||
|
||||
@ -99,7 +100,7 @@ mediaShutdownDOS(Device *dev)
|
||||
if (!DOSMounted)
|
||||
return;
|
||||
msgDebug("Unmounting /dos\n");
|
||||
if (unmount("/dos", 0) != 0)
|
||||
if (unmount("/dos", MNT_FORCE) != 0)
|
||||
msgConfirm("Could not unmount the DOS partition: %s\n", strerror(errno));
|
||||
if (isDebug())
|
||||
msgDebug("Unmount returned\n");
|
||||
|
@ -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: floppy.c,v 1.5 1995/05/29 11:01:13 jkh Exp $
|
||||
* $Id: floppy.c,v 1.6.2.17 1995/06/10 09:14:51 jkh Exp $
|
||||
*
|
||||
* Copyright (c) 1995
|
||||
* Jordan Hubbard. All rights reserved.
|
||||
@ -61,6 +61,8 @@
|
||||
static Device *floppyDev;
|
||||
static Boolean floppyMounted;
|
||||
|
||||
static char *distWanted;
|
||||
|
||||
/* For finding floppies */
|
||||
static int
|
||||
floppyChoiceHook(char *str)
|
||||
@ -90,22 +92,27 @@ getRootFloppy(void)
|
||||
|
||||
devs = deviceFind(NULL, DEVICE_TYPE_FLOPPY);
|
||||
cnt = deviceCount(devs);
|
||||
if (cnt == 1)
|
||||
if (!cnt) {
|
||||
msgConfirm("No floppy devices found! Something is seriously wrong!");
|
||||
return -1;
|
||||
}
|
||||
else if (cnt == 1) {
|
||||
floppyDev = devs[0];
|
||||
else if (cnt > 1) {
|
||||
msgConfirm("Please insert the ROOT floppy in %s and press [ENTER]", floppyDev->description);
|
||||
}
|
||||
else {
|
||||
DMenu *menu;
|
||||
|
||||
menu = deviceCreateMenu(&MenuMediaFloppy, DEVICE_TYPE_FLOPPY, floppyChoiceHook);
|
||||
menu->title = "Please insert the ROOT floppy";
|
||||
dmenuOpenSimple(menu);
|
||||
}
|
||||
else {
|
||||
msgConfirm("No floppy devices found! Something is seriously wrong!");
|
||||
if (!dmenuOpenSimple(menu))
|
||||
return -1;
|
||||
}
|
||||
if (!floppyDev)
|
||||
continue;
|
||||
fd = open(floppyDev->devname, O_RDONLY);
|
||||
if (isDebug())
|
||||
msgDebug("getRootFloppy on %s yields fd of %d\n", floppyDev->devname, fd);
|
||||
}
|
||||
return fd;
|
||||
}
|
||||
@ -114,42 +121,104 @@ Boolean
|
||||
mediaInitFloppy(Device *dev)
|
||||
{
|
||||
struct msdosfs_args dosargs;
|
||||
char mountpoint[FILENAME_MAX];
|
||||
|
||||
if (floppyMounted)
|
||||
return TRUE;
|
||||
memset(&dosargs, 0, sizeof dosargs);
|
||||
|
||||
if (Mkdir("/mnt", NULL)) {
|
||||
msgConfirm("Unable to make directory mountpoint for %s!", mountpoint);
|
||||
msgConfirm("Unable to make directory mountpoint for %s!", dev->devname);
|
||||
return FALSE;
|
||||
}
|
||||
msgConfirm("Please insert media into %s and press return", dev->description);
|
||||
msgDebug("initFloppy: mount floppy %s on /mnt\n", dev->devname);
|
||||
if (!distWanted)
|
||||
msgConfirm("Please insert next floppy into %s", dev->description);
|
||||
else {
|
||||
msgConfirm("Please insert floppy containing %s into %s", distWanted, dev->description);
|
||||
distWanted = NULL;
|
||||
}
|
||||
memset(&dosargs, 0, sizeof dosargs);
|
||||
dosargs.fspec = dev->devname;
|
||||
dosargs.uid = dosargs.gid = 0;
|
||||
dosargs.mask = 0777;
|
||||
if (mount(MOUNT_MSDOS, "/mnt", 0, (caddr_t)&dosargs) == -1) {
|
||||
msgConfirm("Error mounting floppy %s (%s) on /mnt : %s\n", dev->name,
|
||||
dev->devname, mountpoint, strerror(errno));
|
||||
msgConfirm("Error mounting floppy %s (%s) on /mnt : %s", dev->name, dev->devname, strerror(errno));
|
||||
return FALSE;
|
||||
}
|
||||
if (isDebug())
|
||||
msgDebug("initFloppy: mounted floppy %s successfully on /mnt\n", dev->devname);
|
||||
floppyMounted = TRUE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
int
|
||||
mediaGetFloppy(char *file)
|
||||
mediaGetFloppy(Device *dev, char *file, Attribs *dist_attrs)
|
||||
{
|
||||
char buf[PATH_MAX];
|
||||
#ifdef DO_CRC_CHECK
|
||||
char *extn, *var;
|
||||
const char *val;
|
||||
char attrib[10];
|
||||
u_long cval1, clen1, cval2, clen2;
|
||||
#endif
|
||||
int fd;
|
||||
int nretries = 5;
|
||||
|
||||
snprintf(buf, PATH_MAX, "/mnt/%s", file);
|
||||
return open(buf, O_RDONLY);
|
||||
|
||||
if (access(buf, R_OK)) {
|
||||
if (dev->flags & OPT_EXPLORATORY_GET)
|
||||
return -1;
|
||||
else {
|
||||
while (access(buf, R_OK) != 0) {
|
||||
if (!--nretries) {
|
||||
msgConfirm("GetFloppy: Failed to get %s after retries;\ngiving up.", file);
|
||||
return -1;
|
||||
}
|
||||
distWanted = buf;
|
||||
(*dev->shutdown)(dev);
|
||||
if (!(dev->init)(dev))
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fd = open(buf, O_RDONLY);
|
||||
#ifdef DO_CRC_CHECK
|
||||
if (dist_attrs != NULL && fd != -1) {
|
||||
extn = rindex(buf, '.');
|
||||
snprintf(attrib, 10, "cksum%s", extn);
|
||||
val = attr_match(dist_attrs, attrib);
|
||||
if (val != NULL) {
|
||||
if (isDebug())
|
||||
msgDebug("attr_match(%s,%s) returned `%s'\n", dist_attrs, attrib, val);
|
||||
var = strdup(val);
|
||||
|
||||
cval1 = strtol(var, &extn, 10);
|
||||
clen1 = strtol(extn, NULL, 10);
|
||||
|
||||
if (crc(fd, &cval2, &clen2) != 0) {
|
||||
msgConfirm("crc() of file `%s' failed!", file);
|
||||
close(fd);
|
||||
return -1;
|
||||
}
|
||||
if ((cval1 != cval2) || (clen1 != clen2)) {
|
||||
msgConfirm("Invalid file `%s' (checksum `%u %u' should be %s)", file, cval2, clen2, var);
|
||||
close(fd);
|
||||
return -1;
|
||||
}
|
||||
lseek(fd, 0, 0);
|
||||
}
|
||||
else
|
||||
msgNotify("No checksum information for file %s..", file);
|
||||
}
|
||||
#endif
|
||||
return fd;
|
||||
}
|
||||
|
||||
void
|
||||
mediaShutdownFloppy(Device *dev)
|
||||
{
|
||||
if (floppyMounted) {
|
||||
if (unmount("/mnt", 0) != 0)
|
||||
if (unmount("/mnt", MNT_FORCE) != 0)
|
||||
msgDebug("Umount of floppy on /mnt failed: %s (%d)\n", strerror(errno), errno);
|
||||
else {
|
||||
floppyMounted = FALSE;
|
||||
|
@ -6,7 +6,11 @@
|
||||
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
|
||||
* ----------------------------------------------------------------------------
|
||||
*
|
||||
* $Id: ftp.c,v 1.12 1995/05/29 11:01:16 jkh Exp $
|
||||
* $Id: ftp.c,v 1.13.2.9 1995/06/05 18:34:15 jkh Exp $
|
||||
*
|
||||
* Return values have been sanitized:
|
||||
* -1 error, but you (still) have a session.
|
||||
* -2 error, your session is dead.
|
||||
*
|
||||
*/
|
||||
|
||||
@ -27,6 +31,9 @@
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
|
||||
/* Handy global for us to stick the port # */
|
||||
int FtpPort;
|
||||
|
||||
#ifndef STANDALONE_FTP
|
||||
#include "sysinstall.h"
|
||||
#endif /*STANDALONE_FTP*/
|
||||
@ -39,17 +46,14 @@ debug(FTP_t ftp, const char *fmt, ...)
|
||||
va_start(ap, fmt);
|
||||
#ifdef STANDALONE_FTP
|
||||
strcpy(p,"LIBFTP: ");
|
||||
#else
|
||||
*p = '\0';
|
||||
#endif
|
||||
(void) vsnprintf(p+strlen(p), sizeof p - strlen(p), fmt, ap);
|
||||
va_end(ap);
|
||||
|
||||
#ifdef STANDALONE_FTP
|
||||
write(ftp->fd_debug,p,strlen(p));
|
||||
#else
|
||||
if (isDebug())
|
||||
if (isDebug()) {
|
||||
(void) vsnprintf(p, sizeof p - strlen(p), fmt, ap);
|
||||
msgDebug(p);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -58,11 +62,11 @@ writes(int fd, char *s)
|
||||
{
|
||||
int i = strlen(s);
|
||||
if (i != write(fd,s,i))
|
||||
return errno ? errno : -1;
|
||||
return -2;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static char*
|
||||
static __inline char*
|
||||
get_a_line(FTP_t ftp)
|
||||
{
|
||||
static char buf[BUFSIZ];
|
||||
@ -92,15 +96,17 @@ get_a_number(FTP_t ftp, char **q)
|
||||
|
||||
while(1) {
|
||||
p = get_a_line(ftp);
|
||||
if (!p)
|
||||
return -2;
|
||||
if (!(isdigit(p[0]) && isdigit(p[1]) && isdigit(p[2])))
|
||||
continue;
|
||||
if (i == -1 && p[3] == '-') {
|
||||
i = atoi(p);
|
||||
i = strtol(p, 0, 0);
|
||||
continue;
|
||||
}
|
||||
if (p[3] != ' ' && p[3] != '\t')
|
||||
continue;
|
||||
j = atoi(p);
|
||||
j = strtol(p, 0, 0);
|
||||
if (i == -1) {
|
||||
if (q) *q = p+4;
|
||||
return j;
|
||||
@ -112,14 +118,24 @@ get_a_number(FTP_t ftp, char **q)
|
||||
}
|
||||
|
||||
static int
|
||||
botch(FTP_t ftp, char *func, char *state)
|
||||
zap(FTP_t ftp)
|
||||
{
|
||||
debug(ftp, "Botch: %s called outside state %s\n",func,state);
|
||||
writes(ftp->fd_ctrl,"QUIT\r\n");
|
||||
int i;
|
||||
|
||||
i = writes(ftp->fd_ctrl,"QUIT\r\n");
|
||||
if (isDebug())
|
||||
msgDebug("Zapping ftp connection on %d returns %d\n", ftp->fd_ctrl, i);
|
||||
close(ftp->fd_ctrl); ftp->fd_ctrl = -1;
|
||||
close(ftp->fd_xfer); ftp->fd_xfer = -1;
|
||||
ftp->state = init;
|
||||
return -1;
|
||||
return -2;
|
||||
}
|
||||
|
||||
static int
|
||||
botch(FTP_t ftp, char *func, char *state)
|
||||
{
|
||||
debug(ftp, "Botch: %s called outside state %s\n",func,state);
|
||||
return -2;
|
||||
}
|
||||
|
||||
static int
|
||||
@ -136,7 +152,7 @@ cmd(FTP_t ftp, const char *fmt, ...)
|
||||
debug(ftp, "send <%s>\n",p);
|
||||
strcat(p,"\r\n");
|
||||
if (writes(ftp->fd_ctrl,p))
|
||||
return -1;
|
||||
return -2;
|
||||
i = get_a_number(ftp,0);
|
||||
return i;
|
||||
}
|
||||
@ -186,35 +202,34 @@ FtpOpen(FTP_t ftp, char *host, char *user, char *passwd)
|
||||
debug(ftp, "FtpOpen(ftp, %s, %s, %s)\n", host, user, passwd);
|
||||
|
||||
temp = inet_addr(host);
|
||||
if (temp != INADDR_NONE)
|
||||
{
|
||||
if (temp != INADDR_NONE) {
|
||||
debug(ftp, "Using dotted IP address `%s'\n", host);
|
||||
ftp->addrtype = sin.sin_family = AF_INET;
|
||||
sin.sin_addr.s_addr = temp;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
debug(ftp, "Trying to resolve `%s'\n", host);
|
||||
he = gethostbyname(host);
|
||||
if (!he)
|
||||
{
|
||||
if (!he) {
|
||||
debug(ftp, "Lookup of `%s' failed!\n", host);
|
||||
return ENOENT;
|
||||
return zap(ftp);
|
||||
}
|
||||
ftp->addrtype = sin.sin_family = he->h_addrtype;
|
||||
bcopy(he->h_addr, (char *)&sin.sin_addr, he->h_length);
|
||||
}
|
||||
|
||||
sin.sin_port = htons(21);
|
||||
sin.sin_port = htons(FtpPort ? FtpPort : 21);
|
||||
|
||||
if ((s = socket(ftp->addrtype, SOCK_STREAM, 0)) < 0)
|
||||
{
|
||||
debug(ftp, "Socket open failed: %s (%i)\n", strerror(errno), errno);
|
||||
return s;
|
||||
return zap(ftp);
|
||||
}
|
||||
|
||||
if (connect(s, (struct sockaddr *)&sin, sizeof(sin)) < 0) {
|
||||
debug(ftp,"Connection failed: %s (%i)\n", strerror(errno), errno);
|
||||
(void)close(s);
|
||||
return -1;
|
||||
return zap(ftp);
|
||||
}
|
||||
|
||||
ftp->fd_ctrl = s;
|
||||
@ -224,30 +239,25 @@ FtpOpen(FTP_t ftp, char *host, char *user, char *passwd)
|
||||
i = cmd(ftp,"USER %s",user);
|
||||
if (i >= 300 && i < 400)
|
||||
i = cmd(ftp,"PASS %s",passwd);
|
||||
if (i >= 299)
|
||||
return -1;
|
||||
if (i >= 299 || i < 0) {
|
||||
close(ftp->fd_ctrl); ftp->fd_ctrl = -1;
|
||||
return zap(ftp);
|
||||
}
|
||||
ftp->state = isopen;
|
||||
return 0;
|
||||
|
||||
#if 0
|
||||
fail:
|
||||
close(ftp->fd_ctrl);
|
||||
ftp->fd_ctrl = -1;
|
||||
return -1;
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
FtpClose(FTP_t ftp)
|
||||
{
|
||||
if (ftp->state != init)
|
||||
return;
|
||||
|
||||
if (ftp->state != isopen)
|
||||
botch(ftp,"FtpClose","open");
|
||||
botch(ftp,"FtpClose","open or init");
|
||||
|
||||
debug(ftp, "FtpClose(ftp)\n");
|
||||
writes(ftp->fd_ctrl,"QUIT\r\n");
|
||||
close(ftp->fd_ctrl); ftp->fd_ctrl = -1;
|
||||
close(ftp->fd_xfer); ftp->fd_xfer = -1;
|
||||
ftp->state = init;
|
||||
zap(ftp);
|
||||
}
|
||||
|
||||
int
|
||||
@ -257,6 +267,10 @@ FtpChdir(FTP_t ftp, char *dir)
|
||||
if (ftp->state != isopen)
|
||||
return botch(ftp,"FtpChdir","open");
|
||||
i = cmd(ftp,"CWD %s",dir);
|
||||
if (i < 0)
|
||||
return i;
|
||||
else if (i != 250)
|
||||
return -1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -265,30 +279,39 @@ FtpGet(FTP_t ftp, char *file)
|
||||
{
|
||||
int i,s;
|
||||
char *q;
|
||||
unsigned char addr[6];
|
||||
unsigned char addr[64];
|
||||
struct sockaddr_in sin;
|
||||
u_long a;
|
||||
|
||||
debug(ftp, "FtpGet(ftp,%s)\n",file);
|
||||
if (ftp->state != isopen)
|
||||
return botch(ftp,"FtpGet","open");
|
||||
if(ftp->binary) {
|
||||
i = cmd(ftp,"TYPE I");
|
||||
if (i < 0)
|
||||
return zap(ftp);
|
||||
if (i > 299)
|
||||
return -1;
|
||||
} else {
|
||||
return -1;
|
||||
}
|
||||
|
||||
if ((s = socket(ftp->addrtype, SOCK_STREAM, 0)) < 0)
|
||||
return zap(ftp);
|
||||
|
||||
if (ftp->passive) {
|
||||
debug(ftp, "send <%s>\n","PASV");
|
||||
if (writes(ftp->fd_ctrl,"PASV\r\n"))
|
||||
return -1;
|
||||
return zap(ftp);
|
||||
i = get_a_number(ftp,&q);
|
||||
if (i < 0)
|
||||
return zap(ftp);
|
||||
if (i != 227)
|
||||
return -1;
|
||||
return zap(ftp);
|
||||
while (*q && !isdigit(*q))
|
||||
q++;
|
||||
if (!*q)
|
||||
return -1;
|
||||
return zap(ftp);
|
||||
q--;
|
||||
for(i=0;i<6;i++) {
|
||||
q++;
|
||||
@ -300,42 +323,96 @@ FtpGet(FTP_t ftp, char *file)
|
||||
bcopy(addr+4, (char *)&sin.sin_port, 2);
|
||||
debug(ftp, "Opening active socket to %s : %u\n", inet_ntoa(sin.sin_addr), htons(sin.sin_port));
|
||||
|
||||
if ((s = socket(ftp->addrtype, SOCK_STREAM, 0)) < 0)
|
||||
return -1;
|
||||
|
||||
debug(ftp, "Connecting to %s:%u\n", inet_ntoa(sin.sin_addr), htons(sin.sin_port));
|
||||
if (connect(s, (struct sockaddr *)&sin, sizeof(sin)) < 0) {
|
||||
(void)close(s);
|
||||
debug(ftp, "connect: %s (%d)\n", strerror(errno), errno);
|
||||
return -1;
|
||||
}
|
||||
|
||||
i = cmd(ftp,"RETR %s",file);
|
||||
if (i > 299)
|
||||
return -1;
|
||||
ftp->state = xfer;
|
||||
ftp->fd_xfer = s;
|
||||
i = cmd(ftp,"RETR %s",file);
|
||||
if (i < 0) {
|
||||
close(s);
|
||||
return zap(ftp);
|
||||
}
|
||||
else if (i > 299) {
|
||||
if (isDebug())
|
||||
msgDebug("FTP: No such file %s, moving on.\n", file);
|
||||
close(s);
|
||||
return -1;
|
||||
}
|
||||
ftp->state = xfer;
|
||||
return s;
|
||||
} else {
|
||||
i = sizeof sin;
|
||||
getsockname(ftp->fd_ctrl,(struct sockaddr *)&sin,&i);
|
||||
sin.sin_port = 0;
|
||||
i = sizeof sin;
|
||||
if (bind(s,(struct sockaddr *)&sin, i) < 0) {
|
||||
close (s);
|
||||
debug(ftp,"bind failed %d\n",errno);
|
||||
return zap(ftp);
|
||||
}
|
||||
getsockname(s,(struct sockaddr *)&sin,&i);
|
||||
if (listen(s,1) < 0) {
|
||||
close (s);
|
||||
debug(ftp,"listen failed %d\n",errno);
|
||||
return zap(ftp);
|
||||
}
|
||||
a = ntohl(sin.sin_addr.s_addr);
|
||||
i = cmd(ftp,"PORT %d,%d,%d,%d,%d,%d",
|
||||
(a >> 24) & 0xff,
|
||||
(a >> 16) & 0xff,
|
||||
(a >> 8) & 0xff,
|
||||
a & 0xff,
|
||||
(ntohs(sin.sin_port) >> 8) & 0xff,
|
||||
ntohs(sin.sin_port) & 0xff);
|
||||
if (i != 200)
|
||||
return -1;
|
||||
i = cmd(ftp,"RETR %s",file);
|
||||
if (i < 0) {
|
||||
close(s);
|
||||
return zap(ftp);
|
||||
}
|
||||
else if (i > 299) {
|
||||
if (isDebug())
|
||||
msgDebug("FTP: No such file %s, moving on.\n", file);
|
||||
close(s);
|
||||
return -1;
|
||||
}
|
||||
ftp->fd_xfer = accept(s, 0, 0);
|
||||
if (ftp->fd_xfer < 0) {
|
||||
close(s);
|
||||
return zap(ftp);
|
||||
}
|
||||
ftp->state = xfer;
|
||||
close(s);
|
||||
return(ftp->fd_xfer);
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
FtpEOF(FTP_t ftp)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (ftp->state != xfer)
|
||||
return botch(ftp,"FtpEOF","xfer");
|
||||
debug(ftp, "FtpEOF(ftp)\n");
|
||||
close(ftp->fd_xfer); ftp->fd_xfer = -1;
|
||||
ftp->state = isopen;
|
||||
return get_a_number(ftp,0);
|
||||
i = get_a_number(ftp,0);
|
||||
if (i < 0)
|
||||
return zap(ftp);
|
||||
else if (i != 250 && i != 226)
|
||||
return -1;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef STANDALONE_FTP
|
||||
|
||||
/* main.c */
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
@ -344,23 +421,13 @@ main(int argc, char **argv)
|
||||
char c;
|
||||
|
||||
ftp = FtpInit();
|
||||
if (!ftp) err(1,"FtpInit()");
|
||||
if (!ftp)
|
||||
err(1, "FtpInit()");
|
||||
|
||||
FtpDebug(ftp, 1);
|
||||
i = FtpOpen(ftp, "ref.tfs.com", "ftp", "phk-libftp@");
|
||||
if (i) err(1,"FtpOpen(%d)",i);
|
||||
FtpBinary(ftp,1);
|
||||
FtpPassive(ftp,1);
|
||||
FtpChdir(ftp,"/");
|
||||
FtpChdir(ftp,"CTM");
|
||||
i = FtpGet(ftp,"README");
|
||||
while(1 == read(i,&c,1))
|
||||
putchar(c);
|
||||
FtpEOF(ftp);
|
||||
FtpClose(ftp);
|
||||
i = FtpOpen(ftp, "freefall.cdrom.com", "ftp", "phk-libftp@");
|
||||
FtpBinary(ftp, 1);
|
||||
FtpPassive(ftp,1);
|
||||
FtpPassive(ftp, 0);
|
||||
FtpChdir(ftp, "/pub");
|
||||
FtpChdir(ftp, "FreeBSD");
|
||||
i = FtpGet(ftp, "README");
|
||||
|
@ -4,7 +4,7 @@
|
||||
* This is probably the last attempt in the `sysinstall' line, the next
|
||||
* generation being slated to essentially a complete rewrite.
|
||||
*
|
||||
* $Id: ftp_strat.c,v 1.5 1995/05/29 11:01:19 jkh Exp $
|
||||
* $Id: ftp_strat.c,v 1.6.2.25 1995/06/07 09:53:14 jkh Exp $
|
||||
*
|
||||
* Copyright (c) 1995
|
||||
* Jordan Hubbard. All rights reserved.
|
||||
@ -54,86 +54,195 @@
|
||||
|
||||
Boolean ftpInitted;
|
||||
static FTP_t ftp;
|
||||
extern int FtpPort;
|
||||
|
||||
int
|
||||
mediaSetFtpUserPass(char *str)
|
||||
{
|
||||
char *user, *pass;
|
||||
|
||||
dialog_clear();
|
||||
if ((user = msgGetInput(getenv(FTP_USER), "Please enter the username you wish to login as")) != NULL)
|
||||
variable_set2(FTP_USER, user);
|
||||
if ((pass = msgGetInput(getenv(FTP_PASS), "Please enter the password for this user.\nWARNING: This password will echo on the screen!")) != NULL)
|
||||
variable_set2(FTP_PASS, pass);
|
||||
dialog_clear();
|
||||
return 0;
|
||||
}
|
||||
|
||||
static Boolean
|
||||
get_new_host(Device *dev)
|
||||
{
|
||||
Boolean i;
|
||||
char *oldTitle = MenuMediaFTP.title;
|
||||
Device *netDev = dev->private;
|
||||
|
||||
MenuMediaFTP.title = "Connection timed out - please select another site";
|
||||
i = mediaSetFTP(NULL);
|
||||
MenuMediaFTP.title = oldTitle;
|
||||
if (i) {
|
||||
char *cp = getenv(FTP_USER);
|
||||
|
||||
if (cp && *cp)
|
||||
(void)mediaSetFtpUserPass(NULL);
|
||||
netDev->flags |= OPT_LEAVE_NETWORK_UP;
|
||||
(*dev->shutdown)(dev);
|
||||
i = (*dev->init)(dev);
|
||||
netDev->flags &= ~OPT_LEAVE_NETWORK_UP;
|
||||
}
|
||||
return i;
|
||||
}
|
||||
|
||||
static Boolean HasDistsDir;
|
||||
|
||||
Boolean
|
||||
mediaInitFTP(Device *dev)
|
||||
{
|
||||
int i;
|
||||
int i, retries, max_retries = MAX_FTP_RETRIES;
|
||||
char *cp, *hostname, *dir;
|
||||
char *my_name, email[BUFSIZ], url[BUFSIZ];
|
||||
char *user, *login_name, password[80], url[BUFSIZ];
|
||||
Device *netDevice = (Device *)dev->private;
|
||||
|
||||
if (ftpInitted)
|
||||
return TRUE;
|
||||
|
||||
if (netDevice->init)
|
||||
if (!(*netDevice->init)(netDevice))
|
||||
return FALSE;
|
||||
|
||||
if ((ftp = FtpInit()) == NULL) {
|
||||
msgConfirm("FTP initialisation failed!");
|
||||
return FALSE;
|
||||
goto punt;
|
||||
}
|
||||
if (isDebug())
|
||||
msgDebug("Initialized FTP library.\n");
|
||||
|
||||
cp = getenv("ftp");
|
||||
if (!cp)
|
||||
return FALSE;
|
||||
my_name = getenv(VAR_HOSTNAME);
|
||||
goto punt;
|
||||
if (isDebug())
|
||||
msgDebug("Attempting to open connection for: %s\n", cp);
|
||||
hostname = getenv(VAR_HOSTNAME);
|
||||
if (strncmp("ftp://", cp, 6) != NULL) {
|
||||
msgConfirm("Invalid URL (`%s') passed to FTP routines!\n(must start with `ftp://')", url);
|
||||
return FALSE;
|
||||
msgConfirm("Invalid URL: %s\n(A URL must start with `ftp://' here)", cp);
|
||||
goto punt;
|
||||
}
|
||||
strncpy(url, cp, BUFSIZ);
|
||||
if (isDebug())
|
||||
msgDebug("Using URL `%s'\n", url);
|
||||
hostname = url + 6;
|
||||
if ((dir = index(hostname, '/')) != NULL)
|
||||
if ((cp = index(hostname, ':')) != NULL) {
|
||||
*(cp++) = '\0';
|
||||
FtpPort = strtol(cp, 0, 0);
|
||||
}
|
||||
else
|
||||
FtpPort = 21;
|
||||
if ((dir = index(cp ? cp : hostname, '/')) != NULL)
|
||||
*(dir++) = '\0';
|
||||
strcpy(dev->name, hostname);
|
||||
if (isDebug()) {
|
||||
msgDebug("hostname = `%s'\n", hostname);
|
||||
msgDebug("dir = `%s'\n", dir ? dir : "/");
|
||||
msgDebug("port # = `%d'\n", FtpPort);
|
||||
}
|
||||
msgNotify("Looking up host %s..", hostname);
|
||||
if ((gethostbyname(hostname) == NULL) && (inet_addr(hostname) == INADDR_NONE)) {
|
||||
msgConfirm("Cannot resolve hostname `%s'! Are you sure your name server\nand/or gateway values are set properly?", hostname);
|
||||
msgConfirm("Cannot resolve hostname `%s'! Are you sure that your\nname server, gateway and network interface are configured?", hostname);
|
||||
goto punt;
|
||||
}
|
||||
user = getenv(FTP_USER);
|
||||
if (!user || !*user) {
|
||||
snprintf(password, BUFSIZ, "installer@%s", hostname);
|
||||
login_name = "anonymous";
|
||||
}
|
||||
else {
|
||||
login_name = user;
|
||||
strcpy(password, getenv(FTP_PASS) ? getenv(FTP_PASS) : login_name);
|
||||
}
|
||||
retries = i = 0;
|
||||
if (OptFlags & (OPT_FTP_RESELECT + OPT_FTP_ABORT))
|
||||
max_retries = 0;
|
||||
retry:
|
||||
if (i && ++retries > max_retries) {
|
||||
if ((OptFlags & OPT_FTP_ABORT) || !get_new_host(dev))
|
||||
return FALSE;
|
||||
retries = 0;
|
||||
}
|
||||
msgNotify("Logging in as %s..", login_name);
|
||||
if ((i = FtpOpen(ftp, hostname, login_name, password)) != 0) {
|
||||
if (OptFlags & OPT_NO_CONFIRM)
|
||||
msgNotify("Couldn't open FTP connection to %s\n", hostname);
|
||||
else
|
||||
msgConfirm("Couldn't open FTP connection to %s\n", hostname);
|
||||
goto retry;
|
||||
}
|
||||
|
||||
snprintf(email, BUFSIZ, "installer@%s", my_name);
|
||||
if (isDebug())
|
||||
msgDebug("Using fake e-mail `%s'\n", email);
|
||||
|
||||
msgNotify("Logging in as anonymous.");
|
||||
if ((i = FtpOpen(ftp, hostname, "anonymous", email)) != 0) {
|
||||
msgConfirm("Couldn't open FTP connection to %s: %s (%u)\n", hostname, strerror(i), i);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (getenv("ftpPassive"))
|
||||
FtpPassive(ftp, 1);
|
||||
FtpPassive(ftp, (OptFlags & OPT_FTP_PASSIVE) ? 1 : 0);
|
||||
FtpBinary(ftp, 1);
|
||||
if (dir && *dir != '\0') {
|
||||
msgNotify("CD to distribution in ~ftp/%s", dir);
|
||||
FtpChdir(ftp, dir);
|
||||
if ((i = FtpChdir(ftp, dir)) == -2)
|
||||
goto retry;
|
||||
}
|
||||
if (!FtpChdir(ftp, "dists")) {
|
||||
HasDistsDir = TRUE;
|
||||
FtpChdir(ftp, ".."); /* Hope this works! :-( */
|
||||
}
|
||||
else
|
||||
HasDistsDir = FALSE;
|
||||
if (isDebug())
|
||||
msgDebug("leaving mediaInitFTP!\n");
|
||||
ftpInitted = TRUE;
|
||||
return TRUE;
|
||||
|
||||
punt:
|
||||
FtpClose(ftp);
|
||||
ftp = NULL;
|
||||
(*netDevice->shutdown)(netDevice);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
int
|
||||
mediaGetFTP(char *file)
|
||||
mediaGetFTP(Device *dev, char *file, Attribs *dist_attrs)
|
||||
{
|
||||
return(FtpGet(ftp, file));
|
||||
int fd;
|
||||
int nretries = 0, max_retries = MAX_FTP_RETRIES;
|
||||
Boolean inDists = FALSE;
|
||||
|
||||
if (OptFlags & (OPT_FTP_RESELECT + OPT_FTP_ABORT) || dev->flags & OPT_EXPLORATORY_GET)
|
||||
max_retries = 1;
|
||||
|
||||
while ((fd = FtpGet(ftp, file)) < 0) {
|
||||
/* If a hard fail, try to "bounce" the ftp server to clear it */
|
||||
if (fd == -2 || ++nretries > max_retries) {
|
||||
if ((OptFlags & OPT_FTP_ABORT) || (dev->flags & OPT_EXPLORATORY_GET))
|
||||
return -1;
|
||||
else if (!get_new_host(dev))
|
||||
return -2;
|
||||
nretries = 0;
|
||||
continue;
|
||||
}
|
||||
if (HasDistsDir) {
|
||||
if (!inDists) {
|
||||
FtpChdir(ftp, "dists");
|
||||
inDists = TRUE;
|
||||
}
|
||||
else {
|
||||
FtpChdir(ftp, "..");
|
||||
inDists = FALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (inDists)
|
||||
FtpChdir(ftp, "..");
|
||||
return fd;
|
||||
}
|
||||
|
||||
Boolean
|
||||
mediaCloseFTP(Device *dev, int fd)
|
||||
{
|
||||
FtpEOF(ftp);
|
||||
if (!close(fd))
|
||||
return (TRUE);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void
|
||||
@ -148,7 +257,6 @@ mediaShutdownFTP(Device *dev)
|
||||
FtpClose(ftp);
|
||||
ftp = NULL;
|
||||
}
|
||||
if (netdev->shutdown)
|
||||
(*netdev->shutdown)(netdev);
|
||||
ftpInitted = FALSE;
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
* This is probably the last program in the `sysinstall' line - the next
|
||||
* generation being essentially a complete rewrite.
|
||||
*
|
||||
* $Id: globals.c,v 1.8 1995/05/25 18:48:25 jkh Exp $
|
||||
* $Id: globals.c,v 1.9.2.2 1995/06/05 03:15:38 jkh Exp $
|
||||
*
|
||||
* Copyright (c) 1995
|
||||
* Jordan Hubbard. All rights reserved.
|
||||
@ -48,16 +48,16 @@
|
||||
* whatever values we feel are appropriate.
|
||||
*/
|
||||
|
||||
int RootFD; /* The file descriptor for our ROOT floppy */
|
||||
int DebugFD; /* Where diagnostic output goes */
|
||||
Boolean OnCDROM; /* Are we running off of a CDROM? */
|
||||
Boolean OnSerial; /* Are we on a serial console? */
|
||||
Boolean RunningAsInit; /* Are we running as init? */
|
||||
Boolean DialogActive;
|
||||
Boolean ColorDisplay;
|
||||
Boolean OnVTY;
|
||||
Variable *VarHead; /* The head of the variable chain */
|
||||
Device *mediaDevice; /* Where we're installing from */
|
||||
unsigned int OptFlags; /* Option flags */
|
||||
int BootMgr;
|
||||
char *InstallPrefix; /* Always install under here */
|
||||
|
||||
/*
|
||||
* Yes, I know some of these are already automatically initialized as
|
||||
@ -66,14 +66,13 @@ Device *mediaDevice; /* Where we're installing from */
|
||||
void
|
||||
globalsInit(void)
|
||||
{
|
||||
RootFD = -1;
|
||||
DebugFD = -1;
|
||||
OnCDROM = FALSE;
|
||||
OnSerial = FALSE;
|
||||
ColorDisplay = FALSE;
|
||||
OnVTY = FALSE;
|
||||
DialogActive = FALSE;
|
||||
VarHead = NULL;
|
||||
mediaDevice = NULL;
|
||||
RunningAsInit = FALSE;
|
||||
OptFlags = 0;
|
||||
InstallPrefix = NULL;
|
||||
}
|
||||
|
@ -1,19 +1,20 @@
|
||||
|
||||
-----------------------------------------
|
||||
FreeBSD 2.0.5 --- RELEASE Version , ,
|
||||
----------------------------------------- /( )`
|
||||
\ \___ / |
|
||||
Willkommen zur Release 2.0.5 von FreeBSD. 2.0.5, /- _ `-/ '
|
||||
ein Zwischen-Release von FreeBSD, f|llt eine oft (/\/ \ \ /\
|
||||
geforderte L|cke zwischen 2.0R (das im Nov. '94 / / | ` \
|
||||
erschien) und 2.1R, das spdt im Juli '95 er- O O ) / |
|
||||
scheinen wird. FreeBSD 2.0.5 enthdlt wesentliche `-^--'`< '
|
||||
Verbesserungen gg|. 2.0R, deren wichtigste eine (_.) _ ) /
|
||||
erhvhte Systemstabilitdt (wesentlich besser), `.___/` /
|
||||
Willkommen zum Release 2.0.5 von FreeBSD, einem /- _ `-/ '
|
||||
Zwischen-Release von FreeBSD, das eine eine Lücke (/\/ \ \ /\
|
||||
füllt zwischen 2.0R (das im Nov. 94 erschien) und / / | ` \
|
||||
2.1R, das Ende Juli '95 erscheinen wird, die oft O O ) / |
|
||||
beklagt wurde. FreeBSD 2.0.5 enthält wesentliche `-^--'`< '
|
||||
Verbesserungen gegenüber 2.0R, deren wichtigste (_.) _ ) /
|
||||
eine erhöhte Systemstabilität (wesentlich besser), `.___/` /
|
||||
Dutzende neuer Features und ein stark `-----' /
|
||||
verbessertes Installationsprogramm <----. __ / __ \
|
||||
sind. Lesen Sie die Release Notes <----|====O)))==) \) /====
|
||||
f|r weitere Details bzgl. der Neu- <----' `--' `.__,' \
|
||||
heiten in FreeBSD 2.0.5. | |
|
||||
sind. Die Release Notes enthalten <----|====O)))==) \) /====
|
||||
weitere Details bzgl. der Neuheiten <----' `--' `.__,' \
|
||||
in FreeBSD 2.0.5. | |
|
||||
\ / /\
|
||||
______( (_ / \______/
|
||||
,' ,-----' |
|
||||
@ -21,64 +22,61 @@ heiten in FreeBSD 2.0.5. | |
|
||||
|
||||
|
||||
|
||||
Was ist FreeBSD? FreeBSD ist ein 4.4BSD Lite basiertes Betriebssystem
|
||||
f|r Intel, AMD, Cyrix oder NexGen "x86"-PC-Hardware. Es arbeitet mit
|
||||
einer gro_en Anzahl von PC-Peripherie und -Konfigurationen zusammen. Es
|
||||
kann f|r die Software-Entwicklung bis hin zum Anbieten von Internet-
|
||||
Diensten eingesetzt werden; der meist genutzte Rechner im Internet,
|
||||
ftp.cdrom.com, ist ein FreeBSD-Rechner.
|
||||
Was ist FreeBSD? FreeBSD ist ein 4.4BSD-Lite-basiertes Betriebssystem für
|
||||
Intel, AMD, Cyrix oder NexGen "x86"-PC-Hardware. Es arbeitet mit einer
|
||||
großen Anzahl von PC-Peripherie und -Konfigurationen zusammen. Es kann für
|
||||
die Software-Entwicklung bis hin zum Anbieten von Internet-Diensten
|
||||
eingesetzt werden; der meist genutzte Rechner im Internet, ftp.cdrom.com,
|
||||
ist ein FreeBSD-Rechner.
|
||||
|
||||
Diese FreeBSD-Release enthdlt alles was Sie zur Nutzung eines
|
||||
solchen Systems brauchen; zusdtzlich erhalten Sie den kompletten
|
||||
Quellcode. Wenn Sie den Quellcode installiert haben, kvnnen Sie
|
||||
das ganze Betriebssystem von Grund auf mit einem einzigen Befehl
|
||||
|bersetzen; dies eignet es in idealer Weise f|r Studenten, Forscher
|
||||
oder einfach Leute, die sehen wollen wie alles funktioniert.
|
||||
Dieses FreeBSD-Release enthält alles, was man zur Nutzung eines solchen
|
||||
Systems braucht; zusätzlich erhält man den kompletten Quellcode. Wenn man
|
||||
den Quellcode installiert hat, kann man das ganze Betriebssystem von Grund
|
||||
auf mit einem einzigen Befehl übersetzen; dies eignet es in idealer Weise
|
||||
für Studenten, Forscher oder einfach Leute, die sehen wollen, wie alles
|
||||
funktioniert.
|
||||
|
||||
Eine gro_e Anzahl portierter Dritt-Software (die "ports collection")
|
||||
gibt es ebenfalls, um Ihnen die Verf|gbarkeit und die Installation
|
||||
Ihrer traditionellen Lieblings-UNIX-Utilities f|r FreeBSD zu
|
||||
erleichtern. \ber 270 Portierungen, vom EMACS Editor bis zur
|
||||
Programmiersprache LISP, machen FreeBSD zu einem mdchtigen
|
||||
und umfassenden Betriebssystem, das keinen Vergleich zu dem gro_er
|
||||
Workstations scheut.
|
||||
Es gibt ebenfalls eine große Anzahl portierter Dritt-Software (die "ports
|
||||
collection"), um die Verfügbarkeit und die Installation traditioneller
|
||||
Lieblings-UNIX-Utilities für FreeBSD zu erleichtern. Über 270 Portierun-
|
||||
gen, von Editoren über Programmiersprachen bis zu Grafikanwendungen, machen
|
||||
FreeBSD zu einem mächtigen und umfassenden Betriebssystem, das keinen
|
||||
Vergleich zu dem großer Workstations scheut.
|
||||
|
||||
Als weitere Dokumentation zu diesem System empfehlen wir die 4.4BSD
|
||||
Dokumentation von O'Reilly Associates und der USENIX Association,
|
||||
ISBN 1-56592-082-1. Wir sind nicht mit O'Reilly verbunden, sondern
|
||||
nur zufriedene Kunden!
|
||||
Als weitere Dokumentation zu diesem System empfehlen wir die 4.4BSD-
|
||||
Dokumentation von O'Reilly Associates und der USENIX Association, ISBN
|
||||
1-56592-082-1. Wir haben nichts mit O'Reilly zu tun, außer daß wir
|
||||
zufriedene Kunden sind!
|
||||
|
||||
Wir empfehlen die HARDWARE ANLEITUNG *vor* jeglicher Fortf|hrung der
|
||||
Installation zu lesen. PC Hardware f|r irgend etwas anderes als
|
||||
DOS/Windows (das keine gro_en Anforderungen an die Hardware stellt)
|
||||
zu konfigurieren, ist schwieriger als es zundchst aussieht. Und wenn
|
||||
Sie glauben PCs zu verstehen, dann haben Sie diese noch nicht lange
|
||||
genung benutzt :) Diese Anleitung wird Ihnen einige Tips zur Konfigu-
|
||||
ration Ihrer Hardware geben und Ihnen sagen auf welche Symptome Sie
|
||||
bei Schwierigkeiten achten m|ssen. Die Anleitung ist im Dokumentations-
|
||||
menue der FreeBSD Bootfloppy verf|gbar.
|
||||
Wir empfehlen, die HARDWARE-ANLEITUNG *vor* jeglicher Fortführung der
|
||||
Installation zu lesen. PC-Hardware für irgend etwas anderes als DOS/
|
||||
Windows (das keine großen Anforderungen an die Hardware stellt) zu
|
||||
konfigurieren, ist schwieriger, als es zunächst aussieht. Und wenn man
|
||||
glaubt, PCs zu verstehen, dann hat man diese nur noch nicht lange genug
|
||||
benutzt. :) Diese Anleitung gibt einige Tips zur Hardwarekonfiguration und
|
||||
sagt, auf welche Symptome man bei Schwierigkeiten achten muß. Die Anlei-
|
||||
tung ist im Dokumentations-Menü der FreeBSD-Bootfloppy verfügbar.
|
||||
|
||||
VORBEHALT: Obwohl FreeBSD alles versucht Ihre Daten gegen zufdlligen
|
||||
Verlust zu sch|tzen, ist es mit dieser Installation mehr als nur mvglich
|
||||
IHRE GESAMTE FESTPLATTE ZU LVSCHEN! Bitte fahren Sie nicht mit der
|
||||
endg|ltigen Installation von FreeBSD fort, ohne zuerst alle wichtigen
|
||||
Daten angemessen gesichert zu haben! Wir empfehlen es eindringlichst!
|
||||
VORBEHALT: Obwohl FreeBSD alles versucht, vorhandene Daten gegen versehent-
|
||||
lichen Verlust zu schützen, ist es mit dieser Installation mehr als nur
|
||||
möglich, DIE GESAMTE FESTPLATTE ZU LÖSCHEN! Bitte nicht mit der endgül-
|
||||
tigen Installation von FreeBSD fortfahren, ohne zuerst alle wichtigen Daten
|
||||
angemessen gesichert zu haben! Wir empfehlen es eindringlichst!
|
||||
|
||||
Technische Kommentare dieser Release sollten an:
|
||||
Technische Kommentare zu diesem Release sollten an:
|
||||
|
||||
hackers@FreeBSD.org
|
||||
|
||||
gesandt werden.
|
||||
gesandt werden (wenn möglich, in englisch).
|
||||
|
||||
Fehlermeldungen sollten bei erfolgreicher Installation mittels des
|
||||
`send-pr' Kommandos, ansonsten an:
|
||||
`send-pr'-Kommandos, ansonsten an:
|
||||
|
||||
bugs@FreeBSD.org
|
||||
|
||||
gesandt werden.
|
||||
|
||||
Bitte stellen Sie sicher, da_ die von Ihnen genutzte FreeBSD-VERSION
|
||||
in jeder Fehlermeldung genannt wird!
|
||||
Bitte in jeder Fehlermeldung die genutzte FreeBSD-VERSION nennen!
|
||||
|
||||
Allgemeine Fragen sollten an:
|
||||
|
||||
@ -86,24 +84,23 @@ Allgemeine Fragen sollten an:
|
||||
|
||||
gesandt werden.
|
||||
|
||||
Wir bitten um Geduld, wenn Ihre Fragen nicht sofort beantwortet werden -
|
||||
dieses sind besonders arbeitsintensive Zeiten f|r uns, und unsere
|
||||
Resourcen i(auf freiwilliger Basis) sind oft bis an die Grenzen ausgereizt!
|
||||
Mittels send-pr verschickte Fehlermeldungen werden registriert und in
|
||||
unserer Datenbank verfolgt. Sie werden |ber Statusdnderungen |ber die
|
||||
gesamte Lebensdauer des Fehlers (oder der Forderung nach einem Feature)
|
||||
auf dem Laufenden gehalten.
|
||||
Wir bitten um Geduld, wenn die Fragen nicht sofort beantwortet werden -
|
||||
dieses sind besonders arbeitsintensive Zeiten für uns, und unsere Resourcen
|
||||
(auf freiwilliger Basis) sind oft bis an die Grenzen ausgereizt! Mittels
|
||||
send-pr verschickte Fehlermeldungen werden registriert und in unserer
|
||||
Datenbank verfolgt. Über Statusänderungen wird über die gesamte Lebensdauer
|
||||
des Fehlers (oder der Forderung nach einem Feature) informiert.
|
||||
|
||||
Unsere WEB Site, http://www.freebsd.org, ist ebenfalls eine gute Quelle
|
||||
f|r neue Informationen und enthdlt einige weitere, fortf|hrende Infor-
|
||||
mationen. Sie kvnnen die BSDI-Version von Netscape zum browsen (bldttern)
|
||||
für neue Informationen und enthält einige weitere, fortführende Infor-
|
||||
mationen. Man kann die BSDI-Version von Netscape zum Browsen (Blättern)
|
||||
im World Wide Web direkt aus FreeBSD heraus nutzen.
|
||||
|
||||
Wir empfehlen auch in /usr/share/FAQ und /usr/share/doc zu weiteren
|
||||
Informationen zum System nachzuschauen.
|
||||
|
||||
Wir danken Ihnen f|r Ihre Aufmerksamkeit und hoffen, da_ Ihnen dieses
|
||||
Release von FreeBSD viel Freude bereitet.
|
||||
Wir danken für die Aufmerksamkeit und hoffen, daß dieses Release von
|
||||
FreeBSD viel Freude bereitet.
|
||||
|
||||
Jordan Hubbard,
|
||||
f|r das FreeBSD Projekt
|
||||
für das FreeBSD Projekt
|
||||
|
@ -10,7 +10,6 @@ PFEIL NACH RECHTS Zum n
|
||||
SHIFT-TAB Zum vorherigen Feld oder zur vorherigen Gruppe.
|
||||
PFEIL NACH LINKS Zum vorherigen Feld oder zur vorherigen Gruppe (wie SH-TAB).
|
||||
RETURN Menüpunkt auswählen.
|
||||
ESC Eine Subshell zu Hilfszwecken starten. `exit' beendet sie.
|
||||
BILD NACH OBEN Innerhalb von Textkästen: eine Seite zurück.
|
||||
BILD NACH UNTEN Innerhalb von Textkästen: eine Seite vor.
|
||||
LEERTASTE In Menüs mit mehreren Auswahlmöglichkeiten: umschalten.
|
||||
|
@ -1,19 +1,20 @@
|
||||
|
||||
-----------------------------------------
|
||||
FreeBSD 2.0.5 --- RELEASE Version , ,
|
||||
----------------------------------------- /( )`
|
||||
\ \___ / |
|
||||
Willkommen zur Release 2.0.5 von FreeBSD. 2.0.5, /- _ `-/ '
|
||||
ein Zwischen-Release von FreeBSD, f|llt eine oft (/\/ \ \ /\
|
||||
geforderte L|cke zwischen 2.0R (das im Nov. '94 / / | ` \
|
||||
erschien) und 2.1R, das spdt im Juli '95 er- O O ) / |
|
||||
scheinen wird. FreeBSD 2.0.5 enthdlt wesentliche `-^--'`< '
|
||||
Verbesserungen gg|. 2.0R, deren wichtigste eine (_.) _ ) /
|
||||
erhvhte Systemstabilitdt (wesentlich besser), `.___/` /
|
||||
Willkommen zum Release 2.0.5 von FreeBSD, einem /- _ `-/ '
|
||||
Zwischen-Release von FreeBSD, das eine eine Lücke (/\/ \ \ /\
|
||||
füllt zwischen 2.0R (das im Nov. 94 erschien) und / / | ` \
|
||||
2.1R, das Ende Juli '95 erscheinen wird, die oft O O ) / |
|
||||
beklagt wurde. FreeBSD 2.0.5 enthält wesentliche `-^--'`< '
|
||||
Verbesserungen gegenüber 2.0R, deren wichtigste (_.) _ ) /
|
||||
eine erhöhte Systemstabilität (wesentlich besser), `.___/` /
|
||||
Dutzende neuer Features und ein stark `-----' /
|
||||
verbessertes Installationsprogramm <----. __ / __ \
|
||||
sind. Lesen Sie die Release Notes <----|====O)))==) \) /====
|
||||
f|r weitere Details bzgl. der Neu- <----' `--' `.__,' \
|
||||
heiten in FreeBSD 2.0.5. | |
|
||||
sind. Die Release Notes enthalten <----|====O)))==) \) /====
|
||||
weitere Details bzgl. der Neuheiten <----' `--' `.__,' \
|
||||
in FreeBSD 2.0.5. | |
|
||||
\ / /\
|
||||
______( (_ / \______/
|
||||
,' ,-----' |
|
||||
@ -21,64 +22,61 @@ heiten in FreeBSD 2.0.5. | |
|
||||
|
||||
|
||||
|
||||
Was ist FreeBSD? FreeBSD ist ein 4.4BSD Lite basiertes Betriebssystem
|
||||
f|r Intel, AMD, Cyrix oder NexGen "x86"-PC-Hardware. Es arbeitet mit
|
||||
einer gro_en Anzahl von PC-Peripherie und -Konfigurationen zusammen. Es
|
||||
kann f|r die Software-Entwicklung bis hin zum Anbieten von Internet-
|
||||
Diensten eingesetzt werden; der meist genutzte Rechner im Internet,
|
||||
ftp.cdrom.com, ist ein FreeBSD-Rechner.
|
||||
Was ist FreeBSD? FreeBSD ist ein 4.4BSD-Lite-basiertes Betriebssystem für
|
||||
Intel, AMD, Cyrix oder NexGen "x86"-PC-Hardware. Es arbeitet mit einer
|
||||
großen Anzahl von PC-Peripherie und -Konfigurationen zusammen. Es kann für
|
||||
die Software-Entwicklung bis hin zum Anbieten von Internet-Diensten
|
||||
eingesetzt werden; der meist genutzte Rechner im Internet, ftp.cdrom.com,
|
||||
ist ein FreeBSD-Rechner.
|
||||
|
||||
Diese FreeBSD-Release enthdlt alles was Sie zur Nutzung eines
|
||||
solchen Systems brauchen; zusdtzlich erhalten Sie den kompletten
|
||||
Quellcode. Wenn Sie den Quellcode installiert haben, kvnnen Sie
|
||||
das ganze Betriebssystem von Grund auf mit einem einzigen Befehl
|
||||
|bersetzen; dies eignet es in idealer Weise f|r Studenten, Forscher
|
||||
oder einfach Leute, die sehen wollen wie alles funktioniert.
|
||||
Dieses FreeBSD-Release enthält alles, was man zur Nutzung eines solchen
|
||||
Systems braucht; zusätzlich erhält man den kompletten Quellcode. Wenn man
|
||||
den Quellcode installiert hat, kann man das ganze Betriebssystem von Grund
|
||||
auf mit einem einzigen Befehl übersetzen; dies eignet es in idealer Weise
|
||||
für Studenten, Forscher oder einfach Leute, die sehen wollen, wie alles
|
||||
funktioniert.
|
||||
|
||||
Eine gro_e Anzahl portierter Dritt-Software (die "ports collection")
|
||||
gibt es ebenfalls, um Ihnen die Verf|gbarkeit und die Installation
|
||||
Ihrer traditionellen Lieblings-UNIX-Utilities f|r FreeBSD zu
|
||||
erleichtern. \ber 270 Portierungen, vom EMACS Editor bis zur
|
||||
Programmiersprache LISP, machen FreeBSD zu einem mdchtigen
|
||||
und umfassenden Betriebssystem, das keinen Vergleich zu dem gro_er
|
||||
Workstations scheut.
|
||||
Es gibt ebenfalls eine große Anzahl portierter Dritt-Software (die "ports
|
||||
collection"), um die Verfügbarkeit und die Installation traditioneller
|
||||
Lieblings-UNIX-Utilities für FreeBSD zu erleichtern. Über 270 Portierun-
|
||||
gen, von Editoren über Programmiersprachen bis zu Grafikanwendungen, machen
|
||||
FreeBSD zu einem mächtigen und umfassenden Betriebssystem, das keinen
|
||||
Vergleich zu dem großer Workstations scheut.
|
||||
|
||||
Als weitere Dokumentation zu diesem System empfehlen wir die 4.4BSD
|
||||
Dokumentation von O'Reilly Associates und der USENIX Association,
|
||||
ISBN 1-56592-082-1. Wir sind nicht mit O'Reilly verbunden, sondern
|
||||
nur zufriedene Kunden!
|
||||
Als weitere Dokumentation zu diesem System empfehlen wir die 4.4BSD-
|
||||
Dokumentation von O'Reilly Associates und der USENIX Association, ISBN
|
||||
1-56592-082-1. Wir haben nichts mit O'Reilly zu tun, außer daß wir
|
||||
zufriedene Kunden sind!
|
||||
|
||||
Wir empfehlen die HARDWARE ANLEITUNG *vor* jeglicher Fortf|hrung der
|
||||
Installation zu lesen. PC Hardware f|r irgend etwas anderes als
|
||||
DOS/Windows (das keine gro_en Anforderungen an die Hardware stellt)
|
||||
zu konfigurieren, ist schwieriger als es zundchst aussieht. Und wenn
|
||||
Sie glauben PCs zu verstehen, dann haben Sie diese noch nicht lange
|
||||
genung benutzt :) Diese Anleitung wird Ihnen einige Tips zur Konfigu-
|
||||
ration Ihrer Hardware geben und Ihnen sagen auf welche Symptome Sie
|
||||
bei Schwierigkeiten achten m|ssen. Die Anleitung ist im Dokumentations-
|
||||
menue der FreeBSD Bootfloppy verf|gbar.
|
||||
Wir empfehlen, die HARDWARE-ANLEITUNG *vor* jeglicher Fortführung der
|
||||
Installation zu lesen. PC-Hardware für irgend etwas anderes als DOS/
|
||||
Windows (das keine großen Anforderungen an die Hardware stellt) zu
|
||||
konfigurieren, ist schwieriger, als es zunächst aussieht. Und wenn man
|
||||
glaubt, PCs zu verstehen, dann hat man diese nur noch nicht lange genug
|
||||
benutzt. :) Diese Anleitung gibt einige Tips zur Hardwarekonfiguration und
|
||||
sagt, auf welche Symptome man bei Schwierigkeiten achten muß. Die Anlei-
|
||||
tung ist im Dokumentations-Menü der FreeBSD-Bootfloppy verfügbar.
|
||||
|
||||
VORBEHALT: Obwohl FreeBSD alles versucht Ihre Daten gegen zufdlligen
|
||||
Verlust zu sch|tzen, ist es mit dieser Installation mehr als nur mvglich
|
||||
IHRE GESAMTE FESTPLATTE ZU LVSCHEN! Bitte fahren Sie nicht mit der
|
||||
endg|ltigen Installation von FreeBSD fort, ohne zuerst alle wichtigen
|
||||
Daten angemessen gesichert zu haben! Wir empfehlen es eindringlichst!
|
||||
VORBEHALT: Obwohl FreeBSD alles versucht, vorhandene Daten gegen versehent-
|
||||
lichen Verlust zu schützen, ist es mit dieser Installation mehr als nur
|
||||
möglich, DIE GESAMTE FESTPLATTE ZU LÖSCHEN! Bitte nicht mit der endgül-
|
||||
tigen Installation von FreeBSD fortfahren, ohne zuerst alle wichtigen Daten
|
||||
angemessen gesichert zu haben! Wir empfehlen es eindringlichst!
|
||||
|
||||
Technische Kommentare dieser Release sollten an:
|
||||
Technische Kommentare zu diesem Release sollten an:
|
||||
|
||||
hackers@FreeBSD.org
|
||||
|
||||
gesandt werden.
|
||||
gesandt werden (wenn möglich, in englisch).
|
||||
|
||||
Fehlermeldungen sollten bei erfolgreicher Installation mittels des
|
||||
`send-pr' Kommandos, ansonsten an:
|
||||
`send-pr'-Kommandos, ansonsten an:
|
||||
|
||||
bugs@FreeBSD.org
|
||||
|
||||
gesandt werden.
|
||||
|
||||
Bitte stellen Sie sicher, da_ die von Ihnen genutzte FreeBSD-VERSION
|
||||
in jeder Fehlermeldung genannt wird!
|
||||
Bitte in jeder Fehlermeldung die genutzte FreeBSD-VERSION nennen!
|
||||
|
||||
Allgemeine Fragen sollten an:
|
||||
|
||||
@ -86,24 +84,23 @@ Allgemeine Fragen sollten an:
|
||||
|
||||
gesandt werden.
|
||||
|
||||
Wir bitten um Geduld, wenn Ihre Fragen nicht sofort beantwortet werden -
|
||||
dieses sind besonders arbeitsintensive Zeiten f|r uns, und unsere
|
||||
Resourcen i(auf freiwilliger Basis) sind oft bis an die Grenzen ausgereizt!
|
||||
Mittels send-pr verschickte Fehlermeldungen werden registriert und in
|
||||
unserer Datenbank verfolgt. Sie werden |ber Statusdnderungen |ber die
|
||||
gesamte Lebensdauer des Fehlers (oder der Forderung nach einem Feature)
|
||||
auf dem Laufenden gehalten.
|
||||
Wir bitten um Geduld, wenn die Fragen nicht sofort beantwortet werden -
|
||||
dieses sind besonders arbeitsintensive Zeiten für uns, und unsere Resourcen
|
||||
(auf freiwilliger Basis) sind oft bis an die Grenzen ausgereizt! Mittels
|
||||
send-pr verschickte Fehlermeldungen werden registriert und in unserer
|
||||
Datenbank verfolgt. Über Statusänderungen wird über die gesamte Lebensdauer
|
||||
des Fehlers (oder der Forderung nach einem Feature) informiert.
|
||||
|
||||
Unsere WEB Site, http://www.freebsd.org, ist ebenfalls eine gute Quelle
|
||||
f|r neue Informationen und enthdlt einige weitere, fortf|hrende Infor-
|
||||
mationen. Sie kvnnen die BSDI-Version von Netscape zum browsen (bldttern)
|
||||
für neue Informationen und enthält einige weitere, fortführende Infor-
|
||||
mationen. Man kann die BSDI-Version von Netscape zum Browsen (Blättern)
|
||||
im World Wide Web direkt aus FreeBSD heraus nutzen.
|
||||
|
||||
Wir empfehlen auch in /usr/share/FAQ und /usr/share/doc zu weiteren
|
||||
Informationen zum System nachzuschauen.
|
||||
|
||||
Wir danken Ihnen f|r Ihre Aufmerksamkeit und hoffen, da_ Ihnen dieses
|
||||
Release von FreeBSD viel Freude bereitet.
|
||||
Wir danken für die Aufmerksamkeit und hoffen, daß dieses Release von
|
||||
FreeBSD viel Freude bereitet.
|
||||
|
||||
Jordan Hubbard,
|
||||
f|r das FreeBSD Projekt
|
||||
für das FreeBSD Projekt
|
||||
|
@ -10,7 +10,6 @@ PFEIL NACH RECHTS Zum n
|
||||
SHIFT-TAB Zum vorherigen Feld oder zur vorherigen Gruppe.
|
||||
PFEIL NACH LINKS Zum vorherigen Feld oder zur vorherigen Gruppe (wie SH-TAB).
|
||||
RETURN Menüpunkt auswählen.
|
||||
ESC Eine Subshell zu Hilfszwecken starten. `exit' beendet sie.
|
||||
BILD NACH OBEN Innerhalb von Textkästen: eine Seite zurück.
|
||||
BILD NACH UNTEN Innerhalb von Textkästen: eine Seite vor.
|
||||
LEERTASTE In Menüs mit mehreren Auswahlmöglichkeiten: umschalten.
|
||||
|
@ -3,6 +3,7 @@
|
||||
20 January 1995
|
||||
|
||||
1. What and Where is XFree86?
|
||||
------------------------------
|
||||
|
||||
XFree86 is a port of X11R6 that supports several versions of Intel-
|
||||
based Unix. It is derived from X386 1.2, which was the X server
|
||||
@ -13,13 +14,15 @@
|
||||
|
||||
See the Copyright Notice (COPYRIGHT.html).
|
||||
|
||||
The sources for XFree86 are available by anonymous ftp from:
|
||||
The sources for XFree86 are available as part of the FreeBSD 2.0.5
|
||||
distribution, or by anonymous ftp from:
|
||||
|
||||
ftp.XFree86.org:/pub/XFree86/current
|
||||
(ftp://ftp.XFree86.org/pub/XFree86/current)
|
||||
|
||||
|
||||
Binaries for XFree86 on FreeBSD are available from:
|
||||
Binaries for XFree86 on FreeBSD are also available as part of
|
||||
2.0.5 or from:
|
||||
|
||||
ftp.XFree86.org:/pub/XFree86/current/binaries/FreeBSD-2.0
|
||||
(ftp://ftp.XFree86.org/pub/XFree86/current/binaries/FreeBSD-2.0)
|
||||
@ -31,28 +34,33 @@
|
||||
comments or suggestions about this file and we'll revise it.
|
||||
|
||||
|
||||
|
||||
2. Installing the Binaries
|
||||
---------------------------
|
||||
|
||||
If you want to save space, first select which archives you want to
|
||||
unpack. If you can't decide what to pick and you have 52Mb of disk
|
||||
In the FreeBSD 2.0.5 distribution, XFree86 comes in 3 major sections:
|
||||
"basic" distributions, fonts and servers. At the minimum, you will
|
||||
need the binaries and libraries from the basic distribution, the
|
||||
"misc" fonts collection and at least one server. The smallest usable
|
||||
distribution is around 9MB.
|
||||
|
||||
If you can't decide what to pick and you have 52Mb of disk
|
||||
space, it's safe to unpack everything.
|
||||
|
||||
At a minimum you need to unpack the 'required' X311*.tgz archives plus
|
||||
at least one server that matches your vga card. You'll need 9Mb for
|
||||
the minimum required run-time binaries only.
|
||||
|
||||
What follows is a description of the various distribution files
|
||||
comprising XFree86. If you are installing this as part of FreeBSD
|
||||
2.0.5 then there's no need to use these files directly: You may
|
||||
simply check the desired components off the installation menus
|
||||
provided for that purpose. If you're installing this manually,
|
||||
then the following information should prove useful:
|
||||
|
||||
Required (6.7Mb):
|
||||
|
||||
X311bin.tgz
|
||||
all the executable X client applications and shared libs
|
||||
|
||||
|
||||
X311fnts.tgz
|
||||
the misc and 75 dpi fonts
|
||||
|
||||
|
||||
X311lib.tgz
|
||||
data files needed at runtime
|
||||
|
||||
@ -63,110 +71,92 @@
|
||||
X311xicf.tgz
|
||||
customizable xinit runtime configuration file
|
||||
|
||||
|
||||
X311xdcf.tgz
|
||||
customizable xdm runtime configuration file
|
||||
|
||||
|
||||
Choose at least one server ( 2.3Mb):
|
||||
|
||||
X3118514.tgz
|
||||
8-bit color for IBM 8514 and true compatibles.
|
||||
|
||||
|
||||
X311AGX.tgz
|
||||
8-bit color for AGX boards.
|
||||
|
||||
|
||||
X311Mch3.tgz
|
||||
8 and 16-bit color for ATI Mach32 boards.
|
||||
|
||||
|
||||
X311Mch8.tgz
|
||||
8-bit color for ATI Mach8 boards.
|
||||
|
||||
|
||||
X311Mono.tgz
|
||||
1-bit monochrome for VGA, Super-VGA, Hercules, and others.
|
||||
|
||||
|
||||
X311P9K.tgz
|
||||
8, 16, and 24-bit color for Weitek P9000 boards (Diamond
|
||||
Viper).
|
||||
|
||||
|
||||
X311S3.tgz
|
||||
8, 16 and 24-bit color for S3 boards (#9 GXE, Actix GE32,
|
||||
SPEA Mercury, STB Pegasus)
|
||||
|
||||
|
||||
X311SVGA.tgz
|
||||
8-bit color for Super-VGA cards.
|
||||
|
||||
|
||||
X311VG16.tgz
|
||||
4-bit color for VGA and Super-VGA cards
|
||||
|
||||
|
||||
X311W32.tgz
|
||||
8-bit Color for ET4000/W32, /W32i and /W32p cards.
|
||||
|
||||
|
||||
X311nest.tgz
|
||||
A nested server running as a client window on another
|
||||
display.
|
||||
|
||||
|
||||
Optional:
|
||||
|
||||
|
||||
X311doc.tgz
|
||||
(.5Mb) READMEs and XFree86 specific man pages
|
||||
|
||||
|
||||
X311man.tgz
|
||||
(1.7Mb) man pages except XFree86 specific ones in etc archive
|
||||
|
||||
|
||||
X311f100.tgz
|
||||
(1.8Mb) 100dpi fonts
|
||||
|
||||
X311fscl.tgz
|
||||
(1.6Mb) Speedo and Type1 fonts
|
||||
|
||||
|
||||
X311fnon.tgz
|
||||
(3.3Mb) Japanese, Chinese and other non-english fonts
|
||||
|
||||
(3.3Mb) Japanese, Chinese and other non-English fonts
|
||||
|
||||
X311fsrv.tgz
|
||||
(.3Mb) the font server and it's man page
|
||||
|
||||
|
||||
X311prog.tgz
|
||||
(3.9Mb) config, lib*.a and *.h files needed only for
|
||||
compiling
|
||||
|
||||
|
||||
X311link.tgz
|
||||
(7.8Mb) X server reconfiguration kit
|
||||
|
||||
|
||||
X311pex.tgz
|
||||
(.5Mb) PEX fonts and shared libs needed by PEX applications.
|
||||
|
||||
|
||||
X311lbx.tgz
|
||||
(.2Mb) low bandwidth X proxy server and libraries.
|
||||
|
||||
Note that there is no longer a separate xdm archive. FreeBSD 2.0
|
||||
handles this in shared libraries now, so that the xdm binary does not
|
||||
itself contain des and there is no more need for us to provide
|
||||
separate tar balls.
|
||||
|
||||
and later handles this in shared libraries now, so that the xdm
|
||||
binary does not itself contain des and there is no more need for
|
||||
us to provide separate tar balls.
|
||||
|
||||
|
||||
2.1. Full Install:
|
||||
-------------------
|
||||
|
||||
[ Note: Unless you're installing XFree86 3.1.1u1 manually, that is
|
||||
to say not as part of the FreeBSD 2.0.5 installation, you may skip
|
||||
to section 2.3 ]
|
||||
|
||||
1. You must be logged in as root to unpack the archives because
|
||||
several executables are set-user-id. Otherwise the server may
|
||||
@ -178,20 +168,15 @@
|
||||
# umask 022
|
||||
|
||||
|
||||
|
||||
|
||||
2. If you have 52Mb free in the /usr partition ``cd /usr'' and skip
|
||||
to no. 3. Otherwise, create a directory on another partition
|
||||
and sym link it into /usr:
|
||||
|
||||
|
||||
# cd /usr/local
|
||||
# mkdir X11R6
|
||||
# ln -s /usr/local/X11R6 /usr/X11R6
|
||||
|
||||
|
||||
|
||||
|
||||
3. Unpack everything:
|
||||
|
||||
If you are using sh (as root usually does):
|
||||
@ -201,8 +186,6 @@
|
||||
# done
|
||||
|
||||
|
||||
|
||||
|
||||
Else, if you are using csh:
|
||||
|
||||
% foreach i (X311*.tgz)
|
||||
@ -210,60 +193,50 @@
|
||||
% end
|
||||
|
||||
|
||||
|
||||
|
||||
4. Create a symbolic link ``X'' that points to the server that
|
||||
matches your video card. The XF86_* man pages list which vga
|
||||
chip sets are supported by each server. For example, if you
|
||||
have an ET4000 based card you will use the XF86_SVGA server:
|
||||
|
||||
|
||||
# cd /usr/X11R6/bin; rm X; ln -s XF86_SVGA X
|
||||
|
||||
|
||||
|
||||
|
||||
2.2. Minimal Install:
|
||||
----------------------
|
||||
|
||||
First do numbers 1 and 2 above. Then unpack the required archives:
|
||||
|
||||
|
||||
# for i in bin fnts lib xicf; do
|
||||
# tar -xzf X311$i.tgz
|
||||
# done
|
||||
|
||||
|
||||
|
||||
Then unpack a server archive corresponding to your vga card. The
|
||||
server man pages, X11R6/man/man1/XF86_*, list the vga chip sets
|
||||
supported by each server. For example, if you have an ET4000 based
|
||||
card you will use the XF86_SVGA server:
|
||||
|
||||
|
||||
# tar -xzf X311SVGA.tgz
|
||||
# cd /usr/X11R6/bin; rm X; ln -s XF86_SVGA X
|
||||
|
||||
|
||||
|
||||
|
||||
2.3. After either Full or Minimal Install above:
|
||||
-------------------------------------------------
|
||||
|
||||
Add /usr/X11R6/bin to the default path for sh in /etc/profile and for
|
||||
csh in /etc/csh.login if they are not already there:
|
||||
|
||||
|
||||
# echo 'set path = ($path /usr/X11R6/bin)' >>/etc/csh.login
|
||||
# echo 'PATH=$PATH:/usr/X11R6/bin' >>/etc/profile
|
||||
|
||||
|
||||
|
||||
Or make sure all who use X put /usr/X11R6/bin in their shell's
|
||||
``path'' variable.
|
||||
|
||||
Next either reboot or invoke ldconfig as root to put the shared
|
||||
libraries in ld.so's cache:
|
||||
# ldconfig /usr/lib /usr/local/lib /usr/X11R6/lib
|
||||
|
||||
# ldconfig /usr/lib /usr/local/lib /usr/X11R6/lib
|
||||
|
||||
|
||||
If you had already configured X11R6/lib/X11/xinit/xinitrc or
|
||||
@ -277,7 +250,6 @@
|
||||
archive contains pex clients and libraries for building 3D graphics
|
||||
applications.
|
||||
|
||||
|
||||
NOTE: You don't need to uncompress the font files, but if
|
||||
you uncompress them anyway you must run mkfontdir in the
|
||||
corresponding font directory; otherwise your server will
|
||||
@ -286,6 +258,7 @@
|
||||
|
||||
|
||||
3. Installing The Display Manager (xdm)
|
||||
----------------------------------------
|
||||
|
||||
The display manager makes your PC look like an X terminal. That is,
|
||||
it presents you with a login screen that runs under X.
|
||||
@ -294,7 +267,6 @@
|
||||
to add a line in /etc/ttys to start it on one of the unoccupied
|
||||
virtual terminals:
|
||||
|
||||
|
||||
ttyv4 "/usr/X11R6/bin/xdm -nodaemon" xterm on secure
|
||||
|
||||
You should also make sure that /usr/X11R6/bin/X is a symbolic link to
|
||||
@ -307,8 +279,8 @@
|
||||
typing ``xdm -nodaemon''.
|
||||
|
||||
|
||||
|
||||
4. Configuring X for Your Hardware
|
||||
-----------------------------------
|
||||
|
||||
The XF86Config file tells the X server what kind of monitor, video
|
||||
card and mouse you have. You must create it to tell the server what
|
||||
@ -321,11 +293,8 @@
|
||||
If you have a Xconfig file for XFree86 2.x, use reconfig to translate
|
||||
part of it into the new format:
|
||||
|
||||
|
||||
# reconfig <Xconfig >XF86Config
|
||||
|
||||
|
||||
|
||||
and complete the rest according to the XF86Config man page and the
|
||||
XF86Config.sample file as a template.
|
||||
|
||||
@ -336,7 +305,6 @@
|
||||
|
||||
You'll need info on your hardware:
|
||||
|
||||
|
||||
o Your mouse type, baud rate and it's /dev entry.
|
||||
|
||||
o The video card's chipset (e.g. ET4000, S3, etc).
|
||||
@ -348,37 +316,27 @@
|
||||
to it and just make sure that it generates output when the mouse is
|
||||
moved or clicked:
|
||||
|
||||
|
||||
% cat < /dev/tty00
|
||||
|
||||
|
||||
% cat < /dev/cuaa0
|
||||
|
||||
If you can't find the right mouse device then use ``dmesg|grep sio''
|
||||
to get a list of devices that were detected upon booting:
|
||||
|
||||
|
||||
% dmesg|grep sio
|
||||
sio0 at 0x3f8-0x3ff irq 4 on isa
|
||||
|
||||
|
||||
|
||||
Then double check the /dev entries corresponding to these devices.
|
||||
Use the script /dev/MAKEDEV to create entries if they don't already
|
||||
exist:
|
||||
|
||||
|
||||
% cd /dev
|
||||
% sh MAKEDEV tty00
|
||||
|
||||
|
||||
% sh MAKEDEV cuaa0
|
||||
|
||||
If you plan to fine tune the screen size or position on your monitor
|
||||
you'll need the specs for sync frequencies from your monitor's manual.
|
||||
|
||||
|
||||
|
||||
|
||||
5. Running X
|
||||
-------------
|
||||
|
||||
8mb of memory is a recommended minimum for running X. The server,
|
||||
window manager, display manager and an xterm take about 8Mb of virtual
|
||||
@ -397,10 +355,8 @@
|
||||
your home directory as described in the xinit and startx man pages.
|
||||
|
||||
|
||||
|
||||
|
||||
6. Rebuilding Kernels for X
|
||||
|
||||
----------------------------
|
||||
|
||||
The GENERIC FreeBSD 2.0 kernel supports XFree86 without any
|
||||
modifications required. You do not need to make any changes to the
|
||||
@ -416,23 +372,18 @@
|
||||
remove the two lines below (in /sys/arch/i386/conf). They are both
|
||||
required for X support:
|
||||
|
||||
|
||||
options XSERVER #Xserver
|
||||
options UCONSOLE #X Console support
|
||||
|
||||
|
||||
|
||||
The generic FreeBSD 2.0 kernel is configured by default with the
|
||||
syscons driver. To configure your kernel similarly it should have a
|
||||
line like this in /usr/src/sys/i386/conf/GENERIC:
|
||||
|
||||
|
||||
device sc0 at isa? port "IO_KBD" tty irq 1 vector scintr
|
||||
|
||||
The maximum number of virtual consoles can be set using the MAXCONS
|
||||
option:
|
||||
|
||||
|
||||
options "MAXCONS=4" #4 virtual consoles
|
||||
|
||||
|
||||
@ -455,13 +406,11 @@
|
||||
support. To do this, add the following line to your kernel config
|
||||
file:
|
||||
|
||||
|
||||
options SYSVSHM # System V shared memory
|
||||
options SYSVSEM # System V semaphores
|
||||
options SYSVMSG # System V message queues
|
||||
|
||||
|
||||
|
||||
If you are using a SoundBlaster 16 on IRQ 2 (9), then you need a patch
|
||||
for sb16_dsp.c. Otherwise a kernel configured with the SoundBlaster
|
||||
driver will claim interrupt 9 doesn't exist and X server will lock up.
|
||||
@ -470,9 +419,8 @@
|
||||
system because the I/O port addresses overlap.
|
||||
|
||||
|
||||
|
||||
7. Rebuilding XFree86
|
||||
|
||||
----------------------
|
||||
|
||||
The server link kit allows you to build an X server using a minimum
|
||||
amount of disk space. Just unpack it, make the appropriate changes to
|
||||
@ -486,26 +434,21 @@
|
||||
you are running a version of FreeBSD that doesn't include shared
|
||||
library support, add the following line to site.def:
|
||||
|
||||
|
||||
#define BuildBsdSharedLibs NO
|
||||
|
||||
If your system doesn't have support or SYSV shared memory (for
|
||||
example, if you don't have the <sys/shm.h> header), you should disable
|
||||
the MIT-SHM extension by adding the following line to site.def:
|
||||
|
||||
|
||||
#define HasShm NO
|
||||
|
||||
|
||||
|
||||
To compile the sources on FreeBSD 1.1 and later, type:
|
||||
|
||||
make World
|
||||
|
||||
|
||||
|
||||
8. Building Other X Clients
|
||||
|
||||
----------------------------
|
||||
|
||||
The easiest way to build a new client (X application) is to use xmkmf
|
||||
if an Imakefile is included with it. Type ``xmkmf -a'' to create the
|
||||
@ -520,10 +463,8 @@
|
||||
of the symbol can be used to distinguish different BSD releases. For
|
||||
example, code specific to the Net-2 and later releases can use:
|
||||
|
||||
|
||||
#if (BSD >= 199103)
|
||||
|
||||
|
||||
To ensure that this symbol is correctly defined, include <sys/param.h>
|
||||
in the source that requires it. Note that the symbol CSRG_BASED is
|
||||
defined for *BSD systems in XFree86 3.1.1 and later. This should be
|
||||
@ -534,11 +475,8 @@
|
||||
and __bsdi__ for BSD/386.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
9. Thanks
|
||||
----------
|
||||
|
||||
Many thanks to:
|
||||
|
||||
@ -559,50 +497,4 @@
|
||||
Generated from XFree86: xc/programs/Xserver/hw/xfree86/doc/sgml/FreeBSD.sgml,v 3.10 1995/01/28 16:01:28 dawes Exp $
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$XFree86: xc/programs/Xserver/hw/xfree86/doc/READ.FreeBSD,v 3.12 1995/01/28 16:19:37 dawes Exp $
|
||||
|
@ -1,11 +1,14 @@
|
||||
This menu lets you configure your system a little after it's
|
||||
installed. In particular, you should probably set the system
|
||||
manager's password and the system time zone.
|
||||
This menu allows you to configure your system after the installation process
|
||||
is complete. At the minimum, you should probably set the system manager's
|
||||
password and the system time zone.
|
||||
|
||||
For extra goodies like bash, emacs, pascal, etc. you should almost
|
||||
certainly look at the Packages item in this menu. Note that this is
|
||||
currently only really useful if you have a CDROM or an existing
|
||||
packages collection somewhere in the file system hierarchy where the
|
||||
package management tool can get to it. Automatic transfer of packages
|
||||
over FTP is not yet supported!
|
||||
For extra goodies like bash, emacs, pascal, etc., you should look at the
|
||||
Packages item in this menu. Currently, the Packages option is only useful
|
||||
if you have a CDROM or an existing packages collection somewhere in the
|
||||
file system hierarchy where the package management tool can locate it.
|
||||
The automatic transfer of packages via FTP is not yet supported!
|
||||
|
||||
If you wish to re-invoke the package installation tool after leaving
|
||||
the system installation, the command is ``pkg_manage''. For setting
|
||||
the timezone, type ``tzsetup''. For more information on the general
|
||||
system configuration, see the ``/etc/sysconfig'' file.
|
||||
|
@ -1,5 +1,3 @@
|
||||
Select the drive(s) you wish FreeBSD to be able to use.
|
||||
|
||||
If you are going to actually install some portion of FreeBSD on a
|
||||
drive then PLEASE BE VERY CERTAIN that the Geometry reported in the
|
||||
Partition Editor (see Installation Menu) is the correct one for your
|
||||
@ -11,13 +9,20 @@ by either the IDE controller or a special boot-sector translation
|
||||
utility such as that by OnTrack Systems. In these cases, knowing
|
||||
the correct geometry gets even more complicated as it's not something
|
||||
you can easily tell by looking at the drive or the PC BIOS setup. The
|
||||
best way of determining your geometry in such situations is to boot
|
||||
DOS (from the hard disk, not a floppy!) and run the ``pfdisk'' utility
|
||||
provided in the tools/ subdirectory of the FreeBSD CDROM or FTP site.
|
||||
It will report the geometry that DOS sees, which is generally the
|
||||
correct one.
|
||||
best way of verifying that your geometry is being correctly calculated
|
||||
in such situations is to boot DOS (from the hard disk, not a floppy!)
|
||||
and run the ``pfdisk'' utility provided in the tools/ subdirectory of the
|
||||
FreeBSD CDROM or FTP site. It will report the geometry that DOS sees,
|
||||
which is generally the correct one.
|
||||
|
||||
FreeBSD does its best to guess all of this automatically, of course,
|
||||
but it sometimes fails which is why it's a good idea to check it. The
|
||||
Partition Editor has a `(G)eometry' command that will allow you to
|
||||
change it as necessary.
|
||||
If you have no DOS partition sharing the disk at all, then you may find that
|
||||
you have better luck with Geometry detection if you create a very small
|
||||
DOS partition first, before installing FreeBSD. Once FreeBSD is installed
|
||||
you can always delete it again if you need the space.
|
||||
|
||||
It's actually not a bad idea (believe it or not) to have a small bootable
|
||||
DOS partition on your FreeBSD machine anyway: Should the machine become
|
||||
unstable or exhibit strange behavior at some point in the future (which
|
||||
is not uncommon behavior for PC hardware!) you can then at least use
|
||||
DOS for installing and running one of the commercially available system
|
||||
diagnostic utilities.
|
||||
|
@ -1,18 +1,35 @@
|
||||
INSTALLATION GUIDE FOR FreeBSD 2.0.5
|
||||
|
||||
This manual documents the process of installing FreeBSD on your
|
||||
machine. Please also see the hardware guide for hardware-specific
|
||||
machine. Please also see the Hardware Guide for hardware-specific
|
||||
installation instructions (how to configure your hardware, what sorts
|
||||
of things to watch out for, etc).
|
||||
|
||||
If you're running DOS and want FreeBSD to interoperate with it, read
|
||||
the following section first! Otherwise, you may skip to the next
|
||||
section.
|
||||
of things to watch out for, etc) before starting a new installation.
|
||||
|
||||
|
||||
+==========================================+
|
||||
|1. DOS user's Question and Answer section |
|
||||
+==========================================+
|
||||
Table of Contents:
|
||||
==================
|
||||
|
||||
1.0 DOS User's Q&A section.
|
||||
1.1 How do I make space for FreeBSD?
|
||||
1.2 Can I use compressed DOS filesystems from FreeBSD?
|
||||
1.3 Can I use DOS extended partitions?
|
||||
1.4 Can I run DOS executables under FreeBSD?
|
||||
|
||||
2.0 Preparing for the installation.
|
||||
2.1 Before installing from CDROM
|
||||
2.2 Before installing from Floppy
|
||||
2.3 Before installing from a DOS partition
|
||||
2.4 Before installing from QIC/SCSI tape
|
||||
2.5 Before installing over a network
|
||||
2.5.1 Preparing for NFS Installation
|
||||
2.5.2 Preparing for FTP Installation
|
||||
|
||||
3.0 Installing FreeBSD.
|
||||
|
||||
|
||||
|
||||
1.0 DOS user's Question and Answer section
|
||||
=== ======================================
|
||||
|
||||
1.1 Help! I have no space! Do I need to delete everything first?
|
||||
|
||||
@ -53,34 +70,47 @@ last 1% of the work involved.
|
||||
1.4 Can I run DOS binaries under FreeBSD?
|
||||
|
||||
Not yet! We'd like to add support for this someday, but are still
|
||||
lacking anyone to actually do the work..
|
||||
lacking anyone to actually do the work. Ongoing work with Linux's
|
||||
DOSEMU utility may bring this much closer to being a reality sometime
|
||||
soon. Send mail to hackers@freebsd.org if you're interested in
|
||||
joining this effort!
|
||||
|
||||
However, there is a neat utility called "pcemu" in the ports collection
|
||||
which emulates an 8088 and enough BIOS services to run DOS text mode
|
||||
applications. It requires the X Window System (provided as
|
||||
XFree86 3.1.1u1).
|
||||
|
||||
|
||||
|
||||
+==================================+
|
||||
|2. PREPARING FOR THE INSTALLATION |
|
||||
+==================================+
|
||||
2.0 Preparing for the installation
|
||||
=== ==============================
|
||||
|
||||
2.1 Before installing from CDROM:
|
||||
|
||||
If your CDROM is of an unsupported type, such as an IDE CDROM, then
|
||||
please skip to section 2.3: DOS Preparation.
|
||||
please skip to section 2.3: Before installing from a DOS partition.
|
||||
|
||||
There is not a lot of preparatory work that needs to be done to
|
||||
successfully install from one of Walnut Creek's FreeBSD CDROMs (other
|
||||
CDROM distributions may work as well, but I can't say for sure as I
|
||||
CDROM distributions may work as well, we simply cannot say as we
|
||||
have no hand or say in their creation). You can either boot into the
|
||||
CD installation directly from DOS using Walnut Creek's supplied "go"
|
||||
batch file or you can make a boot floppy by writing the supplied image
|
||||
(floppies/boot.flp) onto a floppy. Under DOS, a good utility for this
|
||||
is rawrite.exe, which may also be found in the tools/ subdirectory.
|
||||
Under UNIX, you may find that ``dd if=floppies/boot.flp of=/dev/rfd0''
|
||||
or ``dd if=floppies/boot.flp of=/dev/floppy'' works well, depending on
|
||||
your hardware.
|
||||
CD installation directly from DOS using Walnut Creek's supplied
|
||||
``install.bat'' batch file or you can make a boot floppy with
|
||||
the ``makeflp.bat'' command.
|
||||
|
||||
Once you've booted one way or the other, you should be able to select
|
||||
CDROM as the media type when asked and load the entire distribution
|
||||
from CDROM. No other media will be required.
|
||||
For the easiest interface of all (from DOS), type "go". This
|
||||
will bring up a DOS menu utility that leads you through all
|
||||
the available options.
|
||||
|
||||
If you're creating the boot floppy from a UNIX machine, you may find
|
||||
that ``dd if=floppies/boot.flp of=/dev/rfd0'' or
|
||||
``dd if=floppies/boot.flp of=/dev/floppy'' works well, depending on
|
||||
your hardware and operating system environment.
|
||||
|
||||
Once you've booted from DOS or floppy, you should then be able to select
|
||||
CDROM as the media type in the Media menu and load the entire
|
||||
distribution from CDROM. No other types of installation media should
|
||||
be required.
|
||||
|
||||
After your system is fully installed and you have rebooted from the
|
||||
hard disk, you should find the CD mounted on the directory /cdrom. A
|
||||
@ -96,6 +126,26 @@ Which would allow you to then "cd /usr/ports; make" and get all the
|
||||
sources from the CD, but yet create all the intermediate files in
|
||||
/usr/ports, which is presumably on a more writable media! :-)
|
||||
|
||||
SPECIAL NOTE: Before invoking the installation, be sure that the
|
||||
CDROM is in the drive so that the "probe" can find it!
|
||||
This is also true if you wish the CDROM to be added to the default
|
||||
system configuration automatically during the install (whether or
|
||||
not you actually use it as the installation media). This will be
|
||||
fixed for 2.1, but for now this simple work-around will ensure that
|
||||
your CDROM is detected properly.
|
||||
|
||||
Finally, if you would like people to be able to FTP install
|
||||
FreeBSD directly from the CDROM in your machine, you'll find
|
||||
it quite easy. After the machine is fully installed, you simply
|
||||
need to add the following line to the password file (using
|
||||
the vipw command):
|
||||
|
||||
ftp:*:99:99::0:0:FTP:/cdrom:/nonexistent
|
||||
|
||||
No further work is necessary. The other installers will now be able
|
||||
to chose a Media type of FTP and type in: ftp://<your machine>
|
||||
after picking "Other" in the ftp sites menu!
|
||||
|
||||
|
||||
2.2 Before installing from Floppy:
|
||||
|
||||
@ -108,57 +158,80 @@ somewhat special in that it's not a DOS filesystem floppy at all, but
|
||||
rather an "image" floppy (it's actually a gzip'd cpio file). You can
|
||||
use the rawrite.exe program to do this under DOS, or ``dd'' to do it
|
||||
on a UNIX Workstation (see notes in section 2.1 concerning the
|
||||
``floppies/boot.flp'' image). Once this floppy is made, put it aside.
|
||||
You'll be asked for it later.
|
||||
``floppies/boot.flp'' image). Once this floppy is made, go on
|
||||
to make the distribution set floppies:
|
||||
|
||||
You will also need, at minimum, as many 1.44MB or 1.2MB floppies as it
|
||||
takes to hold all files in the bin (binary distribution) directory.
|
||||
THESE floppies *must* be formatted using MS-DOS, using with the FORMAT
|
||||
command in MS-DOS or the File Manager format command in Microsoft
|
||||
Windows(tm). Factory preformatted floppies will also work well,
|
||||
provided that they haven't been previously used for something else.
|
||||
You will need, at minimum, as many 1.44MB or 1.2MB floppies as it takes
|
||||
to hold all files in the bin (binary distribution) directory. THESE
|
||||
floppies *must* be formatted using MS-DOS, using the FORMAT command in
|
||||
MS-DOS or the File Manager format command in Microsoft Windows(tm).
|
||||
Don't trust Factory Preformatted floppies! Format them again yourself,
|
||||
just to make sure!
|
||||
|
||||
Many problems reported by our users in the past have turned out to be
|
||||
from the use of improperly formatted media, so we simply take special
|
||||
care to mention it here!
|
||||
Many problems reported by our users in the past have resulted from the
|
||||
use of improperly formatted media, so we simply take special care to
|
||||
mention it here!
|
||||
|
||||
After you've DOS formatted the floppies, you'll need to copy the files
|
||||
onto them. The distribution files are split into chunks conveniently
|
||||
sized so that 5 of them will fit on a conventional 1.44MB floppy. Go
|
||||
through all your floppies, packing as many files as will fit on each
|
||||
one, until you've got all the distributions you want packed up in this
|
||||
fashion. Select ``Floppy'' from the Media menu at installation time
|
||||
and you will be prompted for everything after that.
|
||||
fashion. Each distribution should go into a subdirectory on the
|
||||
floppy, e.g.: a:\bin\bin.aa, a:\bin\bin.ab, ...
|
||||
|
||||
Once you come to the Media screen of the install, select
|
||||
"Floppy" and you'll be prompted for the rest.
|
||||
|
||||
|
||||
2.3 Before installing from a DOS partition:
|
||||
|
||||
To prepare for installation from an MS-DOS partition, you should
|
||||
simply copy the files from the distribution into a directory with the
|
||||
same name as the distribution. For example, if you are preparing to
|
||||
install the bin distribution set, then make a directory on your C:
|
||||
drive named C:\FREEBSD\BIN and copy the files there. Copying the
|
||||
distributions into subdirectories of the FREEBSD directory allows the
|
||||
installation program to find the files automatically.
|
||||
To prepare for installation from an MS-DOS partition you should
|
||||
simply copy the files from the distribution into a directory called
|
||||
"FREEBSD". For example, to do a minimal installation of FreeBSD from
|
||||
DOS using files copied from the CDROM, you might do something like
|
||||
this:
|
||||
|
||||
C> MD C:\FREEBSD
|
||||
C> XCOPY /S E:\DISTS\BIN C:\FREEBSD
|
||||
C> XCOPY /S E:\FLOPPIES C:\FREEBSD
|
||||
|
||||
Asssuming that `C:' was where you had free space and `E:' was where
|
||||
your CD was mounted. Note that you need the FLOPPIES directory
|
||||
because the `root.flp' image is automatically looked for there when
|
||||
you're doing a DOS installation.
|
||||
|
||||
For as many `DISTS' as you wish to install from DOS (and you have free
|
||||
space for), install each one under `C:\FREEBSD' - the BIN dist is only
|
||||
the minimal requirement.
|
||||
|
||||
|
||||
2.4 Before installing from QIC/SCSI Tape:
|
||||
|
||||
Installing from tape is probably the easiest method, short of an
|
||||
on-line install using FTP or installing from a CDROM. The
|
||||
installation program expects the files to be simply tar'ed onto the
|
||||
tape, so after getting all of the files for distribution you're
|
||||
interested in, simply tar them onto the tape with a command like:
|
||||
on-line install using FTP or a CDROM install. The installation program
|
||||
expects the files to be simply tar'ed onto the tape, so after getting
|
||||
all of the files for distribution you're interested in, simply tar
|
||||
them onto the tape with a command like:
|
||||
|
||||
cd /freebsd/distdir
|
||||
tar cvf /dev/rwt0 (or /dev/rst0) dist1 .. dist2
|
||||
|
||||
When you go to do the installation, you should make sure that you
|
||||
leave enough room in the /usr/tmp directory to accomdate the FULL
|
||||
contents of the tape you've created. Due to the non-random access
|
||||
nature of tapes, this method of installation requires quite a bit of
|
||||
temporary storage! You should expect to require as much temporary
|
||||
storage as you have stuff written on tape!
|
||||
Make sure that the `floppies/' directory is one of the "dists" given
|
||||
above, since the installation will look for `floppies/root.flp' on
|
||||
the tape.
|
||||
|
||||
When you go to do the installation, you should also make sure that you
|
||||
leave enough room in some temporary directory (which you'll be allowed
|
||||
to choose) to accommodate the FULL contents of the tape you've
|
||||
created. Due to the non-random access nature of tapes, this method of
|
||||
installation requires quite a bit of temporary storage! You should
|
||||
expect to require as much temporary storage as you have stuff written
|
||||
on tape.
|
||||
|
||||
SPECIAL NOTE: When going to do the installation, the tape must be in
|
||||
the drive *before* booting from the boot floppy. The installation
|
||||
"probe" may otherwise fail to find it.
|
||||
|
||||
|
||||
2.5 Before installing over a network:
|
||||
@ -189,52 +262,186 @@ terminal emulator.
|
||||
If a hard-wired connection to another FreeBSD (2.0R or later) machine
|
||||
is available, you might also consider installing over a "laplink"
|
||||
parallel port cable. The data rate over the parallel port is much
|
||||
higher than is what's typically possible over a serial line (up to
|
||||
higher than what is typically possible over a serial line (up to
|
||||
50k/sec), thus resulting in a quicker installation.
|
||||
|
||||
Finally, for the fastest possible installation, an ethernet adaptor is
|
||||
always a good choice! FreeBSD supports most common PC ethernet cards,
|
||||
a table of supported cards (and their required settings) provided as
|
||||
part of the FreeBSD Hardware Guide - see the Documentation menu on the
|
||||
boot floppy. If you are using one of the supported PCMCIA ethernet
|
||||
cards, also be sure that it's plugged in _before_ the laptop is
|
||||
powered on! FreeBSD does not, unfortunately, currently support "hot
|
||||
insertion" of PCMCIA cards.
|
||||
Finally, for the fastest possible network installation, an ethernet
|
||||
adaptor is always a good choice! FreeBSD supports most common PC
|
||||
ethernet cards, a table of supported cards (and their required
|
||||
settings) is provided as part of the FreeBSD Hardware Guide - see the
|
||||
Documentation menu on the boot floppy. If you are using one of the
|
||||
supported PCMCIA ethernet cards, also be sure that it's plugged in
|
||||
_before_ the laptop is powered on! FreeBSD does not, unfortunately,
|
||||
currently support "hot insertion" of PCMCIA cards.
|
||||
|
||||
You will also need to know your IP address on the network, the the
|
||||
"netmask" value for your address class and the name of your machine.
|
||||
You will also need to know your IP address on the network, the
|
||||
"netmask" value for your address class, and the name of your machine.
|
||||
Your system administrator can tell you which values to use for your
|
||||
particular network setup. If you will be referring to other hosts by
|
||||
name rather than IP address, you'll also need a name server and
|
||||
possibly the address of a gateway (if you're using PPP, it's your
|
||||
provider's IP address) to use in talking to it. If you do not know
|
||||
the answers to all or or most of these questions, then you should
|
||||
the answers to all or most of these questions, then you should
|
||||
really probably talk to your system administrator _first_ before
|
||||
trying this type of installation!
|
||||
|
||||
|
||||
Once you have a network link of some sort working, the installation
|
||||
can continue over NFS or FTP.
|
||||
|
||||
NFS installation is fairly straight-forward: Simply copy the FreeBSD
|
||||
distribution files you're interested onto a server somewhere and then
|
||||
point the NFS media selection at it. If this server supports only
|
||||
"privileged port" access, or you have a poor quality ethernet card
|
||||
which suffers from very slow transfer rates, you may wish to
|
||||
investigate the ``Ftp Options'' menu for special flags to set in these
|
||||
case.
|
||||
2.5.1 Preparing for NFS installation:
|
||||
|
||||
NFS installation is fairly straight-forward: Simply copy the
|
||||
FreeBSD distribution files you want onto a server somewhere
|
||||
and then point the NFS media selection at it.
|
||||
|
||||
If this server supports only "privileged port" access (as is
|
||||
generally the default for Sun workstations), you will need to set
|
||||
this option in the Options menu before installation can proceed.
|
||||
|
||||
If you have a poor quality ethernet card which suffers from very
|
||||
slow transfer rates, you may also wish to toggle the appropriate
|
||||
Options flag.
|
||||
|
||||
In order for NFS installation to work, the server must support
|
||||
"subdir mounts"; e.g., if your FreeBSD 2.0.5 distribution directory
|
||||
lives on: ziggy:/usr/archive/stuff/FreeBSD
|
||||
Then ziggy will have to allow the direct mounting of
|
||||
/usr/archive/stuff/FreeBSD, not just /usr or /usr/archive/stuff.
|
||||
|
||||
In FreeBSD's /etc/exports file, this is controlled by the
|
||||
``-alldirs'' option. Other NFS servers may have different
|
||||
conventions. If you are getting `Permission Denied' messages
|
||||
from the server then it's likely that you don't have this
|
||||
enabled properly!
|
||||
|
||||
|
||||
2.5.2 Preparing for FTP Installation
|
||||
|
||||
FTP installation may be done from any mirror site containing a
|
||||
reasonably up-to-date version of FreeBSD 2.0.5. A full menu of
|
||||
reasonable choices from almost anywhere in the world is provided in
|
||||
the FTP site menu.
|
||||
reasonable choices from almost anywhere in the world is provided
|
||||
by the FTP site menu.
|
||||
|
||||
If you are installing from some other FTP site not listed in this
|
||||
menu, or you are having troubles getting your name server configured
|
||||
properly, you can also specify your own URL by selecting the ``Other''
|
||||
choice in that menu. A URL can also be a direct IP address, so
|
||||
the following would work in the absence of a name server:
|
||||
|
||||
ftp://192.216.222.4/pub/FreeBSD/2.0.5-RELEASE
|
||||
|
||||
[Substitute "ALPHA" for "RELEASE" during the ALPHA test period!]
|
||||
|
||||
If you are installing through a firewall then you should probably
|
||||
select ``Passive mode'' ftp, which is the default. If you are
|
||||
talking to a server which does not support passive mode for some
|
||||
reason, see the Options menu to select Active mode transfers.
|
||||
|
||||
|
||||
+============================+
|
||||
|2. INSTALLING FREEBSD 2.0.5 |
|
||||
+============================+
|
||||
3. Installing FreeBSD
|
||||
-- ------------------
|
||||
|
||||
Once you've done the appropriate preinstallation steps, you should install
|
||||
FreeBSD!
|
||||
Once you've taken note of the appropriate preinstallation steps, you
|
||||
should be able to install FreeBSD without any further trouble.
|
||||
|
||||
/* XXX Put some more text in this section.. :-) XXX */
|
||||
Should this not be true, then you may wish to go back and re-read the
|
||||
relevant preparation section (section 2.x) for the installation media
|
||||
type you're trying to use - perhaps there's a helpful hint there that
|
||||
you missed the first time? If you're having hardware trouble, or
|
||||
FreeBSD refuses to boot at all, read the Hardware Guide provided on
|
||||
the boot floppy for a list of possible solutions.
|
||||
|
||||
The FreeBSD boot floppy contains all the on-line documentation you
|
||||
should need to be able to navigate through an installation and if it
|
||||
doesn't then I'd like to know what you found most confusing! It is
|
||||
the objective of the FreeBSD installation program (sysinstall) to be
|
||||
self-documenting enough that painful "step-by-step" guides are no
|
||||
longer necessary. It may take us a little while to reach that
|
||||
objective, but that's the objective!
|
||||
|
||||
Meanwhile, you may also find the following "typical installation sequence"
|
||||
to be helpful:
|
||||
|
||||
o Boot the boot floppy. After a boot sequence which can take
|
||||
anywhere from from 30 seconds to 3 minutes, depending on your
|
||||
hardware, you should be presented with a menu of initial
|
||||
choices. If the floppy doesn't boot at all, or the boot
|
||||
hangs at some stage, go read the Q&A section of the Hardware
|
||||
Guide for possible causes.
|
||||
|
||||
o Press F1. You should see some basic usage instructions on
|
||||
the menu system and general navigation. If you haven't used this
|
||||
menu system before then PLEASE read this thoroughly!
|
||||
|
||||
o If English is not your native language, you may wish to proceed
|
||||
directly to the Language option and set your preferred language.
|
||||
This will bring up some of the documentation in that language
|
||||
instead of english.
|
||||
|
||||
o Select the Options item and set any special preferences you
|
||||
may have.
|
||||
|
||||
o Select Proceed, bringing you to the Installation Menu.
|
||||
|
||||
Installation Menu:
|
||||
|
||||
o You can do anything you like in this menu without altering
|
||||
your system _except_ for "Commit", which will perform any
|
||||
requests to alter your system you may have made.
|
||||
|
||||
If you're confused at any point, the F1 key usually pulls
|
||||
up the right information for the screen you're in.
|
||||
|
||||
o The first step is generally `Partition', which allows
|
||||
you to chose how your drives will be used for FreeBSD.
|
||||
|
||||
o Next, with the `Label' editor, you can specify how the space
|
||||
in any allocated FreeBSD partitions should be used by FreeBSD,
|
||||
or where to mount a non-FreeBSD partition (such as DOS).
|
||||
|
||||
o Next, the `Distributions' menu allows you to specify which
|
||||
parts of FreeBSD you wish to load. A good choice is
|
||||
"User" for a small system or "Developer" for someone
|
||||
wanting a bit more out of FreeBSD. If none of the existing
|
||||
collections sound applicable, select Custom.
|
||||
|
||||
o Next, the `Media' menu allows you to specify what kind of
|
||||
media you wish to install from. If a desired media choice is
|
||||
found and configured automatically then this menu will simply
|
||||
return, otherwise you'll be asked for additional details on
|
||||
the media device type.
|
||||
|
||||
o Finally, the Commit command will actually perform all the
|
||||
actions at once (nothing has been written to your disk
|
||||
so far, nor will it until you give the final confirmation).
|
||||
All new or changed partition information will be written
|
||||
out, file systems will be created and/or non-destructively
|
||||
labelled (depending on how you set their newfs flags in the
|
||||
Label editor) and all selected distributions will be
|
||||
extracted.
|
||||
|
||||
o The Configure menu choice allows you to furthur configure your
|
||||
FreeBSD installation by giving you menu-driven access to
|
||||
various system defaults. Some items, like networking, may
|
||||
be especially important if you did a CDROM/Tape/Floppy
|
||||
installation and have not yet configured your network
|
||||
interfaces (assuming you have some). Properly configuring
|
||||
your network here will allow FreeBSD to come up on the network
|
||||
when you first reboot from the hard disk.
|
||||
|
||||
o Exit returns you to the top menu.
|
||||
|
||||
|
||||
At this point, you're generally done with the sysinstall utility and
|
||||
can select the final `Quit'. If you're running it as an installer
|
||||
(e.g., before the system is all the way up) then the system will now
|
||||
reboot. If you selected the boot manager option, you will see a small
|
||||
boot menu with an `F?' prompt. Press the function key for BSD (it
|
||||
will be shown) and you should boot up into FreeBSD off the hard disk.
|
||||
|
||||
If this fails to happen for some reason, see the Q & A section
|
||||
of the Hardware Guide for possible clues!
|
||||
|
||||
Jordan
|
||||
|
||||
---- End of Installation Guide ---
|
||||
|
@ -9,6 +9,6 @@ I18N features to meet various standards.
|
||||
Until these improvements are made, you may find it easier to simply
|
||||
edit the /etc/sysconfig file yourself once the system is fully
|
||||
installed. There are a number of comments in that file that detail
|
||||
just what should be changed as well as a few examples of existing
|
||||
just what should be changed, as well as a few examples of existing
|
||||
non-english setups.
|
||||
|
||||
|
@ -30,25 +30,25 @@ simple terminal emulator and has no "modem capabilities database".
|
||||
If a hard-wired connection to another FreeBSD (2.0R or later) machine
|
||||
is available, you might also consider installing over a "laplink"
|
||||
parallel port cable. The data rate over the parallel port is much
|
||||
higher than is what's typically possible over a serial line, with
|
||||
speeds of up to 50k/sec. not at all uncommon.
|
||||
higher than what is typically possible over a serial line with
|
||||
speeds of up to 50k/sec.
|
||||
|
||||
Finally, for the fastest possible installation, an ethernet adaptor is
|
||||
always a good choice! FreeBSD supports most common PC ethernet cards,
|
||||
a table of required settings for which is provided in the FreeBSD
|
||||
Hardware Guide - see the Documentation menu on the boot floppy.
|
||||
If you are using one of the supported PCMCIA ethernet cards, also
|
||||
be sure that it's plugged in _before_ the laptop is powered on!
|
||||
FreeBSD does not, unfortunately, currently support "hot insertion"
|
||||
of PCMCIA cards.
|
||||
Finally, for the fastest possible network installation, an ethernet
|
||||
adaptor is always a good choice! FreeBSD supports most common PC
|
||||
ethernet cards, a table of which is provided in the FreeBSD
|
||||
Hardware Guide (see the Documentation menu on the boot floppy).
|
||||
If you are using one of the supported PCMCIA ethernet cards, also be
|
||||
sure that it's plugged in _before_ the laptop is powered on! FreeBSD
|
||||
does not, unfortunately, currently support "hot insertion" of PCMCIA
|
||||
cards.
|
||||
|
||||
You will also need to know your IP address on the network, the the
|
||||
"netmask" value for your address class and the name of your machine.
|
||||
You will also need to know your IP address on the network, the "netmask"
|
||||
value for your address class, and the name of your machine.
|
||||
Your system administrator can tell you which values to use for your
|
||||
particular network setup. If you will be referring to other hosts by
|
||||
name rather than IP address, you'll also need a name server and
|
||||
possibly the address of a gateway (if you're using PPP, it's your
|
||||
provider's IP address) to use in talking to it. If you do not know
|
||||
the answers to all or or most of these questions, then you should
|
||||
the answers to all or most of these questions, then you should
|
||||
really probably talk to your system administrator _first_ before
|
||||
trying this type of installation!
|
||||
|
@ -10,7 +10,6 @@ RIGHT ARROW Move to next item or group (same as TAB).
|
||||
SHIFT-TAB Move to previous item or group.
|
||||
LEFT ARROW Move to previous item or group (same as SHIFT-TAB).
|
||||
RETURN Select item.
|
||||
ESC Spawn a sub-shell for diagnostic purposes. Exit returns.
|
||||
PAGE UP In text boxes, scrolls up one page.
|
||||
PAGE DOWN In text boxes, scrolls down one page.
|
||||
SPACE In "radio" or multiple choice menus, toggle the current item.
|
||||
@ -35,7 +34,7 @@ SPECIAL FEATURES:
|
||||
=================
|
||||
|
||||
It is also possible to select a menu item by typing the first
|
||||
character of its name, if unique. Such "accellerator" characters will
|
||||
character of its name, if unique. Such "accelerator" characters will
|
||||
be specially highlighted in the item name.
|
||||
|
||||
The console driver also contains a scroll-back buffer for reviewing
|
||||
@ -51,5 +50,5 @@ also find that you have multiple "virtual consoles" and can use them to
|
||||
have several active sessions at once. Use ALT-F<n> to switch between
|
||||
them, where `F<n>' is the function key corresponding to the screen you
|
||||
wish to see. By default, the system comes with 3 virtual consoles enabled.
|
||||
You can create more by editing the /etc/ttys file once the system is up, up
|
||||
to a maximum of 12.
|
||||
You can create more by editing the /etc/ttys file, once the system is up,
|
||||
for a maximum of 12.
|
||||
|
@ -3,6 +3,7 @@
|
||||
20 January 1995
|
||||
|
||||
1. What and Where is XFree86?
|
||||
------------------------------
|
||||
|
||||
XFree86 is a port of X11R6 that supports several versions of Intel-
|
||||
based Unix. It is derived from X386 1.2, which was the X server
|
||||
@ -13,13 +14,15 @@
|
||||
|
||||
See the Copyright Notice (COPYRIGHT.html).
|
||||
|
||||
The sources for XFree86 are available by anonymous ftp from:
|
||||
The sources for XFree86 are available as part of the FreeBSD 2.0.5
|
||||
distribution, or by anonymous ftp from:
|
||||
|
||||
ftp.XFree86.org:/pub/XFree86/current
|
||||
(ftp://ftp.XFree86.org/pub/XFree86/current)
|
||||
|
||||
|
||||
Binaries for XFree86 on FreeBSD are available from:
|
||||
Binaries for XFree86 on FreeBSD are also available as part of
|
||||
2.0.5 or from:
|
||||
|
||||
ftp.XFree86.org:/pub/XFree86/current/binaries/FreeBSD-2.0
|
||||
(ftp://ftp.XFree86.org/pub/XFree86/current/binaries/FreeBSD-2.0)
|
||||
@ -31,28 +34,33 @@
|
||||
comments or suggestions about this file and we'll revise it.
|
||||
|
||||
|
||||
|
||||
2. Installing the Binaries
|
||||
---------------------------
|
||||
|
||||
If you want to save space, first select which archives you want to
|
||||
unpack. If you can't decide what to pick and you have 52Mb of disk
|
||||
In the FreeBSD 2.0.5 distribution, XFree86 comes in 3 major sections:
|
||||
"basic" distributions, fonts and servers. At the minimum, you will
|
||||
need the binaries and libraries from the basic distribution, the
|
||||
"misc" fonts collection and at least one server. The smallest usable
|
||||
distribution is around 9MB.
|
||||
|
||||
If you can't decide what to pick and you have 52Mb of disk
|
||||
space, it's safe to unpack everything.
|
||||
|
||||
At a minimum you need to unpack the 'required' X311*.tgz archives plus
|
||||
at least one server that matches your vga card. You'll need 9Mb for
|
||||
the minimum required run-time binaries only.
|
||||
|
||||
What follows is a description of the various distribution files
|
||||
comprising XFree86. If you are installing this as part of FreeBSD
|
||||
2.0.5 then there's no need to use these files directly: You may
|
||||
simply check the desired components off the installation menus
|
||||
provided for that purpose. If you're installing this manually,
|
||||
then the following information should prove useful:
|
||||
|
||||
Required (6.7Mb):
|
||||
|
||||
X311bin.tgz
|
||||
all the executable X client applications and shared libs
|
||||
|
||||
|
||||
X311fnts.tgz
|
||||
the misc and 75 dpi fonts
|
||||
|
||||
|
||||
X311lib.tgz
|
||||
data files needed at runtime
|
||||
|
||||
@ -63,110 +71,92 @@
|
||||
X311xicf.tgz
|
||||
customizable xinit runtime configuration file
|
||||
|
||||
|
||||
X311xdcf.tgz
|
||||
customizable xdm runtime configuration file
|
||||
|
||||
|
||||
Choose at least one server ( 2.3Mb):
|
||||
|
||||
X3118514.tgz
|
||||
8-bit color for IBM 8514 and true compatibles.
|
||||
|
||||
|
||||
X311AGX.tgz
|
||||
8-bit color for AGX boards.
|
||||
|
||||
|
||||
X311Mch3.tgz
|
||||
8 and 16-bit color for ATI Mach32 boards.
|
||||
|
||||
|
||||
X311Mch8.tgz
|
||||
8-bit color for ATI Mach8 boards.
|
||||
|
||||
|
||||
X311Mono.tgz
|
||||
1-bit monochrome for VGA, Super-VGA, Hercules, and others.
|
||||
|
||||
|
||||
X311P9K.tgz
|
||||
8, 16, and 24-bit color for Weitek P9000 boards (Diamond
|
||||
Viper).
|
||||
|
||||
|
||||
X311S3.tgz
|
||||
8, 16 and 24-bit color for S3 boards (#9 GXE, Actix GE32,
|
||||
SPEA Mercury, STB Pegasus)
|
||||
|
||||
|
||||
X311SVGA.tgz
|
||||
8-bit color for Super-VGA cards.
|
||||
|
||||
|
||||
X311VG16.tgz
|
||||
4-bit color for VGA and Super-VGA cards
|
||||
|
||||
|
||||
X311W32.tgz
|
||||
8-bit Color for ET4000/W32, /W32i and /W32p cards.
|
||||
|
||||
|
||||
X311nest.tgz
|
||||
A nested server running as a client window on another
|
||||
display.
|
||||
|
||||
|
||||
Optional:
|
||||
|
||||
|
||||
X311doc.tgz
|
||||
(.5Mb) READMEs and XFree86 specific man pages
|
||||
|
||||
|
||||
X311man.tgz
|
||||
(1.7Mb) man pages except XFree86 specific ones in etc archive
|
||||
|
||||
|
||||
X311f100.tgz
|
||||
(1.8Mb) 100dpi fonts
|
||||
|
||||
X311fscl.tgz
|
||||
(1.6Mb) Speedo and Type1 fonts
|
||||
|
||||
|
||||
X311fnon.tgz
|
||||
(3.3Mb) Japanese, Chinese and other non-english fonts
|
||||
|
||||
(3.3Mb) Japanese, Chinese and other non-English fonts
|
||||
|
||||
X311fsrv.tgz
|
||||
(.3Mb) the font server and it's man page
|
||||
|
||||
|
||||
X311prog.tgz
|
||||
(3.9Mb) config, lib*.a and *.h files needed only for
|
||||
compiling
|
||||
|
||||
|
||||
X311link.tgz
|
||||
(7.8Mb) X server reconfiguration kit
|
||||
|
||||
|
||||
X311pex.tgz
|
||||
(.5Mb) PEX fonts and shared libs needed by PEX applications.
|
||||
|
||||
|
||||
X311lbx.tgz
|
||||
(.2Mb) low bandwidth X proxy server and libraries.
|
||||
|
||||
Note that there is no longer a separate xdm archive. FreeBSD 2.0
|
||||
handles this in shared libraries now, so that the xdm binary does not
|
||||
itself contain des and there is no more need for us to provide
|
||||
separate tar balls.
|
||||
|
||||
and later handles this in shared libraries now, so that the xdm
|
||||
binary does not itself contain des and there is no more need for
|
||||
us to provide separate tar balls.
|
||||
|
||||
|
||||
2.1. Full Install:
|
||||
-------------------
|
||||
|
||||
[ Note: Unless you're installing XFree86 3.1.1u1 manually, that is
|
||||
to say not as part of the FreeBSD 2.0.5 installation, you may skip
|
||||
to section 2.3 ]
|
||||
|
||||
1. You must be logged in as root to unpack the archives because
|
||||
several executables are set-user-id. Otherwise the server may
|
||||
@ -178,20 +168,15 @@
|
||||
# umask 022
|
||||
|
||||
|
||||
|
||||
|
||||
2. If you have 52Mb free in the /usr partition ``cd /usr'' and skip
|
||||
to no. 3. Otherwise, create a directory on another partition
|
||||
and sym link it into /usr:
|
||||
|
||||
|
||||
# cd /usr/local
|
||||
# mkdir X11R6
|
||||
# ln -s /usr/local/X11R6 /usr/X11R6
|
||||
|
||||
|
||||
|
||||
|
||||
3. Unpack everything:
|
||||
|
||||
If you are using sh (as root usually does):
|
||||
@ -201,8 +186,6 @@
|
||||
# done
|
||||
|
||||
|
||||
|
||||
|
||||
Else, if you are using csh:
|
||||
|
||||
% foreach i (X311*.tgz)
|
||||
@ -210,60 +193,50 @@
|
||||
% end
|
||||
|
||||
|
||||
|
||||
|
||||
4. Create a symbolic link ``X'' that points to the server that
|
||||
matches your video card. The XF86_* man pages list which vga
|
||||
chip sets are supported by each server. For example, if you
|
||||
have an ET4000 based card you will use the XF86_SVGA server:
|
||||
|
||||
|
||||
# cd /usr/X11R6/bin; rm X; ln -s XF86_SVGA X
|
||||
|
||||
|
||||
|
||||
|
||||
2.2. Minimal Install:
|
||||
----------------------
|
||||
|
||||
First do numbers 1 and 2 above. Then unpack the required archives:
|
||||
|
||||
|
||||
# for i in bin fnts lib xicf; do
|
||||
# tar -xzf X311$i.tgz
|
||||
# done
|
||||
|
||||
|
||||
|
||||
Then unpack a server archive corresponding to your vga card. The
|
||||
server man pages, X11R6/man/man1/XF86_*, list the vga chip sets
|
||||
supported by each server. For example, if you have an ET4000 based
|
||||
card you will use the XF86_SVGA server:
|
||||
|
||||
|
||||
# tar -xzf X311SVGA.tgz
|
||||
# cd /usr/X11R6/bin; rm X; ln -s XF86_SVGA X
|
||||
|
||||
|
||||
|
||||
|
||||
2.3. After either Full or Minimal Install above:
|
||||
-------------------------------------------------
|
||||
|
||||
Add /usr/X11R6/bin to the default path for sh in /etc/profile and for
|
||||
csh in /etc/csh.login if they are not already there:
|
||||
|
||||
|
||||
# echo 'set path = ($path /usr/X11R6/bin)' >>/etc/csh.login
|
||||
# echo 'PATH=$PATH:/usr/X11R6/bin' >>/etc/profile
|
||||
|
||||
|
||||
|
||||
Or make sure all who use X put /usr/X11R6/bin in their shell's
|
||||
``path'' variable.
|
||||
|
||||
Next either reboot or invoke ldconfig as root to put the shared
|
||||
libraries in ld.so's cache:
|
||||
# ldconfig /usr/lib /usr/local/lib /usr/X11R6/lib
|
||||
|
||||
# ldconfig /usr/lib /usr/local/lib /usr/X11R6/lib
|
||||
|
||||
|
||||
If you had already configured X11R6/lib/X11/xinit/xinitrc or
|
||||
@ -277,7 +250,6 @@
|
||||
archive contains pex clients and libraries for building 3D graphics
|
||||
applications.
|
||||
|
||||
|
||||
NOTE: You don't need to uncompress the font files, but if
|
||||
you uncompress them anyway you must run mkfontdir in the
|
||||
corresponding font directory; otherwise your server will
|
||||
@ -286,6 +258,7 @@
|
||||
|
||||
|
||||
3. Installing The Display Manager (xdm)
|
||||
----------------------------------------
|
||||
|
||||
The display manager makes your PC look like an X terminal. That is,
|
||||
it presents you with a login screen that runs under X.
|
||||
@ -294,7 +267,6 @@
|
||||
to add a line in /etc/ttys to start it on one of the unoccupied
|
||||
virtual terminals:
|
||||
|
||||
|
||||
ttyv4 "/usr/X11R6/bin/xdm -nodaemon" xterm on secure
|
||||
|
||||
You should also make sure that /usr/X11R6/bin/X is a symbolic link to
|
||||
@ -307,8 +279,8 @@
|
||||
typing ``xdm -nodaemon''.
|
||||
|
||||
|
||||
|
||||
4. Configuring X for Your Hardware
|
||||
-----------------------------------
|
||||
|
||||
The XF86Config file tells the X server what kind of monitor, video
|
||||
card and mouse you have. You must create it to tell the server what
|
||||
@ -321,11 +293,8 @@
|
||||
If you have a Xconfig file for XFree86 2.x, use reconfig to translate
|
||||
part of it into the new format:
|
||||
|
||||
|
||||
# reconfig <Xconfig >XF86Config
|
||||
|
||||
|
||||
|
||||
and complete the rest according to the XF86Config man page and the
|
||||
XF86Config.sample file as a template.
|
||||
|
||||
@ -336,7 +305,6 @@
|
||||
|
||||
You'll need info on your hardware:
|
||||
|
||||
|
||||
o Your mouse type, baud rate and it's /dev entry.
|
||||
|
||||
o The video card's chipset (e.g. ET4000, S3, etc).
|
||||
@ -348,37 +316,27 @@
|
||||
to it and just make sure that it generates output when the mouse is
|
||||
moved or clicked:
|
||||
|
||||
|
||||
% cat < /dev/tty00
|
||||
|
||||
|
||||
% cat < /dev/cuaa0
|
||||
|
||||
If you can't find the right mouse device then use ``dmesg|grep sio''
|
||||
to get a list of devices that were detected upon booting:
|
||||
|
||||
|
||||
% dmesg|grep sio
|
||||
sio0 at 0x3f8-0x3ff irq 4 on isa
|
||||
|
||||
|
||||
|
||||
Then double check the /dev entries corresponding to these devices.
|
||||
Use the script /dev/MAKEDEV to create entries if they don't already
|
||||
exist:
|
||||
|
||||
|
||||
% cd /dev
|
||||
% sh MAKEDEV tty00
|
||||
|
||||
|
||||
% sh MAKEDEV cuaa0
|
||||
|
||||
If you plan to fine tune the screen size or position on your monitor
|
||||
you'll need the specs for sync frequencies from your monitor's manual.
|
||||
|
||||
|
||||
|
||||
|
||||
5. Running X
|
||||
-------------
|
||||
|
||||
8mb of memory is a recommended minimum for running X. The server,
|
||||
window manager, display manager and an xterm take about 8Mb of virtual
|
||||
@ -397,10 +355,8 @@
|
||||
your home directory as described in the xinit and startx man pages.
|
||||
|
||||
|
||||
|
||||
|
||||
6. Rebuilding Kernels for X
|
||||
|
||||
----------------------------
|
||||
|
||||
The GENERIC FreeBSD 2.0 kernel supports XFree86 without any
|
||||
modifications required. You do not need to make any changes to the
|
||||
@ -416,23 +372,18 @@
|
||||
remove the two lines below (in /sys/arch/i386/conf). They are both
|
||||
required for X support:
|
||||
|
||||
|
||||
options XSERVER #Xserver
|
||||
options UCONSOLE #X Console support
|
||||
|
||||
|
||||
|
||||
The generic FreeBSD 2.0 kernel is configured by default with the
|
||||
syscons driver. To configure your kernel similarly it should have a
|
||||
line like this in /usr/src/sys/i386/conf/GENERIC:
|
||||
|
||||
|
||||
device sc0 at isa? port "IO_KBD" tty irq 1 vector scintr
|
||||
|
||||
The maximum number of virtual consoles can be set using the MAXCONS
|
||||
option:
|
||||
|
||||
|
||||
options "MAXCONS=4" #4 virtual consoles
|
||||
|
||||
|
||||
@ -455,13 +406,11 @@
|
||||
support. To do this, add the following line to your kernel config
|
||||
file:
|
||||
|
||||
|
||||
options SYSVSHM # System V shared memory
|
||||
options SYSVSEM # System V semaphores
|
||||
options SYSVMSG # System V message queues
|
||||
|
||||
|
||||
|
||||
If you are using a SoundBlaster 16 on IRQ 2 (9), then you need a patch
|
||||
for sb16_dsp.c. Otherwise a kernel configured with the SoundBlaster
|
||||
driver will claim interrupt 9 doesn't exist and X server will lock up.
|
||||
@ -470,9 +419,8 @@
|
||||
system because the I/O port addresses overlap.
|
||||
|
||||
|
||||
|
||||
7. Rebuilding XFree86
|
||||
|
||||
----------------------
|
||||
|
||||
The server link kit allows you to build an X server using a minimum
|
||||
amount of disk space. Just unpack it, make the appropriate changes to
|
||||
@ -486,26 +434,21 @@
|
||||
you are running a version of FreeBSD that doesn't include shared
|
||||
library support, add the following line to site.def:
|
||||
|
||||
|
||||
#define BuildBsdSharedLibs NO
|
||||
|
||||
If your system doesn't have support or SYSV shared memory (for
|
||||
example, if you don't have the <sys/shm.h> header), you should disable
|
||||
the MIT-SHM extension by adding the following line to site.def:
|
||||
|
||||
|
||||
#define HasShm NO
|
||||
|
||||
|
||||
|
||||
To compile the sources on FreeBSD 1.1 and later, type:
|
||||
|
||||
make World
|
||||
|
||||
|
||||
|
||||
8. Building Other X Clients
|
||||
|
||||
----------------------------
|
||||
|
||||
The easiest way to build a new client (X application) is to use xmkmf
|
||||
if an Imakefile is included with it. Type ``xmkmf -a'' to create the
|
||||
@ -520,10 +463,8 @@
|
||||
of the symbol can be used to distinguish different BSD releases. For
|
||||
example, code specific to the Net-2 and later releases can use:
|
||||
|
||||
|
||||
#if (BSD >= 199103)
|
||||
|
||||
|
||||
To ensure that this symbol is correctly defined, include <sys/param.h>
|
||||
in the source that requires it. Note that the symbol CSRG_BASED is
|
||||
defined for *BSD systems in XFree86 3.1.1 and later. This should be
|
||||
@ -534,11 +475,8 @@
|
||||
and __bsdi__ for BSD/386.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
9. Thanks
|
||||
----------
|
||||
|
||||
Many thanks to:
|
||||
|
||||
@ -559,50 +497,4 @@
|
||||
Generated from XFree86: xc/programs/Xserver/hw/xfree86/doc/sgml/FreeBSD.sgml,v 3.10 1995/01/28 16:01:28 dawes Exp $
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$XFree86: xc/programs/Xserver/hw/xfree86/doc/READ.FreeBSD,v 3.12 1995/01/28 16:19:37 dawes Exp $
|
||||
|
@ -1,11 +1,14 @@
|
||||
This menu lets you configure your system a little after it's
|
||||
installed. In particular, you should probably set the system
|
||||
manager's password and the system time zone.
|
||||
This menu allows you to configure your system after the installation process
|
||||
is complete. At the minimum, you should probably set the system manager's
|
||||
password and the system time zone.
|
||||
|
||||
For extra goodies like bash, emacs, pascal, etc. you should almost
|
||||
certainly look at the Packages item in this menu. Note that this is
|
||||
currently only really useful if you have a CDROM or an existing
|
||||
packages collection somewhere in the file system hierarchy where the
|
||||
package management tool can get to it. Automatic transfer of packages
|
||||
over FTP is not yet supported!
|
||||
For extra goodies like bash, emacs, pascal, etc., you should look at the
|
||||
Packages item in this menu. Currently, the Packages option is only useful
|
||||
if you have a CDROM or an existing packages collection somewhere in the
|
||||
file system hierarchy where the package management tool can locate it.
|
||||
The automatic transfer of packages via FTP is not yet supported!
|
||||
|
||||
If you wish to re-invoke the package installation tool after leaving
|
||||
the system installation, the command is ``pkg_manage''. For setting
|
||||
the timezone, type ``tzsetup''. For more information on the general
|
||||
system configuration, see the ``/etc/sysconfig'' file.
|
||||
|
@ -1,5 +1,3 @@
|
||||
Select the drive(s) you wish FreeBSD to be able to use.
|
||||
|
||||
If you are going to actually install some portion of FreeBSD on a
|
||||
drive then PLEASE BE VERY CERTAIN that the Geometry reported in the
|
||||
Partition Editor (see Installation Menu) is the correct one for your
|
||||
@ -11,13 +9,20 @@ by either the IDE controller or a special boot-sector translation
|
||||
utility such as that by OnTrack Systems. In these cases, knowing
|
||||
the correct geometry gets even more complicated as it's not something
|
||||
you can easily tell by looking at the drive or the PC BIOS setup. The
|
||||
best way of determining your geometry in such situations is to boot
|
||||
DOS (from the hard disk, not a floppy!) and run the ``pfdisk'' utility
|
||||
provided in the tools/ subdirectory of the FreeBSD CDROM or FTP site.
|
||||
It will report the geometry that DOS sees, which is generally the
|
||||
correct one.
|
||||
best way of verifying that your geometry is being correctly calculated
|
||||
in such situations is to boot DOS (from the hard disk, not a floppy!)
|
||||
and run the ``pfdisk'' utility provided in the tools/ subdirectory of the
|
||||
FreeBSD CDROM or FTP site. It will report the geometry that DOS sees,
|
||||
which is generally the correct one.
|
||||
|
||||
FreeBSD does its best to guess all of this automatically, of course,
|
||||
but it sometimes fails which is why it's a good idea to check it. The
|
||||
Partition Editor has a `(G)eometry' command that will allow you to
|
||||
change it as necessary.
|
||||
If you have no DOS partition sharing the disk at all, then you may find that
|
||||
you have better luck with Geometry detection if you create a very small
|
||||
DOS partition first, before installing FreeBSD. Once FreeBSD is installed
|
||||
you can always delete it again if you need the space.
|
||||
|
||||
It's actually not a bad idea (believe it or not) to have a small bootable
|
||||
DOS partition on your FreeBSD machine anyway: Should the machine become
|
||||
unstable or exhibit strange behavior at some point in the future (which
|
||||
is not uncommon behavior for PC hardware!) you can then at least use
|
||||
DOS for installing and running one of the commercially available system
|
||||
diagnostic utilities.
|
||||
|
@ -1,18 +1,35 @@
|
||||
INSTALLATION GUIDE FOR FreeBSD 2.0.5
|
||||
|
||||
This manual documents the process of installing FreeBSD on your
|
||||
machine. Please also see the hardware guide for hardware-specific
|
||||
machine. Please also see the Hardware Guide for hardware-specific
|
||||
installation instructions (how to configure your hardware, what sorts
|
||||
of things to watch out for, etc).
|
||||
|
||||
If you're running DOS and want FreeBSD to interoperate with it, read
|
||||
the following section first! Otherwise, you may skip to the next
|
||||
section.
|
||||
of things to watch out for, etc) before starting a new installation.
|
||||
|
||||
|
||||
+==========================================+
|
||||
|1. DOS user's Question and Answer section |
|
||||
+==========================================+
|
||||
Table of Contents:
|
||||
==================
|
||||
|
||||
1.0 DOS User's Q&A section.
|
||||
1.1 How do I make space for FreeBSD?
|
||||
1.2 Can I use compressed DOS filesystems from FreeBSD?
|
||||
1.3 Can I use DOS extended partitions?
|
||||
1.4 Can I run DOS executables under FreeBSD?
|
||||
|
||||
2.0 Preparing for the installation.
|
||||
2.1 Before installing from CDROM
|
||||
2.2 Before installing from Floppy
|
||||
2.3 Before installing from a DOS partition
|
||||
2.4 Before installing from QIC/SCSI tape
|
||||
2.5 Before installing over a network
|
||||
2.5.1 Preparing for NFS Installation
|
||||
2.5.2 Preparing for FTP Installation
|
||||
|
||||
3.0 Installing FreeBSD.
|
||||
|
||||
|
||||
|
||||
1.0 DOS user's Question and Answer section
|
||||
=== ======================================
|
||||
|
||||
1.1 Help! I have no space! Do I need to delete everything first?
|
||||
|
||||
@ -53,34 +70,47 @@ last 1% of the work involved.
|
||||
1.4 Can I run DOS binaries under FreeBSD?
|
||||
|
||||
Not yet! We'd like to add support for this someday, but are still
|
||||
lacking anyone to actually do the work..
|
||||
lacking anyone to actually do the work. Ongoing work with Linux's
|
||||
DOSEMU utility may bring this much closer to being a reality sometime
|
||||
soon. Send mail to hackers@freebsd.org if you're interested in
|
||||
joining this effort!
|
||||
|
||||
However, there is a neat utility called "pcemu" in the ports collection
|
||||
which emulates an 8088 and enough BIOS services to run DOS text mode
|
||||
applications. It requires the X Window System (provided as
|
||||
XFree86 3.1.1u1).
|
||||
|
||||
|
||||
|
||||
+==================================+
|
||||
|2. PREPARING FOR THE INSTALLATION |
|
||||
+==================================+
|
||||
2.0 Preparing for the installation
|
||||
=== ==============================
|
||||
|
||||
2.1 Before installing from CDROM:
|
||||
|
||||
If your CDROM is of an unsupported type, such as an IDE CDROM, then
|
||||
please skip to section 2.3: DOS Preparation.
|
||||
please skip to section 2.3: Before installing from a DOS partition.
|
||||
|
||||
There is not a lot of preparatory work that needs to be done to
|
||||
successfully install from one of Walnut Creek's FreeBSD CDROMs (other
|
||||
CDROM distributions may work as well, but I can't say for sure as I
|
||||
CDROM distributions may work as well, we simply cannot say as we
|
||||
have no hand or say in their creation). You can either boot into the
|
||||
CD installation directly from DOS using Walnut Creek's supplied "go"
|
||||
batch file or you can make a boot floppy by writing the supplied image
|
||||
(floppies/boot.flp) onto a floppy. Under DOS, a good utility for this
|
||||
is rawrite.exe, which may also be found in the tools/ subdirectory.
|
||||
Under UNIX, you may find that ``dd if=floppies/boot.flp of=/dev/rfd0''
|
||||
or ``dd if=floppies/boot.flp of=/dev/floppy'' works well, depending on
|
||||
your hardware.
|
||||
CD installation directly from DOS using Walnut Creek's supplied
|
||||
``install.bat'' batch file or you can make a boot floppy with
|
||||
the ``makeflp.bat'' command.
|
||||
|
||||
Once you've booted one way or the other, you should be able to select
|
||||
CDROM as the media type when asked and load the entire distribution
|
||||
from CDROM. No other media will be required.
|
||||
For the easiest interface of all (from DOS), type "go". This
|
||||
will bring up a DOS menu utility that leads you through all
|
||||
the available options.
|
||||
|
||||
If you're creating the boot floppy from a UNIX machine, you may find
|
||||
that ``dd if=floppies/boot.flp of=/dev/rfd0'' or
|
||||
``dd if=floppies/boot.flp of=/dev/floppy'' works well, depending on
|
||||
your hardware and operating system environment.
|
||||
|
||||
Once you've booted from DOS or floppy, you should then be able to select
|
||||
CDROM as the media type in the Media menu and load the entire
|
||||
distribution from CDROM. No other types of installation media should
|
||||
be required.
|
||||
|
||||
After your system is fully installed and you have rebooted from the
|
||||
hard disk, you should find the CD mounted on the directory /cdrom. A
|
||||
@ -96,6 +126,26 @@ Which would allow you to then "cd /usr/ports; make" and get all the
|
||||
sources from the CD, but yet create all the intermediate files in
|
||||
/usr/ports, which is presumably on a more writable media! :-)
|
||||
|
||||
SPECIAL NOTE: Before invoking the installation, be sure that the
|
||||
CDROM is in the drive so that the "probe" can find it!
|
||||
This is also true if you wish the CDROM to be added to the default
|
||||
system configuration automatically during the install (whether or
|
||||
not you actually use it as the installation media). This will be
|
||||
fixed for 2.1, but for now this simple work-around will ensure that
|
||||
your CDROM is detected properly.
|
||||
|
||||
Finally, if you would like people to be able to FTP install
|
||||
FreeBSD directly from the CDROM in your machine, you'll find
|
||||
it quite easy. After the machine is fully installed, you simply
|
||||
need to add the following line to the password file (using
|
||||
the vipw command):
|
||||
|
||||
ftp:*:99:99::0:0:FTP:/cdrom:/nonexistent
|
||||
|
||||
No further work is necessary. The other installers will now be able
|
||||
to chose a Media type of FTP and type in: ftp://<your machine>
|
||||
after picking "Other" in the ftp sites menu!
|
||||
|
||||
|
||||
2.2 Before installing from Floppy:
|
||||
|
||||
@ -108,57 +158,80 @@ somewhat special in that it's not a DOS filesystem floppy at all, but
|
||||
rather an "image" floppy (it's actually a gzip'd cpio file). You can
|
||||
use the rawrite.exe program to do this under DOS, or ``dd'' to do it
|
||||
on a UNIX Workstation (see notes in section 2.1 concerning the
|
||||
``floppies/boot.flp'' image). Once this floppy is made, put it aside.
|
||||
You'll be asked for it later.
|
||||
``floppies/boot.flp'' image). Once this floppy is made, go on
|
||||
to make the distribution set floppies:
|
||||
|
||||
You will also need, at minimum, as many 1.44MB or 1.2MB floppies as it
|
||||
takes to hold all files in the bin (binary distribution) directory.
|
||||
THESE floppies *must* be formatted using MS-DOS, using with the FORMAT
|
||||
command in MS-DOS or the File Manager format command in Microsoft
|
||||
Windows(tm). Factory preformatted floppies will also work well,
|
||||
provided that they haven't been previously used for something else.
|
||||
You will need, at minimum, as many 1.44MB or 1.2MB floppies as it takes
|
||||
to hold all files in the bin (binary distribution) directory. THESE
|
||||
floppies *must* be formatted using MS-DOS, using the FORMAT command in
|
||||
MS-DOS or the File Manager format command in Microsoft Windows(tm).
|
||||
Don't trust Factory Preformatted floppies! Format them again yourself,
|
||||
just to make sure!
|
||||
|
||||
Many problems reported by our users in the past have turned out to be
|
||||
from the use of improperly formatted media, so we simply take special
|
||||
care to mention it here!
|
||||
Many problems reported by our users in the past have resulted from the
|
||||
use of improperly formatted media, so we simply take special care to
|
||||
mention it here!
|
||||
|
||||
After you've DOS formatted the floppies, you'll need to copy the files
|
||||
onto them. The distribution files are split into chunks conveniently
|
||||
sized so that 5 of them will fit on a conventional 1.44MB floppy. Go
|
||||
through all your floppies, packing as many files as will fit on each
|
||||
one, until you've got all the distributions you want packed up in this
|
||||
fashion. Select ``Floppy'' from the Media menu at installation time
|
||||
and you will be prompted for everything after that.
|
||||
fashion. Each distribution should go into a subdirectory on the
|
||||
floppy, e.g.: a:\bin\bin.aa, a:\bin\bin.ab, ...
|
||||
|
||||
Once you come to the Media screen of the install, select
|
||||
"Floppy" and you'll be prompted for the rest.
|
||||
|
||||
|
||||
2.3 Before installing from a DOS partition:
|
||||
|
||||
To prepare for installation from an MS-DOS partition, you should
|
||||
simply copy the files from the distribution into a directory with the
|
||||
same name as the distribution. For example, if you are preparing to
|
||||
install the bin distribution set, then make a directory on your C:
|
||||
drive named C:\FREEBSD\BIN and copy the files there. Copying the
|
||||
distributions into subdirectories of the FREEBSD directory allows the
|
||||
installation program to find the files automatically.
|
||||
To prepare for installation from an MS-DOS partition you should
|
||||
simply copy the files from the distribution into a directory called
|
||||
"FREEBSD". For example, to do a minimal installation of FreeBSD from
|
||||
DOS using files copied from the CDROM, you might do something like
|
||||
this:
|
||||
|
||||
C> MD C:\FREEBSD
|
||||
C> XCOPY /S E:\DISTS\BIN C:\FREEBSD
|
||||
C> XCOPY /S E:\FLOPPIES C:\FREEBSD
|
||||
|
||||
Asssuming that `C:' was where you had free space and `E:' was where
|
||||
your CD was mounted. Note that you need the FLOPPIES directory
|
||||
because the `root.flp' image is automatically looked for there when
|
||||
you're doing a DOS installation.
|
||||
|
||||
For as many `DISTS' as you wish to install from DOS (and you have free
|
||||
space for), install each one under `C:\FREEBSD' - the BIN dist is only
|
||||
the minimal requirement.
|
||||
|
||||
|
||||
2.4 Before installing from QIC/SCSI Tape:
|
||||
|
||||
Installing from tape is probably the easiest method, short of an
|
||||
on-line install using FTP or installing from a CDROM. The
|
||||
installation program expects the files to be simply tar'ed onto the
|
||||
tape, so after getting all of the files for distribution you're
|
||||
interested in, simply tar them onto the tape with a command like:
|
||||
on-line install using FTP or a CDROM install. The installation program
|
||||
expects the files to be simply tar'ed onto the tape, so after getting
|
||||
all of the files for distribution you're interested in, simply tar
|
||||
them onto the tape with a command like:
|
||||
|
||||
cd /freebsd/distdir
|
||||
tar cvf /dev/rwt0 (or /dev/rst0) dist1 .. dist2
|
||||
|
||||
When you go to do the installation, you should make sure that you
|
||||
leave enough room in the /usr/tmp directory to accomdate the FULL
|
||||
contents of the tape you've created. Due to the non-random access
|
||||
nature of tapes, this method of installation requires quite a bit of
|
||||
temporary storage! You should expect to require as much temporary
|
||||
storage as you have stuff written on tape!
|
||||
Make sure that the `floppies/' directory is one of the "dists" given
|
||||
above, since the installation will look for `floppies/root.flp' on
|
||||
the tape.
|
||||
|
||||
When you go to do the installation, you should also make sure that you
|
||||
leave enough room in some temporary directory (which you'll be allowed
|
||||
to choose) to accommodate the FULL contents of the tape you've
|
||||
created. Due to the non-random access nature of tapes, this method of
|
||||
installation requires quite a bit of temporary storage! You should
|
||||
expect to require as much temporary storage as you have stuff written
|
||||
on tape.
|
||||
|
||||
SPECIAL NOTE: When going to do the installation, the tape must be in
|
||||
the drive *before* booting from the boot floppy. The installation
|
||||
"probe" may otherwise fail to find it.
|
||||
|
||||
|
||||
2.5 Before installing over a network:
|
||||
@ -189,52 +262,186 @@ terminal emulator.
|
||||
If a hard-wired connection to another FreeBSD (2.0R or later) machine
|
||||
is available, you might also consider installing over a "laplink"
|
||||
parallel port cable. The data rate over the parallel port is much
|
||||
higher than is what's typically possible over a serial line (up to
|
||||
higher than what is typically possible over a serial line (up to
|
||||
50k/sec), thus resulting in a quicker installation.
|
||||
|
||||
Finally, for the fastest possible installation, an ethernet adaptor is
|
||||
always a good choice! FreeBSD supports most common PC ethernet cards,
|
||||
a table of supported cards (and their required settings) provided as
|
||||
part of the FreeBSD Hardware Guide - see the Documentation menu on the
|
||||
boot floppy. If you are using one of the supported PCMCIA ethernet
|
||||
cards, also be sure that it's plugged in _before_ the laptop is
|
||||
powered on! FreeBSD does not, unfortunately, currently support "hot
|
||||
insertion" of PCMCIA cards.
|
||||
Finally, for the fastest possible network installation, an ethernet
|
||||
adaptor is always a good choice! FreeBSD supports most common PC
|
||||
ethernet cards, a table of supported cards (and their required
|
||||
settings) is provided as part of the FreeBSD Hardware Guide - see the
|
||||
Documentation menu on the boot floppy. If you are using one of the
|
||||
supported PCMCIA ethernet cards, also be sure that it's plugged in
|
||||
_before_ the laptop is powered on! FreeBSD does not, unfortunately,
|
||||
currently support "hot insertion" of PCMCIA cards.
|
||||
|
||||
You will also need to know your IP address on the network, the the
|
||||
"netmask" value for your address class and the name of your machine.
|
||||
You will also need to know your IP address on the network, the
|
||||
"netmask" value for your address class, and the name of your machine.
|
||||
Your system administrator can tell you which values to use for your
|
||||
particular network setup. If you will be referring to other hosts by
|
||||
name rather than IP address, you'll also need a name server and
|
||||
possibly the address of a gateway (if you're using PPP, it's your
|
||||
provider's IP address) to use in talking to it. If you do not know
|
||||
the answers to all or or most of these questions, then you should
|
||||
the answers to all or most of these questions, then you should
|
||||
really probably talk to your system administrator _first_ before
|
||||
trying this type of installation!
|
||||
|
||||
|
||||
Once you have a network link of some sort working, the installation
|
||||
can continue over NFS or FTP.
|
||||
|
||||
NFS installation is fairly straight-forward: Simply copy the FreeBSD
|
||||
distribution files you're interested onto a server somewhere and then
|
||||
point the NFS media selection at it. If this server supports only
|
||||
"privileged port" access, or you have a poor quality ethernet card
|
||||
which suffers from very slow transfer rates, you may wish to
|
||||
investigate the ``Ftp Options'' menu for special flags to set in these
|
||||
case.
|
||||
2.5.1 Preparing for NFS installation:
|
||||
|
||||
NFS installation is fairly straight-forward: Simply copy the
|
||||
FreeBSD distribution files you want onto a server somewhere
|
||||
and then point the NFS media selection at it.
|
||||
|
||||
If this server supports only "privileged port" access (as is
|
||||
generally the default for Sun workstations), you will need to set
|
||||
this option in the Options menu before installation can proceed.
|
||||
|
||||
If you have a poor quality ethernet card which suffers from very
|
||||
slow transfer rates, you may also wish to toggle the appropriate
|
||||
Options flag.
|
||||
|
||||
In order for NFS installation to work, the server must support
|
||||
"subdir mounts"; e.g., if your FreeBSD 2.0.5 distribution directory
|
||||
lives on: ziggy:/usr/archive/stuff/FreeBSD
|
||||
Then ziggy will have to allow the direct mounting of
|
||||
/usr/archive/stuff/FreeBSD, not just /usr or /usr/archive/stuff.
|
||||
|
||||
In FreeBSD's /etc/exports file, this is controlled by the
|
||||
``-alldirs'' option. Other NFS servers may have different
|
||||
conventions. If you are getting `Permission Denied' messages
|
||||
from the server then it's likely that you don't have this
|
||||
enabled properly!
|
||||
|
||||
|
||||
2.5.2 Preparing for FTP Installation
|
||||
|
||||
FTP installation may be done from any mirror site containing a
|
||||
reasonably up-to-date version of FreeBSD 2.0.5. A full menu of
|
||||
reasonable choices from almost anywhere in the world is provided in
|
||||
the FTP site menu.
|
||||
reasonable choices from almost anywhere in the world is provided
|
||||
by the FTP site menu.
|
||||
|
||||
If you are installing from some other FTP site not listed in this
|
||||
menu, or you are having troubles getting your name server configured
|
||||
properly, you can also specify your own URL by selecting the ``Other''
|
||||
choice in that menu. A URL can also be a direct IP address, so
|
||||
the following would work in the absence of a name server:
|
||||
|
||||
ftp://192.216.222.4/pub/FreeBSD/2.0.5-RELEASE
|
||||
|
||||
[Substitute "ALPHA" for "RELEASE" during the ALPHA test period!]
|
||||
|
||||
If you are installing through a firewall then you should probably
|
||||
select ``Passive mode'' ftp, which is the default. If you are
|
||||
talking to a server which does not support passive mode for some
|
||||
reason, see the Options menu to select Active mode transfers.
|
||||
|
||||
|
||||
+============================+
|
||||
|2. INSTALLING FREEBSD 2.0.5 |
|
||||
+============================+
|
||||
3. Installing FreeBSD
|
||||
-- ------------------
|
||||
|
||||
Once you've done the appropriate preinstallation steps, you should install
|
||||
FreeBSD!
|
||||
Once you've taken note of the appropriate preinstallation steps, you
|
||||
should be able to install FreeBSD without any further trouble.
|
||||
|
||||
/* XXX Put some more text in this section.. :-) XXX */
|
||||
Should this not be true, then you may wish to go back and re-read the
|
||||
relevant preparation section (section 2.x) for the installation media
|
||||
type you're trying to use - perhaps there's a helpful hint there that
|
||||
you missed the first time? If you're having hardware trouble, or
|
||||
FreeBSD refuses to boot at all, read the Hardware Guide provided on
|
||||
the boot floppy for a list of possible solutions.
|
||||
|
||||
The FreeBSD boot floppy contains all the on-line documentation you
|
||||
should need to be able to navigate through an installation and if it
|
||||
doesn't then I'd like to know what you found most confusing! It is
|
||||
the objective of the FreeBSD installation program (sysinstall) to be
|
||||
self-documenting enough that painful "step-by-step" guides are no
|
||||
longer necessary. It may take us a little while to reach that
|
||||
objective, but that's the objective!
|
||||
|
||||
Meanwhile, you may also find the following "typical installation sequence"
|
||||
to be helpful:
|
||||
|
||||
o Boot the boot floppy. After a boot sequence which can take
|
||||
anywhere from from 30 seconds to 3 minutes, depending on your
|
||||
hardware, you should be presented with a menu of initial
|
||||
choices. If the floppy doesn't boot at all, or the boot
|
||||
hangs at some stage, go read the Q&A section of the Hardware
|
||||
Guide for possible causes.
|
||||
|
||||
o Press F1. You should see some basic usage instructions on
|
||||
the menu system and general navigation. If you haven't used this
|
||||
menu system before then PLEASE read this thoroughly!
|
||||
|
||||
o If English is not your native language, you may wish to proceed
|
||||
directly to the Language option and set your preferred language.
|
||||
This will bring up some of the documentation in that language
|
||||
instead of english.
|
||||
|
||||
o Select the Options item and set any special preferences you
|
||||
may have.
|
||||
|
||||
o Select Proceed, bringing you to the Installation Menu.
|
||||
|
||||
Installation Menu:
|
||||
|
||||
o You can do anything you like in this menu without altering
|
||||
your system _except_ for "Commit", which will perform any
|
||||
requests to alter your system you may have made.
|
||||
|
||||
If you're confused at any point, the F1 key usually pulls
|
||||
up the right information for the screen you're in.
|
||||
|
||||
o The first step is generally `Partition', which allows
|
||||
you to chose how your drives will be used for FreeBSD.
|
||||
|
||||
o Next, with the `Label' editor, you can specify how the space
|
||||
in any allocated FreeBSD partitions should be used by FreeBSD,
|
||||
or where to mount a non-FreeBSD partition (such as DOS).
|
||||
|
||||
o Next, the `Distributions' menu allows you to specify which
|
||||
parts of FreeBSD you wish to load. A good choice is
|
||||
"User" for a small system or "Developer" for someone
|
||||
wanting a bit more out of FreeBSD. If none of the existing
|
||||
collections sound applicable, select Custom.
|
||||
|
||||
o Next, the `Media' menu allows you to specify what kind of
|
||||
media you wish to install from. If a desired media choice is
|
||||
found and configured automatically then this menu will simply
|
||||
return, otherwise you'll be asked for additional details on
|
||||
the media device type.
|
||||
|
||||
o Finally, the Commit command will actually perform all the
|
||||
actions at once (nothing has been written to your disk
|
||||
so far, nor will it until you give the final confirmation).
|
||||
All new or changed partition information will be written
|
||||
out, file systems will be created and/or non-destructively
|
||||
labelled (depending on how you set their newfs flags in the
|
||||
Label editor) and all selected distributions will be
|
||||
extracted.
|
||||
|
||||
o The Configure menu choice allows you to furthur configure your
|
||||
FreeBSD installation by giving you menu-driven access to
|
||||
various system defaults. Some items, like networking, may
|
||||
be especially important if you did a CDROM/Tape/Floppy
|
||||
installation and have not yet configured your network
|
||||
interfaces (assuming you have some). Properly configuring
|
||||
your network here will allow FreeBSD to come up on the network
|
||||
when you first reboot from the hard disk.
|
||||
|
||||
o Exit returns you to the top menu.
|
||||
|
||||
|
||||
At this point, you're generally done with the sysinstall utility and
|
||||
can select the final `Quit'. If you're running it as an installer
|
||||
(e.g., before the system is all the way up) then the system will now
|
||||
reboot. If you selected the boot manager option, you will see a small
|
||||
boot menu with an `F?' prompt. Press the function key for BSD (it
|
||||
will be shown) and you should boot up into FreeBSD off the hard disk.
|
||||
|
||||
If this fails to happen for some reason, see the Q & A section
|
||||
of the Hardware Guide for possible clues!
|
||||
|
||||
Jordan
|
||||
|
||||
---- End of Installation Guide ---
|
||||
|
@ -9,6 +9,6 @@ I18N features to meet various standards.
|
||||
Until these improvements are made, you may find it easier to simply
|
||||
edit the /etc/sysconfig file yourself once the system is fully
|
||||
installed. There are a number of comments in that file that detail
|
||||
just what should be changed as well as a few examples of existing
|
||||
just what should be changed, as well as a few examples of existing
|
||||
non-english setups.
|
||||
|
||||
|
@ -30,25 +30,25 @@ simple terminal emulator and has no "modem capabilities database".
|
||||
If a hard-wired connection to another FreeBSD (2.0R or later) machine
|
||||
is available, you might also consider installing over a "laplink"
|
||||
parallel port cable. The data rate over the parallel port is much
|
||||
higher than is what's typically possible over a serial line, with
|
||||
speeds of up to 50k/sec. not at all uncommon.
|
||||
higher than what is typically possible over a serial line with
|
||||
speeds of up to 50k/sec.
|
||||
|
||||
Finally, for the fastest possible installation, an ethernet adaptor is
|
||||
always a good choice! FreeBSD supports most common PC ethernet cards,
|
||||
a table of required settings for which is provided in the FreeBSD
|
||||
Hardware Guide - see the Documentation menu on the boot floppy.
|
||||
If you are using one of the supported PCMCIA ethernet cards, also
|
||||
be sure that it's plugged in _before_ the laptop is powered on!
|
||||
FreeBSD does not, unfortunately, currently support "hot insertion"
|
||||
of PCMCIA cards.
|
||||
Finally, for the fastest possible network installation, an ethernet
|
||||
adaptor is always a good choice! FreeBSD supports most common PC
|
||||
ethernet cards, a table of which is provided in the FreeBSD
|
||||
Hardware Guide (see the Documentation menu on the boot floppy).
|
||||
If you are using one of the supported PCMCIA ethernet cards, also be
|
||||
sure that it's plugged in _before_ the laptop is powered on! FreeBSD
|
||||
does not, unfortunately, currently support "hot insertion" of PCMCIA
|
||||
cards.
|
||||
|
||||
You will also need to know your IP address on the network, the the
|
||||
"netmask" value for your address class and the name of your machine.
|
||||
You will also need to know your IP address on the network, the "netmask"
|
||||
value for your address class, and the name of your machine.
|
||||
Your system administrator can tell you which values to use for your
|
||||
particular network setup. If you will be referring to other hosts by
|
||||
name rather than IP address, you'll also need a name server and
|
||||
possibly the address of a gateway (if you're using PPP, it's your
|
||||
provider's IP address) to use in talking to it. If you do not know
|
||||
the answers to all or or most of these questions, then you should
|
||||
the answers to all or most of these questions, then you should
|
||||
really probably talk to your system administrator _first_ before
|
||||
trying this type of installation!
|
||||
|
@ -10,7 +10,6 @@ RIGHT ARROW Move to next item or group (same as TAB).
|
||||
SHIFT-TAB Move to previous item or group.
|
||||
LEFT ARROW Move to previous item or group (same as SHIFT-TAB).
|
||||
RETURN Select item.
|
||||
ESC Spawn a sub-shell for diagnostic purposes. Exit returns.
|
||||
PAGE UP In text boxes, scrolls up one page.
|
||||
PAGE DOWN In text boxes, scrolls down one page.
|
||||
SPACE In "radio" or multiple choice menus, toggle the current item.
|
||||
@ -35,7 +34,7 @@ SPECIAL FEATURES:
|
||||
=================
|
||||
|
||||
It is also possible to select a menu item by typing the first
|
||||
character of its name, if unique. Such "accellerator" characters will
|
||||
character of its name, if unique. Such "accelerator" characters will
|
||||
be specially highlighted in the item name.
|
||||
|
||||
The console driver also contains a scroll-back buffer for reviewing
|
||||
@ -51,5 +50,5 @@ also find that you have multiple "virtual consoles" and can use them to
|
||||
have several active sessions at once. Use ALT-F<n> to switch between
|
||||
them, where `F<n>' is the function key corresponding to the screen you
|
||||
wish to see. By default, the system comes with 3 virtual consoles enabled.
|
||||
You can create more by editing the /etc/ttys file once the system is up, up
|
||||
to a maximum of 12.
|
||||
You can create more by editing the /etc/ttys file, once the system is up,
|
||||
for a maximum of 12.
|
||||
|
@ -10,7 +10,6 @@ FLECHA DERECHA Ir al siguiente elemento o grupo (Ide'ntico a TAB).
|
||||
MAYUSCULAS-TAB Ir al elemento anterior o grupo.
|
||||
FLECHA IZQ. Ir al elemento anterior o grupo (Ide'ntico a MAYUSCULAS-TAB).
|
||||
RETORNO Seleccionar el elemento.
|
||||
ESC Ejecuta un inte'rprete (shell) para diagno'stico. Exit regresa.
|
||||
PAGINA ARRIBA Regresa una pa'gina, en a'reas de texto.
|
||||
PAGINA ABAJO Presenta la siguiente pa'gina, en areas de texto.
|
||||
ESPACIO En menus de opcio'n mu'ltiple (radio), cambia el elemento actual
|
||||
|
@ -10,7 +10,6 @@ FLECHA DERECHA Ir al siguiente elemento o grupo (Ide'ntico a TAB).
|
||||
MAYUSCULAS-TAB Ir al elemento anterior o grupo.
|
||||
FLECHA IZQ. Ir al elemento anterior o grupo (Ide'ntico a MAYUSCULAS-TAB).
|
||||
RETORNO Seleccionar el elemento.
|
||||
ESC Ejecuta un inte'rprete (shell) para diagno'stico. Exit regresa.
|
||||
PAGINA ARRIBA Regresa una pa'gina, en a'reas de texto.
|
||||
PAGINA ABAJO Presenta la siguiente pa'gina, en areas de texto.
|
||||
ESPACIO En menus de opcio'n mu'ltiple (radio), cambia el elemento actual
|
||||
|
@ -13,7 +13,7 @@ consid
|
||||
que des nouveautés par douzaines. Pour <----. __ / __ \
|
||||
obtenir plus de détails concernant ces <----|====O)))==) \) /====
|
||||
nouveautés, consultez le fichier <----' `--' `.__,' \
|
||||
<< release notes >>. | |
|
||||
RELNOTES | |
|
||||
\ / /\
|
||||
______( (_ / \______/
|
||||
,' ,-----' |
|
||||
@ -30,11 +30,11 @@ FreeBSD !
|
||||
Cette version de FreeBSD contient tout ce dont vous pouvez avoir
|
||||
besoin pour implanter ce système sur votre machine. Les sources de
|
||||
tous les programmes étant fournis, vous pouvez recompiler à loisir la
|
||||
distribution complête en une unique commande. C'est idéal pour les
|
||||
distribution complète en une unique commande. C'est idéal pour les
|
||||
étudiants, les chercheurs et tous ceux qui sont simplement curieux de
|
||||
voir comment est conçu un tel système.
|
||||
|
||||
Une importante collection de logiciels supportés (les << ports >>) est
|
||||
Une importante collection de logiciels supportés (les « ports ») est
|
||||
aussi fournie pour vous aider à obtenir et à installer sur FreeBSD,
|
||||
les logiciels traditionnels du domaine UNIX. Plus de 270 ports sont
|
||||
ainsi disponibles, des éditeurs de texte aux langages de programmation,
|
||||
@ -43,8 +43,8 @@ faire autour de FreeBSD, un environnement puissant et accessible,
|
||||
capable de rivaliser avec beaucoup de stations de travail.
|
||||
|
||||
En complément, il est recommandé d'acquérir les ouvrages relatifs à
|
||||
4.4BSD, chez << O'Reilly Associates >> et << USENIX Association >>,
|
||||
ISBN 1-56592-082-1. Nous n'avons pas d'intérêt dans la vente de ces
|
||||
4.4BSD, chez « O'Reilly Associates » et « USENIX Association »,
|
||||
ISBN 1-56592-082-1. Nous n'avons pas d'intérêts dans la vente de ces
|
||||
ouvrages, nous sommes simplement des lecteurs satisfaits.
|
||||
|
||||
Il est conseillé de lire le guide des configurations matérielles avant
|
||||
@ -52,7 +52,7 @@ d'aller plus loin dans l'installation. La configuration d'un PC pour
|
||||
d'autres systèmes que DOS/Windows (qui n'est pas très exigeant sur ce
|
||||
point) est certainement un peu plus difficile qu'il n'y paraît, et si
|
||||
vous pensez maîtriser la situation, c'est sans doute que vous n'avez
|
||||
pas utilisé un PC depuis quelques temps. :) Ce guide donne les
|
||||
pas utilisé un PC depuis quelque temps. :) Ce guide donne les
|
||||
renseignements indiquant comment configurer votre machine et quels
|
||||
symptômes rechercher en cas de problème. Ce guide est disponible par
|
||||
le menu Documentation de la disquette de démarrage de FreeBSD.
|
||||
@ -68,8 +68,8 @@ adress
|
||||
|
||||
hackers@FreeBSD.org (en anglais)
|
||||
|
||||
Les rapports de disfonctionnement << bug reports >> peuvent être
|
||||
notifiés par la commande << send-pr >> dès que votre système est
|
||||
Les rapports de dysfonctionnement « bug reports » peuvent être
|
||||
notifiés par la commande « send-pr » dès que votre système est
|
||||
installé. Dans le cas contraire, ils peuvent être adressés à :
|
||||
|
||||
bugs@FreeBSD.org (en anglais)
|
||||
@ -84,7 +84,7 @@ Les questions d'ordre g
|
||||
Ne soyez pas impatient si vos questions ne trouvent pas réponse dans
|
||||
la minute, car c'est beaucoup d'investissement que d'y répondre et il
|
||||
n'est pas rare que toute notre bonne volonté ne suffise pas. Les
|
||||
problèmes soumis par le biais de la commande << send-pr >> sont
|
||||
problèmes soumis par le biais de la commande « send-pr » sont
|
||||
automatiquement répertoriés dans une base de données. Vous resterez
|
||||
informés de toute évolution concernant votre demande.
|
||||
|
||||
@ -92,7 +92,7 @@ Notre site WEB est http://www.freebsd.org. C'est aussi une bonne
|
||||
source pour obtenir les dernières informations en date. Ce site
|
||||
propose de nombreuses facilités de documentation. La version de
|
||||
Netscape compilée pour BSDI peut être utilisée pour découvrir le
|
||||
<< World Wide Web >> directement à partir de FreeBSD.
|
||||
« World Wide Web » directement à partir de FreeBSD.
|
||||
|
||||
Pour de plus amples détails, consultez les fichiers contenus dans les
|
||||
répertoires /usr/share/FAQ et /usr/share/doc.
|
||||
|
@ -10,7 +10,6 @@ FL
|
||||
MAJ-TAB Aller sur la rubrique ou le groupe précédent.
|
||||
FLÈCHE GAUCHE Aller sur la rubrique précédente. (même chose que MAJ-TAB).
|
||||
ENTRÉE Sélectionne la rubrique.
|
||||
ESC Lance un sous-shell (pour diagnostics). Exit sort du shell.
|
||||
PAGE PRÉC. Remonte d'une page, dans les boîtes de texte.
|
||||
PAGE SUIV. Descend d'une page, dans les boîtes de texte.
|
||||
ESPACE Sélectionne/désélectionne l'élément (menus à choix multiples).
|
||||
|
@ -13,7 +13,7 @@ consid
|
||||
que des nouveautés par douzaines. Pour <----. __ / __ \
|
||||
obtenir plus de détails concernant ces <----|====O)))==) \) /====
|
||||
nouveautés, consultez le fichier <----' `--' `.__,' \
|
||||
<< release notes >>. | |
|
||||
RELNOTES | |
|
||||
\ / /\
|
||||
______( (_ / \______/
|
||||
,' ,-----' |
|
||||
@ -30,11 +30,11 @@ FreeBSD !
|
||||
Cette version de FreeBSD contient tout ce dont vous pouvez avoir
|
||||
besoin pour implanter ce système sur votre machine. Les sources de
|
||||
tous les programmes étant fournis, vous pouvez recompiler à loisir la
|
||||
distribution complête en une unique commande. C'est idéal pour les
|
||||
distribution complète en une unique commande. C'est idéal pour les
|
||||
étudiants, les chercheurs et tous ceux qui sont simplement curieux de
|
||||
voir comment est conçu un tel système.
|
||||
|
||||
Une importante collection de logiciels supportés (les << ports >>) est
|
||||
Une importante collection de logiciels supportés (les « ports ») est
|
||||
aussi fournie pour vous aider à obtenir et à installer sur FreeBSD,
|
||||
les logiciels traditionnels du domaine UNIX. Plus de 270 ports sont
|
||||
ainsi disponibles, des éditeurs de texte aux langages de programmation,
|
||||
@ -43,8 +43,8 @@ faire autour de FreeBSD, un environnement puissant et accessible,
|
||||
capable de rivaliser avec beaucoup de stations de travail.
|
||||
|
||||
En complément, il est recommandé d'acquérir les ouvrages relatifs à
|
||||
4.4BSD, chez << O'Reilly Associates >> et << USENIX Association >>,
|
||||
ISBN 1-56592-082-1. Nous n'avons pas d'intérêt dans la vente de ces
|
||||
4.4BSD, chez « O'Reilly Associates » et « USENIX Association »,
|
||||
ISBN 1-56592-082-1. Nous n'avons pas d'intérêts dans la vente de ces
|
||||
ouvrages, nous sommes simplement des lecteurs satisfaits.
|
||||
|
||||
Il est conseillé de lire le guide des configurations matérielles avant
|
||||
@ -52,7 +52,7 @@ d'aller plus loin dans l'installation. La configuration d'un PC pour
|
||||
d'autres systèmes que DOS/Windows (qui n'est pas très exigeant sur ce
|
||||
point) est certainement un peu plus difficile qu'il n'y paraît, et si
|
||||
vous pensez maîtriser la situation, c'est sans doute que vous n'avez
|
||||
pas utilisé un PC depuis quelques temps. :) Ce guide donne les
|
||||
pas utilisé un PC depuis quelque temps. :) Ce guide donne les
|
||||
renseignements indiquant comment configurer votre machine et quels
|
||||
symptômes rechercher en cas de problème. Ce guide est disponible par
|
||||
le menu Documentation de la disquette de démarrage de FreeBSD.
|
||||
@ -68,8 +68,8 @@ adress
|
||||
|
||||
hackers@FreeBSD.org (en anglais)
|
||||
|
||||
Les rapports de disfonctionnement << bug reports >> peuvent être
|
||||
notifiés par la commande << send-pr >> dès que votre système est
|
||||
Les rapports de dysfonctionnement « bug reports » peuvent être
|
||||
notifiés par la commande « send-pr » dès que votre système est
|
||||
installé. Dans le cas contraire, ils peuvent être adressés à :
|
||||
|
||||
bugs@FreeBSD.org (en anglais)
|
||||
@ -84,7 +84,7 @@ Les questions d'ordre g
|
||||
Ne soyez pas impatient si vos questions ne trouvent pas réponse dans
|
||||
la minute, car c'est beaucoup d'investissement que d'y répondre et il
|
||||
n'est pas rare que toute notre bonne volonté ne suffise pas. Les
|
||||
problèmes soumis par le biais de la commande << send-pr >> sont
|
||||
problèmes soumis par le biais de la commande « send-pr » sont
|
||||
automatiquement répertoriés dans une base de données. Vous resterez
|
||||
informés de toute évolution concernant votre demande.
|
||||
|
||||
@ -92,7 +92,7 @@ Notre site WEB est http://www.freebsd.org. C'est aussi une bonne
|
||||
source pour obtenir les dernières informations en date. Ce site
|
||||
propose de nombreuses facilités de documentation. La version de
|
||||
Netscape compilée pour BSDI peut être utilisée pour découvrir le
|
||||
<< World Wide Web >> directement à partir de FreeBSD.
|
||||
« World Wide Web » directement à partir de FreeBSD.
|
||||
|
||||
Pour de plus amples détails, consultez les fichiers contenus dans les
|
||||
répertoires /usr/share/FAQ et /usr/share/doc.
|
||||
|
@ -10,7 +10,6 @@ FL
|
||||
MAJ-TAB Aller sur la rubrique ou le groupe précédent.
|
||||
FLÈCHE GAUCHE Aller sur la rubrique précédente. (même chose que MAJ-TAB).
|
||||
ENTRÉE Sélectionne la rubrique.
|
||||
ESC Lance un sous-shell (pour diagnostics). Exit sort du shell.
|
||||
PAGE PRÉC. Remonte d'une page, dans les boîtes de texte.
|
||||
PAGE SUIV. Descend d'une page, dans les boîtes de texte.
|
||||
ESPACE Sélectionne/désélectionne l'élément (menus à choix multiples).
|
||||
|
@ -1,5 +1,3 @@
|
||||
|
||||
|
||||
COME USARE QUESTO SISTEMA
|
||||
=========================
|
||||
|
||||
@ -12,7 +10,6 @@ FRECCIA A DESTRA voce o gruppo successivo (come TAB)
|
||||
SHIFT-TAB voce o gruppo precedente
|
||||
FRECCIA A SINISTRA voce o gruppo precedente (come SHIFT-TAB)
|
||||
RETURN selezione voce corrente
|
||||
ESC lancia una shell. Si ritorna dalla shell con exit
|
||||
PAGINA SU nelle aree di testo, va alla pagina precedente
|
||||
PAGINA GIU nelle aree di testo, va alla pagina successiva
|
||||
SPAZIO cambia stato alla voce corrente (menu "radio")
|
||||
|
@ -1,5 +1,3 @@
|
||||
|
||||
|
||||
COME USARE QUESTO SISTEMA
|
||||
=========================
|
||||
|
||||
@ -12,7 +10,6 @@ FRECCIA A DESTRA voce o gruppo successivo (come TAB)
|
||||
SHIFT-TAB voce o gruppo precedente
|
||||
FRECCIA A SINISTRA voce o gruppo precedente (come SHIFT-TAB)
|
||||
RETURN selezione voce corrente
|
||||
ESC lancia una shell. Si ritorna dalla shell con exit
|
||||
PAGINA SU nelle aree di testo, va alla pagina precedente
|
||||
PAGINA GIU nelle aree di testo, va alla pagina successiva
|
||||
SPAZIO cambia stato alla voce corrente (menu "radio")
|
||||
|
@ -10,7 +10,6 @@ RIGHT ARROW $B<!$N9`L\$^$?$O%0%k!<%W$K0\F0$7$^$9!#(B(TAB $B$HF1$8(B)
|
||||
SHIFT-TAB $BA0$N9`L\$^$?$O%0%k!<%W$K0\F0$7$^$9!#(B
|
||||
LEFT ARROW $BA0$N9`L\$^$?$O%0%k!<%W$K0\F0$7$^$9!#(B(SHIFT-TAB $B$HF1$8(B)
|
||||
RETURN $B9`L\$rA*Br$7$^$9!#(B
|
||||
ESC $B%5%V%7%'%k$r<B9T$7$^$9!#(Bexit $B$GLa$j$^$9!#(B
|
||||
PAGE UP $B%F%-%9%H%\%C%/%9$G!"A0$N%Z!<%8$KLa$j$^$9!#(B
|
||||
PAGE DOWN $B%F%-%9%H%\%C%/%9$G!"<!$N%Z!<%8$K?J$_$^$9!#(B
|
||||
SPACE $B!V%i%8%*%\%?%s!W$dJ#?t$NA*Br;h$,$"$k%a%K%e!<$G!"8=:_$N(B
|
||||
|
@ -11,7 +11,6 @@ SHIFT-TAB mae no koumoku mataha group ni idou shimasu.
|
||||
LEFT ARROW mae no koumoku mataha group ni idou shimasu. (SHIFT-TAB to
|
||||
onaji).
|
||||
RETURN koumoku wo sentaku shimasu.
|
||||
ESC sub-shell wo jikkou shimasu. exit de modorimasu.
|
||||
PAGE UP text box de, mae no page ni modorimasu.
|
||||
PAGE DOWN text box de, tsugi no page ni susumimasu.
|
||||
SPACE "radio button" ya fukusuu no sentakushi ga aru menu de,
|
||||
|
@ -10,8 +10,6 @@ PIJL RECHTS Ga naar het volgende item of groep (hetzelfde als TAB)
|
||||
SHIFT-TAB Ga naar het vorige item of groep
|
||||
PIJL LINKS Ga naar het vorige item of groep (hetzelfde als SHIFT-TAB)
|
||||
RETURN Selecteer item
|
||||
ESC Start een sub-shell voor diagnostische doeleinden.
|
||||
Beeindig de shell om terug te gaan.
|
||||
PAGE UP Ga een pagina omhoog in tekst vensters
|
||||
PAGE DOWN Ga een pagina omlaag in tekst vensters
|
||||
SPATIEBALK Selecteer/deselecteer het huidige item in "radio" of
|
||||
@ -45,7 +43,7 @@ bovenkant van het scherm zijn gerold. Deze 'terug-blader-modus'
|
||||
kan geaktiveerd worden door op de "Scroll Lock" toets te drukken.
|
||||
Nu kun je m.b.v. PIJL OMHOOG/OMLAAG of Page Up/Page Down door de
|
||||
bewaarde regels bladeren. Druk nogmaals op "Scroll Lock" om deze
|
||||
modus te be‰indigen. Deze mogelijkheid is erg handig als je in een
|
||||
modus te beëindigen. Deze mogelijkheid is erg handig als je in een
|
||||
sub-shell zit of andere expert-modes gebruikt die geen menus
|
||||
hebben.
|
||||
|
||||
|
@ -10,8 +10,6 @@ PIJL RECHTS Ga naar het volgende item of groep (hetzelfde als TAB)
|
||||
SHIFT-TAB Ga naar het vorige item of groep
|
||||
PIJL LINKS Ga naar het vorige item of groep (hetzelfde als SHIFT-TAB)
|
||||
RETURN Selecteer item
|
||||
ESC Start een sub-shell voor diagnostische doeleinden.
|
||||
Beeindig de shell om terug te gaan.
|
||||
PAGE UP Ga een pagina omhoog in tekst vensters
|
||||
PAGE DOWN Ga een pagina omlaag in tekst vensters
|
||||
SPATIEBALK Selecteer/deselecteer het huidige item in "radio" of
|
||||
@ -45,7 +43,7 @@ bovenkant van het scherm zijn gerold. Deze 'terug-blader-modus'
|
||||
kan geaktiveerd worden door op de "Scroll Lock" toets te drukken.
|
||||
Nu kun je m.b.v. PIJL OMHOOG/OMLAAG of Page Up/Page Down door de
|
||||
bewaarde regels bladeren. Druk nogmaals op "Scroll Lock" om deze
|
||||
modus te be‰indigen. Deze mogelijkheid is erg handig als je in een
|
||||
modus te beëindigen. Deze mogelijkheid is erg handig als je in een
|
||||
sub-shell zit of andere expert-modes gebruikt die geen menus
|
||||
hebben.
|
||||
|
||||
|
@ -11,7 +11,6 @@ SKIFT-TAB Flytte til forrige dataelement eller gruppe.
|
||||
VENSTRE PIL Flytte til forrige dataelement eller gruppe (samme
|
||||
som SKIFT-TAB).
|
||||
RETUR Velge dataelement.
|
||||
ESC Starte et underordnet skall i diagnostiserings-øyemed.
|
||||
SIDE OPP I tekstbokser, ruller opp en side.
|
||||
SIDE NED I tekstbokser, ruller ned en side.
|
||||
MELLOMROM I "radio" eller flervalgs menyer, markere inneværende
|
||||
@ -43,7 +42,15 @@ Konsolldriveren har en innebygget rulle-tilbake buffer some en kan bruke
|
||||
til å inspisere ting som har rullet ut av skjermen. For å bruke
|
||||
rulle-tilbake funksjonen, trykk på "Scroll Lock" tasten på tastaturet.
|
||||
Piltastene og Side Opp/Ned tastene kan nå brukes til å gå
|
||||
igjennom den lagrete teksten. For å forlate rulle-tilbake modusen,
|
||||
igjennom den lagrede teksten. For å forlate rulle-tilbake modusen,
|
||||
trykk på "Scroll Lock" tasten igjen. Dette momentet er best egnet for å
|
||||
håndtere underordnede-skjell og andre "vidundermoduser" som ikke bruker
|
||||
menyer.
|
||||
|
||||
Når systemet er ferdig installert og kjører i fler-bruker modus, vil
|
||||
du også finne at du har mange "virtuelle konsoller" til rådighet og
|
||||
kan bruke dem til å ha flere aktive sesjoner på en gang. Bruk ALT-F<n>
|
||||
til å velge mellom dem, hvor 'F<n>' er funksjons-tasten som korresponderer
|
||||
med den skjermen du ønsker å se. Systemet, som det blir installert, har
|
||||
normalt 3 virtuelle konsoller. Du kan lage flere med å redigere /etc/ttys
|
||||
filen, etter systemet har kommet opp, opptil et maksimum av 12.
|
||||
|
@ -11,7 +11,6 @@ SKIFT-TAB Flytte til forrige dataelement eller gruppe.
|
||||
VENSTRE PIL Flytte til forrige dataelement eller gruppe (samme
|
||||
som SKIFT-TAB).
|
||||
RETUR Velge dataelement.
|
||||
ESC Starte et underordnet skall i diagnostiserings-øyemed.
|
||||
SIDE OPP I tekstbokser, ruller opp en side.
|
||||
SIDE NED I tekstbokser, ruller ned en side.
|
||||
MELLOMROM I "radio" eller flervalgs menyer, markere inneværende
|
||||
@ -43,7 +42,15 @@ Konsolldriveren har en innebygget rulle-tilbake buffer some en kan bruke
|
||||
til å inspisere ting som har rullet ut av skjermen. For å bruke
|
||||
rulle-tilbake funksjonen, trykk på "Scroll Lock" tasten på tastaturet.
|
||||
Piltastene og Side Opp/Ned tastene kan nå brukes til å gå
|
||||
igjennom den lagrete teksten. For å forlate rulle-tilbake modusen,
|
||||
igjennom den lagrede teksten. For å forlate rulle-tilbake modusen,
|
||||
trykk på "Scroll Lock" tasten igjen. Dette momentet er best egnet for å
|
||||
håndtere underordnede-skjell og andre "vidundermoduser" som ikke bruker
|
||||
menyer.
|
||||
|
||||
Når systemet er ferdig installert og kjører i fler-bruker modus, vil
|
||||
du også finne at du har mange "virtuelle konsoller" til rådighet og
|
||||
kan bruke dem til å ha flere aktive sesjoner på en gang. Bruk ALT-F<n>
|
||||
til å velge mellom dem, hvor 'F<n>' er funksjons-tasten som korresponderer
|
||||
med den skjermen du ønsker å se. Systemet, som det blir installert, har
|
||||
normalt 3 virtuelle konsoller. Du kan lage flere med å redigere /etc/ttys
|
||||
filen, etter systemet har kommet opp, opptil et maksimum av 12.
|
||||
|
@ -2,18 +2,18 @@
|
||||
FreeBSD 2.0.5 --- RELEASE Version , ,
|
||||
----------------------------------------- /( )`
|
||||
\ \___ / |
|
||||
Добро пожаловать в версию 2.0.5 FreeBSD! 2.0.5 - /- _ `-/ '
|
||||
Добро пожаловать в релиз 2.0.5 FreeBSD! 2.0.5 - /- _ `-/ '
|
||||
это промежуточная версия FreeBSD, заполняющая (/\/ \ \ /\
|
||||
необходимый промежуток мажду 2.0 (которая была / / | ` \
|
||||
выпущена в ноябре 1994) и 2.1, которая будет O O ) / |
|
||||
выпущена в конце июля 95-го. FreeBSD 2.0.5 `-^--'`< '
|
||||
необходимый промежуток мажду релизами 2.0 (был / / | ` \
|
||||
выпущен в ноябре 1994) и 2.1, который будет O O ) / |
|
||||
выпущен в конце июля 95-го. FreeBSD 2.0.5 `-^--'`< '
|
||||
содержит множество значительных усовершенствований, (_.) _ ) /
|
||||
не последнее из которых - большая стабильность `.___/` /
|
||||
(в приемлемых пределах), десятки новых `-----' /
|
||||
не последнее из которых - увеличенная стабильность `.___/` /
|
||||
(уже в приемлемых пределах), десятки новых `-----' /
|
||||
возможностей, значительно улучшенная <----. __ / __ \
|
||||
программа установки. В подробностях <----|====O)))==) \) /====
|
||||
новые возможности FreeBSD 2.0.5 <----' `--' `.__,' \
|
||||
описаны в описании версии! | |
|
||||
описаны в описании релиза! | |
|
||||
\ / /\
|
||||
______( (_ / \______/
|
||||
,' ,-----' |
|
||||
@ -21,14 +21,14 @@
|
||||
|
||||
|
||||
Что такое FreeBSD? FreeBSD - это операционная система, основанная на
|
||||
4.4 BSD Lite, для персональных компьютеров, основанных на процессорах
|
||||
"x86" фирм Intel, AMD, Cyrix или NexGen. Она поддерживает множество
|
||||
различных периферийных устройств и конфигураций ПК и может быть
|
||||
4.4 BSD Lite, предназначенная для персональных компьютеров, основанных
|
||||
на процессорах "x86" фирм Intel, AMD, Cyrix или NexGen. Она поддерживает
|
||||
множество различных периферийных устройств и конфигураций ПК и может быть
|
||||
использована для чего угодно начиная от разработки программ и
|
||||
заканчивая предоставлением сервиса через сеть Internet; самый
|
||||
загруженный сервер в Internet, ftp.cdrom.com работает под FreeBSD!
|
||||
|
||||
Эта версия FreeBSD содержит все, что вам надо для работы такой
|
||||
В этой версии FreeBSD есть все, что вам надо для работы такой
|
||||
системы, плюс исходные тексты для всего этого. Если у вас установлены
|
||||
исходные тексты, то вы можете заново скомпилировать всю систему
|
||||
с нуля буквально одной командой, что делает ее идеальной для
|
||||
@ -39,18 +39,19 @@
|
||||
программного обеспечения, перенесенного под FreeBSD ("ports
|
||||
collection"), облегчающая для вас добывание и установку ваших
|
||||
любимых традиционных утилит UNIX для FreeBSD. Она состоит из более 270
|
||||
пакетов, от редактора EMACS и до компилятора Лиспа, и делает FreeBSD
|
||||
мощной и всеохватывающей системой, которая может посоревноваться с
|
||||
операционными системами мощных рабочих станций в мощности и количестве
|
||||
утилит.
|
||||
пакетов, от текстовых редакторов и языков программирования до графических
|
||||
пакетов, и делает FreeBSD мощной и всеохватывающей системой, которая
|
||||
может посоревноваться с операционными системами мощных рабочих станций
|
||||
в мощности и предоставляемом сервисе.
|
||||
|
||||
Чтобы получить более полную документацию на систему, мы советуем вам
|
||||
приобрести набор книг по BSD 4.4 от издательства O'Reilly Associates и
|
||||
ассоциации USENIX, ISBN 1-56592-082-1. Мы не связаны с O'Reilly, мы
|
||||
лишь удовлетворенные покупатели! (В России книги O'Reilly продает,
|
||||
например, фирма SWD в Санкт-Петербурге - прим.пер.)
|
||||
например, фирма SWD в Санкт-Петербурге - прим.пер. - я с ними не
|
||||
связан, просто я знаю, где были куплены книги, которые я читал)
|
||||
|
||||
Перед тем, как продолжить установку, вы можете прочитать "Руководство
|
||||
Перед тем, как продолжить установку, вы можете почитать "Руководство
|
||||
по аппаратуре" (HARDWARE GUIDE). Конфигурирование аппаратуры ПК для
|
||||
чего угодно кроме DOS/Windows (которые на самом деле используют не все
|
||||
возможности аппаратуры) всегда оказывается несколько сложнее, чем может
|
||||
@ -58,8 +59,8 @@ collection"),
|
||||
это значит лишь то, что вы работаете с ним недостаточно долго! :) Это
|
||||
руководство даст вам некоторые наметки насчет конфигурирования
|
||||
аппаратуры и симптомов, за которыми нужно следить при возникновении
|
||||
проблем. Это руководство доступно через меню "Documentation" на
|
||||
загрузочной дискете FreeBSD.
|
||||
проблем. Оно доступно через меню "Documentation" на загрузочной дискете
|
||||
FreeBSD.
|
||||
|
||||
ПРЕДОСТЕРЕЖЕНИЕ: Хотя FreeBSD делает все от нее зависящее, чтобы
|
||||
предотвратить случайную потерю данных, все равно вполне вероятно, что
|
||||
@ -67,19 +68,21 @@ collection"),
|
||||
продолжайте установку, пока вы не сделаете архивную копию всей вашей
|
||||
важной информации! Мы не шутим!
|
||||
|
||||
Технические комментарии про эту версию посылайте по адресу:
|
||||
Технические комментарии про эту версию посылайте по адресу (на
|
||||
английском языке):
|
||||
|
||||
hackers@FreeBSD.org
|
||||
|
||||
Сообщения об ошибках следует посылать с помощью программы `send-pr',
|
||||
если вам удалось установить систему, иначе по адресу:
|
||||
если вам удалось установить систему, иначе по адресу (и то и другое на
|
||||
английском языке):
|
||||
|
||||
bugs@FreeBSD.org
|
||||
|
||||
Пожалуйста, в любом вашем сообщении об ошибках указывайте, в КАКОЙ
|
||||
ВЕРСИИ FreeBSD вы их обнаружили!
|
||||
|
||||
Вопросы общего характера надо посылать по адресу:
|
||||
Вопросы общего характера надо посылать по адресу (тоже на английском):
|
||||
|
||||
questions@FreeBSD.org
|
||||
|
||||
@ -93,11 +96,11 @@ collection"),
|
||||
|
||||
Еще один очень хороший источник обновленной информации - это
|
||||
наш сервер WWW, http:://www.freebsd.org, который кроме того содержит
|
||||
дополнительную документацию. Для получения доступа к WWW прямо из
|
||||
FreeBSD вы можете использовать версию Netscape от BSDI.
|
||||
дополнительную документацию. Для доступа к WWW прямо из FreeBSD вы
|
||||
можете использовать версию Netscape от BSDI.
|
||||
|
||||
Для получения дальнейшей информации о системе вы можете просмотреть
|
||||
каталоги /usr/share/FAQ и /usr/share/DOC.
|
||||
Дальнейшая информация о системе содержится в каталогах /usr/share/FAQ
|
||||
(частые вопросы и ответы) и /usr/share/DOC (документация).
|
||||
|
||||
Спасибо вам за то, что вы все это прочли, и мы очень надеемся, что
|
||||
работа с этой версией FreeBSD доставит вам удовольствие!
|
||||
|
@ -10,7 +10,6 @@ PIL H
|
||||
SHIFT-TAB Flytta till föregående fält.
|
||||
PIL VÄNSTER Flytta till föregående fält (samma som SHIFT-TAB).
|
||||
RETURN Markera rad eller utför handling.
|
||||
ESC Starta en kommandotolk för diagnostik. Exit återgår.
|
||||
PAGE UP Flyttar upp texten en sida i textfält.
|
||||
PAGE DOWN Flyttar ner texten en sida i textfält.
|
||||
MELLANSLAG Markera/avmarkera gällande val i flervalsmenyer.
|
||||
@ -44,7 +43,7 @@ eller n
|
||||
|
||||
När systemet är färdiginstallerat och igång kommer du att kunna byta
|
||||
mellan flera "virtuella skärmar". På så sätt kan du ha flera sessioner
|
||||
öppna samtidigt. Använd ALT-F<n> för att byta mellan skärmarna.
|
||||
Från början finns det fyra skärmar att byta mellan. När systemet till
|
||||
öppna samtidigt. Använd ALT-F<n> för att byta mellan dem.
|
||||
Från början finns det fyra sessioner att byta mellan. När systemet till
|
||||
slut är uppe kan du ändra det genom att editera filen /etc/ttys.
|
||||
Maximalt antal virtuella skärmar är 12.
|
||||
|
@ -10,7 +10,6 @@ PIL H
|
||||
SHIFT-TAB Flytta till föregående fält.
|
||||
PIL VÄNSTER Flytta till föregående fält (samma som SHIFT-TAB).
|
||||
RETURN Markera rad eller utför handling.
|
||||
ESC Starta en kommandotolk för diagnostik. Exit återgår.
|
||||
PAGE UP Flyttar upp texten en sida i textfält.
|
||||
PAGE DOWN Flyttar ner texten en sida i textfält.
|
||||
MELLANSLAG Markera/avmarkera gällande val i flervalsmenyer.
|
||||
@ -44,7 +43,7 @@ eller n
|
||||
|
||||
När systemet är färdiginstallerat och igång kommer du att kunna byta
|
||||
mellan flera "virtuella skärmar". På så sätt kan du ha flera sessioner
|
||||
öppna samtidigt. Använd ALT-F<n> för att byta mellan skärmarna.
|
||||
Från början finns det fyra skärmar att byta mellan. När systemet till
|
||||
öppna samtidigt. Använd ALT-F<n> för att byta mellan dem.
|
||||
Från början finns det fyra sessioner att byta mellan. När systemet till
|
||||
slut är uppe kan du ändra det genom att editera filen /etc/ttys.
|
||||
Maximalt antal virtuella skärmar är 12.
|
||||
|
@ -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.69 1995/05/30 05:50:53 jkh Exp $
|
||||
* $Id: install.c,v 1.70.2.41 1995/06/10 07:58:37 jkh Exp $
|
||||
*
|
||||
* Copyright (c) 1995
|
||||
* Jordan Hubbard. All rights reserved.
|
||||
@ -49,11 +49,11 @@
|
||||
#include <sys/wait.h>
|
||||
#include <unistd.h>
|
||||
|
||||
Boolean SystemWasInstalled;
|
||||
Boolean SystemWasInstalled = FALSE;
|
||||
|
||||
static void make_filesystems(void);
|
||||
static void copy_self(void);
|
||||
static void root_extract(void);
|
||||
static Boolean make_filesystems(void);
|
||||
static Boolean copy_self(void);
|
||||
static Boolean root_extract(void);
|
||||
|
||||
static Chunk *rootdev;
|
||||
|
||||
@ -62,9 +62,10 @@ checkLabels(void)
|
||||
{
|
||||
Device **devs;
|
||||
Disk *disk;
|
||||
Chunk *c1, *c2, *swapdev = NULL;
|
||||
Chunk *c1, *c2, *swapdev, *usrdev;
|
||||
int i;
|
||||
|
||||
rootdev = swapdev = usrdev = NULL;
|
||||
devs = deviceFind(NULL, DEVICE_TYPE_DISK);
|
||||
/* First verify that we have a root device */
|
||||
for (i = 0; devs[i]; i++) {
|
||||
@ -77,9 +78,21 @@ checkLabels(void)
|
||||
for (c1 = disk->chunks->part; c1; c1 = c1->next) {
|
||||
if (c1->type == freebsd) {
|
||||
for (c2 = c1->part; c2; c2 = c2->next) {
|
||||
if (c2->type == part && c2->subtype != FS_SWAP && c2->private && c2->flags & CHUNK_IS_ROOT) {
|
||||
if (c2->type == part && c2->subtype != FS_SWAP && c2->private) {
|
||||
if (c2->flags & CHUNK_IS_ROOT) {
|
||||
if (rootdev) {
|
||||
msgConfirm("WARNING: You have more than one root device set?!\nUsing the first one found.");
|
||||
continue;
|
||||
}
|
||||
rootdev = c2;
|
||||
break;
|
||||
}
|
||||
else if (!strcmp(((PartInfo *)c2->private)->mountpoint, "/usr")) {
|
||||
if (usrdev) {
|
||||
msgConfirm("WARNING: You have more than one /usr filesystem.\nUsing the first one found.");
|
||||
continue;
|
||||
}
|
||||
usrdev = c2;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -116,6 +129,8 @@ checkLabels(void)
|
||||
msgConfirm("No swap devices found - you must create at least one\nswap partition.");
|
||||
return FALSE;
|
||||
}
|
||||
if (!usrdev)
|
||||
msgConfirm("WARNING: No /usr filesystem found. This is not technically\nan error if your root filesystem is big enough (or you later\nintend to get your /usr filesystem over NFS), but it may otherwise\ncause you trouble and is not recommended procedure!");
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@ -128,7 +143,6 @@ installInitial(void)
|
||||
Device **devs;
|
||||
int i;
|
||||
static Boolean alreadyDone = FALSE;
|
||||
char *cp;
|
||||
|
||||
if (alreadyDone)
|
||||
return TRUE;
|
||||
@ -145,14 +159,21 @@ installInitial(void)
|
||||
return FALSE;
|
||||
|
||||
/* Figure out what kind of MBR the user wants */
|
||||
dmenuOpenSimple(&MenuMBRType);
|
||||
mbrContents = NULL;
|
||||
cp = getenv("bootManager");
|
||||
if (cp) {
|
||||
if (!strcmp(cp, "bteasy"))
|
||||
if (!dmenuOpenSimple(&MenuMBRType))
|
||||
return FALSE;
|
||||
|
||||
switch (BootMgr) {
|
||||
case 0:
|
||||
mbrContents = bteasy17;
|
||||
else if (!strcmp(cp, "mbr"))
|
||||
break;
|
||||
|
||||
case 1:
|
||||
mbrContents = mbr;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
default:
|
||||
mbrContents = NULL;
|
||||
}
|
||||
|
||||
/* If we refuse to proceed, bail. */
|
||||
@ -190,18 +211,24 @@ installInitial(void)
|
||||
}
|
||||
}
|
||||
}
|
||||
make_filesystems();
|
||||
copy_self();
|
||||
if (!make_filesystems()) {
|
||||
msgConfirm("Couldn't make filesystems properly. Aborting.");
|
||||
return 0;
|
||||
}
|
||||
if (!copy_self()) {
|
||||
msgConfirm("Couldn't clone the boot floppy onto the root file system.\nAborting.");
|
||||
return 0;
|
||||
}
|
||||
dialog_clear();
|
||||
chroot("/mnt");
|
||||
chdir("/");
|
||||
variable_set2(RUNNING_ON_ROOT, "yes");
|
||||
/* stick a helpful shell over on the 4th VTY */
|
||||
msgDebug("Sticking a potentially helpful shell over on the 4th screen\n");
|
||||
if (!fork()) {
|
||||
if (OnVTY && !fork()) {
|
||||
int i, fd;
|
||||
extern int login_tty(int);
|
||||
|
||||
msgDebug("Starting an emergency holographic shell over on the 4th screen\n");
|
||||
for (i = 0; i < 64; i++)
|
||||
close(i);
|
||||
fd = open("/dev/ttyv3", O_RDWR);
|
||||
@ -209,13 +236,13 @@ installInitial(void)
|
||||
dup2(0, 1);
|
||||
dup2(0, 2);
|
||||
if (login_tty(fd) == -1) {
|
||||
msgConfirm("Can't set controlling terminal");
|
||||
msgNotify("Can't set controlling terminal");
|
||||
exit(1);
|
||||
}
|
||||
printf("Warning: This shell is chroot()'d to /mnt\n");
|
||||
execlp("sh", "-sh", 0);
|
||||
exit(1);
|
||||
}
|
||||
root_extract();
|
||||
alreadyDone = TRUE;
|
||||
return TRUE;
|
||||
}
|
||||
@ -229,8 +256,8 @@ installInitial(void)
|
||||
int
|
||||
installCommit(char *str)
|
||||
{
|
||||
FILE *fp;
|
||||
static Boolean hostsModified = FALSE;
|
||||
Device **devs;
|
||||
int i;
|
||||
|
||||
if (!Dists) {
|
||||
msgConfirm("You haven't told me what distributions to load yet!\nPlease select a distribution from the Distributions menu.");
|
||||
@ -239,32 +266,75 @@ installCommit(char *str)
|
||||
if (!mediaVerify())
|
||||
return 0;
|
||||
|
||||
if (RunningAsInit) {
|
||||
if (RunningAsInit && !SystemWasInstalled) {
|
||||
if (!installInitial())
|
||||
return 0;
|
||||
configFstab();
|
||||
configResolv();
|
||||
}
|
||||
if (!SystemWasInstalled && !root_extract()) {
|
||||
msgConfirm("Failed to load the ROOT distribution. Please correct\nthis problem and try again.");
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* If we're about to extract the bin dist again, reset the installed state */
|
||||
if (Dists & DIST_BIN)
|
||||
SystemWasInstalled = FALSE;
|
||||
|
||||
distExtractAll();
|
||||
|
||||
/* Tack ourselves at the end of /etc/hosts */
|
||||
if (RunningAsInit && getenv(VAR_IPADDR) && !hostsModified) {
|
||||
fp = fopen("/etc/hosts", "a");
|
||||
fprintf(fp, "%s\t\t%s\n", getenv(VAR_IPADDR), getenv(VAR_HOSTNAME));
|
||||
fclose(fp);
|
||||
hostsModified = TRUE;
|
||||
if (!SystemWasInstalled && access("/kernel", R_OK)) {
|
||||
if (vsystem("ln -f /kernel.GENERIC /kernel")) {
|
||||
msgConfirm("Unable to link /kernel into place!");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
/* If there's no kernel but there is a kernel.GENERIC, link it over */
|
||||
if (access("/kernel", R_OK))
|
||||
vsystem("ln -f /kernel.GENERIC /kernel");
|
||||
|
||||
msgConfirm("Installation completed successfully.\nHit return now to go back to the main menu.");
|
||||
/* Resurrect /dev after bin distribution screws it up */
|
||||
if (!SystemWasInstalled) {
|
||||
msgNotify("Remaking all devices.. Please wait!");
|
||||
if (vsystem("cd /dev; sh MAKEDEV all"))
|
||||
msgConfirm("MAKEDEV returned non-zero status");
|
||||
|
||||
msgNotify("Resurrecting /dev entries for slices..");
|
||||
devs = deviceFind(NULL, DEVICE_TYPE_DISK);
|
||||
if (!devs)
|
||||
msgFatal("Couldn't get a disk device list!");
|
||||
/* Resurrect the slices that the former clobbered */
|
||||
for (i = 0; devs[i]; i++) {
|
||||
Disk *disk = (Disk *)devs[i]->private;
|
||||
Chunk *c1;
|
||||
|
||||
if (!disk->chunks)
|
||||
msgFatal("No chunk list found for %s!", disk->name);
|
||||
for (c1 = disk->chunks->part; c1; c1 = c1->next) {
|
||||
if (c1->type == freebsd) {
|
||||
msgNotify("Making slice entries for %s", c1->name);
|
||||
if (vsystem("cd /dev; sh MAKEDEV %sh", c1->name))
|
||||
msgConfirm("Unable to make slice entries for %s!", c1->name);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* XXX Do all the last ugly work-arounds here which we'll try and excise someday right?? XXX */
|
||||
/* BOGON #1: XFree86 extracting /usr/X11R6 with root-only perms */
|
||||
if (file_readable("/usr/X11R6"))
|
||||
(void)system("chmod 755 /usr/X11R6");
|
||||
|
||||
/* BOGON #2: We leave /etc in a bad state */
|
||||
(void)system("chmod 755 /etc");
|
||||
|
||||
dialog_clear();
|
||||
if (Dists)
|
||||
msgConfirm("Installation completed with some errors. You may wish\nto scroll through the debugging messages on ALT-F2 with the scroll-lock\nfeature. Press [ENTER] to return to the installation menu.");
|
||||
else
|
||||
msgConfirm("Installation completed successfully, now press [ENTER] to return\nto the main menu. If you have any network devices you have not yet\nconfigured, see the Interface configuration item on the\nConfiguration menu.");
|
||||
SystemWasInstalled = TRUE;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Go newfs and/or mount all the filesystems we've been asked to */
|
||||
static void
|
||||
static Boolean
|
||||
make_filesystems(void)
|
||||
{
|
||||
int i;
|
||||
@ -273,6 +343,7 @@ make_filesystems(void)
|
||||
Device **devs;
|
||||
char dname[40];
|
||||
PartInfo *p = (PartInfo *)rootdev->private;
|
||||
Boolean RootReadOnly;
|
||||
|
||||
command_clear();
|
||||
devs = deviceFind(NULL, DEVICE_TYPE_DISK);
|
||||
@ -289,10 +360,12 @@ make_filesystems(void)
|
||||
i = vsystem("%s %s", p->newfs_cmd, dname);
|
||||
if (i) {
|
||||
msgConfirm("Unable to make new root filesystem! Command returned status %d", i);
|
||||
return;
|
||||
return FALSE;
|
||||
}
|
||||
RootReadOnly = FALSE;
|
||||
}
|
||||
else {
|
||||
RootReadOnly = TRUE;
|
||||
msgConfirm("Warning: You have selected a Read-Only root device\nand may be unable to find the appropriate device entries on it\nif it is from an older pre-slice version of FreeBSD.");
|
||||
sprintf(dname, "/dev/r%sa", rootdev->disk->name);
|
||||
msgNotify("Checking integrity of existing %s filesystem", dname);
|
||||
@ -303,19 +376,7 @@ make_filesystems(void)
|
||||
sprintf(dname, "/dev/%sa", rootdev->disk->name);
|
||||
if (Mount("/mnt", dname)) {
|
||||
msgConfirm("Unable to mount the root file system! Giving up.");
|
||||
return;
|
||||
}
|
||||
else {
|
||||
extern int makedevs(void);
|
||||
|
||||
msgNotify("Making device files");
|
||||
if (Mkdir("/mnt/dev", NULL) || chdir("/mnt/dev") || makedevs())
|
||||
msgConfirm("Failed to make some of the devices in /mnt!");
|
||||
if (Mkdir("/mnt/stand", NULL)) {
|
||||
msgConfirm("Unable to make /mnt/stand directory!");
|
||||
return;
|
||||
}
|
||||
chdir("/");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* Now buzz through the rest of the partitions and mount them too */
|
||||
@ -324,12 +385,16 @@ make_filesystems(void)
|
||||
continue;
|
||||
|
||||
disk = (Disk *)devs[i]->private;
|
||||
if (!disk->chunks)
|
||||
msgFatal("No chunk list found for %s!", disk->name);
|
||||
if (!disk->chunks) {
|
||||
msgConfirm("No chunk list found for %s!", disk->name);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* Make the proper device mount points in /mnt/dev */
|
||||
if (!(RootReadOnly && disk == rootdev->disk)) {
|
||||
Mkdir("/mnt/dev", NULL);
|
||||
MakeDevDisk(disk, "/mnt/dev");
|
||||
|
||||
}
|
||||
for (c1 = disk->chunks->part; c1; c1 = c1->next) {
|
||||
if (c1->type == freebsd) {
|
||||
for (c2 = c1->part; c2; c2 = c2->next) {
|
||||
@ -358,90 +423,103 @@ make_filesystems(void)
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (c1->type == fat) {
|
||||
PartInfo *tmp = (PartInfo *)c1->private;
|
||||
else if (c1->type == fat && c1->private && !RootReadOnly) {
|
||||
char name[FILENAME_MAX];
|
||||
|
||||
if (!tmp)
|
||||
continue;
|
||||
command_func_add(tmp->mountpoint, Mount_DOS, c1->name);
|
||||
sprintf(name, "/mnt%s", ((PartInfo *)c1->private)->mountpoint);
|
||||
Mkdir(name, NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Copy the boot floppy's dev files */
|
||||
if (vsystem("find -x /dev | cpio -pdmV /mnt")) {
|
||||
msgConfirm("Couldn't clone the /dev files!");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
command_sort();
|
||||
command_execute();
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* Copy the boot floppy contents into /stand */
|
||||
static void
|
||||
static Boolean
|
||||
copy_self(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
msgWeHaveOutput("Copying the boot floppy to /stand on root filesystem");
|
||||
i = vsystem("find -x /stand | cpio -pdmV /mnt");
|
||||
if (i)
|
||||
if (i) {
|
||||
msgConfirm("Copy returned error status of %d!", i);
|
||||
|
||||
/* Copy the /etc files into their rightful place */
|
||||
(void)vsystem("cd /mnt/stand; find etc | cpio -pdmv /mnt");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void loop_on_root_floppy();
|
||||
/* Copy the /etc files into their rightful place */
|
||||
if (vsystem("cd /mnt/stand; find etc | cpio -pdmV /mnt")) {
|
||||
msgConfirm("Couldn't copy up the /etc files!");
|
||||
return TRUE;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
static Boolean loop_on_root_floppy(void);
|
||||
|
||||
static Boolean
|
||||
root_extract(void)
|
||||
{
|
||||
int fd;
|
||||
static Boolean alreadyExtracted = FALSE;
|
||||
|
||||
if (alreadyExtracted)
|
||||
return TRUE;
|
||||
|
||||
if (OnCDROM) {
|
||||
fd = open("/floppies/root.flp", O_RDONLY);
|
||||
(void)mediaExtractDist("/", fd);
|
||||
return;
|
||||
}
|
||||
if (mediaDevice) {
|
||||
if (isDebug())
|
||||
msgDebug("Attempting to extract root image from %s device\n", mediaDevice->description);
|
||||
switch(mediaDevice->type) {
|
||||
|
||||
case DEVICE_TYPE_TAPE:
|
||||
case DEVICE_TYPE_FLOPPY:
|
||||
loop_on_root_floppy();
|
||||
alreadyExtracted = loop_on_root_floppy();
|
||||
break;
|
||||
|
||||
default:
|
||||
if (mediaDevice->init)
|
||||
if (!(*mediaDevice->init)(mediaDevice))
|
||||
break;
|
||||
fd = (*mediaDevice->get)("floppies/root.flp");
|
||||
if (fd != -1) {
|
||||
msgNotify("Loading root floppy from %s", mediaDevice->name);
|
||||
(void)mediaExtractDist("/", fd);
|
||||
if (mediaDevice->close)
|
||||
(*mediaDevice->close)(mediaDevice, fd);
|
||||
else
|
||||
close(fd);
|
||||
fd = (*mediaDevice->get)(mediaDevice, "floppies/root.flp", NULL);
|
||||
if (fd < 0) {
|
||||
msgConfirm("Couldn't get root image from %s!\nWill try to get it from floppy.", mediaDevice->name);
|
||||
(*mediaDevice->shutdown)(mediaDevice);
|
||||
alreadyExtracted = loop_on_root_floppy();
|
||||
}
|
||||
else {
|
||||
msgConfirm("Couldn't get root floppy image from %s\n, falling back to floppy.", mediaDevice->name);
|
||||
if (mediaDevice->shutdown)
|
||||
(*mediaDevice->shutdown)(mediaDevice);
|
||||
loop_on_root_floppy();
|
||||
msgNotify("Loading root image from %s", mediaDevice->name);
|
||||
alreadyExtracted = mediaExtractDist("/", fd);
|
||||
(*mediaDevice->close)(mediaDevice, fd);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
loop_on_root_floppy();
|
||||
alreadyExtracted = loop_on_root_floppy();
|
||||
return alreadyExtracted;
|
||||
}
|
||||
|
||||
static void
|
||||
static Boolean
|
||||
loop_on_root_floppy(void)
|
||||
{
|
||||
int fd;
|
||||
int status = FALSE;
|
||||
|
||||
while (1) {
|
||||
fd = getRootFloppy();
|
||||
if (fd != -1) {
|
||||
mediaExtractDist("/", fd);
|
||||
msgNotify("Extracting root floppy..");
|
||||
status = mediaExtractDist("/", fd);
|
||||
close(fd);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return status;
|
||||
}
|
||||
|
@ -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.30 1995/05/29 00:50:03 jkh Exp $
|
||||
* $Id: label.c,v 1.31.2.4 1995/06/07 06:38:11 jkh Exp $
|
||||
*
|
||||
* Copyright (c) 1995
|
||||
* Jordan Hubbard. All rights reserved.
|
||||
@ -173,6 +173,9 @@ new_part(char *mpoint, Boolean newfs, u_long size)
|
||||
PartInfo *ret;
|
||||
u_long target, divisor;
|
||||
|
||||
if (!mpoint)
|
||||
mpoint = "/change_me";
|
||||
|
||||
ret = (PartInfo *)safe_malloc(sizeof(PartInfo));
|
||||
strncpy(ret->mountpoint, mpoint, FILENAME_MAX);
|
||||
strcpy(ret->newfs_cmd, "newfs");
|
||||
@ -383,7 +386,7 @@ print_command_summary()
|
||||
{
|
||||
mvprintw(17, 0, "The following commands are valid here (upper or lower case):");
|
||||
mvprintw(19, 0, "C = Create New D = Delete M = Set Mountpoint");
|
||||
mvprintw(20, 0, "N = Newfs Options T = Toggle Newfs U = Undo ESC = Exit");
|
||||
mvprintw(20, 0, "N = Newfs Options T = Toggle Newfs U = Undo Q = Finish");
|
||||
mvprintw(21, 0, "The default target will be displayed in ");
|
||||
|
||||
attrset(A_REVERSE);
|
||||
@ -400,7 +403,7 @@ diskLabelEditor(char *str)
|
||||
int sz, i, key = 0;
|
||||
Boolean labeling;
|
||||
char *msg = NULL;
|
||||
PartInfo *p;
|
||||
PartInfo *p, *oldp;
|
||||
PartType type;
|
||||
Device **devs;
|
||||
|
||||
@ -459,7 +462,7 @@ diskLabelEditor(char *str)
|
||||
|
||||
case KEY_F(1):
|
||||
case '?':
|
||||
systemDisplayFile("disklabel.hlp");
|
||||
systemDisplayFile("partition.hlp");
|
||||
break;
|
||||
|
||||
case 'C':
|
||||
@ -580,8 +583,10 @@ diskLabelEditor(char *str)
|
||||
|
||||
case PART_FAT:
|
||||
case PART_FILESYSTEM:
|
||||
oldp = label_chunk_info[here].c->private;
|
||||
p = get_mountpoint(label_chunk_info[here].c);
|
||||
if (p) {
|
||||
if (!oldp)
|
||||
p->newfs = FALSE;
|
||||
if (label_chunk_info[here].type == PART_FAT
|
||||
&& (!strcmp(p->mountpoint, "/") || !strcmp(p->mountpoint, "/usr")
|
||||
@ -608,10 +613,9 @@ diskLabelEditor(char *str)
|
||||
break;
|
||||
|
||||
case 'T': /* Toggle newfs state */
|
||||
if (label_chunk_info[here].type == PART_FILESYSTEM &&
|
||||
label_chunk_info[here].c->private) {
|
||||
if (label_chunk_info[here].type == PART_FILESYSTEM) {
|
||||
PartInfo *pi = ((PartInfo *)label_chunk_info[here].c->private);
|
||||
label_chunk_info[here].c->private = new_part(pi->mountpoint, !pi->newfs, label_chunk_info[here].c->size);
|
||||
label_chunk_info[here].c->private = new_part(pi ? pi->mountpoint : NULL, pi ? !pi->newfs : TRUE, label_chunk_info[here].c->size);
|
||||
safe_free(pi);
|
||||
label_chunk_info[here].c->private_free = safe_free;
|
||||
}
|
||||
@ -659,7 +663,7 @@ diskLabelEditor(char *str)
|
||||
msg = "A most prudent choice!";
|
||||
break;
|
||||
|
||||
case 27: /* ESC */
|
||||
case 'Q':
|
||||
labeling = FALSE;
|
||||
break;
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
* This is probably the last program in the `sysinstall' line - the next
|
||||
* generation being essentially a complete rewrite.
|
||||
*
|
||||
* $Id: lang.c,v 1.5 1995/05/24 21:42:43 jkh Exp $
|
||||
* $Id: lang.c,v 1.6.2.3 1995/06/05 04:39:59 jkh Exp $
|
||||
*
|
||||
* Copyright (c) 1995
|
||||
* Jordan Hubbard. All rights reserved.
|
||||
@ -48,9 +48,9 @@ u_char default_scrnmap[256];
|
||||
void
|
||||
lang_set_Danish(char *str)
|
||||
{
|
||||
systemChangeFont(font_iso_8x16);
|
||||
systemChangeLang("da_DK.ISO8859-1");
|
||||
systemChangeScreenmap(default_scrnmap);
|
||||
systemChangeLang("da_DK.ISO8859-1");
|
||||
systemChangeFont(font_iso_8x16);
|
||||
systemChangeTerminal("cons25l1", termcap_cons25l1,
|
||||
"cons25l1-m", termcap_cons25l1_m);
|
||||
}
|
||||
@ -58,45 +58,45 @@ lang_set_Danish(char *str)
|
||||
void
|
||||
lang_set_Dutch(char *str)
|
||||
{
|
||||
systemChangeFont(font_iso_8x16);
|
||||
systemChangeLang("nl_NL.ISO8859-1");
|
||||
systemChangeScreenmap(default_scrnmap);
|
||||
systemChangeLang("nl_NL.ISO8859-1");
|
||||
systemChangeFont(font_iso_8x16);
|
||||
systemChangeTerminal("cons25l1", termcap_cons25l1, "cons25l1-m", termcap_cons25l1_m);
|
||||
}
|
||||
|
||||
void
|
||||
lang_set_English(char *str)
|
||||
{
|
||||
systemChangeFont(font_cp850_8x16);
|
||||
systemChangeLang("en_US.ISO8859-1");
|
||||
systemChangeScreenmap(default_scrnmap);
|
||||
systemChangeLang("en_US.ISO8859-1");
|
||||
systemChangeFont(font_cp850_8x16);
|
||||
systemChangeTerminal("cons25", termcap_cons25, "cons25-m", termcap_cons25_m);
|
||||
}
|
||||
|
||||
void
|
||||
lang_set_French(char *str)
|
||||
{
|
||||
systemChangeFont(font_iso_8x16);
|
||||
systemChangeLang("fr_FR.ISO8859-1");
|
||||
systemChangeScreenmap(default_scrnmap);
|
||||
systemChangeLang("fr_FR.ISO8859-1");
|
||||
systemChangeFont(font_iso_8x16);
|
||||
systemChangeTerminal("cons25l1", termcap_cons25l1, "cons25l1-m", termcap_cons25l1_m);
|
||||
}
|
||||
|
||||
void
|
||||
lang_set_German(char *str)
|
||||
{
|
||||
systemChangeFont(font_iso_8x16);
|
||||
systemChangeLang("de_DE.ISO8859-1");
|
||||
systemChangeScreenmap(default_scrnmap);
|
||||
systemChangeLang("de_DE.ISO8859-1");
|
||||
systemChangeFont(font_iso_8x16);
|
||||
systemChangeTerminal("cons25l1", termcap_cons25l1, "cons25l1-m", termcap_cons25l1_m);
|
||||
}
|
||||
|
||||
void
|
||||
lang_set_Italian(char *str)
|
||||
{
|
||||
systemChangeFont(font_iso_8x16);
|
||||
systemChangeLang("it_IT.ISO8859-1");
|
||||
systemChangeScreenmap(default_scrnmap);
|
||||
systemChangeLang("it_IT.ISO8859-1");
|
||||
systemChangeFont(font_iso_8x16);
|
||||
systemChangeTerminal("cons25l1", termcap_cons25l1, "cons25l1-m", termcap_cons25l1_m);
|
||||
}
|
||||
|
||||
@ -104,44 +104,44 @@ lang_set_Italian(char *str)
|
||||
void
|
||||
lang_set_Japanese(char *str)
|
||||
{
|
||||
systemChangeFont(font_cp850_8x16); /* must prepare JIS X0201 font? */
|
||||
systemChangeLang("ja_JP.ROMAJI");
|
||||
systemChangeScreenmap(default_scrnmap);
|
||||
systemChangeLang("ja_JP.ROMAJI");
|
||||
systemChangeFont(font_cp850_8x16); /* must prepare JIS X0201 font? */
|
||||
systemChangeTerminal("cons25", termcap_cons25, "cons25-m", termcap_cons25_m);
|
||||
}
|
||||
|
||||
void
|
||||
lang_set_Norwegian(char *str)
|
||||
{
|
||||
systemChangeFont(font_iso_8x16);
|
||||
systemChangeLang("no_NO.ISO8859-1");
|
||||
systemChangeScreenmap(default_scrnmap);
|
||||
systemChangeLang("no_NO.ISO8859-1");
|
||||
systemChangeFont(font_iso_8x16);
|
||||
systemChangeTerminal("cons25l1", termcap_cons25l1, "cons25l1-m", termcap_cons25l1_m);
|
||||
}
|
||||
|
||||
void
|
||||
lang_set_Russian(char *str)
|
||||
{
|
||||
systemChangeFont(font_cp866_8x16);
|
||||
systemChangeLang("ru_SU.KOI8-R");
|
||||
systemChangeScreenmap(koi8_r2cp866);
|
||||
systemChangeLang("ru_SU.KOI8-R");
|
||||
systemChangeFont(font_cp866_8x16);
|
||||
systemChangeTerminal("cons25r", termcap_cons25r, "cons25r-m", termcap_cons25r_m);
|
||||
}
|
||||
|
||||
void
|
||||
lang_set_Spanish(char *str)
|
||||
{
|
||||
systemChangeFont(font_iso_8x16);
|
||||
systemChangeLang("es_ES.ISO8859-1");
|
||||
systemChangeScreenmap(default_scrnmap);
|
||||
systemChangeLang("es_ES.ISO8859-1");
|
||||
systemChangeFont(font_iso_8x16);
|
||||
systemChangeTerminal("cons25l1", termcap_cons25l1, "cons25l1-m", termcap_cons25l1_m);
|
||||
}
|
||||
|
||||
void
|
||||
lang_set_Swedish(char *str)
|
||||
{
|
||||
systemChangeFont(font_iso_8x16);
|
||||
systemChangeLang("sv_SV.ISO8859-1");
|
||||
systemChangeScreenmap(default_scrnmap);
|
||||
systemChangeLang("sv_SE.ISO8859-1");
|
||||
systemChangeFont(font_iso_8x16);
|
||||
systemChangeTerminal("cons25l1", termcap_cons25l1, "cons25l1-m", termcap_cons25l1_m);
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
* This is probably the last attempt in the `sysinstall' line, the next
|
||||
* generation being slated for what's essentially a complete rewrite.
|
||||
*
|
||||
* $Id: main.c,v 1.11 1995/05/28 09:31:35 jkh Exp $
|
||||
* $Id: main.c,v 1.12.2.4 1995/06/05 15:17:12 jkh Exp $
|
||||
*
|
||||
* Copyright (c) 1995
|
||||
* Jordan Hubbard. All rights reserved.
|
||||
@ -42,6 +42,7 @@
|
||||
*/
|
||||
|
||||
#include "sysinstall.h"
|
||||
#include <stdio.h>
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
@ -55,17 +56,19 @@ main(int argc, char **argv)
|
||||
/* Set up whatever things need setting up */
|
||||
systemInitialize(argc, argv);
|
||||
|
||||
/* Try to preserve our scroll-back buffer */
|
||||
if (OnVTY)
|
||||
for (curr = 0; curr < 25; curr++)
|
||||
putchar('\n');
|
||||
|
||||
/* Probe for all relevant devices on the system */
|
||||
deviceGetAll();
|
||||
|
||||
/* Welcome user to FreeBSD */
|
||||
systemWelcome();
|
||||
|
||||
/* Default to English */
|
||||
lang_set_English(NULL);
|
||||
|
||||
/* Default to passive mode ftp since it's the only thing we currently support :-( */
|
||||
variable_set2("ftpPassive", "yes");
|
||||
OptFlags |= OPT_FTP_PASSIVE;
|
||||
|
||||
/* Begin user dialog at outer menu */
|
||||
while (1) {
|
||||
@ -76,6 +79,7 @@ main(int argc, char **argv)
|
||||
}
|
||||
|
||||
/* Write out any changes to /etc/sysconfig */
|
||||
if (SystemWasInstalled)
|
||||
configSysconfig();
|
||||
|
||||
/* Say goodnight, Gracie */
|
||||
|
@ -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.23 1995/05/30 05:13:21 jkh Exp $
|
||||
* $Id: media.c,v 1.24.2.11 1995/06/10 01:42:19 jkh Exp $
|
||||
*
|
||||
* Copyright (c) 1995
|
||||
* Jordan Hubbard. All rights reserved.
|
||||
@ -82,17 +82,6 @@ mediaSetCDROM(char *str)
|
||||
Device **devs;
|
||||
int cnt;
|
||||
|
||||
if (OnCDROM == TRUE) {
|
||||
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.get = mediaGetCDROM;
|
||||
mediaDevice = &bootCD;
|
||||
return 1;
|
||||
}
|
||||
else {
|
||||
devs = deviceFind(NULL, DEVICE_TYPE_CDROM);
|
||||
cnt = deviceCount(devs);
|
||||
if (!cnt) {
|
||||
@ -101,16 +90,18 @@ mediaSetCDROM(char *str)
|
||||
}
|
||||
else if (cnt > 1) {
|
||||
DMenu *menu;
|
||||
int status;
|
||||
|
||||
menu = deviceCreateMenu(&MenuMediaCDROM, DEVICE_TYPE_CDROM, cdromHook);
|
||||
if (!menu)
|
||||
msgFatal("Unable to create CDROM menu! Something is seriously wrong.");
|
||||
dmenuOpenSimple(menu);
|
||||
status = dmenuOpenSimple(menu);
|
||||
free(menu);
|
||||
if (!status)
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
mediaDevice = devs[0];
|
||||
}
|
||||
return mediaDevice ? 1 : 0;
|
||||
}
|
||||
|
||||
@ -138,12 +129,15 @@ mediaSetFloppy(char *str)
|
||||
}
|
||||
else if (cnt > 1) {
|
||||
DMenu *menu;
|
||||
int status;
|
||||
|
||||
menu = deviceCreateMenu(&MenuMediaFloppy, DEVICE_TYPE_FLOPPY, floppyHook);
|
||||
if (!menu)
|
||||
msgFatal("Unable to create Floppy menu! Something is seriously wrong.");
|
||||
dmenuOpenSimple(menu);
|
||||
status = dmenuOpenSimple(menu);
|
||||
free(menu);
|
||||
if (!status)
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
mediaDevice = devs[0];
|
||||
@ -174,12 +168,15 @@ mediaSetDOS(char *str)
|
||||
}
|
||||
else if (cnt > 1) {
|
||||
DMenu *menu;
|
||||
int status;
|
||||
|
||||
menu = deviceCreateMenu(&MenuMediaDOS, DEVICE_TYPE_DOS, DOSHook);
|
||||
if (!menu)
|
||||
msgFatal("Unable to create DOS menu! Something is seriously wrong.");
|
||||
dmenuOpenSimple(menu);
|
||||
status = dmenuOpenSimple(menu);
|
||||
free(menu);
|
||||
if (!status)
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
mediaDevice = devs[0];
|
||||
@ -210,15 +207,27 @@ mediaSetTape(char *str)
|
||||
}
|
||||
else if (cnt > 1) {
|
||||
DMenu *menu;
|
||||
int status;
|
||||
|
||||
menu = deviceCreateMenu(&MenuMediaTape, DEVICE_TYPE_TAPE, tapeHook);
|
||||
if (!menu)
|
||||
msgFatal("Unable to create tape drive menu! Something is seriously wrong.");
|
||||
dmenuOpenSimple(menu);
|
||||
status = dmenuOpenSimple(menu);
|
||||
free(menu);
|
||||
if (!status)
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
mediaDevice = devs[0];
|
||||
if (mediaDevice) {
|
||||
char *val;
|
||||
|
||||
val = msgGetInput("/usr/tmp", "Please enter the name of a temporary directory containing\nsufficient space for holding the contents of this tape (or\ntapes). The contents of this directory will be removed\nafter installation, so be sure to specify a directory that\ncan be erased afterward!");
|
||||
if (!val)
|
||||
mediaDevice = NULL;
|
||||
else
|
||||
mediaDevice->private = strdup(val);
|
||||
}
|
||||
return mediaDevice ? 1 : 0;
|
||||
}
|
||||
|
||||
@ -232,25 +241,30 @@ mediaSetFTP(char *str)
|
||||
static Device ftpDevice;
|
||||
char *cp;
|
||||
|
||||
dmenuOpenSimple(&MenuMediaFTP);
|
||||
if (!dmenuOpenSimple(&MenuMediaFTP))
|
||||
return 0;
|
||||
cp = getenv("ftp");
|
||||
if (!cp)
|
||||
return 0;
|
||||
if (!strcmp(cp, "other")) {
|
||||
cp = msgGetInput("ftp://", "Please specify the URL of a FreeBSD distribution on a\nremote ftp site. This site must accept anonymous ftp!\nA URL looks like this: ftp://<hostname>/<path>");
|
||||
cp = msgGetInput("ftp://", "Please specify the URL of a FreeBSD distribution on a\nremote ftp site. This site must accept either anonymous\nftp or you should have set an ftp username and password\nin the Options Menu.\nA URL looks like this: ftp://<hostname>/<path>\nWhere <path> is relative to the anonymous ftp directory or the\nhome directory of the user being logged in as.");
|
||||
if (!cp || strncmp("ftp://", cp, 6))
|
||||
return 0;
|
||||
else
|
||||
variable_set2("ftp", cp);
|
||||
}
|
||||
tcpDeviceSelect(NULL);
|
||||
strcpy(ftpDevice.name, cp);
|
||||
/* XXX hack: if str == NULL, we were called by an ftp strategy routine and don't need to reinit all */
|
||||
if (!str)
|
||||
return 1;
|
||||
if (!tcpDeviceSelect())
|
||||
return 0;
|
||||
ftpDevice.type = DEVICE_TYPE_FTP;
|
||||
ftpDevice.init = mediaInitFTP;
|
||||
ftpDevice.get = mediaGetFTP;
|
||||
ftpDevice.close = mediaCloseFTP;
|
||||
ftpDevice.shutdown = mediaShutdownFTP;
|
||||
ftpDevice.private = mediaDevice;
|
||||
ftpDevice.private = mediaDevice; /* Set to network device by tcpDeviceSelect() */
|
||||
mediaDevice = &ftpDevice;
|
||||
return 1;
|
||||
}
|
||||
@ -261,12 +275,15 @@ mediaSetUFS(char *str)
|
||||
static Device ufsDevice;
|
||||
char *val;
|
||||
|
||||
val = msgGetInput(NULL, "Enter a fully qualified pathname for the directory\ncontaining the FreeBSD distribtion files:");
|
||||
val = msgGetInput(NULL, "Enter a fully qualified pathname for the directory\ncontaining the FreeBSD distribution files:");
|
||||
if (!val)
|
||||
return 0;
|
||||
strcpy(ufsDevice.name, "ufs");
|
||||
ufsDevice.type = DEVICE_TYPE_UFS;
|
||||
ufsDevice.init = dummyInit;
|
||||
ufsDevice.get = mediaGetUFS;
|
||||
ufsDevice.close = dummyClose;
|
||||
ufsDevice.shutdown = dummyShutdown;
|
||||
ufsDevice.private = strdup(val);
|
||||
mediaDevice = &ufsDevice;
|
||||
return 1;
|
||||
@ -281,11 +298,13 @@ mediaSetNFS(char *str)
|
||||
val = msgGetInput(NULL, "Please enter the full NFS file specification for the remote\nhost and directory containing the FreeBSD distribution files.\nThis should be in the format: hostname:/some/freebsd/dir");
|
||||
if (!val)
|
||||
return 0;
|
||||
tcpDeviceSelect(NULL);
|
||||
strncpy(nfsDevice.name, val, DEV_NAME_MAX);
|
||||
if (!tcpDeviceSelect())
|
||||
return 0;
|
||||
nfsDevice.type = DEVICE_TYPE_NFS;
|
||||
nfsDevice.init = mediaInitNFS;
|
||||
nfsDevice.get = mediaGetNFS;
|
||||
nfsDevice.close = dummyClose;
|
||||
nfsDevice.shutdown = mediaShutdownNFS;
|
||||
nfsDevice.private = mediaDevice;
|
||||
mediaDevice = &nfsDevice;
|
||||
@ -436,7 +455,8 @@ mediaExtractDist(char *dir, int fd)
|
||||
Boolean
|
||||
mediaGetType(void)
|
||||
{
|
||||
dmenuOpenSimple(&MenuMedia);
|
||||
if (!dmenuOpenSimple(&MenuMedia))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@ -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.40 1995/05/30 05:13:23 jkh Exp $
|
||||
* $Id: menus.c,v 1.41.2.39 1995/06/10 19:38:27 jkh Exp $
|
||||
*
|
||||
* Copyright (c) 1995
|
||||
* Jordan Hubbard. All rights reserved.
|
||||
@ -57,7 +57,7 @@ DMenu MenuInitial = {
|
||||
"This is the main menu of the FreeBSD installation system. Please\n\
|
||||
select one of the options below by using the arrow keys or typing the\n\
|
||||
first character of the option name you're interested in. Invoke an\n\
|
||||
option by pressing enter. If you'd like a shell, press ESC", /* prompt */
|
||||
option by pressing [ENTER].", /* prompt */
|
||||
"Press F1 for usage instructions", /* help line */
|
||||
"usage.hlp", /* help file */
|
||||
{ { "Usage", "Quick start - How to use this menu system.", /* U */
|
||||
@ -70,7 +70,7 @@ option by pressing enter. If you'd like a shell, press ESC", /* prompt */
|
||||
DMENU_SUBMENU, &MenuOptions, 0, 0 },
|
||||
{ "Proceed", "Go to the installation menu", /* P */
|
||||
DMENU_SUBMENU, &MenuInstall, 0, 0 },
|
||||
{ "Quit", "Exit this installation utility", /* Q */
|
||||
{ "Quit", "Exit this menu (and the installation)", /* Q */
|
||||
DMENU_CANCEL, NULL, 0, 0 },
|
||||
{ NULL } },
|
||||
};
|
||||
@ -83,8 +83,7 @@ DMenu MenuDocumentation = {
|
||||
or are looking to build a system specifically for FreeBSD, read the\n\
|
||||
Hardware guide! New users should also read the Install document for\n\
|
||||
a step-by-step tutorial on installing FreeBSD. For general information,\n\
|
||||
consult the README file. If you're having other problems, you may find\n\
|
||||
answers in the FAQ.",
|
||||
consult the README file.",
|
||||
"Confused? Press F1 for help.",
|
||||
"usage.hlp", /* help file */
|
||||
{ { "README", "Read this for a general description of FreeBSD", /* R */
|
||||
@ -97,22 +96,18 @@ answers in the FAQ.",
|
||||
DMENU_DISPLAY_FILE, "COPYRIGHT", 0, 0 },
|
||||
{ "Release", "The release notes for this version of FreeBSD.", /* R */
|
||||
DMENU_DISPLAY_FILE, "RELNOTES", 0, 0 },
|
||||
{ "FAQ", "Frequently Asked Questions about FreeBSD.", /* F */
|
||||
DMENU_DISPLAY_FILE, "faq.hlp", 0, 0 },
|
||||
{ "Exit", "Exit this menu (returning to previous)", /* E */
|
||||
DMENU_CANCEL, NULL, 0, 0 },
|
||||
{ NULL } },
|
||||
};
|
||||
|
||||
/*
|
||||
* The language selection menu.
|
||||
*
|
||||
* Note: The RADIO menus use a slightly different syntax. If an item
|
||||
* name starts with `*', it's considered to be "ON" by default,
|
||||
* otherwise off.
|
||||
*/
|
||||
DMenu MenuOptionsLanguage = {
|
||||
DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
|
||||
"Natural language selection", /* title */
|
||||
"Please specify the language you'd like to use by default.\n\n\
|
||||
"Please specify the language you would like to use by default.\n\n\
|
||||
While almost all of the system's documentation is still written\n\
|
||||
in english (and may never be translated), there are a few guides\n\
|
||||
and types of system documentation that may be written in your\n\
|
||||
@ -150,8 +145,8 @@ DMenu MenuMediaCDROM = {
|
||||
DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
|
||||
"Choose a CDROM type",
|
||||
"FreeBSD can be installed directly from a CDROM containing a valid\n\
|
||||
FreeBSD 2.0.5 distribution. If you are seeing this menu it's because\n\
|
||||
more than one CDROM drive on your system was found. Please select one\n\
|
||||
FreeBSD 2.0.5 distribution. If you are seeing this menu it is because\n\
|
||||
more than one CDROM drive was found on your system. Please select one\n\
|
||||
of the following CDROM drives as your installation drive.",
|
||||
"Press F1 to read the installation guide",
|
||||
"install.hlp",
|
||||
@ -161,8 +156,8 @@ of the following CDROM drives as your installation drive.",
|
||||
DMenu MenuMediaFloppy = {
|
||||
DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
|
||||
"Choose a Floppy drive",
|
||||
"You have more than one floppy drive. Please chose the floppy\n\
|
||||
drive you'd like to use for this operation",
|
||||
"You have more than one floppy drive. Please chose the drive\n\
|
||||
you would like to use for this operation",
|
||||
NULL,
|
||||
NULL,
|
||||
{ { NULL } },
|
||||
@ -171,13 +166,14 @@ drive you'd like to use for this operation",
|
||||
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.",
|
||||
"FreeBSD can be installed directly from a DOS partition\n\
|
||||
assuming, of course, that you have copied the relevant\n\
|
||||
distributions into your DOS partition before starting this\n\
|
||||
installation. If this is not the case then you should reboot\n\
|
||||
DOS at this time and copy the distributions you wish to install\n\
|
||||
into a \"FREEBSD\" subdirectory on one of your DOS partitions.\n\
|
||||
Otherwise, please select the DOS partition containing the FreeBSD\n\
|
||||
distribution files.",
|
||||
"Press F1 to read the installation guide",
|
||||
"install.hlp",
|
||||
{ { NULL } },
|
||||
@ -192,66 +188,74 @@ choice. Also note that not all sites carry every possible distribution!\n\
|
||||
Distributions other than the basic user set are only guaranteed to be\n\
|
||||
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.\n\
|
||||
You may also wish to investigate the options menu in case of trouble.\n\
|
||||
To specify a URL not in this list, chose \"other\".",
|
||||
"Select a site that's close!",
|
||||
"install.hlp",
|
||||
{ { "Primary Site", "ftp.freebsd.org",
|
||||
DMENU_SET_VARIABLE, "ftp=ftp://ftp.freebsd.org/pub/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
DMENU_SET_VARIABLE, "ftp=ftp://ftp.freebsd.org/pub/FreeBSD/2.0.5-RELEASE", 0, 0 },
|
||||
{ "Secondary Site", "freefall.cdrom.com",
|
||||
DMENU_SET_VARIABLE, "ftp=ftp://freefall.cdrom.com/pub/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
DMENU_SET_VARIABLE, "ftp=ftp://freefall.cdrom.com/pub/FreeBSD/2.0.5-RELEASE", 0, 0 },
|
||||
{ "Other", "Specify some other ftp site by URL",
|
||||
DMENU_SET_VARIABLE, "ftp=other", 0, 0 },
|
||||
{ "Australia", "ftp.physics.usyd.edu.au",
|
||||
DMENU_SET_VARIABLE, "ftp=ftp://ftp.physics.usyd.edu.au/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
DMENU_SET_VARIABLE, "ftp=ftp://ftp.physics.usyd.edu.au/FreeBSD/2.0.5-RELEASE", 0, 0 },
|
||||
{ "Finland", "nic.funet.fi",
|
||||
DMENU_SET_VARIABLE, "ftp=ftp://nic.funet.fi/pub/unix/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
DMENU_SET_VARIABLE, "ftp=ftp://nic.funet.fi/pub/unix/FreeBSD/2.0.5-RELEASE", 0, 0 },
|
||||
{ "France", "ftp.ibp.fr",
|
||||
DMENU_SET_VARIABLE, "ftp=ftp://ftp.ibp.fr/pub/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
{ "Germany", "ftp.uni-duisburg.de",
|
||||
DMENU_SET_VARIABLE, "ftp=ftp://ftp.uni-duisburg.de/pub/unix/FreeBSD/2.0.5-ALPHA", 0, },
|
||||
DMENU_SET_VARIABLE, "ftp=ftp://ftp.ibp.fr/pub/FreeBSD/2.0.5-RELEASE", 0, 0 },
|
||||
{ "Germany", "ftp.fb9dv.uni-duisburg.de",
|
||||
DMENU_SET_VARIABLE, "ftp=ftp://ftp.fb9dv.uni-duisburg.de/pub/unix/FreeBSD/2.0.5-RELEASE", 0, 0 },
|
||||
{ "Germany #2", "gil.physik.rwth-aachen.de",
|
||||
DMENU_SET_VARIABLE, "ftp=ftp://gil.physik.rwth-aachen.de/pub/FreeBSD/2.0.5-RELEASE", 0, 0 },
|
||||
{ "Germany #3", "ftp.uni-paderborn.de",
|
||||
DMENU_SET_VARIABLE, "ftp=ftp://ftp.uni-paderborn.de/freebsd/2.0.5-RELEASE", 0, 0 },
|
||||
{ "Hong Kong", "ftp.hk.super.net",
|
||||
DMENU_SET_VARIABLE, "ftp=ftp://ftp.hk.super.net/pub/FreeBSD/2.0.5-RELEASE", 0, 0 },
|
||||
{ "Israel", "orgchem.weizmann.ac.il",
|
||||
DMENU_SET_VARIABLE, "ftp=ftp://orgchem.weizmann.ac.il/pub/FreeBSD-2.0.5-ALPHA", 0, 0 },
|
||||
DMENU_SET_VARIABLE, "ftp=ftp://orgchem.weizmann.ac.il/pub/FreeBSD-2.0.5-RELEASE", 0, 0 },
|
||||
{ "Japan", "ftp.sra.co.jp",
|
||||
DMENU_SET_VARIABLE, "ftp=ftp://ftp.sra.co.jp/pub/os/FreeBSD/distribution/2.0.5-ALPHA", 0, 0 },
|
||||
DMENU_SET_VARIABLE, "ftp=ftp://ftp.sra.co.jp/pub/os/FreeBSD/2.0.5-RELEASE", 0, 0 },
|
||||
{ "Japan #2", "ftp.mei.co.jp",
|
||||
DMENU_SET_VARIABLE, "ftp=ftp://ftp.mei.co.jp/free/PC-UNIX/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
DMENU_SET_VARIABLE, "ftp=ftp://ftp.mei.co.jp/free/PC-UNIX/FreeBSD/2.0.5-RELEASE", 0, 0 },
|
||||
{ "Japan #3", "ftp.waseda.ac.jp",
|
||||
DMENU_SET_VARIABLE, "ftp=ftp://ftp.waseda.ac.jp/pub/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
DMENU_SET_VARIABLE, "ftp=ftp://ftp.waseda.ac.jp/pub/FreeBSD/2.0.5-RELEASE", 0, 0 },
|
||||
{ "Japan #4", "ftp.pu-toyama.ac.jp",
|
||||
DMENU_SET_VARIABLE, "ftp=ftp://ftp.pu-toyama.ac.jp/pub/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
DMENU_SET_VARIABLE, "ftp=ftp://ftp.pu-toyama.ac.jp/pub/FreeBSD/2.0.5-RELEASE", 0, 0 },
|
||||
{ "Japan #5", "ftpsv1.u-aizu.ac.jp",
|
||||
DMENU_SET_VARIABLE, "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, "ftp=ftp://tutserver.tutcc.tut.ac.jp/FreeBSD/FreeBSD-2.0.5-ALPHA", 0, 0 },
|
||||
DMENU_SET_VARIABLE, "ftp=ftp://ftpsv1.u-aizu.ac.jp/pub/os/FreeBSD/2.0.5-RELEASE", 0, 0 },
|
||||
{ "Japan #6", "ftp.tut.ac.jp",
|
||||
DMENU_SET_VARIABLE, "ftp://ftp.tut.ac.jp/FreeBSD/2.0.5-RELEASE", 0, 0 },
|
||||
{ "Japan #7", "ftp.ee.uec.ac.jp",
|
||||
DMENU_SET_VARIABLE, "ftp=ftp://ftp.ee.uec.ac.jp/pub/os/FreeBSD.other/FreeBSD-2.0.5-ALPHA", 0, 0 },
|
||||
DMENU_SET_VARIABLE, "ftp=ftp://ftp.ee.uec.ac.jp/pub/os/mirror/ftp.freebsd.org/2.0.5-RELEASE", 0, 0 },
|
||||
{ "Japan #8", "ftp.tokyonet.ad.jp",
|
||||
DMENU_SET_VARIABLE, "ftp://ftp.tokyonet.ad.jp/pub/FreeBSD/2.0.5-RELEASE", 0, 0 },
|
||||
{ "Korea", "ftp.cau.ac.kr",
|
||||
DMENU_SET_VARIABLE, "ftp=ftp://ftp.cau.ac.kr/pub/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
DMENU_SET_VARIABLE, "ftp=ftp://ftp.cau.ac.kr/pub/FreeBSD/2.0.5-RELEASE", 0, 0 },
|
||||
{ "Netherlands", "ftp.nl.net",
|
||||
DMENU_SET_VARIABLE, "ftp=ftp://ftp.nl.net/pub/os/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
DMENU_SET_VARIABLE, "ftp=ftp://ftp.nl.net/pub/os/FreeBSD/2.0.5-RELEASE", 0, 0 },
|
||||
{ "Russia", "ftp.kiae.su",
|
||||
DMENU_SET_VARIABLE, "ftp=ftp://ftp.kiae.su/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
DMENU_SET_VARIABLE, "ftp=ftp://ftp.kiae.su/FreeBSD/2.0.5-RELEASE", 0, 0 },
|
||||
{ "Sweden", "ftp.luth.se",
|
||||
DMENU_SET_VARIABLE, "ftp=ftp://ftp.luth.se/pub/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
DMENU_SET_VARIABLE, "ftp=ftp://ftp.luth.se/pub/FreeBSD/2.0.5-RELEASE", 0, 0 },
|
||||
{ "Taiwan", "netbsd.csie.nctu.edu.tw",
|
||||
DMENU_SET_VARIABLE, "ftp=ftp://netbsd.csie.nctu.edu.tw/pub/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
DMENU_SET_VARIABLE, "ftp=ftp://netbsd.csie.nctu.edu.tw/pub/FreeBSD/2.0.5-RELEASE", 0, 0 },
|
||||
{ "Thailand", "ftp.nectec.or.th",
|
||||
DMENU_SET_VARIABLE, "ftp=ftp://ftp.nectec.or.th/pub/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
DMENU_SET_VARIABLE, "ftp=ftp://ftp.nectec.or.th/pub/FreeBSD/2.0.5-RELEASE", 0, 0 },
|
||||
{ "UK", "ftp.demon.co.uk",
|
||||
DMENU_SET_VARIABLE, "ftp=ftp://ftp.demon.co.uk/pub/BSD/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
DMENU_SET_VARIABLE, "ftp=ftp://ftp.demon.co.uk/pub/BSD/FreeBSD/2.0.5-RELEASE", 0, 0 },
|
||||
{ "UK #2", "src.doc.ic.ac.uk",
|
||||
DMENU_SET_VARIABLE, "ftp=ftp://src.doc.ic.ac.uk/packages/unix/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
DMENU_SET_VARIABLE, "ftp=ftp://src.doc.ic.ac.uk/packages/unix/FreeBSD/2.0.5-RELEASE", 0, 0 },
|
||||
{ "UK #3", "unix.hensa.ac.uk",
|
||||
DMENU_SET_VARIABLE, "ftp=ftp://unix.hensa.ac.uk/pub/walnut.creek/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
DMENU_SET_VARIABLE, "ftp=ftp://unix.hensa.ac.uk/mirrors/walnut.creek/FreeBSD/2.0.5-RELEASE", 0, 0 },
|
||||
{ "USA", "ref.tfs.com",
|
||||
DMENU_SET_VARIABLE, "ftp=ftp://ref.tfs.com/pub/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
DMENU_SET_VARIABLE, "ftp=ftp://ref.tfs.com/pub/FreeBSD/2.0.5-RELEASE", 0, 0 },
|
||||
{ "USA #2", "ftp.dataplex.net",
|
||||
DMENU_SET_VARIABLE, "ftp=ftp://ftp.dataplex.net/pub/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
DMENU_SET_VARIABLE, "ftp=ftp://ftp.dataplex.net/pub/FreeBSD/2.0.5-RELEASE", 0, 0 },
|
||||
{ "USA #3", "kryten.atinc.com",
|
||||
DMENU_SET_VARIABLE, "ftp=ftp://kryten.atinc.com/pub/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
DMENU_SET_VARIABLE, "ftp=ftp://kryten.atinc.com/pub/FreeBSD/2.0.5-RELEASE", 0, 0 },
|
||||
{ "USA #4", "ftp.neosoft.com",
|
||||
DMENU_SET_VARIABLE, "ftp=ftp://ftp.neosoft.com/systems/FreeBSD/2.0.5-ALPHA", 0, 0 },
|
||||
DMENU_SET_VARIABLE, "ftp=ftp://ftp.neosoft.com/systems/FreeBSD/2.0.5-RELEASE", 0, 0 },
|
||||
{ NULL } }
|
||||
};
|
||||
|
||||
@ -274,8 +278,8 @@ DMenu MenuNetworkDevice = {
|
||||
"Choose a network interface type",
|
||||
"FreeBSD can be installed directly over a network, using NFS or FTP.\n
|
||||
If you are using PPP over a serial device (cuaa0 or cuaa1) as opposed\n\
|
||||
to a direct ethernet connection, then you may need to first dial your\n\
|
||||
service provider using a special utility we provide for that purpose.\n\
|
||||
to a direct ethernet connection, then you may first need to dial your\n\
|
||||
service provider using the ppp utility we provide for that purpose.\n\
|
||||
You can also install over a 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\
|
||||
@ -323,12 +327,14 @@ DMenu MenuInstallType = {
|
||||
These select what we consider to be the most reasonable defaults for the\n\
|
||||
type of system in question. If you would prefer to pick and choose\n\
|
||||
the list of distributions yourself, simply select \"custom\".",
|
||||
NULL,
|
||||
NULL,
|
||||
"Press F1 for more information on these options.",
|
||||
"distributions.hlp",
|
||||
{ { "Developer", "Full sources, binaries and doc but no games [171MB]",
|
||||
DMENU_CALL, distSetDeveloper, 0, 0 },
|
||||
{ "X-Developer", "Same as above, but includes XFree86 [196MB]",
|
||||
DMENU_CALL, distSetXDeveloper, 0, 0 },
|
||||
{ "Kern-Developer", "Full binaries and doc, kernel sources only [35MB]",
|
||||
DMENU_CALL, distSetKernDeveloper, 0, 0 },
|
||||
{ "User", "Average user - binaries and doc but no sources [19MB]",
|
||||
DMENU_CALL, distSetUser, 0, 0 },
|
||||
{ "X-User", "Same as above, but includes XFree86 [45MB]",
|
||||
@ -339,43 +345,90 @@ the list of distributions yourself, simply select \"custom\".",
|
||||
DMENU_CALL, distSetEverything, 0, 0 },
|
||||
{ "Custom", "Specify your own distribution set [?]",
|
||||
DMENU_SUBMENU, &MenuDistributions, 0, 0 },
|
||||
{ "Reset", "Reset selected distribution list to None",
|
||||
{ "Clear", "Reset selected distribution list to None",
|
||||
DMENU_CALL, distReset, 0, 0 },
|
||||
{ NULL } },
|
||||
};
|
||||
|
||||
static char *
|
||||
DESFlagCheck(DMenuItem *item)
|
||||
{
|
||||
if (isDebug())
|
||||
msgDebug("Dists & DIST_DES = %d\n", Dists & DIST_DES);
|
||||
return (Dists & DIST_DES) ? "ON" : "OFF";
|
||||
}
|
||||
|
||||
static char *
|
||||
srcFlagCheck(DMenuItem *item)
|
||||
{
|
||||
if (isDebug())
|
||||
msgDebug("Dists & DIST_SRC = %d\n", Dists & DIST_SRC);
|
||||
return (Dists & DIST_SRC) ? "ON" : "OFF";
|
||||
}
|
||||
|
||||
static char *
|
||||
x11FlagCheck(DMenuItem *item)
|
||||
{
|
||||
if (isDebug())
|
||||
msgDebug("Dists & DIST_XF86 = %d\n", Dists & DIST_XF86);
|
||||
return (Dists & DIST_XF86) ? "ON" : "OFF";
|
||||
}
|
||||
|
||||
DMenu MenuDistributions = {
|
||||
DMENU_MULTIPLE_TYPE | DMENU_SELECTION_RETURNS,
|
||||
"Select the distributions you wish to install.",
|
||||
"Please check off the distributions you wish to install. Some\n
|
||||
of the most generally useful distributions are already checked, and\n\
|
||||
selecting OK at this stage will chose them as defaults.",
|
||||
"Please check off the distributions you wish to install. At the\n\
|
||||
very minimum, this should be \"bin\". WARNING: Do not export the\n\
|
||||
DES distribution out of the U.S.! It is for U.S. customers only.",
|
||||
NULL,
|
||||
NULL,
|
||||
{ { "*bin", "Binary base distribution (required) [36MB]",
|
||||
DMENU_SET_FLAG, &Dists, DIST_BIN, 0 },
|
||||
{ { "bin", "Binary base distribution (required) [36MB]",
|
||||
DMENU_SET_FLAG, &Dists, DIST_BIN, 0, dmenuFlagCheck },
|
||||
{ "commercial", "Commercial demos and shareware [10MB]",
|
||||
DMENU_SET_FLAG, &Dists, DIST_COMMERCIAL, 0 },
|
||||
{ "compat1x", "FreeBSD 1.x binary compatability package [2MB]",
|
||||
DMENU_SET_FLAG, &Dists, DIST_COMPAT1X, 0 },
|
||||
{ "compat20", "FreeBSD 2.0 binary compatability package [2MB]",
|
||||
DMENU_SET_FLAG, &Dists, DIST_COMPAT20, 0 },
|
||||
{ "DES", "DES encryption code and sources [.3MB]",
|
||||
DMENU_SET_FLAG, &Dists, DIST_DES, 0 },
|
||||
{ "dict", "Spelling checker disctionary files [4.2MB]",
|
||||
DMENU_SET_FLAG, &Dists, DIST_DICT, 0 },
|
||||
DMENU_SET_FLAG, &Dists, DIST_COMMERCIAL, 0, dmenuFlagCheck },
|
||||
{ "compat1x", "FreeBSD 1.x binary compatibility package [2MB]",
|
||||
DMENU_SET_FLAG, &Dists, DIST_COMPAT1X, 0, dmenuFlagCheck },
|
||||
{ "compat20", "FreeBSD 2.0 binary compatibility package [2MB]",
|
||||
DMENU_SET_FLAG, &Dists, DIST_COMPAT20, 0, dmenuFlagCheck },
|
||||
{ "DES", "NOT FOR EXPORT! DES encryption code [.3MB]",
|
||||
DMENU_CALL, distSetDES, 0, 0, DESFlagCheck },
|
||||
{ "dict", "Spelling checker dictionary files [4.2MB]",
|
||||
DMENU_SET_FLAG, &Dists, DIST_DICT, 0, dmenuFlagCheck },
|
||||
{ "games", "Games and other amusements (non-commercial) [6.4MB]",
|
||||
DMENU_SET_FLAG, &Dists, DIST_GAMES, 0 },
|
||||
DMENU_SET_FLAG, &Dists, DIST_GAMES, 0, dmenuFlagCheck },
|
||||
{ "info", "GNU info files [4.1MB]",
|
||||
DMENU_SET_FLAG, &Dists, DIST_INFO, 0 },
|
||||
{ "*man", "System manual pages - strongly recommended [3.3MB]",
|
||||
DMENU_SET_FLAG, &Dists, DIST_MANPAGES, 0 },
|
||||
DMENU_SET_FLAG, &Dists, DIST_INFO, 0, dmenuFlagCheck },
|
||||
{ "man", "System manual pages - strongly recommended [3.3MB]",
|
||||
DMENU_SET_FLAG, &Dists, DIST_MANPAGES, 0, dmenuFlagCheck },
|
||||
{ "proflibs", "Profiled versions of the libraries [3.3MB]",
|
||||
DMENU_SET_FLAG, &Dists, DIST_PROFLIBS, 0 },
|
||||
DMENU_SET_FLAG, &Dists, DIST_PROFLIBS, 0, dmenuFlagCheck },
|
||||
{ "src", "Sources for everything but DES [120MB]",
|
||||
DMENU_CALL, distSetSrc, 0 },
|
||||
{ "XFree86", "The XFree86 3.1.1L distribution [?]",
|
||||
DMENU_SUBMENU, &MenuXF86Select, 0 },
|
||||
DMENU_CALL, distSetSrc, 0, 0, srcFlagCheck },
|
||||
{ "XFree86", "The XFree86 3.1.1u1 distribution [?]",
|
||||
DMENU_CALL, distSetXF86, 0, 0, x11FlagCheck },
|
||||
{ "Experimental", "Work in progress!",
|
||||
DMENU_SET_FLAG, &Dists, DIST_EXPERIMENTAL, 0, dmenuFlagCheck },
|
||||
{ NULL } },
|
||||
};
|
||||
|
||||
DMenu MenuDESDistributions = {
|
||||
DMENU_MULTIPLE_TYPE | DMENU_SELECTION_RETURNS,
|
||||
"Select the encryption facilities you wish to install.",
|
||||
"Please check off any special DES-based encryption distributions\n\
|
||||
you would like to install. Please note that these services are NOT FOR\n\
|
||||
EXPORT from the United States, nor are they available on CDROM (for the\n\
|
||||
same reason). For information on non-U.S. FTP distributions of this\n\
|
||||
software, please consult the release notes.",
|
||||
NULL,
|
||||
NULL,
|
||||
{ { "des", "Basic DES services (rlogin, init, etc) [1MB]",
|
||||
DMENU_SET_FLAG, &DESDists, DIST_DES_DES, 0, dmenuFlagCheck },
|
||||
{ "krb", "Kerberos encryption services [2MB]",
|
||||
DMENU_SET_FLAG, &DESDists, DIST_DES_KERBEROS, 0, dmenuFlagCheck },
|
||||
{ "sebones", "Sources for eBones (Kerberos) [1MB]",
|
||||
DMENU_SET_FLAG, &DESDists, DIST_DES_SEBONES, 0, dmenuFlagCheck },
|
||||
{ "ssecure", "Sources for DES libs and utilities [1MB]",
|
||||
DMENU_SET_FLAG, &DESDists, DIST_DES_SSECURE, 0, dmenuFlagCheck },
|
||||
{ NULL } },
|
||||
};
|
||||
|
||||
@ -387,81 +440,93 @@ you wish to install.",
|
||||
NULL,
|
||||
NULL,
|
||||
{ { "base", "top-level files in /usr/src [300K]",
|
||||
DMENU_SET_FLAG, &SrcDists, DIST_SRC_BASE, 0 },
|
||||
DMENU_SET_FLAG, &SrcDists, DIST_SRC_BASE, 0, dmenuFlagCheck },
|
||||
{ "gnu", "/usr/src/gnu (software from the GNU Project) [42MB]]",
|
||||
DMENU_SET_FLAG, &SrcDists, DIST_SRC_GNU, 0 },
|
||||
DMENU_SET_FLAG, &SrcDists, DIST_SRC_GNU, 0, dmenuFlagCheck },
|
||||
{ "etc", "/usr/src/etc (miscellaneous system files) [460K]",
|
||||
DMENU_SET_FLAG, &SrcDists, DIST_SRC_ETC, 0 },
|
||||
DMENU_SET_FLAG, &SrcDists, DIST_SRC_ETC, 0, dmenuFlagCheck },
|
||||
{ "games", "/usr/src/games (diversions) [7.8MB]",
|
||||
DMENU_SET_FLAG, &SrcDists, DIST_SRC_GAMES, 0 },
|
||||
DMENU_SET_FLAG, &SrcDists, DIST_SRC_GAMES, 0, dmenuFlagCheck },
|
||||
{ "include", "/usr/src/include (header files) [467K]",
|
||||
DMENU_SET_FLAG, &SrcDists, DIST_SRC_INCLUDE, 0 },
|
||||
DMENU_SET_FLAG, &SrcDists, DIST_SRC_INCLUDE, 0, dmenuFlagCheck },
|
||||
{ "lib", "/usr/src/lib (system libraries) [9.2MB]",
|
||||
DMENU_SET_FLAG, &SrcDists, DIST_SRC_LIB, 0 },
|
||||
DMENU_SET_FLAG, &SrcDists, DIST_SRC_LIB, 0, dmenuFlagCheck },
|
||||
{ "libexec", "/usr/src/libexec (system programs) [1.2MB]",
|
||||
DMENU_SET_FLAG, &SrcDists, DIST_SRC_LIBEXEC, 0 },
|
||||
DMENU_SET_FLAG, &SrcDists, DIST_SRC_LIBEXEC, 0, dmenuFlagCheck },
|
||||
{ "lkm", "/usr/src/lkm (Loadable Kernel Modules) [193K]",
|
||||
DMENU_SET_FLAG, &SrcDists, DIST_SRC_LKM, 0 },
|
||||
DMENU_SET_FLAG, &SrcDists, DIST_SRC_LKM, 0, dmenuFlagCheck },
|
||||
{ "release", "/usr/src/release (release-generation tools) [533K]",
|
||||
DMENU_SET_FLAG, &SrcDists, DIST_SRC_RELEASE, 0 },
|
||||
DMENU_SET_FLAG, &SrcDists, DIST_SRC_RELEASE, 0, dmenuFlagCheck },
|
||||
{ "sbin", "/usr/src/sbin (system binaries) [1.3MB]",
|
||||
DMENU_SET_FLAG, &SrcDists, DIST_SRC_SBIN, 0 },
|
||||
DMENU_SET_FLAG, &SrcDists, DIST_SRC_SBIN, 0, dmenuFlagCheck },
|
||||
{ "share", "/usr/src/share (documents and shared files) [10MB]",
|
||||
DMENU_SET_FLAG, &SrcDists, DIST_SRC_SHARE, 0 },
|
||||
DMENU_SET_FLAG, &SrcDists, DIST_SRC_SHARE, 0, dmenuFlagCheck },
|
||||
{ "sys", "/usr/src/sys (FreeBSD kernel) [13MB]",
|
||||
DMENU_SET_FLAG, &SrcDists, DIST_SRC_SYS, 0 },
|
||||
DMENU_SET_FLAG, &SrcDists, DIST_SRC_SYS, 0, dmenuFlagCheck },
|
||||
{ "ubin", "/usr/src/usr.bin (user binaries) [13MB]",
|
||||
DMENU_SET_FLAG, &SrcDists, DIST_SRC_UBIN, 0 },
|
||||
DMENU_SET_FLAG, &SrcDists, DIST_SRC_UBIN, 0, dmenuFlagCheck },
|
||||
{ "usbin", "/usr/src/usr.sbin (aux system binaries) [14MB]",
|
||||
DMENU_SET_FLAG, &SrcDists, DIST_SRC_USBIN, 0 },
|
||||
{ "XFree86", "XFree86 3.1.1L source + contrib distribution [200MB]",
|
||||
DMENU_SET_FLAG, &SrcDists, DIST_SRC_XF86, 0 },
|
||||
DMENU_SET_FLAG, &SrcDists, DIST_SRC_USBIN, 0, dmenuFlagCheck },
|
||||
{ NULL } },
|
||||
};
|
||||
|
||||
static int
|
||||
clearx11(char *str)
|
||||
{
|
||||
XF86Dists = 0;
|
||||
XF86ServerDists = 0;
|
||||
XF86FontDists = 0;
|
||||
Dists &= ~DIST_XF86;
|
||||
return 0;
|
||||
}
|
||||
|
||||
DMenu MenuXF86Select = {
|
||||
DMENU_NORMAL_TYPE,
|
||||
"XFree86 3.1.1u1 Distribution",
|
||||
"Please select the components you need from the XFree86 3.1.1u1\n\
|
||||
distribution. We recommend that you select what you need from the basic\n\
|
||||
components set and at least one entry from the Server and Font set menus.\n\n\
|
||||
When you're finished, select Cancel.",
|
||||
components set and at least one entry from the Server and Font set menus.",
|
||||
"Press F1 to read the XFree86 release notes for FreeBSD",
|
||||
"XF86.hlp",
|
||||
{ { "Basic", "Basic component menu (required)",
|
||||
{ { "Basic", "Basic component menu (required)", /* B */
|
||||
DMENU_SUBMENU, &MenuXF86SelectCore, 0, 0 },
|
||||
{ "Server", "X server menu",
|
||||
{ "Server", "X server menu", /* S */
|
||||
DMENU_SUBMENU, &MenuXF86SelectServer, 0, 0 },
|
||||
{ "Fonts", "Font set menu",
|
||||
{ "Fonts", "Font set menu", /* F */
|
||||
DMENU_SUBMENU, &MenuXF86SelectFonts, 0, 0 },
|
||||
{ "Clear", "Reset XFree86 distribution list",
|
||||
DMENU_CALL, clearx11, 0, 0, 0 },
|
||||
{ "Exit", "Exit this menu (returning to previous)", /* E */
|
||||
DMENU_CANCEL, NULL, 0, 0 },
|
||||
{ NULL } },
|
||||
};
|
||||
|
||||
DMenu MenuXF86SelectCore = {
|
||||
DMENU_MULTIPLE_TYPE | DMENU_SELECTION_RETURNS,
|
||||
"XFree86 3.1.1 base distribution types",
|
||||
"Please check off the basic XFree86 components you wish to install.\n\
|
||||
Those deemed most generally useful are already checked off for you.",
|
||||
"Please check off the basic XFree86 components you wish to install.",
|
||||
"Press F1 to read the XFree86 release notes for FreeBSD",
|
||||
"XF86.hlp",
|
||||
{ { "*bin", "X client applications and shared libs [4MB].",
|
||||
DMENU_SET_FLAG, &XF86Dists, DIST_XF86_BIN, 0 },
|
||||
{ "*lib", "Data files needed at runtime [600K]",
|
||||
DMENU_SET_FLAG, &XF86Dists, DIST_XF86_LIB, 0 },
|
||||
{ { "bin", "X client applications and shared libs [4MB].",
|
||||
DMENU_SET_FLAG, &XF86Dists, DIST_XF86_BIN, 0, dmenuFlagCheck },
|
||||
{ "lib", "Data files needed at runtime [600K]",
|
||||
DMENU_SET_FLAG, &XF86Dists, DIST_XF86_LIB, 0, dmenuFlagCheck },
|
||||
{ "xicf", "Customizable xinit runtime configuration file [100K]",
|
||||
DMENU_SET_FLAG, &XF86Dists, DIST_XF86_XINIT, 0 },
|
||||
DMENU_SET_FLAG, &XF86Dists, DIST_XF86_XINIT, 0, dmenuFlagCheck },
|
||||
{ "xdcf", "Customizable xdm runtime configuration file [100K]",
|
||||
DMENU_SET_FLAG, &XF86Dists, DIST_XF86_XDMCF, 0 },
|
||||
DMENU_SET_FLAG, &XF86Dists, DIST_XF86_XDMCF, 0, dmenuFlagCheck },
|
||||
{ "doc", "READMEs and XFree86 specific man pages [500K]",
|
||||
DMENU_SET_FLAG, &XF86Dists, DIST_XF86_DOC, 0 },
|
||||
{ "*man", "Man pages (except XFree86 specific ones) [1.2MB]",
|
||||
DMENU_SET_FLAG, &XF86Dists, DIST_XF86_MAN, 0 },
|
||||
DMENU_SET_FLAG, &XF86Dists, DIST_XF86_DOC, 0, dmenuFlagCheck },
|
||||
{ "man", "Man pages (except XFree86 specific ones) [1.2MB]",
|
||||
DMENU_SET_FLAG, &XF86Dists, DIST_XF86_MAN, 0, dmenuFlagCheck },
|
||||
{ "prog", "Programmer's header and library files [4MB]",
|
||||
DMENU_SET_FLAG, &XF86Dists, DIST_XF86_PROG, 0 },
|
||||
DMENU_SET_FLAG, &XF86Dists, DIST_XF86_PROG, 0, dmenuFlagCheck },
|
||||
{ "link", "X Server reconfiguration kit [7.8MB]",
|
||||
DMENU_SET_FLAG, &XF86Dists, DIST_XF86_LINK, 0 },
|
||||
DMENU_SET_FLAG, &XF86Dists, DIST_XF86_LINK, 0, dmenuFlagCheck },
|
||||
{ "pex", "PEX fonts and libs needed by PEX apps [500K]",
|
||||
DMENU_SET_FLAG, &XF86Dists, DIST_XF86_PEX, 0 },
|
||||
DMENU_SET_FLAG, &XF86Dists, DIST_XF86_PEX, 0, dmenuFlagCheck },
|
||||
{ "sources", "XFree86 3.1.1u1 source + contrib distribution [200MB]",
|
||||
DMENU_SET_FLAG, &XF86Dists, DIST_XF86_SRC, 0, dmenuFlagCheck },
|
||||
{ NULL } },
|
||||
};
|
||||
|
||||
@ -474,16 +539,16 @@ install. At the minimum, you should install the standard\n\
|
||||
(these are selected by default).",
|
||||
"Press F1 to read the XFree86 release notes for FreeBSD",
|
||||
"XF86.hlp",
|
||||
{ { "*fnts", "Standard 75 DPI and miscellaneous fonts [3.6MB]",
|
||||
DMENU_SET_FLAG, &XF86FontDists, DIST_XF86_FONTS_MISC, 0 },
|
||||
{ { "fnts", "Standard 75 DPI and miscellaneous fonts [3.6MB]",
|
||||
DMENU_SET_FLAG, &XF86FontDists, DIST_XF86_FONTS_MISC, 0, dmenuFlagCheck },
|
||||
{ "f100", "100 DPI fonts [1.8MB]",
|
||||
DMENU_SET_FLAG, &XF86FontDists, DIST_XF86_FONTS_100, 0 },
|
||||
DMENU_SET_FLAG, &XF86FontDists, DIST_XF86_FONTS_100, 0, dmenuFlagCheck },
|
||||
{ "fscl", "Speedo and Type scalable fonts [1.6MB]",
|
||||
DMENU_SET_FLAG, &XF86FontDists, DIST_XF86_FONTS_SCALE, 0 },
|
||||
DMENU_SET_FLAG, &XF86FontDists, DIST_XF86_FONTS_SCALE, 0, dmenuFlagCheck },
|
||||
{ "non", "Japanese, Chinese and other non-english fonts [3.3MB]",
|
||||
DMENU_SET_FLAG, &XF86FontDists, DIST_XF86_FONTS_NON, 0 },
|
||||
DMENU_SET_FLAG, &XF86FontDists, DIST_XF86_FONTS_NON, 0, dmenuFlagCheck },
|
||||
{ "server", "Font server [0.3MB]",
|
||||
DMENU_SET_FLAG, &XF86FontDists, DIST_XF86_FONTS_SERVER, 0 },
|
||||
DMENU_SET_FLAG, &XF86FontDists, DIST_XF86_FONTS_SERVER, 0, dmenuFlagCheck },
|
||||
{ NULL } },
|
||||
};
|
||||
|
||||
@ -496,28 +561,30 @@ it is recommended that try the SVGA or VGA16 servers (the VGA16 and\n\
|
||||
Mono servers are particularly well-suited to most LCD displays).",
|
||||
"Press F1 to read the XFree86 release notes for FreeBSD",
|
||||
"XF86.hlp",
|
||||
{ { "*SVGA", "Standard VGA or Super VGA display [1MB]",
|
||||
DMENU_SET_FLAG, &XF86ServerDists, DIST_XF86_SERVER_SVGA, 0 },
|
||||
{ { "SVGA", "Standard VGA or Super VGA display [1MB]",
|
||||
DMENU_SET_FLAG, &XF86ServerDists, DIST_XF86_SERVER_SVGA, 0, dmenuFlagCheck },
|
||||
{ "VGA16", "Standard 16 color VGA display [1MB]",
|
||||
DMENU_SET_FLAG, &XF86ServerDists, DIST_XF86_SERVER_VGA16, 0 },
|
||||
DMENU_SET_FLAG, &XF86ServerDists, DIST_XF86_SERVER_VGA16, 0, dmenuFlagCheck },
|
||||
{ "Mono", "Standard Monochrome display [1MB]",
|
||||
DMENU_SET_FLAG, &XF86ServerDists, DIST_XF86_SERVER_MONO, 0 },
|
||||
DMENU_SET_FLAG, &XF86ServerDists, DIST_XF86_SERVER_MONO, 0, dmenuFlagCheck },
|
||||
{ "8514", "8-bit (256 color) IBM 8514 or compatible card [1MB]",
|
||||
DMENU_SET_FLAG, &XF86ServerDists, DIST_XF86_SERVER_8514, 0 },
|
||||
DMENU_SET_FLAG, &XF86ServerDists, DIST_XF86_SERVER_8514, 0, dmenuFlagCheck },
|
||||
{ "AGX", "8-bit AGX card [1MB]",
|
||||
DMENU_SET_FLAG, &XF86ServerDists, DIST_XF86_SERVER_AGX, 0 },
|
||||
{ "Mch3", "8 and 16-bit (65K color) for ATI Mach32 card [1MB]",
|
||||
DMENU_SET_FLAG, &XF86ServerDists, DIST_XF86_SERVER_MACH32, 0 },
|
||||
{ "Mch8", "8-bit ATI Mach8 card [1MB]",
|
||||
DMENU_SET_FLAG, &XF86ServerDists, DIST_XF86_SERVER_MACH8, 0 },
|
||||
DMENU_SET_FLAG, &XF86ServerDists, DIST_XF86_SERVER_AGX, 0, dmenuFlagCheck },
|
||||
{ "Ma8", "8-bit ATI Mach8 card [1MB]",
|
||||
DMENU_SET_FLAG, &XF86ServerDists, DIST_XF86_SERVER_MACH8, 0, dmenuFlagCheck },
|
||||
{ "Ma32", "8 and 16-bit (65K color) for ATI Mach32 card [1MB]",
|
||||
DMENU_SET_FLAG, &XF86ServerDists, DIST_XF86_SERVER_MACH32, 0, dmenuFlagCheck },
|
||||
{ "Ma64", "8 and 16-bit (65K color) for ATI Mach64 card [1MB]",
|
||||
DMENU_SET_FLAG, &XF86ServerDists, DIST_XF86_SERVER_MACH64, 0, dmenuFlagCheck },
|
||||
{ "P9K", "8, 16, and 24-bit color for Weitek P9000 based boards [1MB]",
|
||||
DMENU_SET_FLAG, &XF86ServerDists, DIST_XF86_SERVER_P9000, 0 },
|
||||
DMENU_SET_FLAG, &XF86ServerDists, DIST_XF86_SERVER_P9000, 0, dmenuFlagCheck },
|
||||
{ "S3", "8, 16 and 24-bit color for S3 based boards [1MB]",
|
||||
DMENU_SET_FLAG, &XF86ServerDists, DIST_XF86_SERVER_S3, 0 },
|
||||
DMENU_SET_FLAG, &XF86ServerDists, DIST_XF86_SERVER_S3, 0, dmenuFlagCheck },
|
||||
{ "W32", "8-bit Color for ET4000/W32, /W32i and /W32p cards [1MB]",
|
||||
DMENU_SET_FLAG, &XF86ServerDists, DIST_XF86_SERVER_W32, 0 },
|
||||
DMENU_SET_FLAG, &XF86ServerDists, DIST_XF86_SERVER_W32, 0, dmenuFlagCheck },
|
||||
{ "nest", "A nested server for testing purposes [1MB]",
|
||||
DMENU_SET_FLAG, &XF86ServerDists, DIST_XF86_SERVER_NEST, 0 },
|
||||
DMENU_SET_FLAG, &XF86ServerDists, DIST_XF86_SERVER_NEST, 0, dmenuFlagCheck },
|
||||
{ NULL } },
|
||||
};
|
||||
|
||||
@ -530,55 +597,77 @@ space, though FreeBSD can be installed across several drives if you do\n\
|
||||
not have the required space on a single drive. If you wish to boot\n\
|
||||
off a drive that's not a `zero drive', or have multiple operating\n\
|
||||
systems on your machine, you will have the option to install a boot\n\
|
||||
manager later.",
|
||||
manager later. To select a drive, use the arrow keys to move to it\n\
|
||||
and press [SPACE].",
|
||||
"Press F1 for important information regarding geometry!",
|
||||
"drives.hlp",
|
||||
{ { NULL } },
|
||||
};
|
||||
|
||||
/* Local work func for MenuOptions */
|
||||
static int
|
||||
clearFlags(char *str)
|
||||
{
|
||||
OptFlags = 0;
|
||||
return 1; /* Gross, but forces menu rebuild */
|
||||
}
|
||||
|
||||
static char *
|
||||
userPassCheck(DMenuItem *item)
|
||||
{
|
||||
char *cp = getenv(FTP_USER);
|
||||
|
||||
return (cp && *cp) ? "ON" : "OFF";
|
||||
}
|
||||
|
||||
static char *
|
||||
ftpFlagCheck(DMenuItem *item)
|
||||
{
|
||||
/* Verify that everything's sane */
|
||||
if ((OptFlags & (OPT_FTP_ABORT + OPT_FTP_RESELECT)) == (OPT_FTP_ABORT + OPT_FTP_RESELECT))
|
||||
OptFlags &= ~OPT_FTP_RESELECT;
|
||||
if (!(OptFlags & (OPT_FTP_ABORT + OPT_FTP_RESELECT)))
|
||||
OptFlags |= OPT_FTP_ABORT;
|
||||
if ((OptFlags & (OPT_FTP_ACTIVE + OPT_FTP_PASSIVE)) == (OPT_FTP_ACTIVE + OPT_FTP_PASSIVE))
|
||||
OptFlags &= ~OPT_FTP_ACTIVE;
|
||||
if (!(OptFlags & (OPT_FTP_ACTIVE + OPT_FTP_PASSIVE)))
|
||||
OptFlags |= OPT_FTP_PASSIVE;
|
||||
if (*((unsigned int *)item->ptr) & item->parm)
|
||||
return "ON";
|
||||
return "OFF";
|
||||
}
|
||||
|
||||
/* The installation options menu */
|
||||
DMenu MenuOptions = {
|
||||
DMENU_NORMAL_TYPE,
|
||||
DMENU_MULTIPLE_TYPE | DMENU_SELECTION_RETURNS,
|
||||
"Choose Installation Options",
|
||||
"The following options control how this utility will deal\n\
|
||||
with various possible error conditions and how verbose it will\n\
|
||||
be at various stages.\n\n\
|
||||
When you're done setting options, select Cancel",
|
||||
NULL,
|
||||
NULL,
|
||||
{ { "Ftp Options", "Ftp options menu",
|
||||
DMENU_SUBMENU, &MenuOptionsFTP, 0, 0 },
|
||||
{ "NFS Secure", "NFS server talks only on a secure port",
|
||||
DMENU_SET_VARIABLE, "nfsServerSecure=yes", 0, 0 },
|
||||
be at various stages.",
|
||||
"Press F1 for more help on these options",
|
||||
"options.hlp",
|
||||
{ { "NFS Secure", "NFS server talks only on a secure port",
|
||||
DMENU_SET_FLAG, &OptFlags, OPT_NFS_SECURE, 0, dmenuFlagCheck },
|
||||
{ "NFS Slow", "User is using a slow PC or ethernet card",
|
||||
DMENU_SET_VARIABLE, "nfsSlowPC=yes", 0, 0 },
|
||||
{ "Extra Debugging", "Toggle the extra debugging flag",
|
||||
DMENU_SET_VARIABLE, "debug=yes", 0, 0 },
|
||||
{ "No Debugging", "Turn the extra debugging flag off",
|
||||
DMENU_SET_VARIABLE, "debug=no", 0, 0 },
|
||||
{ "Yes To All", "Assume \"Yes\" answers to all non-critical dialogs",
|
||||
DMENU_SET_VARIABLE, "noConfirmation=Yes", 0, 0 },
|
||||
{ NULL } },
|
||||
};
|
||||
|
||||
DMenu MenuOptionsFTP = {
|
||||
DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
|
||||
"Choose FTP Options",
|
||||
"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",
|
||||
DMENU_SET_VARIABLE, "ftpRetryType=loop", 0, 0 },
|
||||
DMENU_SET_FLAG, &OptFlags, OPT_SLOW_ETHER, 0, dmenuFlagCheck },
|
||||
{ "FTP Abort", "On transfer failure, abort",
|
||||
DMENU_SET_FLAG, &OptFlags, OPT_FTP_ABORT, 0, ftpFlagCheck },
|
||||
{ "FTP Reselect", "On transfer failure, ask for another host",
|
||||
DMENU_SET_VARIABLE, "ftpRetryType=reselect", 0, 0 },
|
||||
{ "FTP Abort", "On transfer failure, abort installation",
|
||||
DMENU_SET_VARIABLE, "ftpRetryType=abort", 0, 0 },
|
||||
DMENU_SET_FLAG, &OptFlags, OPT_FTP_RESELECT, 0, ftpFlagCheck },
|
||||
{ "FTP active", "Use \"active mode\" for standard FTP",
|
||||
DMENU_SET_FLAG, &OptFlags, OPT_FTP_ACTIVE, 0, ftpFlagCheck },
|
||||
{ "FTP passive", "Use \"passive mode\" for firewalled FTP",
|
||||
DMENU_SET_VARIABLE, "ftpPassive=yes", 0, 0 },
|
||||
DMENU_SET_FLAG, &OptFlags, OPT_FTP_PASSIVE, 0, ftpFlagCheck },
|
||||
{ "Debugging", "Turn on the extra debugging flag",
|
||||
DMENU_SET_FLAG, &OptFlags, OPT_DEBUG, 0, dmenuFlagCheck },
|
||||
{ "Yes To All", "Assume \"Yes\" answers to all non-critical dialogs",
|
||||
DMENU_SET_FLAG, &OptFlags, OPT_NO_CONFIRM, 0, dmenuFlagCheck },
|
||||
{ "FTP userpass", "Specify username and password instead of anonymous",
|
||||
DMENU_CALL, mediaSetFtpUserPass, 0, 0, userPassCheck },
|
||||
{ "Clear", "Clear All Option Flags",
|
||||
DMENU_CALL, clearFlags, 0, 0 },
|
||||
{ "Exit", "Exit this menu (returning to previous)",
|
||||
DMENU_CANCEL, NULL, 0, 0 },
|
||||
{ NULL } },
|
||||
};
|
||||
|
||||
@ -591,7 +680,7 @@ details on the type of distribution you wish to have, where you wish\n\
|
||||
to install it from and how you wish to allocate disk storage to FreeBSD.\n\n\
|
||||
None of the items in this menu will actually modify the contents of\n\
|
||||
your disk until you select the \"Install\" menu item (and even then, only\n\
|
||||
after a final confirmation). Select Cancel to leave this menu.",
|
||||
after a final confirmation).",
|
||||
"Press F1 to read the installation guide",
|
||||
"install.hlp",
|
||||
{ { "Partition", "Allocate disk space for FreeBSD", /* P */
|
||||
@ -602,10 +691,14 @@ after a final confirmation). Select Cancel to leave this menu.",
|
||||
DMENU_SUBMENU, &MenuInstallType, 0, 0 },
|
||||
{ "Media", "Choose the installation media type", /* M */
|
||||
DMENU_SUBMENU, &MenuMedia, 0, 0 },
|
||||
{ "Install", "Install FreeBSD onto your hard disk(s)", /* I */
|
||||
{ "Options", "Go to Options submenu", /* O */
|
||||
DMENU_SUBMENU, &MenuOptions, 0, 0 },
|
||||
{ "Commit", "Install FreeBSD onto your hard disk(s)", /* C */
|
||||
DMENU_CALL, installCommit, 0, 0 },
|
||||
{ "Configure", "Do post-install configuration of FreeBSD", /* C */
|
||||
DMENU_SUBMENU, &MenuConfigure, 0, 0 },
|
||||
{ "Exit", "Exit this menu (returning to previous)",
|
||||
DMENU_CANCEL, NULL, 0, 0 },
|
||||
{ NULL } },
|
||||
};
|
||||
|
||||
@ -623,12 +716,12 @@ one, select \"standard\". If you would prefer your Master Boot\n\
|
||||
Record to remain untouched, then select \"none\".",
|
||||
"Press F1 to read the installation guide",
|
||||
"install.hlp",
|
||||
{ { "*BootMgr", "Install the FreeBSD Boot Manager (\"Booteasy\")", /* B */
|
||||
DMENU_SET_VARIABLE, "bootManager=bteasy", 0, 0 },
|
||||
{ { "BootMgr", "Install the FreeBSD Boot Manager (\"Booteasy\")", /* B */
|
||||
DMENU_SET_VALUE, &BootMgr, 0, 0, dmenuRadioCheck },
|
||||
{ "Standard", "Use a standard MBR (no boot manager)", /* S */
|
||||
DMENU_SET_VARIABLE, "bootManager=mbr", 0, 0 },
|
||||
DMENU_SET_VALUE, &BootMgr, 1, 0, dmenuRadioCheck },
|
||||
{ "None", "Leave the Master Boot Record untouched", /* N */
|
||||
DMENU_SET_VARIABLE, "bootManager=none", 0, 0 },
|
||||
DMENU_SET_VALUE, &BootMgr, 2, 0, dmenuRadioCheck },
|
||||
{ NULL } },
|
||||
};
|
||||
|
||||
@ -639,8 +732,7 @@ DMenu MenuConfigure = {
|
||||
"If you've already installed FreeBSD, you may use this menu to\n\
|
||||
customize it somewhat to suit your particular configuration. Most\n\
|
||||
importantly, you can use the Packages utility to load extra \"3rd party\"\n\
|
||||
software not provided in the base distributions.\n\n\
|
||||
When you're done, select Cancel",
|
||||
software not provided in the base distributions.",
|
||||
"Press F1 for more information on these options",
|
||||
"configure.hlp",
|
||||
{ { "Add User", "Add users to the system",
|
||||
@ -650,7 +742,7 @@ When you're done, select Cancel",
|
||||
{ "Networking", "Configure additional network services",
|
||||
DMENU_SUBMENU, &MenuNetworking, 0, 0 },
|
||||
{ "Time Zone", "Set which time zone you're in",
|
||||
DMENU_SYSTEM_COMMAND, "tzsetup", 0, 0 },
|
||||
DMENU_SYSTEM_COMMAND, "rm -f /etc/wall_cmos_clock /etc/localtime; tzsetup", 0, 0 },
|
||||
{ "Packages", "Install extra FreeBSD packaged software",
|
||||
DMENU_CALL, configPackages, 0, 0 },
|
||||
{ "Ports", "Enable the FreeBSD Ports Collection from CD",
|
||||
@ -658,32 +750,47 @@ When you're done, select Cancel",
|
||||
{ "Root Password", "Set the system manager's password",
|
||||
DMENU_SYSTEM_COMMAND, "passwd root", 0, 0 },
|
||||
{ "XFree86", "Configure XFree86 (if installed)",
|
||||
DMENU_SYSTEM_COMMAND, "PATH=/usr/bin:/bin:/usr/X11R6/bin xf86config", 0, 0 },
|
||||
DMENU_SYSTEM_COMMAND, "/usr/X11R6/bin/xf86config", 0, 0 },
|
||||
{ "Exit", "Exit this menu (returning to previous)",
|
||||
DMENU_CANCEL, NULL, 0, 0 },
|
||||
{ NULL } },
|
||||
};
|
||||
|
||||
static char *
|
||||
menuCheckNTP(DMenuItem *item)
|
||||
{
|
||||
return getenv("ntpdate") ? "ON" : "OFF";
|
||||
}
|
||||
|
||||
static char *
|
||||
menuCheckRouted(DMenuItem *item)
|
||||
{
|
||||
return getenv("routedflags") ? "ON" : "OFF";
|
||||
}
|
||||
|
||||
DMenu MenuNetworking = {
|
||||
DMENU_NORMAL_TYPE,
|
||||
DMENU_MULTIPLE_TYPE | DMENU_SELECTION_RETURNS,
|
||||
"Network Services Menu",
|
||||
"You may have already configured one network device (and the\n\
|
||||
other various hostname/gateway/name server parameters) in the process\n\
|
||||
of installing FreeBSD. This menu allows you to configure other\n\
|
||||
aspects of your system's network configuration.\n\n\
|
||||
When you are done, select Cancel.",
|
||||
aspects of your system's network configuration.",
|
||||
NULL,
|
||||
NULL,
|
||||
{ { "NFS client", "This machine will be an NFS client",
|
||||
DMENU_SET_VARIABLE, "nfs_client=YES", 0, 0 },
|
||||
DMENU_SET_VARIABLE, "nfs_client=YES", 0, 0, dmenuVarCheck },
|
||||
{ "NFS server", "This machine will be an NFS server",
|
||||
DMENU_SET_VARIABLE, "nfs_server=YES", 0, 0 },
|
||||
{ "interfaces", "Configure additional interfaces",
|
||||
DMENU_CALL, tcpDeviceSelect, 0, 0 },
|
||||
DMENU_SET_VARIABLE, "nfs_server=YES", 0, 0, dmenuVarCheck },
|
||||
{ "Interfaces", "Configure network interfaces",
|
||||
DMENU_CALL, tcpMenuSelect, 0, 0 },
|
||||
{ "ntpdate", "Select a clock-syncronization server",
|
||||
DMENU_SUBMENU, &MenuNTP, 0, 0 },
|
||||
DMENU_SUBMENU, &MenuNTP, 0, 0, menuCheckNTP },
|
||||
{ "routed", "Set flags for routed (default: -q)",
|
||||
DMENU_CALL, configRoutedFlags, 0, 0 },
|
||||
DMENU_CALL, configRoutedFlags, 0, 0, menuCheckRouted },
|
||||
{ "rwhod", "This machine wants to run the rwho daemon",
|
||||
DMENU_SET_VARIABLE, "rwhod=YES", 0, 0 },
|
||||
DMENU_SET_VARIABLE, "rwhod=YES", 0, 0, dmenuVarCheck },
|
||||
{ "Exit", "Exit this menu (returning to previous)",
|
||||
DMENU_CANCEL, NULL, 0, 0 },
|
||||
{ NULL } },
|
||||
};
|
||||
|
||||
@ -695,7 +802,9 @@ for public use around the Internet. Please select one reasonably\n\
|
||||
close to you to have your system time syncronized accordingly.",
|
||||
"These are the primary open-access NTP servers",
|
||||
NULL,
|
||||
{ { "Australia", "ntp.syd.dms.csiro.au (HP 5061 Cesium Beam)",
|
||||
{ { "Other", "Select a site not on this list",
|
||||
DMENU_CALL, configNTP, 0, 0 },
|
||||
{ "Australia", "ntp.syd.dms.csiro.au (HP 5061 Cesium Beam)",
|
||||
DMENU_SET_VARIABLE, "ntpdate=ntp.syd.dms.csiro.au", 0, 0 },
|
||||
{ "Canada", "tick.usask.ca (GOES clock)",
|
||||
DMENU_SET_VARIABLE, "ntpdate=tick.usask.ca", 0, 0 },
|
||||
@ -751,11 +860,13 @@ When you are done setting configuration options, select Cancel.",
|
||||
DMENU_SUBMENU, &MenuSysconsKeyrate, 0, 0 },
|
||||
{ "Saver", "Configure the screen saver",
|
||||
DMENU_SUBMENU, &MenuSysconsSaver, 0, 0 },
|
||||
{ "Exit", "Exit this menu (returning to previous)",
|
||||
DMENU_CANCEL, NULL, 0, 0 },
|
||||
{ NULL } },
|
||||
};
|
||||
|
||||
DMenu MenuSysconsKeymap = {
|
||||
DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
|
||||
DMENU_RADIO_TYPE | DMENU_SELECTION_RETURNS,
|
||||
"System Console Keymap",
|
||||
"The default system console driver for FreeBSD (syscons) defaults\n\
|
||||
to a standard \"American\" keyboard map. Users in other countries\n\
|
||||
@ -764,54 +875,60 @@ the other keymaps below.",
|
||||
"Choose a keyboard map",
|
||||
NULL,
|
||||
{ { "Danish CP865", "Danish Code Page 865 keymap",
|
||||
DMENU_SET_VARIABLE, "keymap=danish.cp865", 0, 0 },
|
||||
DMENU_SET_VARIABLE, "keymap=danish.cp865", 0, 0, dmenuVarCheck },
|
||||
{ "Danish ISO", "Danish ISO keymap",
|
||||
DMENU_SET_VARIABLE, "keymap=danish.iso", 0, 0 },
|
||||
DMENU_SET_VARIABLE, "keymap=danish.iso", 0, 0, dmenuVarCheck },
|
||||
{ "French ISO", "French ISO keymap",
|
||||
DMENU_SET_VARIABLE, "keymap=fr.iso", 0, 0 },
|
||||
DMENU_SET_VARIABLE, "keymap=fr.iso", 0, 0, dmenuVarCheck },
|
||||
{ "German CP850", "German Code Page 850 keymap",
|
||||
DMENU_SET_VARIABLE, "keymap=german.cp850", 0, 0 },
|
||||
DMENU_SET_VARIABLE, "keymap=german.cp850", 0, 0, dmenuVarCheck },
|
||||
{ "German ISO", "German ISO keymap",
|
||||
DMENU_SET_VARIABLE, "keymap=german.iso", 0, 0 },
|
||||
DMENU_SET_VARIABLE, "keymap=german.iso", 0, 0, dmenuVarCheck },
|
||||
{ "Russian CP866", "Russian Code Page 866 keymap",
|
||||
DMENU_SET_VARIABLE, "keymap=ru.cp866", 0, 0 },
|
||||
DMENU_SET_VARIABLE, "keymap=ru.cp866", 0, 0, dmenuVarCheck },
|
||||
{ "Russian KOI8", "Russian koi8 keymap",
|
||||
DMENU_SET_VARIABLE, "keymap=ru.koi8-r", 0, 0 },
|
||||
DMENU_SET_VARIABLE, "keymap=ru.koi8-r", 0, 0, dmenuVarCheck },
|
||||
{ "Russian s-KOI8", "Russian shifted koi8 keymap",
|
||||
DMENU_SET_VARIABLE, "keymap=ru.koi8-r.shift", 0, 0 },
|
||||
DMENU_SET_VARIABLE, "keymap=ru.koi8-r.shift", 0, 0, dmenuVarCheck},
|
||||
{ "Swedish CP850", "Swedish Code Page 850 keymap",
|
||||
DMENU_SET_VARIABLE, "keymap=swedish.cp850", 0, 0 },
|
||||
DMENU_SET_VARIABLE, "keymap=swedish.cp850", 0, 0, dmenuVarCheck },
|
||||
{ "Swedish ISO", "Swedish ISO keymap",
|
||||
DMENU_SET_VARIABLE, "keymap=swedish.iso", 0, 0 },
|
||||
DMENU_SET_VARIABLE, "keymap=swedish.iso", 0, 0, dmenuVarCheck },
|
||||
{ "U.K. CP850", "United Kingdom Code Page 850 keymap",
|
||||
DMENU_SET_VARIABLE, "keymap=uk.cp850.iso", 0, 0 },
|
||||
DMENU_SET_VARIABLE, "keymap=uk.cp850", 0, 0, dmenuVarCheck },
|
||||
{ "U.K. ISO", "United Kingdom ISO keymap",
|
||||
DMENU_SET_VARIABLE, "keymap=uk.iso", 0, 0 },
|
||||
DMENU_SET_VARIABLE, "keymap=uk.iso", 0, 0, dmenuVarCheck },
|
||||
{ "U.S. ISO", "United States ISO keymap",
|
||||
DMENU_SET_VARIABLE, "keymap=us.iso", 0, 0 },
|
||||
DMENU_SET_VARIABLE, "keymap=us.iso", 0, 0, dmenuVarCheck },
|
||||
{ NULL } },
|
||||
};
|
||||
|
||||
DMenu MenuSysconsKeyrate = {
|
||||
DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
|
||||
DMENU_RADIO_TYPE | DMENU_SELECTION_RETURNS,
|
||||
"System Console Keyboard Repeat Rate",
|
||||
"This menu allows you to set the speed at which keys repeat\n\
|
||||
when held down.",
|
||||
"Choose a keyboard repeat rate",
|
||||
NULL,
|
||||
{ { "Slow", "Slow keyboard repeat rate",
|
||||
DMENU_SET_VARIABLE, "keyrate=slow", 0, 0 },
|
||||
DMENU_SET_VARIABLE, "keyrate=slow", 0, 0, dmenuVarCheck },
|
||||
{ "Normal", "\"Normal\" keyboard repeat rate",
|
||||
DMENU_SET_VARIABLE, "keyrate=normal", 0, 0 },
|
||||
DMENU_SET_VARIABLE, "keyrate=normal", 0, 0, dmenuVarCheck },
|
||||
{ "Fast", "Fast keyboard repeat rate",
|
||||
DMENU_SET_VARIABLE, "keyrate=fast", 0, 0 },
|
||||
DMENU_SET_VARIABLE, "keyrate=fast", 0, 0, dmenuVarCheck },
|
||||
{ "Default", "Use default keyboard repeat rate",
|
||||
DMENU_SET_VARIABLE, "keyrate=NO", 0, 0 },
|
||||
DMENU_SET_VARIABLE, "keyrate=NO", 0, 0, dmenuVarCheck },
|
||||
{ NULL } },
|
||||
};
|
||||
|
||||
static char *
|
||||
menuSaverTimeoutCheck(DMenuItem *item)
|
||||
{
|
||||
return getenv("blanktime") ? "ON" : "OFF";
|
||||
}
|
||||
|
||||
DMenu MenuSysconsSaver = {
|
||||
DMENU_NORMAL_TYPE,
|
||||
DMENU_MULTIPLE_TYPE | DMENU_SELECTION_RETURNS,
|
||||
"System Console Screen Saver",
|
||||
"By default, the console driver will not attempt to do anything\n\
|
||||
special with your screen when it's idle. If you expect to leave your\n\
|
||||
@ -820,14 +937,16 @@ probably enable one of these screen savers to prevent phosphor burn-in.",
|
||||
"Choose a nifty-looking screen saver",
|
||||
NULL,
|
||||
{ { "blank", "Simply blank the screen",
|
||||
DMENU_SET_VARIABLE, "saver=star", 0, 0 },
|
||||
DMENU_SET_VARIABLE, "saver=blank", 0, 0, dmenuVarCheck },
|
||||
{ "Green", "\"Green\" power saving mode (if supported by monitor)",
|
||||
DMENU_SET_VARIABLE, "saver=snake", 0, 0 },
|
||||
DMENU_SET_VARIABLE, "saver=green", 0, 0, dmenuVarCheck },
|
||||
{ "Snake", "Draw a FreeBSD \"snake\" on your screen",
|
||||
DMENU_SET_VARIABLE, "saver=snake", 0, 0 },
|
||||
DMENU_SET_VARIABLE, "saver=snake", 0, 0, dmenuVarCheck },
|
||||
{ "Star", "A \"twinkling stars\" effect",
|
||||
DMENU_SET_VARIABLE, "saver=star", 0, 0 },
|
||||
DMENU_SET_VARIABLE, "saver=star", 0, 0, dmenuVarCheck },
|
||||
{ "Timeout", "Set the screen saver timeout interval",
|
||||
DMENU_CALL, configSaverTimeout, 0, 0 },
|
||||
DMENU_CALL, configSaverTimeout, 0, 0, menuSaverTimeoutCheck },
|
||||
{ "Exit", "Exit this menu (returning to previous)",
|
||||
DMENU_CANCEL, NULL, 0, 0 },
|
||||
{ NULL } },
|
||||
};
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Miscellaneous support routines..
|
||||
*
|
||||
* $Id: misc.c,v 1.10 1995/05/29 11:01:31 jkh Exp $
|
||||
* $Id: misc.c,v 1.11.2.2 1995/06/01 22:32:06 jkh Exp $
|
||||
*
|
||||
* Copyright (c) 1995
|
||||
* Jordan Hubbard. All rights reserved.
|
||||
@ -243,34 +243,3 @@ Mount(char *mountp, void *dev)
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
Mount_DOS(char *mountp, void *dev)
|
||||
{
|
||||
struct ufs_args ufsargs;
|
||||
char device[80];
|
||||
char mountpoint[FILENAME_MAX];
|
||||
|
||||
if (*((char *)dev) != '/') {
|
||||
sprintf(device, "/mnt/dev/%s", (char *)dev);
|
||||
sprintf(mountpoint, "/mnt%s", mountp);
|
||||
}
|
||||
else {
|
||||
strcpy(device, dev);
|
||||
strcpy(mountpoint, mountp);
|
||||
}
|
||||
memset(&ufsargs,0,sizeof ufsargs);
|
||||
|
||||
if (Mkdir(mountpoint, NULL)) {
|
||||
msgConfirm("Unable to make directory mountpoint for %s!", mountpoint);
|
||||
return 1;
|
||||
}
|
||||
msgDebug("mount %s %s\n", device, mountpoint);
|
||||
ufsargs.fspec = device;
|
||||
if (mount(MOUNT_MSDOS, mountpoint, 0, (caddr_t)&ufsargs) == -1) {
|
||||
msgConfirm("Error mounting %s on %s : %s\n", device, mountpoint, strerror(errno));
|
||||
return 1;
|
||||
}
|
||||
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: msg.c,v 1.27 1995/05/29 11:01:32 jkh Exp $
|
||||
* $Id: msg.c,v 1.28.2.2 1995/06/02 15:31:31 jkh Exp $
|
||||
*
|
||||
* Copyright (c) 1995
|
||||
* Jordan Hubbard. All rights reserved.
|
||||
@ -52,10 +52,7 @@
|
||||
Boolean
|
||||
isDebug(void)
|
||||
{
|
||||
char *cp;
|
||||
|
||||
cp = getenv("debug");
|
||||
if (cp && !strcmp(cp, "yes"))
|
||||
if (OptFlags & OPT_DEBUG)
|
||||
return TRUE;
|
||||
return FALSE;
|
||||
}
|
||||
@ -220,7 +217,7 @@ msgConfirm(char *fmt, ...)
|
||||
w = dupwin(newscr);
|
||||
if (OnVTY) {
|
||||
msgDebug("Switching back to VTY 0\n");
|
||||
ioctl(0, VT_RELDISP, 1);
|
||||
ioctl(0, VT_ACTIVATE, 1);
|
||||
msgInfo(NULL);
|
||||
}
|
||||
dialog_notify(errstr);
|
||||
@ -268,7 +265,7 @@ msgYesNo(char *fmt, ...)
|
||||
w = dupwin(newscr);
|
||||
if (OnVTY) {
|
||||
msgDebug("Switching back to VTY 0\n");
|
||||
ioctl(0, VT_RELDISP, 1); /* Switch back */
|
||||
ioctl(0, VT_ACTIVATE, 1); /* Switch back */
|
||||
msgInfo(NULL);
|
||||
}
|
||||
ret = dialog_yesno("User Confirmation Requested", errstr, -1, -1);
|
||||
@ -302,7 +299,7 @@ msgGetInput(char *buf, char *fmt, ...)
|
||||
w = dupwin(newscr);
|
||||
if (OnVTY) {
|
||||
msgDebug("Switching back to VTY 0\n");
|
||||
ioctl(0, VT_RELDISP, 1); /* Switch back */
|
||||
ioctl(0, VT_ACTIVATE, 1); /* Switch back */
|
||||
msgInfo(NULL);
|
||||
}
|
||||
rval = dialog_inputbox("Value Required", errstr, -1, -1, input_buffer);
|
||||
|
@ -4,12 +4,10 @@
|
||||
* This is probably the last attempt in the `sysinstall' line, the next
|
||||
* generation being slated to essentially a complete rewrite.
|
||||
*
|
||||
* $Id: network.c,v 1.5 1995/05/29 11:01:34 jkh Exp $
|
||||
* $Id: network.c,v 1.6.2.14 1995/06/07 09:26:29 jkh Exp $
|
||||
*
|
||||
* Copyright (c) 1995
|
||||
* Jordan Hubbard. All rights reserved.
|
||||
* Copyright (c) 1995
|
||||
* Gary J Palmer. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
@ -47,10 +45,12 @@
|
||||
|
||||
#include "sysinstall.h"
|
||||
#include <sys/fcntl.h>
|
||||
#include <signal.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
static Boolean networkInitialized;
|
||||
static Boolean startPPP(Device *devp);
|
||||
static pid_t pppPid;
|
||||
static pid_t startPPP(Device *devp);
|
||||
|
||||
Boolean
|
||||
mediaInitNetwork(Device *dev)
|
||||
@ -58,16 +58,18 @@ mediaInitNetwork(Device *dev)
|
||||
int i;
|
||||
char *rp;
|
||||
|
||||
if (networkInitialized)
|
||||
if (networkInitialized || (dev->flags & OPT_LEAVE_NETWORK_UP))
|
||||
return TRUE;
|
||||
|
||||
configResolv();
|
||||
if (!strncmp("cuaa", dev->name, 4)) {
|
||||
if (!msgYesNo("You have selected a serial-line network interface.\nDo you want to use PPP with it?")) {
|
||||
if (!startPPP(dev)) {
|
||||
if (!(dev->private = (void *)startPPP(dev))) {
|
||||
msgConfirm("Unable to start PPP! This installation method\ncannot be used.");
|
||||
return FALSE;
|
||||
}
|
||||
networkInitialized = TRUE;
|
||||
return TRUE;
|
||||
}
|
||||
else {
|
||||
char *val;
|
||||
@ -78,8 +80,12 @@ mediaInitNetwork(Device *dev)
|
||||
val = msgGetInput(attach, "Warning: SLIP is rather poorly supported in this revision\nof the installation due to the lack of a dialing utility.\nIf you can use PPP for this instead then you're much better\noff doing so, otherwise SLIP works fairly well for *hardwired*\nlinks. Please edit the following slattach command for\ncorrectness (default here is VJ compression, Hardware flow-control,\nignore carrier and 9600 baud data rate) and hit return to execute it.");
|
||||
if (!val)
|
||||
return FALSE;
|
||||
else if (!vsystem(attach))
|
||||
else
|
||||
strcpy(attach, val);
|
||||
if (!vsystem(attach)) {
|
||||
dev->private = NULL;
|
||||
return TRUE;
|
||||
}
|
||||
else {
|
||||
msgConfirm("slattach returned a bad status! Please verify that\nthe command is correct and try again.");
|
||||
return FALSE;
|
||||
@ -103,9 +109,8 @@ mediaInitNetwork(Device *dev)
|
||||
}
|
||||
|
||||
rp = getenv(VAR_GATEWAY);
|
||||
if (!rp)
|
||||
msgConfirm("No gateway has been set. You will not be able to access hosts\n
|
||||
not on the local network\n");
|
||||
if (!rp || *rp == '0')
|
||||
msgConfirm("No gateway has been set. You may be unable to access hosts\nnot on your local network\n");
|
||||
else
|
||||
vsystem("route add default %s", rp);
|
||||
networkInitialized = TRUE;
|
||||
@ -117,10 +122,9 @@ mediaShutdownNetwork(Device *dev)
|
||||
{
|
||||
char *cp;
|
||||
|
||||
if (!networkInitialized)
|
||||
if (!networkInitialized || (dev->flags & OPT_LEAVE_NETWORK_UP))
|
||||
return;
|
||||
|
||||
/* If we're running PPP or SLIP, it's too much trouble to shut down so forget it */
|
||||
if (strncmp("cuaa", dev->name, 4)) {
|
||||
int i;
|
||||
char ifconfig[64];
|
||||
@ -137,38 +141,53 @@ mediaShutdownNetwork(Device *dev)
|
||||
vsystem("route delete default");
|
||||
networkInitialized = FALSE;
|
||||
}
|
||||
else if (pppPid != 0) {
|
||||
kill(pppPid, SIGTERM);
|
||||
pppPid = 0;
|
||||
}
|
||||
|
||||
int
|
||||
configRoutedFlags(char *str)
|
||||
{
|
||||
char *val;
|
||||
|
||||
val = msgGetInput("-q", "Specify the flags for routed; -q is the default, -s is\na good choice for gateway machines.");
|
||||
if (val)
|
||||
variable_set2("routedflags", val);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Start PPP on the 3rd screen */
|
||||
static Boolean
|
||||
static pid_t
|
||||
startPPP(Device *devp)
|
||||
{
|
||||
int fd, fd2;
|
||||
int vfd, fd2;
|
||||
FILE *fp;
|
||||
char *val;
|
||||
char myaddr[16], provider[16];
|
||||
pid_t pid;
|
||||
char myaddr[16], provider[16], speed[16];
|
||||
|
||||
fd = open("/dev/ttyv2", O_RDWR);
|
||||
if (fd == -1)
|
||||
return FALSE;
|
||||
/* We're going over to VTY2 */
|
||||
vfd = open("/dev/ttyv2", O_RDWR);
|
||||
if (vfd == -1)
|
||||
return 0;
|
||||
|
||||
/* These are needed to make ppp work */
|
||||
Mkdir("/var/log", NULL);
|
||||
Mkdir("/var/spool/lock", NULL);
|
||||
Mkdir("/etc/ppp", NULL);
|
||||
fd2 = open("/etc/ppp/ppp.linkup", O_CREAT);
|
||||
if (fd2 != -1) {
|
||||
fchmod(fd2, 0755);
|
||||
close(fd2);
|
||||
|
||||
/* Get any important user values */
|
||||
val = msgGetInput("115200",
|
||||
"Enter the baud rate for your modem - this can be higher than the actual\nmaximum data rate since most modems can talk at one speed to the\ncomputer and at another speed to the remote end.\n\nIf you're not sure what to put here, just select the default.");
|
||||
strcpy(speed, val ? val : "115200");
|
||||
|
||||
strcpy(provider, getenv(VAR_GATEWAY) ? getenv(VAR_GATEWAY) : "0");
|
||||
val = msgGetInput(provider, "Enter the IP address of your service provider or 0 if you\ndon't know it and would prefer to negotiate it dynamically.");
|
||||
strcpy(provider, val ? val : "0");
|
||||
|
||||
if (devp->private && ((DevInfo *)devp->private)->ipaddr[0])
|
||||
strcpy(myaddr, ((DevInfo *)devp->private)->ipaddr);
|
||||
else
|
||||
strcpy(myaddr, "0");
|
||||
|
||||
fp = fopen("/etc/ppp/ppp.linkup", "w");
|
||||
if (fp != NULL) {
|
||||
fprintf(fp, "MYADDR:\n");
|
||||
fprintf(fp, " delete ALL\n");
|
||||
fprintf(fp, " add 0 0 HISADDR\n");
|
||||
fchmod(fileno(fp), 0755);
|
||||
fclose(fp);
|
||||
}
|
||||
fd2 = open("/etc/ppp/ppp.secret", O_CREAT);
|
||||
if (fd2 != -1) {
|
||||
@ -178,35 +197,27 @@ startPPP(Device *devp)
|
||||
fp = fopen("/etc/ppp/ppp.conf", "w");
|
||||
if (!fp) {
|
||||
msgConfirm("Couldn't open /etc/ppp/ppp.conf file! This isn't going to work");
|
||||
return FALSE;
|
||||
return 0;
|
||||
}
|
||||
fprintf(fp, "default:\n");
|
||||
fprintf(fp, " set speed %s\n", speed);
|
||||
fprintf(fp, " set device %s\n", devp->devname);
|
||||
val = msgGetInput("115200",
|
||||
"Enter the baud rate for your modem - this can be higher than the actual\nmaximum data rate since most modems can talk at one speed to the\ncomputer and at another speed to the remote end.\n\nIf you're not sure what to put here, just select the default.");
|
||||
if (!val)
|
||||
val = "115200";
|
||||
fprintf(fp, " set speed %s\n", val);
|
||||
if (getenv(VAR_GATEWAY))
|
||||
strcpy(provider, getenv(VAR_GATEWAY));
|
||||
else
|
||||
strcpy(provider, "0");
|
||||
val = msgGetInput(provider, "Enter the IP address of your service provider or 0 if you\ndon't know it and would prefer to negotiate it dynamically.");
|
||||
if (!val)
|
||||
val = "0";
|
||||
if (devp->private && ((DevInfo *)devp->private)->ipaddr[0])
|
||||
strcpy(myaddr, ((DevInfo *)devp->private)->ipaddr);
|
||||
else
|
||||
strcpy(myaddr, "0");
|
||||
fprintf(fp, " set ifaddr %s %s\n", myaddr, val);
|
||||
fprintf(fp, " set ifaddr %s %s\n", myaddr, provider);
|
||||
fclose(fp);
|
||||
if (!fork()) {
|
||||
dup2(fd, 0);
|
||||
dup2(fd, 1);
|
||||
dup2(fd, 2);
|
||||
|
||||
if (isDebug())
|
||||
msgDebug("Creating /dev/tun0 device.\n");
|
||||
if (!file_readable("/dev/tun0") && mknod("/dev/tun0", 0600 | S_IFCHR, makedev(52, 0))) {
|
||||
msgConfirm("Warning: No /dev/tun0 device. PPP will not work!");
|
||||
return 0;
|
||||
}
|
||||
if (!(pid = fork())) {
|
||||
dup2(vfd, 0);
|
||||
dup2(vfd, 1);
|
||||
dup2(vfd, 2);
|
||||
execl("/stand/ppp", "/stand/ppp", (char *)NULL);
|
||||
exit(1);
|
||||
}
|
||||
msgConfirm("The PPP command is now started on screen 3 (type ALT-F3 to\ninteract with it, ALT-F1 to switch back here). The only command\nyou'll probably want or need to use is the \"term\" command\nwhich starts a terminal emulator you can use to talk to your\nmodem and dial the service provider. Once you're connected,\ncome back to this screen and press return. DO NOT PRESS RETURN\nHERE UNTIL THE CONNECTION IS FULLY ESTABLISHED!");
|
||||
return TRUE;
|
||||
return pid;
|
||||
}
|
||||
|
@ -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: nfs.c,v 1.3 1995/05/30 05:13:24 jkh Exp $
|
||||
* $Id: nfs.c,v 1.4.2.6 1995/06/10 02:21:40 jkh Exp $
|
||||
*
|
||||
* Copyright (c) 1995
|
||||
* Jordan Hubbard. All rights reserved.
|
||||
@ -58,17 +58,14 @@ mediaInitNFS(Device *dev)
|
||||
if (NFSMounted)
|
||||
return TRUE;
|
||||
|
||||
if (netDevice->init)
|
||||
if (!(*netDevice->init)(netDevice))
|
||||
return FALSE;
|
||||
|
||||
if (Mkdir("/nfs", NULL))
|
||||
return FALSE;
|
||||
|
||||
if (!vsystem("mount_nfs %s %s %s /nfs", getenv("nfsSlowPC") ? "-r 1024 -w 1024" : "",
|
||||
getenv("nfsServerSecure") ? "-P" : "", dev->name))
|
||||
return TRUE;
|
||||
else {
|
||||
if (vsystem("mount_nfs %s %s %s /nfs", (OptFlags & OPT_SLOW_ETHER) ? "-r 1024 -w 1024" : "",
|
||||
(OptFlags & OPT_NFS_SECURE) ? "-P" : "", dev->name)) {
|
||||
msgConfirm("Error mounting %s on /nfs: %s (%u)\n", dev->name, strerror(errno), errno);
|
||||
return FALSE;
|
||||
}
|
||||
@ -77,7 +74,7 @@ mediaInitNFS(Device *dev)
|
||||
}
|
||||
|
||||
int
|
||||
mediaGetNFS(char *file)
|
||||
mediaGetNFS(Device *dev, char *file, Attribs *dist_attrs)
|
||||
{
|
||||
char buf[PATH_MAX];
|
||||
|
||||
@ -96,11 +93,10 @@ mediaShutdownNFS(Device *dev)
|
||||
if (!NFSMounted)
|
||||
return;
|
||||
msgDebug("Unmounting /nfs\n");
|
||||
if (unmount("/nfs", 0) != 0)
|
||||
if (unmount("/nfs", MNT_FORCE) != 0)
|
||||
msgConfirm("Could not unmount the NFS partition: %s\n", strerror(errno));
|
||||
if (isDebug())
|
||||
msgDebug("Unmount returned\n");
|
||||
if (netdev->shutdown)
|
||||
(*netdev->shutdown)(netdev);
|
||||
NFSMounted = FALSE;
|
||||
return;
|
||||
|
@ -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.40 1995/05/29 11:01:37 jkh Exp $
|
||||
* $Id: sysinstall.h,v 1.41.2.20 1995/06/10 09:14:53 jkh Exp $
|
||||
*
|
||||
* Copyright (c) 1995
|
||||
* Jordan Hubbard. All rights reserved.
|
||||
@ -69,6 +69,7 @@
|
||||
#define DEV_NAME_MAX 128 /* The maximum length of a device name */
|
||||
#define DEV_MAX 200 /* The maximum number of devices we'll deal with */
|
||||
#define INTERFACE_MAX 50 /* Maximum number of network interfaces we'll deal with */
|
||||
#define MAX_FTP_RETRIES 3 /* How many times to beat our heads against the wall */
|
||||
|
||||
/*
|
||||
* I make some pretty gross assumptions about having a max of 50 chunks
|
||||
@ -85,7 +86,20 @@
|
||||
#define DISK_LABELLED "_diskLabelled"
|
||||
#define RUNNING_ON_ROOT "_runningOnRoot"
|
||||
#define TCP_CONFIGURED "_tcpConfigured"
|
||||
#define NO_CONFIRMATION "noConfirmation"
|
||||
|
||||
#define FTP_USER "_ftpUser"
|
||||
#define FTP_PASS "_ftpPass"
|
||||
|
||||
#define OPT_NO_CONFIRM 0x0001
|
||||
#define OPT_NFS_SECURE 0x0002
|
||||
#define OPT_DEBUG 0x0004
|
||||
#define OPT_FTP_ACTIVE 0x0008
|
||||
#define OPT_FTP_PASSIVE 0x0010
|
||||
#define OPT_FTP_RESELECT 0x0020
|
||||
#define OPT_FTP_ABORT 0x0040
|
||||
#define OPT_SLOW_ETHER 0x0080
|
||||
#define OPT_EXPLORATORY_GET 0x0100
|
||||
#define OPT_LEAVE_NETWORK_UP 0x0200
|
||||
|
||||
#define VAR_HOSTNAME "hostname"
|
||||
#define VAR_DOMAINNAME "domainname"
|
||||
@ -105,13 +119,13 @@ typedef struct disk Disk;
|
||||
typedef struct chunk Chunk;
|
||||
|
||||
typedef enum {
|
||||
DMENU_SHELL_ESCAPE, /* Fork a shell */
|
||||
DMENU_DISPLAY_FILE, /* Display a file's contents */
|
||||
DMENU_SUBMENU, /* Recurse into another menu */
|
||||
DMENU_SYSTEM_COMMAND, /* Run shell commmand */
|
||||
DMENU_SYSTEM_COMMAND_BOX, /* Same as above, but in prgbox */
|
||||
DMENU_SET_VARIABLE, /* Set an environment/system var */
|
||||
DMENU_SET_FLAG, /* Set flag in an unsigned int */
|
||||
DMENU_SET_VALUE, /* Set unsigned int to value */
|
||||
DMENU_CALL, /* Call back a C function */
|
||||
DMENU_CANCEL, /* Cancel out of this menu */
|
||||
DMENU_NOP, /* Do nothing special for item */
|
||||
@ -124,6 +138,7 @@ typedef struct _dmenuItem {
|
||||
void *ptr; /* Generic data ptr */
|
||||
u_long parm; /* Parameter for above */
|
||||
Boolean disabled; /* Are we temporarily disabled? */
|
||||
char * (*check)(struct _dmenuItem *); /* Our state */
|
||||
} DMenuItem;
|
||||
|
||||
typedef struct _dmenu {
|
||||
@ -172,11 +187,12 @@ typedef struct _device {
|
||||
char *devname;
|
||||
DeviceType type;
|
||||
Boolean enabled;
|
||||
Boolean (*init)(struct _device *);
|
||||
int (*get)(char *file);
|
||||
Boolean (*close)(struct _device *, int fd);
|
||||
void (*shutdown)(struct _device *);
|
||||
Boolean (*init)(struct _device *dev);
|
||||
int (*get)(struct _device *dev, char *file, Attribs *dist_attrs);
|
||||
Boolean (*close)(struct _device *dev, int fd);
|
||||
void (*shutdown)(struct _device *dev);
|
||||
void *private;
|
||||
unsigned int flags;
|
||||
} Device;
|
||||
|
||||
/* Some internal representations of partitions */
|
||||
@ -213,8 +229,6 @@ typedef struct _devPriv {
|
||||
|
||||
/*** Externs ***/
|
||||
extern int DebugFD; /* Where diagnostic output goes */
|
||||
extern Boolean OnCDROM; /* Are we running off of a CDROM? */
|
||||
extern Boolean OnSerial; /* Are we on a serial console? */
|
||||
extern Boolean SystemWasInstalled; /* Did we install it? */
|
||||
extern Boolean RunningAsInit; /* Are we running stand-alone? */
|
||||
extern Boolean DialogActive; /* Is the dialog() stuff up? */
|
||||
@ -223,10 +237,15 @@ extern Boolean OnVTY; /* On a syscons VTY? */
|
||||
extern Variable *VarHead; /* The head of the variable chain */
|
||||
extern Device *mediaDevice; /* Where we're getting our distribution from */
|
||||
extern unsigned int Dists; /* Which distributions we want */
|
||||
extern unsigned int DESDists; /* Which naughty distributions we want */
|
||||
extern unsigned int SrcDists; /* Which src distributions we want */
|
||||
extern unsigned int XF86Dists; /* Which XFree86 dists we want */
|
||||
extern unsigned int XF86ServerDists; /* The XFree86 servers we want */
|
||||
extern unsigned int XF86FontDists; /* The XFree86 fonts we want */
|
||||
extern unsigned int OptFlags; /* Global options */
|
||||
extern int BootMgr; /* Which boot manager to use */
|
||||
extern char *InstallPrefix; /* A location bias */
|
||||
|
||||
|
||||
extern DMenu MenuInitial; /* Initial installation menu */
|
||||
extern DMenu MenuMBRType; /* Type of MBR to write on the disk */
|
||||
@ -234,7 +253,6 @@ extern DMenu MenuConfigure; /* Final configuration menu */
|
||||
extern DMenu MenuDocumentation; /* Documentation menu */
|
||||
extern DMenu MenuOptions; /* Installation options */
|
||||
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 */
|
||||
@ -251,6 +269,7 @@ extern DMenu MenuNetworking; /* Network configuration menu */
|
||||
extern DMenu MenuInstall; /* Installation menu */
|
||||
extern DMenu MenuInstallType; /* Installation type menu */
|
||||
extern DMenu MenuDistributions; /* Distribution menu */
|
||||
extern DMenu MenuDESDistributions; /* DES distribution menu */
|
||||
extern DMenu MenuSrcDistributions; /* Source distribution menu */
|
||||
extern DMenu MenuXF86; /* XFree86 main menu */
|
||||
extern DMenu MenuXF86Select; /* XFree86 distribution selection menu */
|
||||
@ -268,7 +287,7 @@ extern int attr_parse(Attribs **attr, char *file);
|
||||
|
||||
/* cdrom.c */
|
||||
extern Boolean mediaInitCDROM(Device *dev);
|
||||
extern int mediaGetCDROM(char *file);
|
||||
extern int mediaGetCDROM(Device *dev, char *file, Attribs *dist_attrs);
|
||||
extern void mediaShutdownCDROM(Device *dev);
|
||||
|
||||
/* command.c */
|
||||
@ -285,6 +304,11 @@ extern void configResolv(void);
|
||||
extern int configPorts(char *str);
|
||||
extern int configPackages(char *str);
|
||||
extern int configSaverTimeout(char *str);
|
||||
extern int configNTP(char *str);
|
||||
extern int configRoutedFlags(char *str);
|
||||
|
||||
/* crc.c */
|
||||
extern int crc(int, unsigned long *, unsigned long *);
|
||||
|
||||
/* decode.c */
|
||||
extern DMenuItem *decode(DMenu *menu, char *name);
|
||||
@ -298,9 +322,13 @@ extern Device **deviceFind(char *name, DeviceType type);
|
||||
extern int deviceCount(Device **devs);
|
||||
extern Device *new_device(char *name);
|
||||
extern Device *deviceRegister(char *name, char *desc, char *devname, DeviceType type, Boolean enabled,
|
||||
Boolean (*init)(Device *mediadev), int (*get)(char *file),
|
||||
Boolean (*init)(Device *mediadev), int (*get)(Device *dev, char *file, Attribs *dist_attrs),
|
||||
Boolean (*close)(Device *mediadev, int fd), void (*shutDown)(Device *mediadev),
|
||||
void *private);
|
||||
extern Boolean dummyInit(Device *dev);
|
||||
extern int dummyGet(Device *dev, char *dist, Attribs *dist_attrs);
|
||||
extern Boolean dummyClose(Device *dev, int fd);
|
||||
extern void dummyShutdown(Device *dev);
|
||||
|
||||
/* disks.c */
|
||||
extern int diskPartitionEditor(char *unused);
|
||||
@ -309,34 +337,40 @@ extern int diskPartitionEditor(char *unused);
|
||||
extern int distReset(char *str);
|
||||
extern int distSetDeveloper(char *str);
|
||||
extern int distSetXDeveloper(char *str);
|
||||
extern int distSetKernDeveloper(char *str);
|
||||
extern int distSetUser(char *str);
|
||||
extern int distSetXUser(char *str);
|
||||
extern int distSetMinimum(char *str);
|
||||
extern int distSetEverything(char *str);
|
||||
extern int distSetDES(char *str);
|
||||
extern int distSetSrc(char *str);
|
||||
extern int distSetXF86(char *str);
|
||||
extern void distExtractAll(void);
|
||||
|
||||
/* dmenu.c */
|
||||
extern void dmenuOpen(DMenu *menu, int *choice, int *scroll,
|
||||
int *curr, int *max);
|
||||
extern void dmenuOpenSimple(DMenu *menu);
|
||||
extern Boolean dmenuOpen(DMenu *menu, int *choice, int *scroll, int *curr, int *max);
|
||||
extern Boolean dmenuOpenSimple(DMenu *menu);
|
||||
extern char *dmenuVarCheck(DMenuItem *item);
|
||||
extern char *dmenuFlagCheck(DMenuItem *item);
|
||||
extern char *dmenuRadioCheck(DMenuItem *item);
|
||||
|
||||
/* dos.c */
|
||||
extern Boolean mediaInitDOS(Device *dev);
|
||||
extern int mediaGetDOS(char *file);
|
||||
extern int mediaGetDOS(Device *dev, char *file, Attribs *dist_attrs);
|
||||
extern void mediaShutdownDOS(Device *dev);
|
||||
|
||||
/* floppy.c */
|
||||
extern int getRootFloppy(void);
|
||||
extern Boolean mediaInitFloppy(Device *dev);
|
||||
extern int mediaGetFloppy(char *file);
|
||||
extern int mediaGetFloppy(Device *dev, char *file, Attribs *dist_attrs);
|
||||
extern void mediaShutdownFloppy(Device *dev);
|
||||
|
||||
/* ftp_strat.c */
|
||||
extern Boolean mediaCloseFTP(Device *dev, int fd);
|
||||
extern Boolean mediaInitFTP(Device *dev);
|
||||
extern int mediaGetFTP(char *file);
|
||||
extern int mediaGetFTP(Device *dev, char *file, Attribs *dist_attrs);
|
||||
extern void mediaShutdownFTP(Device *dev);
|
||||
extern int mediaSetFtpUserPass(char *str);
|
||||
|
||||
/* globals.c */
|
||||
extern void globalsInit(void);
|
||||
@ -403,7 +437,6 @@ extern char **item_add_pair(char **list, char *item1, char *item2,
|
||||
extern void items_free(char **list, int *curr, int *max);
|
||||
extern int Mkdir(char *, void *data);
|
||||
extern int Mount(char *, void *data);
|
||||
extern int Mount_DOS(char *, void *data);
|
||||
|
||||
/* msg.c */
|
||||
extern Boolean isDebug(void);
|
||||
@ -422,19 +455,16 @@ extern char *msgGetInput(char *buf, char *fmt, ...);
|
||||
/* network.c */
|
||||
extern Boolean mediaInitNetwork(Device *dev);
|
||||
extern void mediaShutdownNetwork(Device *dev);
|
||||
extern int configRoutedFlags(char *str);
|
||||
|
||||
/* nfs.c */
|
||||
extern Boolean mediaInitNFS(Device *dev);
|
||||
extern int mediaGetNFS(char *file);
|
||||
extern int mediaGetNFS(Device *dev, char *file, Attribs *dist_attrs);
|
||||
extern void mediaShutdownNFS(Device *dev);
|
||||
|
||||
/* system.c */
|
||||
extern void systemInitialize(int argc, char **argv);
|
||||
extern void systemShutdown(void);
|
||||
extern void systemWelcome(void);
|
||||
extern int systemExecute(char *cmd);
|
||||
extern int systemShellEscape(void);
|
||||
extern int systemDisplayFile(char *file);
|
||||
extern char *systemHelpFile(char *file, char *buf);
|
||||
extern void systemChangeFont(const u_char font[]);
|
||||
@ -446,12 +476,13 @@ extern int vsystem(char *fmt, ...);
|
||||
|
||||
/* tape.c */
|
||||
extern Boolean mediaInitTape(Device *dev);
|
||||
extern int mediaGetTape(char *file);
|
||||
extern int mediaGetTape(Device *dev, char *file, Attribs *dist_attrs);
|
||||
extern void mediaShutdownTape(Device *dev);
|
||||
|
||||
/* tcpip.c */
|
||||
extern int tcpOpenDialog(Device *dev);
|
||||
extern int tcpDeviceSelect(char *str);
|
||||
extern int tcpMenuSelect(char *str);
|
||||
extern Boolean tcpDeviceSelect(void);
|
||||
|
||||
/* termcap.c */
|
||||
extern int set_termcap(void);
|
||||
@ -459,7 +490,7 @@ extern int set_termcap(void);
|
||||
/* ufs.c */
|
||||
extern void mediaShutdownUFS(Device *dev);
|
||||
extern Boolean mediaInitUFS(Device *dev);
|
||||
extern int mediaGetUFS(char *file);
|
||||
extern int mediaGetUFS(Device *dev, char *file, Attribs *dist_attrs);
|
||||
|
||||
/* variables.c */
|
||||
extern void variable_set(char *var);
|
||||
|
@ -4,7 +4,7 @@
|
||||
* This is probably the last program in the `sysinstall' line - the next
|
||||
* generation being essentially a complete rewrite.
|
||||
*
|
||||
* $Id: system.c,v 1.42 1995/05/29 11:01:39 jkh Exp $
|
||||
* $Id: system.c,v 1.43.2.14 1995/06/09 14:33:36 jkh Exp $
|
||||
*
|
||||
* Jordan Hubbard
|
||||
*
|
||||
@ -36,13 +36,6 @@ handle_intr(int sig)
|
||||
systemShutdown();
|
||||
}
|
||||
|
||||
/* Welcome the user to the system */
|
||||
void
|
||||
systemWelcome(void)
|
||||
{
|
||||
printf("Installation system initializing..\n");
|
||||
}
|
||||
|
||||
/* Initialize system defaults */
|
||||
void
|
||||
systemInitialize(int argc, char **argv)
|
||||
@ -55,23 +48,14 @@ systemInitialize(int argc, char **argv)
|
||||
/* Are we running as init? */
|
||||
if (getpid() == 1) {
|
||||
setsid();
|
||||
if (argc > 1 && strchr(argv[1],'C')) {
|
||||
/* Kernel told us that we are on a CDROM root */
|
||||
close(0); open("/bootcd/dev/console", O_RDWR);
|
||||
close(1); dup(0);
|
||||
close(2); dup(0);
|
||||
OnCDROM = TRUE;
|
||||
chroot("/bootcd");
|
||||
} else {
|
||||
close(0); open("/dev/ttyv0", O_RDWR);
|
||||
close(1); dup(0);
|
||||
close(2); dup(0);
|
||||
}
|
||||
printf("%s running as init\n", argv[0]);
|
||||
|
||||
i = ioctl(0, TIOCSCTTY, (char *)NULL);
|
||||
setlogin("root");
|
||||
setenv("PATH", "/stand:/bin:/sbin:/usr/sbin:/usr/bin:/mnt/bin:/mnt/sbin:/mnt/usr/sbin:/mnt/usr/bin", 1);
|
||||
setenv("PATH", "/stand:/bin:/sbin:/usr/sbin:/usr/bin:/mnt/bin:/mnt/sbin:/mnt/usr/sbin:/mnt/usr/bin:/usr/X11R6/bin", 1);
|
||||
setbuf(stdin, 0);
|
||||
setbuf(stderr, 0);
|
||||
}
|
||||
@ -103,7 +87,7 @@ systemShutdown(void)
|
||||
/* REALLY exit! */
|
||||
if (RunningAsInit) {
|
||||
/* Put the console back */
|
||||
ioctl(DebugFD, VT_RELDISP, 1);
|
||||
ioctl(0, VT_ACTIVATE, 2);
|
||||
reboot(RB_HALT);
|
||||
}
|
||||
else
|
||||
@ -127,39 +111,6 @@ systemExecute(char *command)
|
||||
return status;
|
||||
}
|
||||
|
||||
/* Find and execute a shell */
|
||||
int
|
||||
systemShellEscape(void)
|
||||
{
|
||||
char *sh = NULL;
|
||||
|
||||
if (file_executable("/bin/sh"))
|
||||
sh = "/bin/sh";
|
||||
else if (file_executable("/stand/sh"))
|
||||
sh = "/stand/sh";
|
||||
else {
|
||||
msgWarn("No shell available, sorry!");
|
||||
return 1;
|
||||
}
|
||||
setenv("PS1", "freebsd% ", 1);
|
||||
dialog_clear();
|
||||
dialog_update();
|
||||
move(0, 0);
|
||||
standout();
|
||||
addstr("Type `exit' to leave this shell and continue installation");
|
||||
standend();
|
||||
refresh();
|
||||
end_dialog();
|
||||
DialogActive = FALSE;
|
||||
if (fork() == 0)
|
||||
execlp(sh, "-sh", 0);
|
||||
else
|
||||
wait(NULL);
|
||||
dialog_clear();
|
||||
DialogActive = TRUE;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Display a file in a filebox */
|
||||
int
|
||||
systemDisplayFile(char *file)
|
||||
@ -197,43 +148,41 @@ systemHelpFile(char *file, char *buf)
|
||||
{
|
||||
char *cp;
|
||||
static char oldfile[64]; /* Should be FILENAME_MAX but I don't feel like wasting that much space */
|
||||
static char oldlang[64];
|
||||
char extract[64], *default_lang = "en_US.ISO8859-1";
|
||||
int i;
|
||||
|
||||
if (!file)
|
||||
return NULL;
|
||||
|
||||
if ((cp = getenv("LANG")) != NULL) {
|
||||
snprintf(buf, FILENAME_MAX, "%s/%s", cp, file);
|
||||
if (oldfile[0]) {
|
||||
if (!strcmp(buf, oldfile))
|
||||
return oldfile;
|
||||
else {
|
||||
unlink(oldfile);
|
||||
if ((cp = getenv("LANG")) == NULL)
|
||||
cp = default_lang;
|
||||
|
||||
for (i = 0; i < 2; i++) {
|
||||
snprintf(buf, FILENAME_MAX, "/stand/%s/%s", cp, file);
|
||||
if (file_readable(buf))
|
||||
return buf;
|
||||
if (*oldfile) {
|
||||
int i;
|
||||
|
||||
i = unlink(oldfile);
|
||||
if (isDebug())
|
||||
msgDebug("Unlink(%s) = %d\n", oldfile, i);
|
||||
i = rmdir(oldlang);
|
||||
if (isDebug())
|
||||
msgDebug("rmdir(%s) = %d\n", oldlang, i);
|
||||
oldfile[0] = '\0';
|
||||
}
|
||||
}
|
||||
vsystem("cd /stand && zcat help.tgz | cpio --format=tar -idv %s > /dev/null 2>&1",buf);
|
||||
snprintf(buf, FILENAME_MAX, "/stand/%s/%s", cp, file);
|
||||
snprintf(extract, 64, "%s/%s", cp, file);
|
||||
vsystem("cd /stand && zcat help.tgz | cpio --format=tar -idv %s > /dev/null 2>&1", extract);
|
||||
if (file_readable(buf)) {
|
||||
strcpy(oldfile, buf);
|
||||
sprintf(oldlang, "/stand/%s", cp);
|
||||
return buf;
|
||||
}
|
||||
}
|
||||
/* Fall back to normal imperialistic mode :-) */
|
||||
cp = "en_US.ISO8859-1";
|
||||
snprintf(buf, FILENAME_MAX, "%s/%s", cp, file);
|
||||
if (oldfile[0]) {
|
||||
if (!strcmp(buf, oldfile))
|
||||
return oldfile;
|
||||
else {
|
||||
unlink(oldfile);
|
||||
oldfile[0] = '\0';
|
||||
}
|
||||
}
|
||||
vsystem("cd /stand && zcat help.tgz | cpio --format=tar -idv %s > /dev/null 2>&1",buf);
|
||||
snprintf(buf, FILENAME_MAX, "/stand/%s/%s", cp, file);
|
||||
if (file_readable(buf)) {
|
||||
strcpy(oldfile, buf);
|
||||
return buf;
|
||||
if (cp == default_lang)
|
||||
break;
|
||||
cp = default_lang;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
@ -245,7 +194,6 @@ systemChangeFont(const u_char font[])
|
||||
if (ioctl(0, PIO_FONT8x16, font) < 0)
|
||||
msgConfirm("Sorry! Unable to load font for %s", getenv("LANG"));
|
||||
}
|
||||
dialog_clear();
|
||||
}
|
||||
|
||||
void
|
||||
@ -277,8 +225,10 @@ systemChangeTerminal(char *color, const u_char c_term[],
|
||||
init_acs();
|
||||
cbreak(); noecho();
|
||||
}
|
||||
dialog_clear();
|
||||
}
|
||||
clear();
|
||||
refresh();
|
||||
dialog_clear();
|
||||
}
|
||||
|
||||
void
|
||||
@ -289,7 +239,6 @@ systemChangeScreenmap(const u_char newmap[])
|
||||
msgConfirm("Sorry! Unable to load the screenmap for %s",
|
||||
getenv("LANG"));
|
||||
}
|
||||
dialog_clear();
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -4,12 +4,10 @@
|
||||
* This is probably the last attempt in the `sysinstall' line, the next
|
||||
* generation being slated to essentially a complete rewrite.
|
||||
*
|
||||
* $Id: tape.c,v 1.4 1995/05/29 11:01:40 jkh Exp $
|
||||
* $Id: tape.c,v 1.5.2.6 1995/06/05 15:33:09 jkh Exp $
|
||||
*
|
||||
* Copyright (c) 1995
|
||||
* Jordan Hubbard. All rights reserved.
|
||||
* Copyright (c) 1995
|
||||
* Gary J Palmer. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
@ -59,17 +57,15 @@ mediaInitTape(Device *dev)
|
||||
if (tapeInitted)
|
||||
return TRUE;
|
||||
|
||||
Mkdir("/usr/tmp/tape", NULL);
|
||||
if (chdir("/usr/tmp/tape")) {
|
||||
Mkdir("/var/tmp/tape", NULL);
|
||||
if (chdir("/var/tmp/tape"))
|
||||
Mkdir(dev->private, NULL);
|
||||
if (chdir(dev->private))
|
||||
return FALSE;
|
||||
}
|
||||
msgConfirm("Insert tape into %s and press return", dev->description);
|
||||
msgNotify("Attempting to extract from %s...", dev->description);
|
||||
if (!strcmp(dev->name, "ft0"))
|
||||
i = vsystem("ft | tar xvf -");
|
||||
i = vsystem("ft | cpio -iduVm -H tar");
|
||||
else
|
||||
i = vsystem("tar xvf %s", dev->devname);
|
||||
i = vsystem("cpio -iBduVm -H tar -I %s", dev->devname);
|
||||
if (!i) {
|
||||
tapeInitted = TRUE;
|
||||
return TRUE;
|
||||
@ -80,14 +76,14 @@ mediaInitTape(Device *dev)
|
||||
}
|
||||
|
||||
int
|
||||
mediaGetTape(char *file)
|
||||
mediaGetTape(Device *dev, char *file, Attribs *dist_attrs)
|
||||
{
|
||||
char buf[PATH_MAX];
|
||||
|
||||
sprintf(buf, "/usr/tmp/tape/%s", file);
|
||||
if (!access(buf, R_OK))
|
||||
sprintf(buf, "%s/%s", (char *)dev->private, file);
|
||||
if (file_readable(buf))
|
||||
return open(buf, O_RDONLY);
|
||||
sprintf(buf, "/var/tmp/tape/%s", file);
|
||||
sprintf(buf, "%s/dists/%s", (char *)dev->private, file);
|
||||
return open(buf, O_RDONLY);
|
||||
}
|
||||
|
||||
@ -96,9 +92,9 @@ mediaShutdownTape(Device *dev)
|
||||
{
|
||||
if (!tapeInitted)
|
||||
return;
|
||||
if (!access("/usr/tmp/tape", X_OK))
|
||||
(void)vsystem("rm -rf /usr/tmp/tape");
|
||||
else if (!access("/var/tmp/tape", X_OK))
|
||||
(void)vsystem("rm -rf /var/tmp/tape");
|
||||
if (!access(dev->private, X_OK)) {
|
||||
msgNotify("Cleaning up results of tape extract..");
|
||||
(void)vsystem("rm -rf %s", (char *)dev->private);
|
||||
}
|
||||
tapeInitted = FALSE;
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: tcpip.c,v 1.28 1995/05/29 12:32:41 jkh Exp $
|
||||
* $Id: tcpip.c,v 1.29.2.8 1995/06/06 06:08:29 jkh Exp $
|
||||
*
|
||||
* Copyright (c) 1995
|
||||
* Gary J Palmer. All rights reserved.
|
||||
@ -83,7 +83,7 @@ typedef struct _layout {
|
||||
|
||||
static Layout layout[] = {
|
||||
{ 1, 2, 25, HOSTNAME_FIELD_LEN - 1,
|
||||
"Host name:", "The name of your machine on a network, e.g. foo.bar.com",
|
||||
"Host name:", "Your fully-qualified hostname, e.g. foo.bar.com",
|
||||
hostname, STRINGOBJ, NULL },
|
||||
#define LAYOUT_HOSTNAME 0
|
||||
{ 1, 35, 20, HOSTNAME_FIELD_LEN - 1,
|
||||
@ -392,8 +392,10 @@ tcpOpenDialog(Device *devp)
|
||||
if (!cancel) {
|
||||
DevInfo *di;
|
||||
char temp[512], ifn[64];
|
||||
char *ifaces;
|
||||
|
||||
variable_set2(VAR_HOSTNAME, hostname);
|
||||
if (domainname[0])
|
||||
variable_set2(VAR_DOMAINNAME, domainname);
|
||||
if (gateway[0])
|
||||
variable_set2(VAR_GATEWAY, gateway);
|
||||
@ -410,8 +412,14 @@ tcpOpenDialog(Device *devp)
|
||||
sprintf(temp, "inet %s %s netmask %s", ipaddr, extras, netmask);
|
||||
sprintf(ifn, "%s%s", VAR_IFCONFIG, devp->name);
|
||||
variable_set2(ifn, temp);
|
||||
sprintf(ifn, "%s %s", devp->name, getenv(VAR_INTERFACES) ? getenv(VAR_INTERFACES) : "");
|
||||
ifaces = getenv(VAR_INTERFACES);
|
||||
if (!ifaces)
|
||||
variable_set2(VAR_INTERFACES, ifaces = "lo0");
|
||||
/* Only add it if it's not there already */
|
||||
if (!strstr(ifaces, devp->name)) {
|
||||
sprintf(ifn, "%s %s", devp->name, ifaces);
|
||||
variable_set2(VAR_INTERFACES, ifn);
|
||||
}
|
||||
if (ipaddr[0])
|
||||
variable_set2(VAR_IPADDR, ipaddr);
|
||||
return 0;
|
||||
@ -438,15 +446,41 @@ netHook(char *str)
|
||||
}
|
||||
|
||||
/* Get a network device */
|
||||
int
|
||||
tcpDeviceSelect(char *str)
|
||||
Boolean
|
||||
tcpDeviceSelect(void)
|
||||
{
|
||||
DMenu *menu;
|
||||
Device **devs;
|
||||
int cnt;
|
||||
int status;
|
||||
|
||||
devs = deviceFind(NULL, DEVICE_TYPE_NETWORK);
|
||||
cnt = deviceCount(devs);
|
||||
if (!cnt) {
|
||||
msgConfirm("No network devices available!");
|
||||
status = FALSE;
|
||||
}
|
||||
else if (cnt == 1) {
|
||||
tcpOpenDialog(devs[0]);
|
||||
mediaDevice = devs[0];
|
||||
status = TRUE;
|
||||
}
|
||||
else {
|
||||
|
||||
menu = deviceCreateMenu(&MenuNetworkDevice, DEVICE_TYPE_NETWORK, netHook);
|
||||
if (!menu)
|
||||
msgFatal("Unable to create network device menu! Argh!");
|
||||
dmenuOpenSimple(menu);
|
||||
status = dmenuOpenSimple(menu);
|
||||
free(menu);
|
||||
}
|
||||
return status;
|
||||
}
|
||||
|
||||
/* Do it from a menu that doesn't care about status */
|
||||
int
|
||||
tcpMenuSelect(char *str)
|
||||
{
|
||||
(void)tcpDeviceSelect();
|
||||
configResolv();
|
||||
return 0;
|
||||
}
|
||||
|
@ -29,21 +29,16 @@ set_termcap(void)
|
||||
char *term;
|
||||
int stat;
|
||||
|
||||
OnVTY = OnSerial = FALSE;
|
||||
if (getpid() != 1)
|
||||
DebugFD = open("sysinstall.debug", O_WRONLY|O_CREAT|O_TRUNC, 0644);
|
||||
else {
|
||||
int i, on;
|
||||
OnVTY = RunningAsInit = FALSE;
|
||||
|
||||
DebugFD = open("/dev/ttyv1", O_WRONLY);
|
||||
on = 1;
|
||||
i = ioctl(DebugFD, TIOCCONS, (char *)&on);
|
||||
msgDebug("ioctl(%d, TIOCCONS, NULL) = %d (%s)\n", DebugFD, i, !i ? "success" : strerror(errno));
|
||||
RunningAsInit = TRUE;
|
||||
OnVTY = TRUE;
|
||||
}
|
||||
term = getenv("TERM");
|
||||
stat = ioctl(STDERR_FILENO, GIO_COLOR, &ColorDisplay);
|
||||
|
||||
if (getpid() != 1)
|
||||
DebugFD = open("sysinstall.debug", O_WRONLY|O_CREAT|O_TRUNC, 0644);
|
||||
else
|
||||
RunningAsInit = TRUE;
|
||||
|
||||
if (stat < 0) {
|
||||
if (!term) {
|
||||
if (setenv("TERM", "vt100", 1) < 0)
|
||||
@ -53,9 +48,15 @@ set_termcap(void)
|
||||
}
|
||||
if (DebugFD == -1)
|
||||
DebugFD = dup(1);
|
||||
OnSerial = TRUE;
|
||||
}
|
||||
else {
|
||||
int i, on;
|
||||
|
||||
DebugFD = open("/dev/ttyv1", O_WRONLY);
|
||||
on = 1;
|
||||
i = ioctl(DebugFD, TIOCCONS, (char *)&on);
|
||||
msgDebug("ioctl(%d, TIOCCONS, NULL) = %d (%s)\n", DebugFD, i, !i ? "success" : strerror(errno));
|
||||
OnVTY = TRUE;
|
||||
if (ColorDisplay) {
|
||||
if (!term) {
|
||||
if (setenv("TERM", "cons25", 1) < 0)
|
||||
@ -72,7 +73,6 @@ set_termcap(void)
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
OnVTY = TRUE;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -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: ufs.c,v 1.3 1995/05/29 11:01:42 jkh Exp $
|
||||
* $Id: ufs.c,v 1.4.2.2 1995/06/05 12:04:09 jkh Exp $
|
||||
*
|
||||
* Copyright (c) 1995
|
||||
* Jordan Hubbard. All rights reserved.
|
||||
@ -50,13 +50,13 @@
|
||||
/* No init or shutdown routines necessary - all done in mediaSetUFS() */
|
||||
|
||||
int
|
||||
mediaGetUFS(char *file)
|
||||
mediaGetUFS(Device *dev, char *file, Attribs *dist_attrs)
|
||||
{
|
||||
char buf[PATH_MAX];
|
||||
|
||||
snprintf(buf, PATH_MAX, "%s/%s", (char *)mediaDevice->private, file);
|
||||
snprintf(buf, PATH_MAX, "%s/%s", dev->private, file);
|
||||
if (!access(buf, R_OK))
|
||||
return open(buf, O_RDONLY);
|
||||
snprintf(buf, PATH_MAX, "%s/dists/%s", (char *)mediaDevice->private, file);
|
||||
snprintf(buf, PATH_MAX, "%s/dists/%s", dev->private, file);
|
||||
return open(buf, O_RDONLY);
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
* This is probably the last program in the `sysinstall' line - the next
|
||||
* generation being essentially a complete rewrite.
|
||||
*
|
||||
* $Id: variable.c,v 1.4 1995/05/27 10:47:44 jkh Exp $
|
||||
* $Id: variable.c,v 1.5.2.2 1995/06/01 21:04:03 jkh Exp $
|
||||
*
|
||||
* Copyright (c) 1995
|
||||
* Jordan Hubbard. All rights reserved.
|
||||
@ -50,6 +50,14 @@ make_variable(char *var, char *value)
|
||||
{
|
||||
Variable *newvar;
|
||||
|
||||
/* First search to see if it's already there */
|
||||
for (newvar = VarHead; newvar; newvar = newvar->next) {
|
||||
if (!strcmp(newvar->name, var)) {
|
||||
strncpy(newvar->value, value, VAR_VALUE_MAX);
|
||||
setenv(var, value, 1);
|
||||
return;
|
||||
}
|
||||
}
|
||||
setenv(var, value, 1);
|
||||
newvar = (Variable *)safe_malloc(sizeof(Variable));
|
||||
strncpy(newvar->name, var, VAR_NAME_MAX);
|
||||
@ -57,7 +65,8 @@ make_variable(char *var, char *value)
|
||||
newvar->next = VarHead;
|
||||
VarHead = newvar;
|
||||
setenv(newvar->name, newvar->value, 1);
|
||||
msgInfo("Set %s to %s", newvar->name, newvar->value);
|
||||
if (isDebug())
|
||||
msgDebug("Setting variable %s to %s\n", newvar->name, newvar->value);
|
||||
}
|
||||
|
||||
void
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user