Merge RELENG_2_0_5 into HEAD

This commit is contained in:
Rodney W. Grimes 1995-06-11 19:33:05 +00:00
parent 67eb1e0ed1
commit d3628763db
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=9202
200 changed files with 6714 additions and 5003 deletions

View File

@ -1,5 +1,5 @@
# From: @(#)Makefile 5.1 (Berkeley) 6/25/90 # 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 SUBDIR= include des acl kdb krb libkadm
@ -12,22 +12,26 @@ SUBDIR+= ext_srvtab kdb_destroy kdb_edit \
SDIR= ${.CURDIR}/.. SDIR= ${.CURDIR}/..
CODAI?= ${MAKE} ${MFLAGS} cleandir; \ CODAI= ${MAKE} ${MFLAGS} cleandir; \
${MAKE} ${MFLAGS} obj; ${MAKE} ${MFLAGS} depend all install ${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 # These are the programs which depend on kerberos
# It's nice to know who they are
kprog: kprog:
cd ${SDIR}/bin/rcp; ${CODAI} cd ${SDIR}/bin/rcp; ${CODAI}
cd ${SDIR}/libexec/rlogind; ${CODAI} cd ${SDIR}/libexec/rlogind; ${CODAI}
cd ${SDIR}/libexec/rshd; ${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/login; ${CODAI}
cd ${SDIR}/usr.bin/passwd; ${CODAI} cd ${SDIR}/usr.bin/passwd; ${CODAI}
cd ${SDIR}/usr.bin/rlogin; ${CODAI} cd ${SDIR}/usr.bin/rlogin; ${CODAI}
cd ${SDIR}/usr.bin/rsh; ${CODAI} cd ${SDIR}/usr.bin/rsh; ${CODAI}
cd ${SDIR}/usr.bin/su; ${CODAI} cd ${SDIR}/usr.bin/su; ${CODAI}
cd ${SDIR}/usr.bin/passwd; ${CODAI}
cd ${SDIR}/libexec/kpasswdd; ${CODAI}
bootstrap: bootstrap:
cd include; ${MAKE} ${MFLAGS} install cd include; ${MAKE} ${MFLAGS} install
@ -40,17 +44,16 @@ bootstrap:
${MAKE} ${MFLAGS} depend all install kprog ${MAKE} ${MFLAGS} depend all install kprog
help-distribute: distribute help-distribute: distribute
cd ${SDIR}/bin/rcp; ${MAKE} ${MFLAGS} distribute cd ${SDIR}/bin/rcp; ${CODAD}
cd ${SDIR}/libexec/rlogind; ${MAKE} ${MFLAGS} distribute cd ${SDIR}/libexec/rlogind; ${CODAD}
cd ${SDIR}/libexec/rshd; ${MAKE} ${MFLAGS} distribute cd ${SDIR}/libexec/rshd; ${CODAD}
cd ${SDIR}/usr.bin/login; ${MAKE} ${MFLAGS} distribute cd ${SDIR}/sbin/mount_nfs; ${CODAD}
cd ${SDIR}/usr.bin/passwd; ${MAKE} ${MFLAGS} distribute cd ${SDIR}/sbin/nfsd; ${CODAD}
cd ${SDIR}/usr.bin/rlogin; ${MAKE} ${MFLAGS} distribute cd ${SDIR}/usr.bin/login; ${CODAD}
cd ${SDIR}/usr.bin/rsh; ${MAKE} ${MFLAGS} distribute cd ${SDIR}/usr.bin/passwd; ${CODAD}
cd ${SDIR}/usr.bin/su; ${MAKE} ${MFLAGS} distribute cd ${SDIR}/usr.bin/rlogin; ${CODAD}
cd ${SDIR}/usr.bin/passwd; ${MAKE} ${MFLAGS} distribute cd ${SDIR}/usr.bin/rsh; ${CODAD}
cd ${SDIR}/libexec/kpasswdd; ${MAKE} ${MFLAGS} distribute cd ${SDIR}/usr.bin/su; ${CODAD}
.include <bsd.subdir.mk> .include <bsd.subdir.mk>

View File

@ -18,7 +18,7 @@
Modified for use with FreeBSD 2.x by Bill Paul (wpaul@ctr.columbia.edu) 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> #include <stdio.h>
@ -203,7 +203,7 @@ _svc_run( void)
perror("svc_run: - select failed"); perror("svc_run: - select failed");
return; return;
case 0: case 0:
fprintf(stderr, "%sh: callback timed out\n, progname"); fprintf(stderr, "%s: callback timed out\n", progname);
exit(0); exit(0);
default: default:
svc_getreqset(&readfds); svc_getreqset(&readfds);
@ -421,16 +421,16 @@ main(int argc, char **argv)
if (DomainName==NULL) { if (DomainName==NULL) {
if (yp_get_default_domain(&DomainName)!=0) { if (yp_get_default_domain(&DomainName)!=0) {
fprintf(stderr, "%s: cannot get default domain\n, fprintf(stderr, "%s: cannot get default domain\n",
progname"); progname);
exit(1); exit(1);
} }
} }
ThisHost=getHostName(); ThisHost=getHostName();
if (ThisHost==NULL) { if (ThisHost==NULL) {
fprintf(stderr, "%s: cannot determine local hostname\n, fprintf(stderr, "%s: cannot determine local hostname\n",
progname"); progname);
exit(1); exit(1);
} }

View File

@ -496,6 +496,15 @@ static void
_pw_breakout_yp(struct passwd *pw, char *result, int master) _pw_breakout_yp(struct passwd *pw, char *result, int master)
{ {
char *s; 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 */ s = strsep(&result, ":"); /* name */
if(!(pw->pw_fields & _PWF_NAME) || (pw->pw_name[0] == '+')) { if(!(pw->pw_fields & _PWF_NAME) || (pw->pw_name[0] == '+')) {

View File

@ -6,7 +6,7 @@
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp * 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 <sys/types.h>
#include "libdisk.h" #include "libdisk.h"
#if 0
struct disk * struct disk *
Set_Phys_Geom(struct disk *disk, u_long cyl, u_long hd, u_long sect) 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); Free_Disk(disk);
return d; return d;
} }
#endif
void void
Set_Bios_Geom(struct disk *disk, u_long cyl, u_long hd, u_long sect) Set_Bios_Geom(struct disk *disk, u_long cyl, u_long hd, u_long sect)

View File

@ -6,7 +6,7 @@
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp * 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__; 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 void
Print_Chunk(struct chunk *c1,int offset) Print_Chunk(struct chunk *c1,int offset)
{ {
@ -270,14 +286,10 @@ Print_Chunk(struct chunk *c1,int offset)
for(;i<offset;i++) putchar('-'); for(;i<offset;i++) putchar('-');
putchar('>'); putchar('>');
for(;i<10;i++) 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, c1, c1->offset, c1->size, c1->end, c1->name,
chunk_n[c1->type],c1->subtype); chunk_n[c1->type],c1->subtype,
if (c1->flags & CHUNK_ALIGN) putchar('='); ShowChunkFlags(c1));
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');
putchar('\n'); putchar('\n');
Print_Chunk(c1->part,offset + 2); Print_Chunk(c1->part,offset + 2);
Print_Chunk(c1->next,offset); Print_Chunk(c1->next,offset);
@ -354,6 +366,7 @@ Delete_Chunk(struct disk *d, struct chunk *c)
return 0; return 0;
} }
#if 0
int int
Collapse_Chunk(struct disk *d, struct chunk *c1) Collapse_Chunk(struct disk *d, struct chunk *c1)
{ {
@ -417,3 +430,4 @@ Collapse_Chunk(struct disk *d, struct chunk *c1)
return 0; return 0;
} }
#endif

View File

@ -6,7 +6,7 @@
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp * 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"); warn("Not enough unused space");
return 0; return 0;
found: found:
if (c1->flags & CHUNK_BAD144) { if (parent->flags & CHUNK_BAD144) {
edge = c1->end - d->bios_sect - 127; edge = c1->end - d->bios_sect - 127;
if (offset > edge) if (offset > edge)
return 0; return 0;

View File

@ -6,7 +6,7 @@
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp * 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); close(fd);
Fixup_Names(d); Fixup_Names(d);
Bios_Limit_Chunk(d->chunks,1024*d->bios_hd*d->bios_sect);
return d; return d;
} }
@ -207,7 +208,9 @@ Debug_Disk(struct disk *d)
{ {
printf("Debug_Disk(%s)",d->name); printf("Debug_Disk(%s)",d->name);
printf(" flags=%lx",d->flags); printf(" flags=%lx",d->flags);
#if 0
printf(" real_geom=%lu/%lu/%lu",d->real_cyl,d->real_hd,d->real_sect); 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(" bios_geom=%lu/%lu/%lu\n",d->bios_cyl,d->bios_hd,d->bios_sect);
printf(" boot1=%p, boot2=%p, bootmgr=%p\n", printf(" boot1=%p, boot2=%p, bootmgr=%p\n",
d->boot1,d->boot2,d->bootmgr); d->boot1,d->boot2,d->bootmgr);
@ -250,6 +253,7 @@ Clone_Disk(struct disk *d)
return d2; return d2;
} }
#if 0
void void
Collapse_Disk(struct disk *d) Collapse_Disk(struct disk *d)
{ {
@ -257,6 +261,7 @@ Collapse_Disk(struct disk *d)
while(Collapse_Chunk(d,d->chunks)) while(Collapse_Chunk(d,d->chunks))
; ;
} }
#endif
static char * device_list[] = {"wd","sd",0}; static char * device_list[] = {"wd","sd",0};

View File

@ -6,7 +6,7 @@
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp * 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; char *name;
u_long flags; u_long flags;
# define DISK_ON_TRACK 1 # define DISK_ON_TRACK 1
#if 0
u_long real_cyl; u_long real_cyl;
u_long real_hd; u_long real_hd;
u_long real_sect; u_long real_sect;
#endif
u_long bios_cyl; u_long bios_cyl;
u_long bios_hd; u_long bios_hd;
u_long bios_sect; u_long bios_sect;
@ -103,11 +105,13 @@ Debug_Disk(struct disk *disk);
/* Print the content of the tree to stdout /* Print the content of the tree to stdout
*/ */
#if 0
struct disk * struct disk *
Set_Phys_Geom(struct disk *disk, u_long cyl, u_long heads, u_long sects); 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. /* Use a different physical geometry. Makes sense for ST506 disks only.
* The tree returned is read from the disk, using this geometry. * The tree returned is read from the disk, using this geometry.
*/ */
#endif
void void
Set_Bios_Geom(struct disk *disk, u_long cyl, u_long heads, u_long sects); 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); MakeDevDisk(struct disk *d,char *path);
/* Make device nodes for all chunks on this disk */ /* 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 <<< * Implementation details >>> DO NOT USE <<<
*/ */

View File

@ -6,7 +6,7 @@
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp * 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: * Rule#4:
* Max seven 'part' as children of 'freebsd' * Max seven 'part' as children of 'freebsd'
* Max one FS_SWAP child per 'freebsd'
* Max one CHUNK_IS_ROOT 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 void
Rule_004(struct disk *d, struct chunk *c, char *msg) 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; struct chunk *c1;
u_long l;
if (c->type != freebsd) if (c->type != freebsd)
return; 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) { for (c1=c->part; c1; c1=c1->next) {
if (c1->type != part) if (c1->type != part)
continue; continue;
if (c1->subtype == FS_SWAP)
j++;
if (c1->flags & CHUNK_IS_ROOT) { if (c1->flags & CHUNK_IS_ROOT) {
k++; k++;
if (c1->flags & CHUNK_PAST_1024) if (c1->flags & CHUNK_PAST_1024)
@ -205,15 +227,11 @@ Rule_004(struct disk *d, struct chunk *c, char *msg)
} }
if (i > 7) { if (i > 7) {
sprintf(msg+strlen(msg), sprintf(msg+strlen(msg),
"Max seven 'part' per 'freebsd' chunk\n"); "Max seven partitions per freebsd slice\n");
}
if (j > 1) {
sprintf(msg+strlen(msg),
"Max one subtype=FS_SWAP child per 'freebsd' chunk\n");
} }
if (k > 1) { if (k > 1) {
sprintf(msg+strlen(msg), 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 strdup(msg);
return 0; 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;
}

View File

@ -6,7 +6,7 @@
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp * 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)); strtol(cmds[3],0,0));
continue; continue;
} }
#if 0
if (!strcasecmp(*cmds,"phys") && ncmd == 4) { if (!strcasecmp(*cmds,"phys") && ncmd == 4) {
d = Set_Phys_Geom(d, d = Set_Phys_Geom(d,
strtol(cmds[1],0,0), strtol(cmds[1],0,0),
@ -206,6 +207,8 @@ main(int argc, char **argv)
strtol(cmds[3],0,0)); strtol(cmds[3],0,0));
continue; continue;
} }
#endif
#if 0
if (!strcasecmp(*cmds,"collapse")) { if (!strcasecmp(*cmds,"collapse")) {
if (cmds[1]) if (cmds[1])
while (Collapse_Chunk(d, while (Collapse_Chunk(d,
@ -215,6 +218,7 @@ main(int argc, char **argv)
Collapse_Disk(d); Collapse_Disk(d);
continue; continue;
} }
#endif
if (!strcasecmp(*cmds,"list")) { if (!strcasecmp(*cmds,"list")) {
cp = Disk_Names(); cp = Disk_Names();
printf("Disks:"); printf("Disks:");
@ -279,13 +283,17 @@ main(int argc, char **argv)
printf("\tbios cyl hd sect\n"); printf("\tbios cyl hd sect\n");
printf("\tboot\n"); printf("\tboot\n");
printf("\tbteasy17\n"); printf("\tbteasy17\n");
#if 0
printf("\tcollapse [pointer]\n"); printf("\tcollapse [pointer]\n");
#endif
printf("\tcreate offset size enum subtype flags\n"); printf("\tcreate offset size enum subtype flags\n");
printf("\t\tsubtype(part): swap=1, ffs=7\n"); printf("\t\tsubtype(part): swap=1, ffs=7\n");
printf("\tdelete pointer\n"); printf("\tdelete pointer\n");
printf("\tlist\n"); printf("\tlist\n");
printf("\tmbr\n"); printf("\tmbr\n");
#if 0
printf("\tphys cyl hd sect\n"); printf("\tphys cyl hd sect\n");
#endif
printf("\tquit\n"); printf("\tquit\n");
printf("\tread [disk]\n"); printf("\tread [disk]\n");
printf("\tscan\n"); printf("\tscan\n");

View File

@ -6,7 +6,7 @@
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp * 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_secsize = 512;
dl->d_secperunit = new->chunks->size; dl->d_secperunit = new->chunks->size;
#if 0
dl->d_secpercyl = new->real_cyl ? new->real_cyl : new->bios_cyl; 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_ntracks = new->real_hd ? new->real_hd : new->bios_hd;
dl->d_nsectors = new->real_sect ? new->real_sect : new->bios_sect; 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_secpercyl = dl->d_ntracks * dl->d_nsectors;
dl->d_npartitions = MAXPARTITIONS; dl->d_npartitions = MAXPARTITIONS;

View File

@ -20,7 +20,7 @@ int pwok;
/* Try s/key authentication even when the UNIX password is permitted. */ /* 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) { && skeyverify(&skey, pp) == 0) {
/* s/key authentication succeeded */ /* s/key authentication succeeded */
return (pwd->pw_passwd); return (pwd->pw_passwd);

View File

@ -16,7 +16,7 @@ int pwok;
int sflag; int sflag;
/* Attempt an s/key challenge. */ /* Attempt an s/key challenge. */
sflag = skeychallenge(&skey, username, buf); sflag = skeyinfo(&skey, username, buf);
if (!sflag) if (!sflag)
printf("%s\n", buf); printf("%s\n", buf);

View File

@ -69,6 +69,10 @@ static struct in_addr *lookup_internet_addr();
#define PERMIT 1 #define PERMIT 1
#define DENY 0 #define DENY 0
#ifndef CONSOLE
#define CONSOLE "console"
#endif
struct login_info { struct login_info {
char *host_name; /* host name */ char *host_name; /* host name */
struct in_addr *internet_addr; /* null terminated list */ struct in_addr *internet_addr; /* null terminated list */
@ -163,7 +167,7 @@ struct login_info *login_info;
int permission; int permission;
#ifdef PERMIT_CONSOLE #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); return (1);
#endif #endif

View File

@ -26,29 +26,30 @@ int skeylookup __P((struct skey *mp,char *name));
#define setpriority(x,y,z) /* nothing */ #define setpriority(x,y,z) /* nothing */
/* Issue a skey challenge for user 'name'. If successful, /* Look up skey info for user 'name'. If successful, fill in the caller's
* fill in the caller's skey structure and return 0. If unsuccessful * skey structure and return 0. If unsuccessful (e.g., if name is unknown)
* (e.g., if name is unknown) return -1. * return -1. If an optional challenge string buffer is given, update it.
* *
* The file read/write pointer is left at the start of the * The file read/write pointer is left at the start of the
* record. * record.
*/ */
int int
getskeyprompt(mp,name,prompt) skeyinfo(mp,name,ss)
struct skey *mp; struct skey *mp;
char *name; char *name;
char *prompt; char *ss;
{ {
int rval; int rval;
sevenbit(name);
rval = skeylookup(mp,name); rval = skeylookup(mp,name);
strcpy(prompt,"s/key 55 latour1\n");
switch(rval){ switch(rval){
case -1: /* File error */ case -1: /* File error */
return -1; return -1;
case 0: /* Lookup succeeded, return challenge */ case 0: /* Lookup succeeded */
sprintf(prompt,"s/key %d %s\n",mp->n - 1,mp->seed); if (ss != 0) {
sprintf(ss, "s/key %d %s",mp->n - 1,mp->seed);
fclose(mp->keyfile);
}
return 0; return 0;
case 1: /* User not found */ case 1: /* User not found */
fclose(mp->keyfile); fclose(mp->keyfile);
@ -173,7 +174,6 @@ char *response;
{ {
struct timeval startval; struct timeval startval;
struct timeval endval; struct timeval endval;
long microsec;
char key[8]; char key[8];
char fkey[8]; char fkey[8];
char filekey[8]; char filekey[8];
@ -211,9 +211,6 @@ long microsec;
*/ */
setpriority(PRIO_PROCESS, 0, -4); setpriority(PRIO_PROCESS, 0, -4);
/*
gettimeofday(&startval, (char *)0 );
*/
/* reread the file record NOW*/ /* reread the file record NOW*/
@ -256,12 +253,6 @@ long microsec;
fseek(mp->keyfile,mp->recstart,0); fseek(mp->keyfile,mp->recstart,0);
fprintf(mp->keyfile,"%s %04d %-16s %s %-21s\n",mp->logname,mp->n,mp->seed, fprintf(mp->keyfile,"%s %04d %-16s %s %-21s\n",mp->logname,mp->n,mp->seed,
mp->val, tbuf); 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); fclose(mp->keyfile);

View File

@ -1,20 +1,15 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#ifdef __MSDOS__
#include <dos.h>
#endif
#ifdef unix
#include <fcntl.h> #include <fcntl.h>
#include <termios.h> #include <termios.h>
#include <signal.h> #include <signal.h>
#endif
#include "skey.h" #include "skey.h"
#include "mdx.h" #include "mdx.h"
/* Crunch a key: /* 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. * collapse to 64 bits. This is defined as the user's starting key.
*/ */
int int
@ -64,7 +59,6 @@ char *x;
results[0] ^= results[2]; results[0] ^= results[2];
results[1] ^= results[3]; results[1] ^= results[3];
/* Only works on byte-addressed little-endian machines!! */
memcpy(x,(char *)results,8); memcpy(x,(char *)results,8);
} }
@ -73,36 +67,13 @@ void
rip(buf) rip(buf)
char *buf; char *buf;
{ {
char *cp; buf[strcspn(buf, "\r\n")] = 0;
if((cp = strchr(buf,'\r')) != NULL)
*cp = '\0';
if((cp = strchr(buf,'\n')) != NULL)
*cp = '\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 struct termios saved_ttymode;
static void interrupt() static void interrupt(sig)
int sig;
{ {
tcsetattr(0, TCSANOW, &saved_ttymode); tcsetattr(0, TCSANOW, &saved_ttymode);
exit(1); exit(1);
@ -147,14 +118,12 @@ int n;
return buf; return buf;
} }
#endif
sevenbit(s) sevenbit(s)
char *s; char *s;
{ {
/* make sure there are only 7 bit code in the line*/ /* make sure there are only 7 bit code in the line*/
while(*s){ while(*s){
*s = 0x7f & ( *s); *s &= 0x7f;
s++; s++;
} }
} }

View File

@ -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: # How to roll a release:
# #
@ -19,12 +19,12 @@
# Things which without too much trouble can be considered variables # Things which without too much trouble can be considered variables
EXPORT_DISTS= games manpages proflibs dict info EXPORT_DISTS= games manpages proflibs dict info
EXTRA_DISTS= des ${EXPORT_DISTS} EXTRA_DISTS= krb des ${EXPORT_DISTS}
ALL_DISTS= bin ${EXTRA_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 # define this to use a vn device instead of the floppy drive
VNDEVICE= vn0 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. # 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. # You want to keep this as small as possible, it costs dearly in RAM.
BOOTMFSSIZE= 1075 BOOTMFSSIZE= 1075
MFSINODE= 70000 MFSINODE= 80000
# Things which will get you into trouble if you change them # Things which will get you into trouble if you change them
DISTRIBUTIONS= bin ${EXTRA_DISTS} DISTRIBUTIONS= bin ${EXTRA_DISTS}
@ -73,26 +73,23 @@ release:
cd ${.CURDIR}/.. ; ${MAKE} install DESTDIR=${CHROOTDIR} cd ${.CURDIR}/.. ; ${MAKE} install DESTDIR=${CHROOTDIR}
echo "#!/bin/sh" > ${CHROOTDIR}/mk echo "#!/bin/sh" > ${CHROOTDIR}/mk
echo "set -ex" >> ${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 "cd /usr/src" >> ${CHROOTDIR}/mk
echo "make world" >> ${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 "cd /usr/src/release" >> ${CHROOTDIR}/mk
echo "make obj" >> ${CHROOTDIR}/mk echo "make obj" >> ${CHROOTDIR}/mk
echo "make doRELEASE" >> ${CHROOTDIR}/mk echo "make doRELEASE" >> ${CHROOTDIR}/mk
echo "RELEASEDIR=/R" >> ${CHROOTDIR}/etc/make.conf
.if !defined(RELEASETAG) .if !defined(RELEASETAG)
cd ${CHROOTDIR}/usr ; cvs co -P src cd ${CHROOTDIR}/usr ; cvs co -P src
.else .else
cd ${CHROOTDIR}/usr ; cvs export -r ${RELEASETAG} src cd ${CHROOTDIR}/usr ; cvs co -P -r ${RELEASETAG} src
.endif .endif
( cd ${CHROOTDIR}/usr/src/sys/conf && \ ( cd ${CHROOTDIR}/usr/src/sys/conf && \
mv newvers.sh foo && \ 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... # To be used in development...
#find ${.CURDIR} -print | cpio -dumpv ${CHROOTDIR} #find ${.CURDIR} -print | cpio -dumpv ${CHROOTDIR}
chmod 755 ${CHROOTDIR}/mk chmod 755 ${CHROOTDIR}/mk
@ -110,6 +107,10 @@ rerelease:
cd ${.CURDIR}/.. ; ${MAKE} -k install DESTDIR=${CHROOTDIR} cd ${.CURDIR}/.. ; ${MAKE} -k install DESTDIR=${CHROOTDIR}
echo "#!/bin/sh" > ${CHROOTDIR}/mk echo "#!/bin/sh" > ${CHROOTDIR}/mk
echo "set -ex" >> ${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 "cd /usr/src" >> ${CHROOTDIR}/mk
echo "make all install" >> ${CHROOTDIR}/mk echo "make all install" >> ${CHROOTDIR}/mk
echo "cd /usr/src/release/libdisk" >> ${CHROOTDIR}/mk echo "cd /usr/src/release/libdisk" >> ${CHROOTDIR}/mk
@ -121,17 +122,16 @@ rerelease:
echo "cd /usr/src/release" >> ${CHROOTDIR}/mk echo "cd /usr/src/release" >> ${CHROOTDIR}/mk
echo "make obj" >> ${CHROOTDIR}/mk echo "make obj" >> ${CHROOTDIR}/mk
echo "make doRELEASE" >> ${CHROOTDIR}/mk echo "make doRELEASE" >> ${CHROOTDIR}/mk
echo "RELEASEDIR=/R" >> ${CHROOTDIR}/etc/make.conf
.if !defined(RELEASENOUPDATE) .if !defined(RELEASENOUPDATE)
.if !defined(RELEASETAG) .if !defined(RELEASETAG)
cd ${CHROOTDIR}/usr ; cvs update -P -d -q src cd ${CHROOTDIR}/usr ; cvs update -P -d -q src
.else .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
.endif .endif
( cd ${CHROOTDIR}/usr/src/sys/conf && \ ( cd ${CHROOTDIR}/usr/src/sys/conf && \
mv newvers.sh foo && \ 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... # To be used in development...
#find ${.CURDIR} -print | cpio -dumpv ${CHROOTDIR} #find ${.CURDIR} -print | cpio -dumpv ${CHROOTDIR}
chmod 755 ${CHROOTDIR}/mk chmod 755 ${CHROOTDIR}/mk
@ -169,6 +169,10 @@ release.2:
@cd ${.CURDIR} ; $(MAKE) ckRELEASEDIR @cd ${.CURDIR} ; $(MAKE) ckRELEASEDIR
cd ${.CURDIR}/../etc && make distrib-dirs DESTDIR=${RD}/trees/bin cd ${.CURDIR}/../etc && make distrib-dirs DESTDIR=${RD}/trees/bin
cd ${.CURDIR}/.. ; make distribute DISTDIR=${RD}/trees 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 chflags -R noschg ${RD}/trees
uudecode ${.CURDIR}/compat20/libgcc.so.261.0.uu uudecode ${.CURDIR}/compat20/libgcc.so.261.0.uu
install -m 444 -o bin -g bin libgcc.so.261.0 ${RD}/trees/bin/usr/lib 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. # Make and install the three crunched binaries which live on the floppies.
# You are not supposed to like this :-) # You are not supposed to like this :-)
release.4: release.4:
cd ${.CURDIR}/libdisk && make obj && make depend && make all
cd ${.CURDIR}/sysinstall && make obj && make depend && make all
@cd ${.CURDIR} ; $(MAKE) ckRELEASEDIR @cd ${.CURDIR} ; $(MAKE) ckRELEASEDIR
rm -rf ${RD}/crunch rm -rf ${RD}/crunch
mkdir -p ${RD}/crunch mkdir -p ${RD}/crunch
@ -280,7 +286,7 @@ release.6:
touch release.6 touch release.6
# Make source dists, and finish of DES too # Make source dists, and finish off DES too
release.7: release.7:
@cd ${.CURDIR} ; $(MAKE) ckRELEASEDIR @cd ${.CURDIR} ; $(MAKE) ckRELEASEDIR
@cd ${.CURDIR} ; $(MAKE) doTARBALL SD=/usr/src \ @cd ${.CURDIR} ; $(MAKE) doTARBALL SD=/usr/src \
@ -294,9 +300,11 @@ release.7:
fi ; \ fi ; \
done done
( cd ${RD}/dists/src && \ ( 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 ) if [ -f sebones.aa ] ; then mv sebones.* ../des ; fi )
@echo "src distribution is finished." @echo "src distribution is finished."
mv ${RD}/dists/krb/* ${RD}/dists/des
rmdir ${RD}/dists/krb
touch release.7 touch release.7
# Complete the bootfd # Complete the bootfd
@ -329,12 +337,14 @@ release.8: write_mfs_in_kernel
cpio -dump ${RD}/mfsfd/dev ) cpio -dump ${RD}/mfsfd/dev )
( cd ${RD}/mfsfd/dev && rm -f *[sw]d*[bdefgh] ) ( cd ${RD}/mfsfd/dev && rm -f *[sw]d*[bdefgh] )
cd ${RD}/trees/bin && ls ${BOOT1} | cpio -dump ${RD}/mfsfd/stand 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 --exclude CVS -cf - -C ${.CURDIR}/sysinstall help | \
tar xvf - -C ${RD}/mfsfd/stand tar xvf - -C ${RD}/mfsfd/stand
install -c ${.CURDIR}/../COPYRIGHT ${RD}/mfsfd/stand/help/en_US.ISO8859-1/COPYRIGHT 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/help && tar cf - * | gzip -9 > ../help.tgz)
(cd ${RD}/mfsfd/stand && rm -rf help) (cd ${RD}/mfsfd/stand && rm -rf help)
( \ ( \
@ -354,6 +364,7 @@ release.8: write_mfs_in_kernel
cp ${RD}/kernels/BOOTMFS ${RD}/bootfd/kernel cp ${RD}/kernels/BOOTMFS ${RD}/bootfd/kernel
./write_mfs_in_kernel ${RD}/bootfd/kernel fs-image ./write_mfs_in_kernel ${RD}/bootfd/kernel fs-image
kzip ${RD}/bootfd/kernel kzip ${RD}/bootfd/kernel
mv ${RD}/bootfd/kernel ${RD}/kernels/MFSKERNEL
mv ${RD}/bootfd/kernel.kz ${RD}/bootfd/kernel mv ${RD}/bootfd/kernel.kz ${RD}/bootfd/kernel
ls -l ${RD}/bootfd/kernel ls -l ${RD}/bootfd/kernel
cd ${.CURDIR} && ${MAKE} doFLOPPY FLOPPY=boot cd ${.CURDIR} && ${MAKE} doFLOPPY FLOPPY=boot
@ -369,6 +380,11 @@ release.9:
@cd ${.CURDIR} && $(MAKE) installCRUNCH CRUNCH=root \ @cd ${.CURDIR} && $(MAKE) installCRUNCH CRUNCH=root \
DIR=${RD}/rootfd/stand ZIP=false DIR=${RD}/rootfd/stand ZIP=false
tar --exclude CVS -cf - -C ${RD} info | tar xvf - -C ${RD}/rootfd/stand 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 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 mv ${RD}/floppies/root.tmp ${RD}/floppies/root.flp
touch release.9 touch release.9
@ -416,7 +432,7 @@ cdrom.1:
mkdir ${CD} mkdir ${CD}
mkdir ${CD}/filesys mkdir ${CD}/filesys
cd ${RD} && find floppies dists -print | cpio -dumpl ${CD} 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} ln -f ${RD}/trees/bin/usr/mdec/fbsdboot.exe ${CD}
for i in ${DISTRIBUTIONS} ; \ for i in ${DISTRIBUTIONS} ; \
do \ do \

View File

@ -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/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 srcdirs /usr/src/gnu/usr.bin /usr/src/usr.sbin /usr/src/sbin/i386
progs sh find progs sh find
progs ping ppp progs ft ppp
progs sysinstall newfs gzip cpio bad144 fsck ifconfig route slattach progs sysinstall newfs gzip cpio bad144 fsck ifconfig route slattach
progs mount_nfs progs mount_nfs
ln gzip gunzip ln gzip gunzip

View File

@ -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/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 srcdirs /usr/src/gnu/usr.bin /usr/src/usr.sbin /usr/src/sbin/i386
progs sh find progs sh find
progs ping ppp progs ft ppp
progs sysinstall newfs gzip cpio bad144 fsck ifconfig route slattach progs sysinstall newfs gzip cpio bad144 fsck ifconfig route slattach
progs mount_nfs progs mount_nfs
ln gzip gunzip ln gzip gunzip

View File

@ -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/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 srcdirs /usr/src/gnu/usr.bin /usr/src/usr.sbin /usr/src/sbin/i386
progs sh find progs sh find
progs ping ppp progs ft ppp
progs sysinstall newfs gzip cpio bad144 fsck ifconfig route slattach progs sysinstall newfs gzip cpio bad144 fsck ifconfig route slattach
progs mount_nfs progs mount_nfs
ln gzip gunzip ln gzip gunzip

View File

@ -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/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 srcdirs /usr/src/gnu/usr.bin /usr/src/usr.sbin /usr/src/sbin/i386
progs sh find progs sh find
progs ping ppp progs ft ppp
progs sysinstall newfs gzip cpio bad144 fsck ifconfig route slattach progs sysinstall newfs gzip cpio bad144 fsck ifconfig route slattach
progs mount_nfs progs mount_nfs
ln gzip gunzip ln gzip gunzip

View File

@ -1,2 +1,7 @@
#!/bin/sh #!/bin/sh
ls $1.* | wc | awk '{ print "Pieces = ",$1 }' 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

View File

@ -6,7 +6,7 @@
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp * 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 <sys/types.h>
#include "libdisk.h" #include "libdisk.h"
#if 0
struct disk * struct disk *
Set_Phys_Geom(struct disk *disk, u_long cyl, u_long hd, u_long sect) 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); Free_Disk(disk);
return d; return d;
} }
#endif
void void
Set_Bios_Geom(struct disk *disk, u_long cyl, u_long hd, u_long sect) Set_Bios_Geom(struct disk *disk, u_long cyl, u_long hd, u_long sect)

View File

@ -6,7 +6,7 @@
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp * 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__; 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 void
Print_Chunk(struct chunk *c1,int offset) Print_Chunk(struct chunk *c1,int offset)
{ {
@ -270,14 +286,10 @@ Print_Chunk(struct chunk *c1,int offset)
for(;i<offset;i++) putchar('-'); for(;i<offset;i++) putchar('-');
putchar('>'); putchar('>');
for(;i<10;i++) 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, c1, c1->offset, c1->size, c1->end, c1->name,
chunk_n[c1->type],c1->subtype); chunk_n[c1->type],c1->subtype,
if (c1->flags & CHUNK_ALIGN) putchar('='); ShowChunkFlags(c1));
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');
putchar('\n'); putchar('\n');
Print_Chunk(c1->part,offset + 2); Print_Chunk(c1->part,offset + 2);
Print_Chunk(c1->next,offset); Print_Chunk(c1->next,offset);
@ -354,6 +366,7 @@ Delete_Chunk(struct disk *d, struct chunk *c)
return 0; return 0;
} }
#if 0
int int
Collapse_Chunk(struct disk *d, struct chunk *c1) Collapse_Chunk(struct disk *d, struct chunk *c1)
{ {
@ -417,3 +430,4 @@ Collapse_Chunk(struct disk *d, struct chunk *c1)
return 0; return 0;
} }
#endif

View File

@ -6,7 +6,7 @@
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp * 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"); warn("Not enough unused space");
return 0; return 0;
found: found:
if (c1->flags & CHUNK_BAD144) { if (parent->flags & CHUNK_BAD144) {
edge = c1->end - d->bios_sect - 127; edge = c1->end - d->bios_sect - 127;
if (offset > edge) if (offset > edge)
return 0; return 0;

View File

@ -6,7 +6,7 @@
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp * 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); close(fd);
Fixup_Names(d); Fixup_Names(d);
Bios_Limit_Chunk(d->chunks,1024*d->bios_hd*d->bios_sect);
return d; return d;
} }
@ -207,7 +208,9 @@ Debug_Disk(struct disk *d)
{ {
printf("Debug_Disk(%s)",d->name); printf("Debug_Disk(%s)",d->name);
printf(" flags=%lx",d->flags); printf(" flags=%lx",d->flags);
#if 0
printf(" real_geom=%lu/%lu/%lu",d->real_cyl,d->real_hd,d->real_sect); 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(" bios_geom=%lu/%lu/%lu\n",d->bios_cyl,d->bios_hd,d->bios_sect);
printf(" boot1=%p, boot2=%p, bootmgr=%p\n", printf(" boot1=%p, boot2=%p, bootmgr=%p\n",
d->boot1,d->boot2,d->bootmgr); d->boot1,d->boot2,d->bootmgr);
@ -250,6 +253,7 @@ Clone_Disk(struct disk *d)
return d2; return d2;
} }
#if 0
void void
Collapse_Disk(struct disk *d) Collapse_Disk(struct disk *d)
{ {
@ -257,6 +261,7 @@ Collapse_Disk(struct disk *d)
while(Collapse_Chunk(d,d->chunks)) while(Collapse_Chunk(d,d->chunks))
; ;
} }
#endif
static char * device_list[] = {"wd","sd",0}; static char * device_list[] = {"wd","sd",0};

View File

@ -6,7 +6,7 @@
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp * 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; char *name;
u_long flags; u_long flags;
# define DISK_ON_TRACK 1 # define DISK_ON_TRACK 1
#if 0
u_long real_cyl; u_long real_cyl;
u_long real_hd; u_long real_hd;
u_long real_sect; u_long real_sect;
#endif
u_long bios_cyl; u_long bios_cyl;
u_long bios_hd; u_long bios_hd;
u_long bios_sect; u_long bios_sect;
@ -103,11 +105,13 @@ Debug_Disk(struct disk *disk);
/* Print the content of the tree to stdout /* Print the content of the tree to stdout
*/ */
#if 0
struct disk * struct disk *
Set_Phys_Geom(struct disk *disk, u_long cyl, u_long heads, u_long sects); 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. /* Use a different physical geometry. Makes sense for ST506 disks only.
* The tree returned is read from the disk, using this geometry. * The tree returned is read from the disk, using this geometry.
*/ */
#endif
void void
Set_Bios_Geom(struct disk *disk, u_long cyl, u_long heads, u_long sects); 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); MakeDevDisk(struct disk *d,char *path);
/* Make device nodes for all chunks on this disk */ /* 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 <<< * Implementation details >>> DO NOT USE <<<
*/ */

View File

@ -6,7 +6,7 @@
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp * 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: * Rule#4:
* Max seven 'part' as children of 'freebsd' * Max seven 'part' as children of 'freebsd'
* Max one FS_SWAP child per 'freebsd'
* Max one CHUNK_IS_ROOT 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 void
Rule_004(struct disk *d, struct chunk *c, char *msg) 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; struct chunk *c1;
u_long l;
if (c->type != freebsd) if (c->type != freebsd)
return; 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) { for (c1=c->part; c1; c1=c1->next) {
if (c1->type != part) if (c1->type != part)
continue; continue;
if (c1->subtype == FS_SWAP)
j++;
if (c1->flags & CHUNK_IS_ROOT) { if (c1->flags & CHUNK_IS_ROOT) {
k++; k++;
if (c1->flags & CHUNK_PAST_1024) if (c1->flags & CHUNK_PAST_1024)
@ -205,15 +227,11 @@ Rule_004(struct disk *d, struct chunk *c, char *msg)
} }
if (i > 7) { if (i > 7) {
sprintf(msg+strlen(msg), sprintf(msg+strlen(msg),
"Max seven 'part' per 'freebsd' chunk\n"); "Max seven partitions per freebsd slice\n");
}
if (j > 1) {
sprintf(msg+strlen(msg),
"Max one subtype=FS_SWAP child per 'freebsd' chunk\n");
} }
if (k > 1) { if (k > 1) {
sprintf(msg+strlen(msg), 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 strdup(msg);
return 0; 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;
}

View File

@ -6,7 +6,7 @@
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp * 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)); strtol(cmds[3],0,0));
continue; continue;
} }
#if 0
if (!strcasecmp(*cmds,"phys") && ncmd == 4) { if (!strcasecmp(*cmds,"phys") && ncmd == 4) {
d = Set_Phys_Geom(d, d = Set_Phys_Geom(d,
strtol(cmds[1],0,0), strtol(cmds[1],0,0),
@ -206,6 +207,8 @@ main(int argc, char **argv)
strtol(cmds[3],0,0)); strtol(cmds[3],0,0));
continue; continue;
} }
#endif
#if 0
if (!strcasecmp(*cmds,"collapse")) { if (!strcasecmp(*cmds,"collapse")) {
if (cmds[1]) if (cmds[1])
while (Collapse_Chunk(d, while (Collapse_Chunk(d,
@ -215,6 +218,7 @@ main(int argc, char **argv)
Collapse_Disk(d); Collapse_Disk(d);
continue; continue;
} }
#endif
if (!strcasecmp(*cmds,"list")) { if (!strcasecmp(*cmds,"list")) {
cp = Disk_Names(); cp = Disk_Names();
printf("Disks:"); printf("Disks:");
@ -279,13 +283,17 @@ main(int argc, char **argv)
printf("\tbios cyl hd sect\n"); printf("\tbios cyl hd sect\n");
printf("\tboot\n"); printf("\tboot\n");
printf("\tbteasy17\n"); printf("\tbteasy17\n");
#if 0
printf("\tcollapse [pointer]\n"); printf("\tcollapse [pointer]\n");
#endif
printf("\tcreate offset size enum subtype flags\n"); printf("\tcreate offset size enum subtype flags\n");
printf("\t\tsubtype(part): swap=1, ffs=7\n"); printf("\t\tsubtype(part): swap=1, ffs=7\n");
printf("\tdelete pointer\n"); printf("\tdelete pointer\n");
printf("\tlist\n"); printf("\tlist\n");
printf("\tmbr\n"); printf("\tmbr\n");
#if 0
printf("\tphys cyl hd sect\n"); printf("\tphys cyl hd sect\n");
#endif
printf("\tquit\n"); printf("\tquit\n");
printf("\tread [disk]\n"); printf("\tread [disk]\n");
printf("\tscan\n"); printf("\tscan\n");

View File

@ -6,7 +6,7 @@
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp * 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_secsize = 512;
dl->d_secperunit = new->chunks->size; dl->d_secperunit = new->chunks->size;
#if 0
dl->d_secpercyl = new->real_cyl ? new->real_cyl : new->bios_cyl; 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_ntracks = new->real_hd ? new->real_hd : new->bios_hd;
dl->d_nsectors = new->real_sect ? new->real_sect : new->bios_sect; 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_secpercyl = dl->d_ntracks * dl->d_nsectors;
dl->d_npartitions = MAXPARTITIONS; dl->d_npartitions = MAXPARTITIONS;

View File

@ -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/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 srcdirs /usr/src/gnu/usr.bin /usr/src/usr.sbin /usr/src/sbin/i386
progs sh find progs sh find
progs ping ppp progs ft ppp
progs sysinstall newfs gzip cpio bad144 fsck ifconfig route slattach progs sysinstall newfs gzip cpio bad144 fsck ifconfig route slattach
progs mount_nfs progs mount_nfs
ln gzip gunzip ln gzip gunzip

View File

@ -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 # first, we list the source dirs that our programs reside in. These are
# searched in order listed to find the dir containing each program. # searched in order listed to find the dir containing each program.
@ -28,9 +28,7 @@ ln reboot halt
# /usr/bin stuff # /usr/bin stuff
progs tar ncftp rsh sed telnet rlogin progs tar ftp rsh sed telnet rlogin
#progs tip
#ln tip cu
# finally, we specify the libraries to link in with our binary # finally, we specify the libraries to link in with our binary
libs -lcrypt -ltelnet -lutil -ll -ledit libs -lcrypt -ltelnet -lutil -ll -ledit

View File

@ -1,2 +1,7 @@
#!/bin/sh #!/bin/sh
ls $1.* | wc | awk '{ print "Pieces = ",$1 }' 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

View File

@ -4,13 +4,13 @@ CLEANFILES= makedevs.c rtermcap
.PATH: ${.CURDIR}/../disklabel ${.CURDIR}/../../usr.bin/cksum .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 \ 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 \ 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 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 -I${.CURDIR}/../../gnu/lib/libdialog
LDADD= -ldialog -lncurses -lmytinfo -lutil LDADD= -ldialog -lncurses -lmytinfo -lutil
@ -22,30 +22,15 @@ LDADD+= -L${.CURDIR}/../libdisk -ldisk
DPADD= ${LIBDIALOG} ${LIBNCURSES} ${LIBMYTINFO} ${LIBUTIL} 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) .if exists(${.CURDIR}/../../share/syscons/scrnmaps/obj)
MKSCRNMAP=${.CURDIR}/../../share/syscons/scrnmaps/obj/koi8-r2cp866.mk MKSCRNMAP=${.CURDIR}/../../share/syscons/scrnmaps/obj/koi8-r2cp866.mk
.else .else
MKSCRNMAP=${.CURDIR}/../../share/syscons/scrnmaps/koi8-r2cp866.mk MKSCRNMAP=${.CURDIR}/../../share/syscons/scrnmaps/koi8-r2cp866.mk
.endif .endif
makedevs.c: dev2c.sh Makefile rtermcap makedevs.c: Makefile rtermcap
rm -f makedevs.tmp rm -f makedevs.tmp
mkdir -p dev
echo '#include <sys/types.h>' > makedevs.tmp 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 | \ ./rtermcap cons25 | \
file2c 'const char termcap_cons25[] = {' ',0};' \ file2c 'const char termcap_cons25[] = {' ',0};' \
>> makedevs.tmp >> makedevs.tmp

View File

@ -4,7 +4,7 @@
* This is probably the last attempt in the `sysinstall' line, the next * This is probably the last attempt in the `sysinstall' line, the next
* generation being slated to essentially a complete rewrite. * 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 * Copyright (c) 1995
* Jordan Hubbard. All rights reserved. * Jordan Hubbard. All rights reserved.
@ -157,11 +157,23 @@ attr_match(Attribs *attr, char *name)
{ {
int n = 0; int n = 0;
while((strcasecmp(attr[n].name, name)!=0) && (n < num_attribs) && (n < 20)) if (isDebug())
n++; 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((const char *) attr[n].value);
}
return NULL; return NULL;
} }

View File

@ -4,7 +4,7 @@
* This is probably the last attempt in the `sysinstall' line, the next * This is probably the last attempt in the `sysinstall' line, the next
* generation being slated to essentially a complete rewrite. * 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 * Copyright (c) 1995
* Jordan Hubbard. All rights reserved. * Jordan Hubbard. All rights reserved.
@ -101,13 +101,13 @@ mediaInitCDROM(Device *dev)
} }
int int
mediaGetCDROM(char *file) mediaGetCDROM(Device *dev, char *file, Attribs *dist_attrs)
{ {
char buf[PATH_MAX]; char buf[PATH_MAX];
snprintf(buf, PATH_MAX, "/cdrom/%s", file); snprintf(buf, PATH_MAX, "/cdrom/%s", file);
if (!access(buf,R_OK)) if (!access(buf,R_OK))
return open(buf, O_RDONLY); return open(buf, O_RDONLY);
snprintf(buf, PATH_MAX, "/cdrom/dists/%s", file); snprintf(buf, PATH_MAX, "/cdrom/dists/%s", file);
return open(buf, O_RDONLY); return open(buf, O_RDONLY);
} }
@ -118,7 +118,7 @@ mediaShutdownCDROM(Device *dev)
if (!cdromMounted) if (!cdromMounted)
return; return;
msgDebug("Unmounting /cdrom\n"); 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)); msgConfirm("Could not unmount the CDROM: %s\n", strerror(errno));
msgDebug("Unmount returned\n"); msgDebug("Unmount returned\n");
cdromMounted = FALSE; cdromMounted = FALSE;

View File

@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next * This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite. * 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 * Copyright (c) 1995
* Jordan Hubbard. All rights reserved. * Jordan Hubbard. All rights reserved.
@ -83,10 +83,10 @@ nameof(Chunk *c1)
static char * static char *
mount_point(Chunk *c1) mount_point(Chunk *c1)
{ {
if (c1->type == fat || (c1->type == part && c1->subtype != FS_SWAP)) if (c1->type == part && c1->subtype == FS_SWAP)
return ((PartInfo *)c1->private)->mountpoint;
else if (c1->type == part && c1->subtype == FS_SWAP)
return "none"; return "none";
else if (c1->type == part || c1->type == fat)
return ((PartInfo *)c1->private)->mountpoint;
return "/bogus"; return "/bogus";
} }
@ -101,7 +101,7 @@ fstype(Chunk *c1)
else else
return "swap"; return "swap";
} }
return "bogfs"; return "bogus";
} }
static char * static char *
@ -121,13 +121,9 @@ fstype_short(Chunk *c1)
static int static int
seq_num(Chunk *c1) seq_num(Chunk *c1)
{ {
if (c1->type == part) { if (c1->type == part && c1->subtype != FS_SWAP)
if (c1->subtype != FS_SWAP) return 1;
return 1; return 0;
else
return 0;
}
return -1;
} }
void void
@ -139,6 +135,12 @@ configFstab(void)
int i, cnt; int i, cnt;
Chunk *c1, *c2; 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); devs = deviceFind(NULL, DEVICE_TYPE_DISK);
if (!devs) { if (!devs) {
msgConfirm("No disks found!"); msgConfirm("No disks found!");
@ -146,6 +148,7 @@ configFstab(void)
} }
/* Record all the chunks */ /* Record all the chunks */
nchunks = 0;
for (i = 0; devs[i]; i++) { for (i = 0; devs[i]; i++) {
if (!devs[i]->enabled) if (!devs[i]->enabled)
continue; continue;
@ -155,11 +158,11 @@ configFstab(void)
for (c1 = disk->chunks->part; c1; c1 = c1->next) { for (c1 = disk->chunks->part; c1; c1 = c1->next) {
if (c1->type == freebsd) { if (c1->type == freebsd) {
for (c2 = c1->part; c2; c2 = c2->next) { 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; chunk_list[nchunks++] = c2;
} }
} }
else if (c1->type == fat) else if (c1->type == fat && c1->private)
chunk_list[nchunks++] = c1; chunk_list[nchunks++] = c1;
} }
} }
@ -175,14 +178,11 @@ configFstab(void)
/* Go for the burn */ /* Go for the burn */
msgDebug("Generating /etc/fstab file\n"); msgDebug("Generating /etc/fstab file\n");
for (i = 0; i < nchunks; i++) { 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]), 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]), fstype(chunk_list[i]), fstype_short(chunk_list[i]), seq_num(chunk_list[i]), seq_num(chunk_list[i]));
seq_num(chunk_list[i]));
}
Mkdir("/proc", NULL); 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 */ /* Now look for the CDROMs */
devs = deviceFind(NULL, DEVICE_TYPE_CDROM); devs = deviceFind(NULL, DEVICE_TYPE_CDROM);
@ -191,7 +191,7 @@ configFstab(void)
/* Write the first one out as /cdrom */ /* Write the first one out as /cdrom */
if (cnt) { if (cnt) {
Mkdir("/cdrom", NULL); 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> */ /* Write the others out as /cdrom<n> */
@ -200,9 +200,11 @@ configFstab(void)
sprintf(cdname, "/cdrom%d", i); sprintf(cdname, "/cdrom%d", i);
Mkdir(cdname, NULL); 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); fclose(fstab);
if (isDebug())
msgDebug("Wrote out /etc/fstab file\n");
} }
/* /*
@ -266,7 +268,7 @@ configSysconfig(void)
devp = deviceFind(NULL, DEVICE_TYPE_NETWORK); devp = deviceFind(NULL, DEVICE_TYPE_NETWORK);
cnt = deviceCount(devp); cnt = deviceCount(devp);
for (j = 0; j < cnt; j++) { for (j = 0; j < cnt; j++) {
if (devp[j]->private) { if (devp[j]->private && strncmp(devp[j]->name, "cuaa", 4)) {
char iname[64]; char iname[64];
snprintf(iname, 64, "%s%s", VAR_IFCONFIG, devp[j]->name); snprintf(iname, 64, "%s%s", VAR_IFCONFIG, devp[j]->name);
@ -277,6 +279,12 @@ configSysconfig(void)
} }
} }
fclose(fp); 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 int
@ -290,14 +298,30 @@ configSaverTimeout(char *str)
return 0; 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 void
configResolv(void) configResolv(void)
{ {
FILE *fp; FILE *fp;
char *cp;
if (!getenv(VAR_DOMAINNAME) || !getenv(VAR_NAMESERVER)) { if (!RunningAsInit && file_readable("/etc/resolv.conf"))
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.");
return; 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); Mkdir("/etc", NULL);
fp = fopen("/etc/resolv.conf", "w"); 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."); msgConfirm("Unable to open /etc/resolv.conf! You will need to do this manually.");
return; return;
} }
fprintf(fp, "domain\t%s\n", getenv(VAR_DOMAINNAME)); if (getenv(VAR_DOMAINNAME))
fprintf(fp, "domain\t%s\n", getenv(VAR_DOMAINNAME));
fprintf(fp, "nameserver\t%s\n", getenv(VAR_NAMESERVER)); fprintf(fp, "nameserver\t%s\n", getenv(VAR_NAMESERVER));
fclose(fp); 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 int
@ -317,39 +366,26 @@ configPackages(char *str)
pid_t pid; pid_t pid;
Boolean onCD; 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; i = -1;
if (!mediaDevice || mediaDevice->type != DEVICE_TYPE_CDROM) { /* If we're running as init, we know that a CD in the drive is probably ours */
if (getpid() == 1) { onCD = file_readable("/cdrom/packages");
if (!mediaSetCDROM(NULL)) if (!onCD && RunningAsInit) {
onCD = FALSE; if (mediaSetCDROM(NULL)) {
else if ((*mediaDevice->init)(mediaDevice))
onCD = TRUE; onCD = TRUE;
} }
else
onCD = FALSE;
} }
else if (mediaDevice && mediaDevice->type == DEVICE_TYPE_CDROM)
onCD = TRUE; if (!(pid = fork())) {
if (onCD) { if (onCD && chdir("/cdrom/packages/All"))
if (!(pid = fork())) {
execl("/stand/sh", "sh", "-c", "pkg_manage /cdrom", (char *)NULL);
exit(1); exit(1);
} execl("/usr/sbin/pkg_manage", "/usr/sbin/pkg_manage", (char *)NULL);
else { exit(1);
pid = waitpid(pid, (int *)&pstat, 0);
i = (pid == -1) ? -1 : WEXITSTATUS(pstat);
}
} }
else { else {
if (!(pid = fork())) { pid = waitpid(pid, (int *)&pstat, 0);
execl("/stand/sh", "sh", "-c", "pkg_manage", (char *)NULL); i = (pid == -1) ? -1 : WEXITSTATUS(pstat);
exit(1);
}
else {
pid = waitpid(pid, (int *)&pstat, 0);
i = (pid == -1) ? -1 : WEXITSTATUS(pstat);
}
} }
if (i != 0 && isDebug()) if (i != 0 && isDebug())
msgDebug("pkg_manage returns status of %d\n", i); msgDebug("pkg_manage returns status of %d\n", i);

View File

@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next * This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite. * 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 * Copyright (c) 1995
* Jordan Hubbard. All rights reserved. * Jordan Hubbard. All rights reserved.
@ -49,7 +49,7 @@ decode(DMenu *menu, char *name)
DMenuItem *tmp; DMenuItem *tmp;
for (tmp = menu->items; tmp->title; tmp++) for (tmp = menu->items; tmp->title; tmp++)
if (!strcmp(name, (*tmp->title == '*') ? tmp->title + 1 : tmp->title)) if (!strcmp(name, tmp->title))
break; break;
if (!tmp->title) if (!tmp->title)
return NULL; return NULL;
@ -62,11 +62,6 @@ dispatch(DMenuItem *tmp, char *name)
Boolean failed = FALSE; Boolean failed = FALSE;
switch (tmp->type) { 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 */ /* We want to simply display a file */
case DMENU_DISPLAY_FILE: case DMENU_DISPLAY_FILE:
systemDisplayFile((char *)tmp->ptr); systemDisplayFile((char *)tmp->ptr);
@ -74,7 +69,7 @@ dispatch(DMenuItem *tmp, char *name)
/* It's a sub-menu; recurse on it */ /* It's a sub-menu; recurse on it */
case DMENU_SUBMENU: case DMENU_SUBMENU:
dmenuOpenSimple((DMenu *)tmp->ptr); (void)dmenuOpenSimple((DMenu *)tmp->ptr);
break; break;
/* Execute it as a system command */ /* Execute it as a system command */
@ -105,6 +100,10 @@ dispatch(DMenuItem *tmp, char *name)
*((unsigned int *)tmp->ptr) |= tmp->parm; *((unsigned int *)tmp->ptr) |= tmp->parm;
break; break;
case DMENU_SET_VALUE:
*((unsigned int *)tmp->ptr) = tmp->parm;
break;
case DMENU_NOP: case DMENU_NOP:
break; break;
@ -122,6 +121,15 @@ decode_and_dispatch_multiple(DMenu *menu, char *names)
string_prune(names); string_prune(names);
names = string_skipwhite(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) { while (names) {
char *cp; char *cp;

View File

@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next * This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite. * 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 * Copyright (c) 1995
* Jordan Hubbard. All rights reserved. * Jordan Hubbard. All rights reserved.
@ -88,14 +88,15 @@ static struct {
{ DEVICE_TYPE_TAPE, "wt0", "Wangtek tape drive" }, { DEVICE_TYPE_TAPE, "wt0", "Wangtek tape drive" },
{ DEVICE_TYPE_DISK, "sd", "SCSI disk device" }, { DEVICE_TYPE_DISK, "sd", "SCSI disk device" },
{ DEVICE_TYPE_DISK, "wd", "IDE/ESDI/MFM/ST506 disk device" }, { DEVICE_TYPE_DISK, "wd", "IDE/ESDI/MFM/ST506 disk device" },
{ DEVICE_TYPE_FLOPPY, "rfd0", "floppy drive unit A" }, { DEVICE_TYPE_FLOPPY, "fd0", "floppy drive unit A" },
{ DEVICE_TYPE_FLOPPY, "rfd1", "floppy drive unit B" }, { DEVICE_TYPE_FLOPPY, "fd1", "floppy drive unit B" },
{ DEVICE_TYPE_NETWORK, "cuaa0", "Serial port (COM1) - possible PPP/SLIP device" }, { 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, "cuaa1", "Serial port (COM2) - possible PPP/SLIP device" },
{ DEVICE_TYPE_NETWORK, "lp0", "Parallel Port IP (PLIP) using laplink cable" }, { DEVICE_TYPE_NETWORK, "lp0", "Parallel Port IP (PLIP) using laplink cable" },
{ DEVICE_TYPE_NETWORK, "lo", "Loop-back (local) network interface" }, { DEVICE_TYPE_NETWORK, "lo", "Loop-back (local) network interface" },
{ DEVICE_TYPE_NETWORK, "sl", "Serial-line IP (SLIP) interface" }, { DEVICE_TYPE_NETWORK, "sl", "Serial-line IP (SLIP) interface" },
{ DEVICE_TYPE_NETWORK, "ppp", "Point-to-Point Protocol (PPP) 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, "ed", "WD/SMC 80xx; Novell NE1000/2000; 3Com 3C503 cards" },
{ DEVICE_TYPE_NETWORK, "ep", "3Com 3C509 ethernet card" }, { DEVICE_TYPE_NETWORK, "ep", "3Com 3C509 ethernet card" },
{ DEVICE_TYPE_NETWORK, "el", "3Com 3C501 ethernet card" }, { DEVICE_TYPE_NETWORK, "el", "3Com 3C501 ethernet card" },
@ -115,13 +116,39 @@ new_device(char *name)
Device *dev; Device *dev;
dev = safe_malloc(sizeof(Device)); dev = safe_malloc(sizeof(Device));
bzero(dev, sizeof(Device));
if (name) if (name)
strcpy(dev->name, name); strcpy(dev->name, name);
else
dev->name[0] = '\0';
return dev; 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 static int
deviceTry(char *name, char *try) deviceTry(char *name, char *try)
{ {
@ -136,17 +163,11 @@ deviceTry(char *name, char *try)
return fd; return fd;
} }
static void
deviceDiskFree(Device *dev)
{
Free_Disk(dev->private);
}
/* Register a new device in the devices array */ /* Register a new device in the devices array */
Device * Device *
deviceRegister(char *name, char *desc, char *devname, DeviceType type, Boolean enabled, deviceRegister(char *name, char *desc, char *devname, DeviceType type, Boolean enabled,
Boolean (*init)(Device *), int (*get)(char *), Boolean (*close)(Device *, int), Boolean (*init)(Device *), int (*get)(Device *, char *, Attribs *),
void (*shutdown)(Device *), void *private) Boolean (*close)(Device *, int), void (*shutdown)(Device *), void *private)
{ {
Device *newdev; Device *newdev;
@ -157,10 +178,10 @@ deviceRegister(char *name, char *desc, char *devname, DeviceType type, Boolean e
newdev->devname = devname; newdev->devname = devname;
newdev->type = type; newdev->type = type;
newdev->enabled = enabled; newdev->enabled = enabled;
newdev->init = init; newdev->init = init ? init : dummyInit;
newdev->get = get; newdev->get = get ? get : dummyGet;
newdev->close = close; newdev->close = close ? close : dummyClose;
newdev->shutdown = shutdown; newdev->shutdown = shutdown ? shutdown : dummyShutdown;
newdev->private = private; newdev->private = private;
Devices[numDevs] = newdev; Devices[numDevs] = newdev;
Devices[++numDevs] = NULL; Devices[++numDevs] = NULL;
@ -197,9 +218,11 @@ deviceGetAll(void)
for (c1 = d->chunks->part; c1; c1 = c1->next) { for (c1 = d->chunks->part; c1; c1 = c1->next) {
if (c1->type == fat) { if (c1->type == fat) {
Device *dev; Device *dev;
char devname[80];
/* Got one! */ /* 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); mediaInitDOS, mediaGetDOS, NULL, mediaShutdownDOS, NULL);
dev->private = c1; dev->private = c1;
msgDebug("Found a DOS partition %s on drive %s\n", c1->name, d->name); 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++) { for (i = 0; devs[i]; i++) {
tmp->items[i].title = devs[i]->name; tmp->items[i].title = devs[i]->name;
for (j = 0; device_names[j].name; j++) { for (j = 0; device_names[j].name; j++) {
if (!strncmp(devs[i]->name, device_names[j].name, if (!strncmp(devs[i]->name, device_names[j].name, strlen(device_names[j].name))) {
strlen(device_names[j].name))) {
tmp->items[i].prompt = device_names[j].description; tmp->items[i].prompt = device_names[j].description;
break; break;
} }
@ -366,6 +388,7 @@ deviceCreateMenu(DMenu *menu, DeviceType type, int (*hook)())
tmp->items[i].type = DMENU_CALL; tmp->items[i].type = DMENU_CALL;
tmp->items[i].ptr = hook; tmp->items[i].ptr = hook;
tmp->items[i].disabled = FALSE; tmp->items[i].disabled = FALSE;
tmp->items[i].check = NULL;
} }
tmp->items[i].type = DMENU_NOP; tmp->items[i].type = DMENU_NOP;
tmp->items[i].title = NULL; tmp->items[i].title = NULL;

View File

@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next * This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite. * 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 * Copyright (c) 1995
* Jordan Hubbard. All rights reserved. * Jordan Hubbard. All rights reserved.
@ -79,11 +79,14 @@ print_chunks(Disk *d)
int row; int row;
int i; 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); attrset(A_NORMAL);
mvaddstr(0, 0, "Disk name:\t"); mvaddstr(0, 0, "Disk name:\t");
clrtobot(); clrtobot();
attrset(A_REVERSE); addstr(d->name); attrset(A_NORMAL); 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, mvprintw(1, 0,
"BIOS Geometry:\t%lu cyls/%lu heads/%lu sectors", "BIOS Geometry:\t%lu cyls/%lu heads/%lu sectors",
d->bios_cyl, d->bios_hd, d->bios_sect); 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++) { for (i = 0, row = CHUNK_START_ROW; chunk_info[i]; i++, row++) {
if (i == current_chunk) if (i == current_chunk)
attrset(A_REVERSE); 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]->offset, chunk_info[i]->size,
chunk_info[i]->end, chunk_info[i]->name, chunk_info[i]->end, chunk_info[i]->name,
chunk_info[i]->type, chunk_n[chunk_info[i]->type], 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) if (i == current_chunk)
attrset(A_NORMAL); attrset(A_NORMAL);
} }
@ -109,7 +112,7 @@ print_command_summary()
mvprintw(14, 0, "The following commands are supported (in upper or lower case):"); 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(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(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 "); mvprintw(20, 0, "The currently selected partition is displayed in ");
attrset(A_REVERSE); addstr("reverse"); attrset(A_NORMAL); addstr(" video."); attrset(A_REVERSE); addstr("reverse"); attrset(A_NORMAL); addstr(" video.");
mvprintw(21, 0, "Use F1 or ? to get more help, arrow keys to move."); mvprintw(21, 0, "Use F1 or ? to get more help, arrow keys to move.");
@ -265,7 +268,7 @@ diskPartition(Disk *d)
msg = "Wise choice!"; msg = "Wise choice!";
break; break;
case 27: /* ESC */ case 'Q':
chunking = FALSE; chunking = FALSE;
break; break;
@ -322,14 +325,27 @@ int
diskPartitionEditor(char *str) diskPartitionEditor(char *str)
{ {
DMenu *menu; DMenu *menu;
Device **devs;
int cnt;
menu = deviceCreateMenu(&MenuDiskDevices, DEVICE_TYPE_DISK, partitionHook); devs = deviceFind(NULL, DEVICE_TYPE_DISK);
if (!menu) { cnt = deviceCount(devs);
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."); 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 { else {
dmenuOpenSimple(menu); menu = deviceCreateMenu(&MenuDiskDevices, DEVICE_TYPE_DISK, partitionHook);
free(menu); 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; return 0;
} }

View File

@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next * This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite. * 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 * Copyright (c) 1995
* Jordan Hubbard. All rights reserved. * Jordan Hubbard. All rights reserved.
@ -44,88 +44,12 @@
#include "sysinstall.h" #include "sysinstall.h"
unsigned int Dists; unsigned int Dists;
unsigned int DESDists;
unsigned int SrcDists; unsigned int SrcDists;
unsigned int XF86Dists; unsigned int XF86Dists;
unsigned int XF86ServerDists; unsigned int XF86ServerDists;
unsigned int XF86FontDists; 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 { typedef struct _dist {
char *my_name; char *my_name;
char *my_dir; char *my_dir;
@ -134,27 +58,41 @@ typedef struct _dist {
struct _dist *my_dist; struct _dist *my_dist;
} Distribution; } Distribution;
extern Distribution DistTable[];
extern Distribution DESDistTable[];
extern Distribution SrcDistTable[]; extern Distribution SrcDistTable[];
extern Distribution XF86DistTable[]; extern Distribution XF86DistTable[];
extern Distribution XF86FontDistTable[]; extern Distribution XF86FontDistTable[];
extern Distribution XF86ServerDistTable[]; extern Distribution XF86ServerDistTable[];
/* The top-level distribution categories */ /* The top-level distribution categories */
static Distribution DistTable[] = { static Distribution DistTable[] = {
{ "bin", "/", &Dists, DIST_BIN, NULL }, { "bin", "/", &Dists, DIST_BIN, NULL },
{ "games", "/", &Dists, DIST_GAMES, NULL }, { "games", "/", &Dists, DIST_GAMES, NULL },
{ "help", NULL, &Dists, DIST_HELP, NULL },
{ "manpages", "/", &Dists, DIST_MANPAGES, NULL }, { "manpages", "/", &Dists, DIST_MANPAGES, NULL },
{ "proflibs", "/", &Dists, DIST_PROFLIBS, NULL }, { "proflibs", "/", &Dists, DIST_PROFLIBS, NULL },
{ "dict", "/", &Dists, DIST_DICT, NULL }, { "dict", "/", &Dists, DIST_DICT, NULL },
{ "info", "/", &Dists, DIST_INFO, NULL },
{ "src", "/", &Dists, DIST_SRC, SrcDistTable }, { "src", "/", &Dists, DIST_SRC, SrcDistTable },
{ "des", "/", &Dists, DIST_DES, NULL }, { "des", "/", &Dists, DIST_DES, DESDistTable },
{ "compat1x", "/", &Dists, DIST_COMPAT1X, NULL }, { "compat1x", "/", &Dists, DIST_COMPAT1X, NULL },
{ "compat20", "/", &Dists, DIST_COMPAT20, 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 }, { "XF86311", "/usr", &Dists, DIST_XF86, XF86DistTable },
{ NULL }, { 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 */ /* The /usr/src distribution */
static Distribution SrcDistTable[] = { static Distribution SrcDistTable[] = {
{ "sbase", "/usr/src", &SrcDists, DIST_SRC_BASE, NULL }, { "sbase", "/usr/src", &SrcDists, DIST_SRC_BASE, NULL },
@ -171,8 +109,6 @@ static Distribution SrcDistTable[] = {
{ "ssys", "/usr/src", &SrcDists, DIST_SRC_SYS, NULL }, { "ssys", "/usr/src", &SrcDists, DIST_SRC_SYS, NULL },
{ "subin", "/usr/src", &SrcDists, DIST_SRC_UBIN, NULL }, { "subin", "/usr/src", &SrcDists, DIST_SRC_UBIN, NULL },
{ "susbin", "/usr/src", &SrcDists, DIST_SRC_USBIN, 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 }, { NULL },
}; };
@ -181,15 +117,17 @@ static Distribution XF86DistTable[] = {
{ "X311bin", "/usr", &XF86Dists, DIST_XF86_BIN, NULL }, { "X311bin", "/usr", &XF86Dists, DIST_XF86_BIN, NULL },
{ "X311lib", "/usr", &XF86Dists, DIST_XF86_LIB, NULL }, { "X311lib", "/usr", &XF86Dists, DIST_XF86_LIB, NULL },
{ "X311doc", "/usr", &XF86Dists, DIST_XF86_DOC, 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 }, { "X311man", "/usr", &XF86Dists, DIST_XF86_MAN, NULL },
{ "X311prog", "/usr", &XF86Dists, DIST_XF86_PROG, NULL }, { "X311prog", "/usr", &XF86Dists, DIST_XF86_PROG, NULL },
{ "X311link", "/usr", &XF86Dists, DIST_XF86_LINK, NULL }, { "X311link", "/usr", &XF86Dists, DIST_XF86_LINK, NULL },
{ "X311pex", "/usr", &XF86Dists, DIST_XF86_PEX, NULL }, { "X311pex", "/usr", &XF86Dists, DIST_XF86_PEX, NULL },
{ "X311lbx", "/usr", &XF86Dists, DIST_XF86_LBX, NULL }, { "X311lbx", "/usr", &XF86Dists, DIST_XF86_LBX, NULL },
{ "X311xicf", "/usr", &XF86Dists, DIST_XF86_XINIT, NULL }, { "X311xicf", "/usr", &XF86Dists, DIST_XF86_XINIT, NULL },
{ "X311xdmcf", "/usr", &XF86Dists, DIST_XF86_XDMCF, NULL }, { "X311xdcf", "/usr", &XF86Dists, DIST_XF86_XDMCF, NULL },
{ "Xf86311", "/usr", &XF86Dists, DIST_XF86_SERVER, XF86ServerDistTable }, { "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 }, { NULL },
}; };
@ -197,8 +135,9 @@ static Distribution XF86DistTable[] = {
static Distribution XF86ServerDistTable[] = { static Distribution XF86ServerDistTable[] = {
{ "X3118514", "/usr", &XF86ServerDists, DIST_XF86_SERVER_8514, NULL }, { "X3118514", "/usr", &XF86ServerDists, DIST_XF86_SERVER_8514, NULL },
{ "X311AGX", "/usr", &XF86ServerDists, DIST_XF86_SERVER_AGX, NULL }, { "X311AGX", "/usr", &XF86ServerDists, DIST_XF86_SERVER_AGX, NULL },
{ "X311Mch3", "/usr", &XF86ServerDists, DIST_XF86_SERVER_MACH32,NULL }, { "X311Ma8", "/usr", &XF86ServerDists, DIST_XF86_SERVER_MACH8, NULL },
{ "X311Mch8", "/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 }, { "X311Mono", "/usr", &XF86ServerDists, DIST_XF86_SERVER_MONO, NULL },
{ "X311P9K", "/usr", &XF86ServerDists, DIST_XF86_SERVER_P9000, NULL }, { "X311P9K", "/usr", &XF86ServerDists, DIST_XF86_SERVER_P9000, NULL },
{ "X311S3", "/usr", &XF86ServerDists, DIST_XF86_SERVER_S3, NULL }, { "X311S3", "/usr", &XF86ServerDists, DIST_XF86_SERVER_S3, NULL },
@ -219,6 +158,121 @@ static Distribution XF86FontDistTable[] = {
{ NULL }, { 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 static Boolean
distExtract(char *parent, Distribution *me) distExtract(char *parent, Distribution *me)
{ {
@ -228,37 +282,49 @@ distExtract(char *parent, Distribution *me)
const char *tmp; const char *tmp;
Attribs *dist_attr; Attribs *dist_attr;
status = FALSE; status = TRUE;
if (mediaDevice->init) if (isDebug())
if (!(*mediaDevice->init)(mediaDevice)) msgDebug("distExtract: parent: %s, me: %s\n", parent ? parent : "(none)", me->my_name);
return FALSE;
/* Loop through to see if we're in our parent's plans */
for (i = 0; me[i].my_name; i++) { 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))) if (!(me[i].my_bit & *(me[i].my_mask)))
continue; 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 */ /* Recurse if actually have a sub-distribution */
if (me[i].my_dist) { if (me[i].my_dist) {
status = distExtract(me[i].my_name, me[i].my_dist); status = distExtract(dist, me[i].my_dist);
goto done; goto done;
} }
dist = me[i].my_name; /* First try to get the distribution as a single file */
path = parent ? parent : me[i].my_name;
snprintf(buf, 512, "%s/%s.tgz", path, dist); snprintf(buf, 512, "%s/%s.tgz", path, dist);
fd = (*mediaDevice->get)(buf); if (isDebug())
if (fd != -1) { 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); msgNotify("Extracting %s into %s directory...", me[i].my_name, me[i].my_dir);
status = mediaExtractDist(me[i].my_dir, fd); status = mediaExtractDist(me[i].my_dir, fd);
if (mediaDevice->close) (*mediaDevice->close)(mediaDevice, fd);
(*mediaDevice->close)(mediaDevice, fd);
else
close(fd);
goto done; 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); snprintf(buf, sizeof buf, "/stand/info/%s/%s.inf", path, dist);
if (!access(buf, R_OK)) { if (!access(buf, R_OK)) {
if (isDebug()) if (isDebug())
@ -273,56 +339,42 @@ distExtract(char *parent, Distribution *me)
msgDebug("Looking for attribute `pieces'\n"); msgDebug("Looking for attribute `pieces'\n");
tmp = attr_match(dist_attr, "pieces"); tmp = attr_match(dist_attr, "pieces");
if (tmp) if (tmp)
numchunks = atoi(tmp); numchunks = strtol(tmp, 0, 0);
else else
numchunks = 0; numchunks = 0;
} }
else else {
if (isDebug())
msgDebug("Couldn't open attributes file: %s\n", buf);
numchunks = 0; numchunks = 0;
}
if (!numchunks)
continue;
if (isDebug()) if (isDebug())
msgDebug("Attempting to extract distribution from %u chunks.\n", numchunks); msgDebug("Attempting to extract distribution from %u chunks.\n", numchunks);
if (numchunks < 2 ) { /* We have one or more chunks, go pick them up */
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;
}
mediaExtractDistBegin(me[i].my_dir, &fd2, &zpid, &cpid); mediaExtractDistBegin(me[i].my_dir, &fd2, &zpid, &cpid);
dialog_clear(); dialog_clear();
for (chunk = 0; chunk < numchunks; chunk++) { for (chunk = 0; chunk < numchunks; chunk++) {
int n, retval; int n, retval;
char prompt[80]; char prompt[80];
int retries = 0;
snprintf(buf, 512, "%s/%s.%c%c", path, dist, (chunk / 26) + 'a', (chunk % 26) + 'a'); snprintf(buf, 512, "%s/%s.%c%c", path, dist, (chunk / 26) + 'a', (chunk % 26) + 'a');
retry: if (isDebug())
fd = (*mediaDevice->get)(buf); msgDebug("trying for piece %d of %d: %s\n", chunk, numchunks, buf);
fd = (*mediaDevice->get)(mediaDevice, buf, dist_attr);
if (fd < 0) { if (fd < 0) {
if (++retries < 5) dialog_clear();
goto retry; msgConfirm("failed to retreive piece file %s!\nAborting the transfer", buf);
msgConfirm("failed to retreive piece file %s after 5 retries!\nAborting the transfer", buf);
goto punt; goto punt;
} }
snprintf(prompt, 80, "Extracting %s into %s directory...", me[i].my_name, me[i].my_dir); 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)); dialog_gauge("Progress", prompt, 8, 15, 6, 50, (int)((float)(chunk + 1) / numchunks * 100));
while ((n = read(fd, buf, sizeof buf)) > 0) { while ((n = read(fd, buf, sizeof buf)) > 0) {
retval = write(fd2, buf, n); retval = write(fd2, buf, n);
if (retval != n) if (retval != n) {
{
if (mediaDevice->close) if (mediaDevice->close)
(*mediaDevice->close)(mediaDevice, fd); (*mediaDevice->close)(mediaDevice, fd);
else else
@ -331,10 +383,7 @@ distExtract(char *parent, Distribution *me)
goto punt; goto punt;
} }
} }
if (mediaDevice->close) (*mediaDevice->close)(mediaDevice, fd);
(*mediaDevice->close)(mediaDevice, fd);
else
close(fd);
} }
close(fd2); close(fd2);
status = mediaExtractDistEnd(zpid, cpid); status = mediaExtractDistEnd(zpid, cpid);
@ -347,19 +396,20 @@ distExtract(char *parent, Distribution *me)
done: done:
if (!status) { if (!status) {
if (getenv(NO_CONFIRMATION)) if (OptFlags & OPT_NO_CONFIRM)
status = TRUE; status = TRUE;
else 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); 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 try to retrieve it again?", me[i].my_name, mediaDevice->name);
}
} }
if (status) { /* Extract was successful, remove ourselves from further consideration */
/* Extract was successful, remove ourselves from further consideration */ if (status)
*(me[i].my_mask) &= ~(me[i].my_bit); *(me[i].my_mask) &= ~(me[i].my_bit);
}
}
if (mediaDevice->shutdown && parent == NULL) {
(*mediaDevice->shutdown)(mediaDevice);
mediaDevice = NULL;
} }
return status; return status;
} }
@ -369,9 +419,18 @@ distExtractAll(void)
{ {
int retries = 0; 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. */ /* Try for 3 times around the loop, then give up. */
while (Dists && ++retries < 3) while (Dists && ++retries < 3)
distExtract(NULL, DistTable); distExtract(NULL, DistTable);
/* Anything left? */
if (Dists) 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);
} }

View File

@ -8,27 +8,28 @@
#define DIST_PROFLIBS 0x0008 #define DIST_PROFLIBS 0x0008
#define DIST_DICT 0x0010 #define DIST_DICT 0x0010
#define DIST_SRC 0x0020 #define DIST_SRC 0x0020
#define DIST_DES 0x0040 #define DIST_HELP 0x0040 /* Not yet used; reserved */
#define DIST_INFO 0x0080 #define DIST_INFO 0x0080
#define DIST_COMPAT1X 0x0100 #define DIST_COMPAT1X 0x0100
#define DIST_COMPAT20 0x0200 #define DIST_COMPAT20 0x0200
#define DIST_XF86 0x0400 #define DIST_XF86 0x0400
#define DIST_COMMERCIAL 0x0800 #define DIST_COMMERCIAL 0x0800
#define DIST_DES 0x1000
#define DIST_EXPERIMENTAL 0x2000
#define DIST_ALL 0x0FFF #define DIST_ALL 0x0FFF
/* Canned distribution sets */ /* Canned distribution sets */
#define _DIST_DEVELOPER \ #define _DIST_DEVELOPER \
(DIST_BIN | DIST_MANPAGES | DIST_DICT | DIST_PROFLIBS | DIST_SRC) (DIST_BIN | DIST_MANPAGES | DIST_DICT | DIST_PROFLIBS | DIST_INFO | DIST_SRC)
#define _DIST_XDEVELOPER \
(_DIST_DEVELOPER | DIST_XF86)
#define _DIST_USER \ #define _DIST_USER \
(DIST_BIN | DIST_MANPAGES | DIST_DICT | DIST_COMPAT1X | DIST_COMPAT20) (DIST_BIN | DIST_MANPAGES | DIST_DICT | DIST_COMPAT1X | DIST_COMPAT20)
#define _DIST_XUSER \ /* Subtypes for DES distribution */
(_DIST_USER | DIST_XF86) #define DIST_DES_DES 0x0001
#define DIST_DES_SEBONES 0x0002
#define DIST_DES_SSECURE 0x0004
#define DIST_DES_KERBEROS 0x0008
/* Subtypes for SRC distribution */ /* Subtypes for SRC distribution */
#define DIST_SRC_BASE 0x0001 #define DIST_SRC_BASE 0x0001
@ -45,38 +46,41 @@
#define DIST_SRC_SYS 0x0800 #define DIST_SRC_SYS 0x0800
#define DIST_SRC_UBIN 0x1000 #define DIST_SRC_UBIN 0x1000
#define DIST_SRC_USBIN 0x2000 #define DIST_SRC_USBIN 0x2000
#define DIST_SRC_XF86 0x4000 #define DIST_SRC_ALL 0xFFFF
#define DIST_SRC_ALL 0x3FFF /* Don't include XFree86 source by default */
/* Subtypes for XFree86 distribution */ /* Subtypes for XFree86 distribution */
#define DIST_XF86_BIN 0x0001 #define DIST_XF86_BIN 0x0001
#define DIST_XF86_LIB 0x0004 #define DIST_XF86_LIB 0x0002
#define DIST_XF86_DOC 0x0008 #define DIST_XF86_DOC 0x0004
#define DIST_XF86_MAN 0x0010 #define DIST_XF86_MAN 0x0008
#define DIST_XF86_PROG 0x0020 #define DIST_XF86_PROG 0x0010
#define DIST_XF86_LINK 0x0040 #define DIST_XF86_LINK 0x0020
#define DIST_XF86_PEX 0x0080 #define DIST_XF86_PEX 0x0040
#define DIST_XF86_LBX 0x0100 #define DIST_XF86_LBX 0x0080
#define DIST_XF86_SERVER 0x0200 #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_8514 0x0001
#define DIST_XF86_SERVER_AGX 0x0002 #define DIST_XF86_SERVER_AGX 0x0002
#define DIST_XF86_SERVER_MACH32 0x0004 #define DIST_XF86_SERVER_MACH8 0x0004
#define DIST_XF86_SERVER_MACH8 0x0008 #define DIST_XF86_SERVER_MACH32 0x0008
#define DIST_XF86_SERVER_MONO 0x0010 #define DIST_XF86_SERVER_MACH64 0x0010
#define DIST_XF86_SERVER_P9000 0x0020 #define DIST_XF86_SERVER_MONO 0x0020
#define DIST_XF86_SERVER_S3 0x0040 #define DIST_XF86_SERVER_P9000 0x0040
#define DIST_XF86_SERVER_SVGA 0x0080 #define DIST_XF86_SERVER_S3 0x0080
#define DIST_XF86_SERVER_VGA16 0x0100 #define DIST_XF86_SERVER_SVGA 0x0100
#define DIST_XF86_SERVER_W32 0x0200 #define DIST_XF86_SERVER_VGA16 0x0200
#define DIST_XF86_SERVER_NEST 0x0400 #define DIST_XF86_SERVER_W32 0x0400
#define DIST_XF86_XINIT 0x0400 #define DIST_XF86_SERVER_NEST 0x0800
#define DIST_XF86_XDMCF 0x0800 #define DIST_XF86_SERVER_ALL 0x0FFF
#define DIST_XF86_FONTS 0x1000 #define DIST_XF86_FONTS 0x1000
#define DIST_XF86_FONTS_MISC 0x0001 #define DIST_XF86_FONTS_MISC 0x0001
#define DIST_XF86_FONTS_100 0x0002 #define DIST_XF86_FONTS_100 0x0002
#define DIST_XF86_FONTS_SCALE 0x0004 #define DIST_XF86_FONTS_SCALE 0x0004
#define DIST_XF86_FONTS_NON 0x0008 #define DIST_XF86_FONTS_NON 0x0008
#define DIST_XF86_FONTS_SERVER 0x0010 #define DIST_XF86_FONTS_SERVER 0x0010
#define DIST_XF86_FONTS_ALL 0x00FF
#define DIST_XF86_ALL 0xFFFF #define DIST_XF86_ALL 0xFFFF
#endif #endif

View File

@ -4,7 +4,7 @@
* This is probably the last attempt in the `sysinstall' line, the next * This is probably the last attempt in the `sysinstall' line, the next
* generation being slated for what's essentially a complete rewrite. * 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 * Copyright (c) 1995
* Jordan Hubbard. All rights reserved. * Jordan Hubbard. All rights reserved.
@ -42,23 +42,66 @@
*/ */
#include "sysinstall.h" #include "sysinstall.h"
#include <sys/types.h>
#define MAX_MENU 10 #define MAX_MENU 8
static DMenuItem shellAction = { NULL, NULL, DMENU_SHELL_ESCAPE, NULL, 0 };
/* Traverse menu but give user no control over positioning */ /* Traverse menu but give user no control over positioning */
void Boolean
dmenuOpenSimple(DMenu *menu) dmenuOpenSimple(DMenu *menu)
{ {
int choice, scroll, curr, max; int choice, scroll, curr, max;
choice = scroll = curr = max = 0; 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 */ /* Traverse over an internal menu */
void Boolean
dmenuOpen(DMenu *menu, int *choice, int *scroll, int *curr, int *max) dmenuOpen(DMenu *menu, int *choice, int *scroll, int *curr, int *max)
{ {
char result[FILENAME_MAX]; char result[FILENAME_MAX];
@ -69,21 +112,9 @@ dmenuOpen(DMenu *menu, int *choice, int *scroll, int *curr, int *max)
/* First, construct the menu */ /* First, construct the menu */
for (tmp = menu->items; tmp->title; tmp++) { for (tmp = menu->items; tmp->title; tmp++) {
if (!tmp->disabled) { if (!tmp->disabled) {
char *addme = NULL; nitems = item_add_pair(nitems, tmp->title, tmp->prompt, curr, max);
char *title = tmp->title; if (menu->options & (DMENU_RADIO_TYPE | DMENU_MULTIPLE_TYPE))
char *prompt = tmp->prompt; nitems = item_add(nitems, checkHookVal(tmp), curr, max);
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);
++n; ++n;
} }
} }
@ -98,32 +129,16 @@ dmenuOpen(DMenu *menu, int *choice, int *scroll, int *curr, int *max)
/* Pop up that dialog! */ /* Pop up that dialog! */
if (menu->options & DMENU_NORMAL_TYPE) { if (menu->options & DMENU_NORMAL_TYPE) {
rval = dialog_menu((unsigned char *)menu->title, rval = dialog_menu((u_char *)menu->title, (u_char *)menu->prompt, -1, -1,
(unsigned char *)menu->prompt, n > MAX_MENU ? MAX_MENU : n, n, (u_char **)nitems, (u_char *)result, choice, scroll);
-1, -1,
n > MAX_MENU ? MAX_MENU : n,
n,
(unsigned char **)nitems,
(unsigned char *)result,
choice, scroll);
} }
else if (menu->options & DMENU_RADIO_TYPE) { else if (menu->options & DMENU_RADIO_TYPE) {
rval = dialog_radiolist((unsigned char *)menu->title, rval = dialog_radiolist((u_char *)menu->title, (u_char *)menu->prompt, -1, -1,
(unsigned char *)menu->prompt, n > MAX_MENU ? MAX_MENU : n, n, (u_char **)nitems, (u_char *)result);
-1, -1,
n > MAX_MENU ? MAX_MENU : n,
n,
(unsigned char **)nitems,
(unsigned char *)result);
} }
else if (menu->options & DMENU_MULTIPLE_TYPE) { else if (menu->options & DMENU_MULTIPLE_TYPE) {
rval = dialog_checklist((unsigned char *)menu->title, rval = dialog_checklist((u_char *)menu->title, (u_char *)menu->prompt, -1, -1,
(unsigned char *)menu->prompt, n > MAX_MENU ? MAX_MENU : n, n, (u_char **)nitems, (u_char *)result);
-1, -1,
n > MAX_MENU ? MAX_MENU : n,
n,
(unsigned char **)nitems,
(unsigned char *)result);
} }
/* This seems to be the only technique that works for getting the display to look right */ /* 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) || if (decode_and_dispatch_multiple(menu, result) ||
menu->options & DMENU_SELECTION_RETURNS) { menu->options & DMENU_SELECTION_RETURNS) {
items_free(nitems, curr, max); items_free(nitems, curr, max);
return; return TRUE;
} }
} }
} }
else { else {
if ((tmp = decode(menu, result)) == NULL) 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 { else {
items_free(nitems, curr, max); items_free(nitems, curr, max);
return; return FALSE;
}
if (dispatch(tmp, result) ||
menu->options & DMENU_SELECTION_RETURNS) {
items_free(nitems, curr, max);
return;
} }
} }
} }

View File

@ -4,7 +4,7 @@
* This is probably the last attempt in the `sysinstall' line, the next * This is probably the last attempt in the `sysinstall' line, the next
* generation being slated to essentially a complete rewrite. * 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 * Copyright (c) 1995
* Jordan Hubbard. All rights reserved. * Jordan Hubbard. All rights reserved.
@ -69,12 +69,13 @@ mediaInitDOS(Device *dev)
if (Mkdir("/dos", NULL)) if (Mkdir("/dos", NULL))
return FALSE; return FALSE;
bzero(&args, sizeof(args)); memset(&args, 0, sizeof(args));
args.fspec = dev->devname; args.fspec = dev->devname;
args.uid = args.gid = 0; args.uid = args.gid = 0;
args.mask = 0777;
if (mount(MOUNT_MSDOS, "/dos", MNT_RDONLY, (caddr_t)&args) == -1) { 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; return FALSE;
} }
DOSMounted = TRUE; DOSMounted = TRUE;
@ -82,13 +83,13 @@ mediaInitDOS(Device *dev)
} }
int int
mediaGetDOS(char *file) mediaGetDOS(Device *dev, char *file, Attribs *dist_attrs)
{ {
char buf[PATH_MAX]; char buf[PATH_MAX];
snprintf(buf, PATH_MAX, "/dos/freebsd/%s", file); snprintf(buf, PATH_MAX, "/dos/freebsd/%s", file);
if (!access(buf, R_OK)) if (!access(buf, R_OK))
return open(buf, O_RDONLY); return open(buf, O_RDONLY);
snprintf(buf, PATH_MAX, "/dos/freebsd/dists/%s", file); snprintf(buf, PATH_MAX, "/dos/freebsd/dists/%s", file);
return open(buf, O_RDONLY); return open(buf, O_RDONLY);
} }
@ -99,7 +100,7 @@ mediaShutdownDOS(Device *dev)
if (!DOSMounted) if (!DOSMounted)
return; return;
msgDebug("Unmounting /dos\n"); 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)); msgConfirm("Could not unmount the DOS partition: %s\n", strerror(errno));
if (isDebug()) if (isDebug())
msgDebug("Unmount returned\n"); msgDebug("Unmount returned\n");

View File

@ -4,7 +4,7 @@
* This is probably the last attempt in the `sysinstall' line, the next * This is probably the last attempt in the `sysinstall' line, the next
* generation being slated to essentially a complete rewrite. * 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 * Copyright (c) 1995
* Jordan Hubbard. All rights reserved. * Jordan Hubbard. All rights reserved.
@ -61,6 +61,8 @@
static Device *floppyDev; static Device *floppyDev;
static Boolean floppyMounted; static Boolean floppyMounted;
static char *distWanted;
/* For finding floppies */ /* For finding floppies */
static int static int
floppyChoiceHook(char *str) floppyChoiceHook(char *str)
@ -90,22 +92,27 @@ getRootFloppy(void)
devs = deviceFind(NULL, DEVICE_TYPE_FLOPPY); devs = deviceFind(NULL, DEVICE_TYPE_FLOPPY);
cnt = deviceCount(devs); 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]; floppyDev = devs[0];
else if (cnt > 1) { msgConfirm("Please insert the ROOT floppy in %s and press [ENTER]", floppyDev->description);
}
else {
DMenu *menu; DMenu *menu;
menu = deviceCreateMenu(&MenuMediaFloppy, DEVICE_TYPE_FLOPPY, floppyChoiceHook); menu = deviceCreateMenu(&MenuMediaFloppy, DEVICE_TYPE_FLOPPY, floppyChoiceHook);
menu->title = "Please insert the ROOT floppy"; menu->title = "Please insert the ROOT floppy";
dmenuOpenSimple(menu); if (!dmenuOpenSimple(menu))
} return -1;
else {
msgConfirm("No floppy devices found! Something is seriously wrong!");
return -1;
} }
if (!floppyDev) if (!floppyDev)
continue; continue;
fd = open(floppyDev->devname, O_RDONLY); fd = open(floppyDev->devname, O_RDONLY);
if (isDebug())
msgDebug("getRootFloppy on %s yields fd of %d\n", floppyDev->devname, fd);
} }
return fd; return fd;
} }
@ -114,42 +121,104 @@ Boolean
mediaInitFloppy(Device *dev) mediaInitFloppy(Device *dev)
{ {
struct msdosfs_args dosargs; struct msdosfs_args dosargs;
char mountpoint[FILENAME_MAX];
if (floppyMounted) if (floppyMounted)
return TRUE; return TRUE;
memset(&dosargs, 0, sizeof dosargs);
if (Mkdir("/mnt", NULL)) { 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; return FALSE;
} }
msgConfirm("Please insert media into %s and press return", dev->description); if (!distWanted)
msgDebug("initFloppy: mount floppy %s on /mnt\n", dev->devname); 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.fspec = dev->devname;
dosargs.uid = dosargs.gid = 0;
dosargs.mask = 0777;
if (mount(MOUNT_MSDOS, "/mnt", 0, (caddr_t)&dosargs) == -1) { if (mount(MOUNT_MSDOS, "/mnt", 0, (caddr_t)&dosargs) == -1) {
msgConfirm("Error mounting floppy %s (%s) on /mnt : %s\n", dev->name, msgConfirm("Error mounting floppy %s (%s) on /mnt : %s", dev->name, dev->devname, strerror(errno));
dev->devname, mountpoint, strerror(errno));
return FALSE; return FALSE;
} }
if (isDebug())
msgDebug("initFloppy: mounted floppy %s successfully on /mnt\n", dev->devname);
floppyMounted = TRUE; floppyMounted = TRUE;
return TRUE; return TRUE;
} }
int int
mediaGetFloppy(char *file) mediaGetFloppy(Device *dev, char *file, Attribs *dist_attrs)
{ {
char buf[PATH_MAX]; 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); 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 void
mediaShutdownFloppy(Device *dev) mediaShutdownFloppy(Device *dev)
{ {
if (floppyMounted) { 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); msgDebug("Umount of floppy on /mnt failed: %s (%d)\n", strerror(errno), errno);
else { else {
floppyMounted = FALSE; floppyMounted = FALSE;

View File

@ -6,8 +6,12 @@
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp * 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.
*
*/ */
#include <stdlib.h> #include <stdlib.h>
@ -27,6 +31,9 @@
#include <netinet/in.h> #include <netinet/in.h>
#include <arpa/inet.h> #include <arpa/inet.h>
/* Handy global for us to stick the port # */
int FtpPort;
#ifndef STANDALONE_FTP #ifndef STANDALONE_FTP
#include "sysinstall.h" #include "sysinstall.h"
#endif /*STANDALONE_FTP*/ #endif /*STANDALONE_FTP*/
@ -39,17 +46,14 @@ debug(FTP_t ftp, const char *fmt, ...)
va_start(ap, fmt); va_start(ap, fmt);
#ifdef STANDALONE_FTP #ifdef STANDALONE_FTP
strcpy(p,"LIBFTP: "); strcpy(p,"LIBFTP: ");
#else
*p = '\0';
#endif
(void) vsnprintf(p+strlen(p), sizeof p - strlen(p), fmt, ap); (void) vsnprintf(p+strlen(p), sizeof p - strlen(p), fmt, ap);
va_end(ap); va_end(ap);
#ifdef STANDALONE_FTP
write(ftp->fd_debug,p,strlen(p)); write(ftp->fd_debug,p,strlen(p));
#else #else
if (isDebug()) if (isDebug()) {
(void) vsnprintf(p, sizeof p - strlen(p), fmt, ap);
msgDebug(p); msgDebug(p);
}
#endif #endif
} }
@ -58,11 +62,11 @@ writes(int fd, char *s)
{ {
int i = strlen(s); int i = strlen(s);
if (i != write(fd,s,i)) if (i != write(fd,s,i))
return errno ? errno : -1; return -2;
return 0; return 0;
} }
static char* static __inline char*
get_a_line(FTP_t ftp) get_a_line(FTP_t ftp)
{ {
static char buf[BUFSIZ]; static char buf[BUFSIZ];
@ -92,15 +96,17 @@ get_a_number(FTP_t ftp, char **q)
while(1) { while(1) {
p = get_a_line(ftp); p = get_a_line(ftp);
if (!p)
return -2;
if (!(isdigit(p[0]) && isdigit(p[1]) && isdigit(p[2]))) if (!(isdigit(p[0]) && isdigit(p[1]) && isdigit(p[2])))
continue; continue;
if (i == -1 && p[3] == '-') { if (i == -1 && p[3] == '-') {
i = atoi(p); i = strtol(p, 0, 0);
continue; continue;
} }
if (p[3] != ' ' && p[3] != '\t') if (p[3] != ' ' && p[3] != '\t')
continue; continue;
j = atoi(p); j = strtol(p, 0, 0);
if (i == -1) { if (i == -1) {
if (q) *q = p+4; if (q) *q = p+4;
return j; return j;
@ -112,14 +118,24 @@ get_a_number(FTP_t ftp, char **q)
} }
static int 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); int i;
writes(ftp->fd_ctrl,"QUIT\r\n");
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_ctrl); ftp->fd_ctrl = -1;
close(ftp->fd_xfer); ftp->fd_xfer = -1; close(ftp->fd_xfer); ftp->fd_xfer = -1;
ftp->state = init; 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 static int
@ -136,7 +152,7 @@ cmd(FTP_t ftp, const char *fmt, ...)
debug(ftp, "send <%s>\n",p); debug(ftp, "send <%s>\n",p);
strcat(p,"\r\n"); strcat(p,"\r\n");
if (writes(ftp->fd_ctrl,p)) if (writes(ftp->fd_ctrl,p))
return -1; return -2;
i = get_a_number(ftp,0); i = get_a_number(ftp,0);
return i; return i;
} }
@ -170,9 +186,9 @@ FtpOpen(FTP_t ftp, char *host, char *user, char *passwd)
{ {
struct hostent *he = NULL; struct hostent *he = NULL;
struct sockaddr_in sin; struct sockaddr_in sin;
int s; int s;
unsigned long temp; unsigned long temp;
int i; int i;
if (ftp->state != init) if (ftp->state != init)
return botch(ftp,"FtpOpen","init"); return botch(ftp,"FtpOpen","init");
@ -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); debug(ftp, "FtpOpen(ftp, %s, %s, %s)\n", host, user, passwd);
temp = inet_addr(host); temp = inet_addr(host);
if (temp != INADDR_NONE) if (temp != INADDR_NONE) {
{
debug(ftp, "Using dotted IP address `%s'\n", host); debug(ftp, "Using dotted IP address `%s'\n", host);
ftp->addrtype = sin.sin_family = AF_INET; ftp->addrtype = sin.sin_family = AF_INET;
sin.sin_addr.s_addr = temp; sin.sin_addr.s_addr = temp;
} else { }
else {
debug(ftp, "Trying to resolve `%s'\n", host); debug(ftp, "Trying to resolve `%s'\n", host);
he = gethostbyname(host); he = gethostbyname(host);
if (!he) if (!he) {
{
debug(ftp, "Lookup of `%s' failed!\n", host); debug(ftp, "Lookup of `%s' failed!\n", host);
return ENOENT; return zap(ftp);
} }
ftp->addrtype = sin.sin_family = he->h_addrtype; ftp->addrtype = sin.sin_family = he->h_addrtype;
bcopy(he->h_addr, (char *)&sin.sin_addr, he->h_length); 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) if ((s = socket(ftp->addrtype, SOCK_STREAM, 0)) < 0)
{ {
debug(ftp, "Socket open failed: %s (%i)\n", strerror(errno), errno); 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) { if (connect(s, (struct sockaddr *)&sin, sizeof(sin)) < 0) {
debug(ftp,"Connection failed: %s (%i)\n", strerror(errno), errno); debug(ftp,"Connection failed: %s (%i)\n", strerror(errno), errno);
(void)close(s); (void)close(s);
return -1; return zap(ftp);
} }
ftp->fd_ctrl = s; ftp->fd_ctrl = s;
@ -224,30 +239,25 @@ FtpOpen(FTP_t ftp, char *host, char *user, char *passwd)
i = cmd(ftp,"USER %s",user); i = cmd(ftp,"USER %s",user);
if (i >= 300 && i < 400) if (i >= 300 && i < 400)
i = cmd(ftp,"PASS %s",passwd); i = cmd(ftp,"PASS %s",passwd);
if (i >= 299) if (i >= 299 || i < 0) {
return -1; close(ftp->fd_ctrl); ftp->fd_ctrl = -1;
return zap(ftp);
}
ftp->state = isopen; ftp->state = isopen;
return 0; return 0;
#if 0
fail:
close(ftp->fd_ctrl);
ftp->fd_ctrl = -1;
return -1;
#endif
} }
void void
FtpClose(FTP_t ftp) FtpClose(FTP_t ftp)
{ {
if (ftp->state != init)
return;
if (ftp->state != isopen) if (ftp->state != isopen)
botch(ftp,"FtpClose","open"); botch(ftp,"FtpClose","open or init");
debug(ftp, "FtpClose(ftp)\n"); debug(ftp, "FtpClose(ftp)\n");
writes(ftp->fd_ctrl,"QUIT\r\n"); zap(ftp);
close(ftp->fd_ctrl); ftp->fd_ctrl = -1;
close(ftp->fd_xfer); ftp->fd_xfer = -1;
ftp->state = init;
} }
int int
@ -257,6 +267,10 @@ FtpChdir(FTP_t ftp, char *dir)
if (ftp->state != isopen) if (ftp->state != isopen)
return botch(ftp,"FtpChdir","open"); return botch(ftp,"FtpChdir","open");
i = cmd(ftp,"CWD %s",dir); i = cmd(ftp,"CWD %s",dir);
if (i < 0)
return i;
else if (i != 250)
return -1;
return 0; return 0;
} }
@ -265,30 +279,39 @@ FtpGet(FTP_t ftp, char *file)
{ {
int i,s; int i,s;
char *q; char *q;
unsigned char addr[6]; unsigned char addr[64];
struct sockaddr_in sin; struct sockaddr_in sin;
u_long a;
debug(ftp, "FtpGet(ftp,%s)\n",file); debug(ftp, "FtpGet(ftp,%s)\n",file);
if (ftp->state != isopen) if (ftp->state != isopen)
return botch(ftp,"FtpGet","open"); return botch(ftp,"FtpGet","open");
if(ftp->binary) { if(ftp->binary) {
i = cmd(ftp,"TYPE I"); i = cmd(ftp,"TYPE I");
if (i < 0)
return zap(ftp);
if (i > 299) if (i > 299)
return -1; return -1;
} else { } else {
return -1; return -1;
} }
if ((s = socket(ftp->addrtype, SOCK_STREAM, 0)) < 0)
return zap(ftp);
if (ftp->passive) { if (ftp->passive) {
debug(ftp, "send <%s>\n","PASV"); debug(ftp, "send <%s>\n","PASV");
if (writes(ftp->fd_ctrl,"PASV\r\n")) if (writes(ftp->fd_ctrl,"PASV\r\n"))
return -1; return zap(ftp);
i = get_a_number(ftp,&q); i = get_a_number(ftp,&q);
if (i < 0)
return zap(ftp);
if (i != 227) if (i != 227)
return -1; return zap(ftp);
while (*q && !isdigit(*q)) while (*q && !isdigit(*q))
q++; q++;
if (!*q) if (!*q)
return -1; return zap(ftp);
q--; q--;
for(i=0;i<6;i++) { for(i=0;i<6;i++) {
q++; q++;
@ -300,42 +323,96 @@ FtpGet(FTP_t ftp, char *file)
bcopy(addr+4, (char *)&sin.sin_port, 2); 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)); 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)); 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) { if (connect(s, (struct sockaddr *)&sin, sizeof(sin)) < 0) {
(void)close(s); (void)close(s);
debug(ftp, "connect: %s (%d)\n", strerror(errno), errno); debug(ftp, "connect: %s (%d)\n", strerror(errno), errno);
return -1; return -1;
} }
i = cmd(ftp,"RETR %s",file);
if (i > 299)
return -1;
ftp->state = xfer;
ftp->fd_xfer = s; 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; return s;
} else { } else {
return -1; 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 int
FtpEOF(FTP_t ftp) FtpEOF(FTP_t ftp)
{ {
int i;
if (ftp->state != xfer) if (ftp->state != xfer)
return botch(ftp,"FtpEOF","xfer"); return botch(ftp,"FtpEOF","xfer");
debug(ftp, "FtpEOF(ftp)\n"); debug(ftp, "FtpEOF(ftp)\n");
close(ftp->fd_xfer); ftp->fd_xfer = -1; close(ftp->fd_xfer); ftp->fd_xfer = -1;
ftp->state = isopen; 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 #ifdef STANDALONE_FTP
/* main.c */ /* main.c */
int int
main(int argc, char **argv) main(int argc, char **argv)
{ {
@ -344,27 +421,17 @@ main(int argc, char **argv)
char c; char c;
ftp = FtpInit(); ftp = FtpInit();
if (!ftp) err(1,"FtpInit()"); if (!ftp)
err(1, "FtpInit()");
FtpDebug(ftp,1); 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@"); i = FtpOpen(ftp, "freefall.cdrom.com", "ftp", "phk-libftp@");
FtpBinary(ftp,1); FtpBinary(ftp, 1);
FtpPassive(ftp,1); FtpPassive(ftp, 0);
FtpChdir(ftp,"/pub"); FtpChdir(ftp, "/pub");
FtpChdir(ftp,"FreeBSD"); FtpChdir(ftp, "FreeBSD");
i = FtpGet(ftp,"README"); i = FtpGet(ftp, "README");
while(1 == read(i,&c,1)) while (1 == read(i, &c, 1))
putchar(c); putchar(c);
FtpEOF(ftp); FtpEOF(ftp);
return 0; return 0;

View File

@ -4,7 +4,7 @@
* This is probably the last attempt in the `sysinstall' line, the next * This is probably the last attempt in the `sysinstall' line, the next
* generation being slated to essentially a complete rewrite. * 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 * Copyright (c) 1995
* Jordan Hubbard. All rights reserved. * Jordan Hubbard. All rights reserved.
@ -54,86 +54,195 @@
Boolean ftpInitted; Boolean ftpInitted;
static FTP_t ftp; 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 Boolean
mediaInitFTP(Device *dev) mediaInitFTP(Device *dev)
{ {
int i; int i, retries, max_retries = MAX_FTP_RETRIES;
char *cp, *hostname, *dir; char *cp, *hostname, *dir;
char *my_name, email[BUFSIZ], url[BUFSIZ]; char *user, *login_name, password[80], url[BUFSIZ];
Device *netDevice = (Device *)dev->private; Device *netDevice = (Device *)dev->private;
if (ftpInitted) if (ftpInitted)
return TRUE; return TRUE;
if (netDevice->init) if (!(*netDevice->init)(netDevice))
if (!(*netDevice->init)(netDevice)) return FALSE;
return FALSE;
if ((ftp = FtpInit()) == NULL) { if ((ftp = FtpInit()) == NULL) {
msgConfirm("FTP initialisation failed!"); msgConfirm("FTP initialisation failed!");
return FALSE; goto punt;
} }
if (isDebug())
msgDebug("Initialized FTP library.\n");
cp = getenv("ftp"); cp = getenv("ftp");
if (!cp) if (!cp)
return FALSE; goto punt;
my_name = getenv(VAR_HOSTNAME); if (isDebug())
msgDebug("Attempting to open connection for: %s\n", cp);
hostname = getenv(VAR_HOSTNAME);
if (strncmp("ftp://", cp, 6) != NULL) { if (strncmp("ftp://", cp, 6) != NULL) {
msgConfirm("Invalid URL (`%s') passed to FTP routines!\n(must start with `ftp://')", url); msgConfirm("Invalid URL: %s\n(A URL must start with `ftp://' here)", cp);
return FALSE; goto punt;
} }
strncpy(url, cp, BUFSIZ); strncpy(url, cp, BUFSIZ);
if (isDebug()) if (isDebug())
msgDebug("Using URL `%s'\n", url); msgDebug("Using URL `%s'\n", url);
hostname = url + 6; 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'; *(dir++) = '\0';
strcpy(dev->name, hostname);
if (isDebug()) { if (isDebug()) {
msgDebug("hostname = `%s'\n", hostname); msgDebug("hostname = `%s'\n", hostname);
msgDebug("dir = `%s'\n", dir ? dir : "/"); msgDebug("dir = `%s'\n", dir ? dir : "/");
msgDebug("port # = `%d'\n", FtpPort);
} }
msgNotify("Looking up host %s..", hostname); msgNotify("Looking up host %s..", hostname);
if ((gethostbyname(hostname) == NULL) && (inet_addr(hostname) == INADDR_NONE)) { 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);
return FALSE; 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); FtpPassive(ftp, (OptFlags & OPT_FTP_PASSIVE) ? 1 : 0);
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);
FtpBinary(ftp, 1); FtpBinary(ftp, 1);
if (dir && *dir != '\0') { if (dir && *dir != '\0') {
msgNotify("CD to distribution in ~ftp/%s", dir); 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()) if (isDebug())
msgDebug("leaving mediaInitFTP!\n"); msgDebug("leaving mediaInitFTP!\n");
ftpInitted = TRUE; ftpInitted = TRUE;
return TRUE; return TRUE;
punt:
FtpClose(ftp);
ftp = NULL;
(*netDevice->shutdown)(netDevice);
return FALSE;
} }
int 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 Boolean
mediaCloseFTP(Device *dev, int fd) mediaCloseFTP(Device *dev, int fd)
{ {
FtpEOF(ftp); FtpEOF(ftp);
return (TRUE); if (!close(fd))
return (TRUE);
return FALSE;
} }
void void
@ -148,7 +257,6 @@ mediaShutdownFTP(Device *dev)
FtpClose(ftp); FtpClose(ftp);
ftp = NULL; ftp = NULL;
} }
if (netdev->shutdown) (*netdev->shutdown)(netdev);
(*netdev->shutdown)(netdev);
ftpInitted = FALSE; ftpInitted = FALSE;
} }

View File

@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next * This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite. * 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 * Copyright (c) 1995
* Jordan Hubbard. All rights reserved. * Jordan Hubbard. All rights reserved.
@ -48,16 +48,16 @@
* whatever values we feel are appropriate. * whatever values we feel are appropriate.
*/ */
int RootFD; /* The file descriptor for our ROOT floppy */
int DebugFD; /* Where diagnostic output goes */ 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 RunningAsInit; /* Are we running as init? */
Boolean DialogActive; Boolean DialogActive;
Boolean ColorDisplay; Boolean ColorDisplay;
Boolean OnVTY; Boolean OnVTY;
Variable *VarHead; /* The head of the variable chain */ Variable *VarHead; /* The head of the variable chain */
Device *mediaDevice; /* Where we're installing from */ 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 * Yes, I know some of these are already automatically initialized as
@ -66,14 +66,13 @@ Device *mediaDevice; /* Where we're installing from */
void void
globalsInit(void) globalsInit(void)
{ {
RootFD = -1;
DebugFD = -1; DebugFD = -1;
OnCDROM = FALSE;
OnSerial = FALSE;
ColorDisplay = FALSE; ColorDisplay = FALSE;
OnVTY = FALSE; OnVTY = FALSE;
DialogActive = FALSE; DialogActive = FALSE;
VarHead = NULL; VarHead = NULL;
mediaDevice = NULL; mediaDevice = NULL;
RunningAsInit = FALSE; RunningAsInit = FALSE;
OptFlags = 0;
InstallPrefix = NULL;
} }

View File

@ -1,19 +1,20 @@
----------------------------------------- -----------------------------------------
FreeBSD 2.0.5 --- RELEASE Version , , FreeBSD 2.0.5 --- RELEASE Version , ,
----------------------------------------- /( )` ----------------------------------------- /( )`
\ \___ / | \ \___ / |
Willkommen zur Release 2.0.5 von FreeBSD. 2.0.5, /- _ `-/ ' Willkommen zum Release 2.0.5 von FreeBSD, einem /- _ `-/ '
ein Zwischen-Release von FreeBSD, f|llt eine oft (/\/ \ \ /\ Zwischen-Release von FreeBSD, das eine eine Lücke (/\/ \ \ /\
geforderte L|cke zwischen 2.0R (das im Nov. '94 / / | ` \ füllt zwischen 2.0R (das im Nov. 94 erschien) und / / | ` \
erschien) und 2.1R, das spdt im Juli '95 er- O O ) / | 2.1R, das Ende Juli '95 erscheinen wird, die oft O O ) / |
scheinen wird. FreeBSD 2.0.5 enthdlt wesentliche `-^--'`< ' beklagt wurde. FreeBSD 2.0.5 enthält wesentliche `-^--'`< '
Verbesserungen gg|. 2.0R, deren wichtigste eine (_.) _ ) / Verbesserungen gegenüber 2.0R, deren wichtigste (_.) _ ) /
erhvhte Systemstabilitdt (wesentlich besser), `.___/` / eine erhöhte Systemstabilität (wesentlich besser), `.___/` /
Dutzende neuer Features und ein stark `-----' / Dutzende neuer Features und ein stark `-----' /
verbessertes Installationsprogramm <----. __ / __ \ verbessertes Installationsprogramm <----. __ / __ \
sind. Lesen Sie die Release Notes <----|====O)))==) \) /==== sind. Die Release Notes enthalten <----|====O)))==) \) /====
f|r weitere Details bzgl. der Neu- <----' `--' `.__,' \ weitere Details bzgl. der Neuheiten <----' `--' `.__,' \
heiten in FreeBSD 2.0.5. | | 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 Was ist FreeBSD? FreeBSD ist ein 4.4BSD-Lite-basiertes Betriebssystem für
f|r Intel, AMD, Cyrix oder NexGen "x86"-PC-Hardware. Es arbeitet mit Intel, AMD, Cyrix oder NexGen "x86"-PC-Hardware. Es arbeitet mit einer
einer gro_en Anzahl von PC-Peripherie und -Konfigurationen zusammen. Es großen Anzahl von PC-Peripherie und -Konfigurationen zusammen. Es kann für
kann f|r die Software-Entwicklung bis hin zum Anbieten von Internet- die Software-Entwicklung bis hin zum Anbieten von Internet-Diensten
Diensten eingesetzt werden; der meist genutzte Rechner im Internet, eingesetzt werden; der meist genutzte Rechner im Internet, ftp.cdrom.com,
ftp.cdrom.com, ist ein FreeBSD-Rechner. ist ein FreeBSD-Rechner.
Diese FreeBSD-Release enthdlt alles was Sie zur Nutzung eines Dieses FreeBSD-Release enthält alles, was man zur Nutzung eines solchen
solchen Systems brauchen; zusdtzlich erhalten Sie den kompletten Systems braucht; zusätzlich erhält man den kompletten Quellcode. Wenn man
Quellcode. Wenn Sie den Quellcode installiert haben, kvnnen Sie den Quellcode installiert hat, kann man das ganze Betriebssystem von Grund
das ganze Betriebssystem von Grund auf mit einem einzigen Befehl auf mit einem einzigen Befehl übersetzen; dies eignet es in idealer Weise
|bersetzen; dies eignet es in idealer Weise f|r Studenten, Forscher für Studenten, Forscher oder einfach Leute, die sehen wollen, wie alles
oder einfach Leute, die sehen wollen wie alles funktioniert. funktioniert.
Eine gro_e Anzahl portierter Dritt-Software (die "ports collection") Es gibt ebenfalls eine große Anzahl portierter Dritt-Software (die "ports
gibt es ebenfalls, um Ihnen die Verf|gbarkeit und die Installation collection"), um die Verfügbarkeit und die Installation traditioneller
Ihrer traditionellen Lieblings-UNIX-Utilities f|r FreeBSD zu Lieblings-UNIX-Utilities für FreeBSD zu erleichtern. Über 270 Portierun-
erleichtern. \ber 270 Portierungen, vom EMACS Editor bis zur gen, von Editoren über Programmiersprachen bis zu Grafikanwendungen, machen
Programmiersprache LISP, machen FreeBSD zu einem mdchtigen FreeBSD zu einem mächtigen und umfassenden Betriebssystem, das keinen
und umfassenden Betriebssystem, das keinen Vergleich zu dem gro_er Vergleich zu dem großer Workstations scheut.
Workstations scheut.
Als weitere Dokumentation zu diesem System empfehlen wir die 4.4BSD Als weitere Dokumentation zu diesem System empfehlen wir die 4.4BSD-
Dokumentation von O'Reilly Associates und der USENIX Association, Dokumentation von O'Reilly Associates und der USENIX Association, ISBN
ISBN 1-56592-082-1. Wir sind nicht mit O'Reilly verbunden, sondern 1-56592-082-1. Wir haben nichts mit O'Reilly zu tun, außer daß wir
nur zufriedene Kunden! zufriedene Kunden sind!
Wir empfehlen die HARDWARE ANLEITUNG *vor* jeglicher Fortf|hrung der Wir empfehlen, die HARDWARE-ANLEITUNG *vor* jeglicher Fortführung der
Installation zu lesen. PC Hardware f|r irgend etwas anderes als Installation zu lesen. PC-Hardware für irgend etwas anderes als DOS/
DOS/Windows (das keine gro_en Anforderungen an die Hardware stellt) Windows (das keine großen Anforderungen an die Hardware stellt) zu
zu konfigurieren, ist schwieriger als es zundchst aussieht. Und wenn konfigurieren, ist schwieriger, als es zunächst aussieht. Und wenn man
Sie glauben PCs zu verstehen, dann haben Sie diese noch nicht lange glaubt, PCs zu verstehen, dann hat man diese nur noch nicht lange genug
genung benutzt :) Diese Anleitung wird Ihnen einige Tips zur Konfigu- benutzt. :) Diese Anleitung gibt einige Tips zur Hardwarekonfiguration und
ration Ihrer Hardware geben und Ihnen sagen auf welche Symptome Sie sagt, auf welche Symptome man bei Schwierigkeiten achten muß. Die Anlei-
bei Schwierigkeiten achten m|ssen. Die Anleitung ist im Dokumentations- tung ist im Dokumentations-Menü der FreeBSD-Bootfloppy verfügbar.
menue der FreeBSD Bootfloppy verf|gbar.
VORBEHALT: Obwohl FreeBSD alles versucht Ihre Daten gegen zufdlligen VORBEHALT: Obwohl FreeBSD alles versucht, vorhandene Daten gegen versehent-
Verlust zu sch|tzen, ist es mit dieser Installation mehr als nur mvglich lichen Verlust zu schützen, ist es mit dieser Installation mehr als nur
IHRE GESAMTE FESTPLATTE ZU LVSCHEN! Bitte fahren Sie nicht mit der möglich, DIE GESAMTE FESTPLATTE ZU LÖSCHEN! Bitte nicht mit der endgül-
endg|ltigen Installation von FreeBSD fort, ohne zuerst alle wichtigen tigen Installation von FreeBSD fortfahren, ohne zuerst alle wichtigen Daten
Daten angemessen gesichert zu haben! Wir empfehlen es eindringlichst! angemessen gesichert zu haben! Wir empfehlen es eindringlichst!
Technische Kommentare dieser Release sollten an: Technische Kommentare zu diesem Release sollten an:
hackers@FreeBSD.org hackers@FreeBSD.org
gesandt werden. gesandt werden (wenn möglich, in englisch).
Fehlermeldungen sollten bei erfolgreicher Installation mittels des Fehlermeldungen sollten bei erfolgreicher Installation mittels des
`send-pr' Kommandos, ansonsten an: `send-pr'-Kommandos, ansonsten an:
bugs@FreeBSD.org bugs@FreeBSD.org
gesandt werden. gesandt werden.
Bitte stellen Sie sicher, da_ die von Ihnen genutzte FreeBSD-VERSION Bitte in jeder Fehlermeldung die genutzte FreeBSD-VERSION nennen!
in jeder Fehlermeldung genannt wird!
Allgemeine Fragen sollten an: Allgemeine Fragen sollten an:
@ -86,24 +84,23 @@ Allgemeine Fragen sollten an:
gesandt werden. gesandt werden.
Wir bitten um Geduld, wenn Ihre Fragen nicht sofort beantwortet werden - Wir bitten um Geduld, wenn die Fragen nicht sofort beantwortet werden -
dieses sind besonders arbeitsintensive Zeiten f|r uns, und unsere dieses sind besonders arbeitsintensive Zeiten für uns, und unsere Resourcen
Resourcen i(auf freiwilliger Basis) sind oft bis an die Grenzen ausgereizt! (auf freiwilliger Basis) sind oft bis an die Grenzen ausgereizt! Mittels
Mittels send-pr verschickte Fehlermeldungen werden registriert und in send-pr verschickte Fehlermeldungen werden registriert und in unserer
unserer Datenbank verfolgt. Sie werden |ber Statusdnderungen |ber die Datenbank verfolgt. Über Statusänderungen wird über die gesamte Lebensdauer
gesamte Lebensdauer des Fehlers (oder der Forderung nach einem Feature) des Fehlers (oder der Forderung nach einem Feature) informiert.
auf dem Laufenden gehalten.
Unsere WEB Site, http://www.freebsd.org, ist ebenfalls eine gute Quelle Unsere WEB Site, http://www.freebsd.org, ist ebenfalls eine gute Quelle
f|r neue Informationen und enthdlt einige weitere, fortf|hrende Infor- für neue Informationen und enthält einige weitere, fortführende Infor-
mationen. Sie kvnnen die BSDI-Version von Netscape zum browsen (bldttern) mationen. Man kann die BSDI-Version von Netscape zum Browsen (Blättern)
im World Wide Web direkt aus FreeBSD heraus nutzen. im World Wide Web direkt aus FreeBSD heraus nutzen.
Wir empfehlen auch in /usr/share/FAQ und /usr/share/doc zu weiteren Wir empfehlen auch in /usr/share/FAQ und /usr/share/doc zu weiteren
Informationen zum System nachzuschauen. Informationen zum System nachzuschauen.
Wir danken Ihnen f|r Ihre Aufmerksamkeit und hoffen, da_ Ihnen dieses Wir danken für die Aufmerksamkeit und hoffen, daß dieses Release von
Release von FreeBSD viel Freude bereitet. FreeBSD viel Freude bereitet.
Jordan Hubbard, Jordan Hubbard,
f|r das FreeBSD Projekt für das FreeBSD Projekt

View File

@ -10,7 +10,6 @@ PFEIL NACH RECHTS Zum n
SHIFT-TAB Zum vorherigen Feld oder zur vorherigen Gruppe. SHIFT-TAB Zum vorherigen Feld oder zur vorherigen Gruppe.
PFEIL NACH LINKS Zum vorherigen Feld oder zur vorherigen Gruppe (wie SH-TAB). PFEIL NACH LINKS Zum vorherigen Feld oder zur vorherigen Gruppe (wie SH-TAB).
RETURN Menüpunkt auswählen. 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 OBEN Innerhalb von Textkästen: eine Seite zurück.
BILD NACH UNTEN Innerhalb von Textkästen: eine Seite vor. BILD NACH UNTEN Innerhalb von Textkästen: eine Seite vor.
LEERTASTE In Menüs mit mehreren Auswahlmöglichkeiten: umschalten. LEERTASTE In Menüs mit mehreren Auswahlmöglichkeiten: umschalten.

View File

@ -1,19 +1,20 @@
----------------------------------------- -----------------------------------------
FreeBSD 2.0.5 --- RELEASE Version , , FreeBSD 2.0.5 --- RELEASE Version , ,
----------------------------------------- /( )` ----------------------------------------- /( )`
\ \___ / | \ \___ / |
Willkommen zur Release 2.0.5 von FreeBSD. 2.0.5, /- _ `-/ ' Willkommen zum Release 2.0.5 von FreeBSD, einem /- _ `-/ '
ein Zwischen-Release von FreeBSD, f|llt eine oft (/\/ \ \ /\ Zwischen-Release von FreeBSD, das eine eine Lücke (/\/ \ \ /\
geforderte L|cke zwischen 2.0R (das im Nov. '94 / / | ` \ füllt zwischen 2.0R (das im Nov. 94 erschien) und / / | ` \
erschien) und 2.1R, das spdt im Juli '95 er- O O ) / | 2.1R, das Ende Juli '95 erscheinen wird, die oft O O ) / |
scheinen wird. FreeBSD 2.0.5 enthdlt wesentliche `-^--'`< ' beklagt wurde. FreeBSD 2.0.5 enthält wesentliche `-^--'`< '
Verbesserungen gg|. 2.0R, deren wichtigste eine (_.) _ ) / Verbesserungen gegenüber 2.0R, deren wichtigste (_.) _ ) /
erhvhte Systemstabilitdt (wesentlich besser), `.___/` / eine erhöhte Systemstabilität (wesentlich besser), `.___/` /
Dutzende neuer Features und ein stark `-----' / Dutzende neuer Features und ein stark `-----' /
verbessertes Installationsprogramm <----. __ / __ \ verbessertes Installationsprogramm <----. __ / __ \
sind. Lesen Sie die Release Notes <----|====O)))==) \) /==== sind. Die Release Notes enthalten <----|====O)))==) \) /====
f|r weitere Details bzgl. der Neu- <----' `--' `.__,' \ weitere Details bzgl. der Neuheiten <----' `--' `.__,' \
heiten in FreeBSD 2.0.5. | | 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 Was ist FreeBSD? FreeBSD ist ein 4.4BSD-Lite-basiertes Betriebssystem für
f|r Intel, AMD, Cyrix oder NexGen "x86"-PC-Hardware. Es arbeitet mit Intel, AMD, Cyrix oder NexGen "x86"-PC-Hardware. Es arbeitet mit einer
einer gro_en Anzahl von PC-Peripherie und -Konfigurationen zusammen. Es großen Anzahl von PC-Peripherie und -Konfigurationen zusammen. Es kann für
kann f|r die Software-Entwicklung bis hin zum Anbieten von Internet- die Software-Entwicklung bis hin zum Anbieten von Internet-Diensten
Diensten eingesetzt werden; der meist genutzte Rechner im Internet, eingesetzt werden; der meist genutzte Rechner im Internet, ftp.cdrom.com,
ftp.cdrom.com, ist ein FreeBSD-Rechner. ist ein FreeBSD-Rechner.
Diese FreeBSD-Release enthdlt alles was Sie zur Nutzung eines Dieses FreeBSD-Release enthält alles, was man zur Nutzung eines solchen
solchen Systems brauchen; zusdtzlich erhalten Sie den kompletten Systems braucht; zusätzlich erhält man den kompletten Quellcode. Wenn man
Quellcode. Wenn Sie den Quellcode installiert haben, kvnnen Sie den Quellcode installiert hat, kann man das ganze Betriebssystem von Grund
das ganze Betriebssystem von Grund auf mit einem einzigen Befehl auf mit einem einzigen Befehl übersetzen; dies eignet es in idealer Weise
|bersetzen; dies eignet es in idealer Weise f|r Studenten, Forscher für Studenten, Forscher oder einfach Leute, die sehen wollen, wie alles
oder einfach Leute, die sehen wollen wie alles funktioniert. funktioniert.
Eine gro_e Anzahl portierter Dritt-Software (die "ports collection") Es gibt ebenfalls eine große Anzahl portierter Dritt-Software (die "ports
gibt es ebenfalls, um Ihnen die Verf|gbarkeit und die Installation collection"), um die Verfügbarkeit und die Installation traditioneller
Ihrer traditionellen Lieblings-UNIX-Utilities f|r FreeBSD zu Lieblings-UNIX-Utilities für FreeBSD zu erleichtern. Über 270 Portierun-
erleichtern. \ber 270 Portierungen, vom EMACS Editor bis zur gen, von Editoren über Programmiersprachen bis zu Grafikanwendungen, machen
Programmiersprache LISP, machen FreeBSD zu einem mdchtigen FreeBSD zu einem mächtigen und umfassenden Betriebssystem, das keinen
und umfassenden Betriebssystem, das keinen Vergleich zu dem gro_er Vergleich zu dem großer Workstations scheut.
Workstations scheut.
Als weitere Dokumentation zu diesem System empfehlen wir die 4.4BSD Als weitere Dokumentation zu diesem System empfehlen wir die 4.4BSD-
Dokumentation von O'Reilly Associates und der USENIX Association, Dokumentation von O'Reilly Associates und der USENIX Association, ISBN
ISBN 1-56592-082-1. Wir sind nicht mit O'Reilly verbunden, sondern 1-56592-082-1. Wir haben nichts mit O'Reilly zu tun, außer daß wir
nur zufriedene Kunden! zufriedene Kunden sind!
Wir empfehlen die HARDWARE ANLEITUNG *vor* jeglicher Fortf|hrung der Wir empfehlen, die HARDWARE-ANLEITUNG *vor* jeglicher Fortführung der
Installation zu lesen. PC Hardware f|r irgend etwas anderes als Installation zu lesen. PC-Hardware für irgend etwas anderes als DOS/
DOS/Windows (das keine gro_en Anforderungen an die Hardware stellt) Windows (das keine großen Anforderungen an die Hardware stellt) zu
zu konfigurieren, ist schwieriger als es zundchst aussieht. Und wenn konfigurieren, ist schwieriger, als es zunächst aussieht. Und wenn man
Sie glauben PCs zu verstehen, dann haben Sie diese noch nicht lange glaubt, PCs zu verstehen, dann hat man diese nur noch nicht lange genug
genung benutzt :) Diese Anleitung wird Ihnen einige Tips zur Konfigu- benutzt. :) Diese Anleitung gibt einige Tips zur Hardwarekonfiguration und
ration Ihrer Hardware geben und Ihnen sagen auf welche Symptome Sie sagt, auf welche Symptome man bei Schwierigkeiten achten muß. Die Anlei-
bei Schwierigkeiten achten m|ssen. Die Anleitung ist im Dokumentations- tung ist im Dokumentations-Menü der FreeBSD-Bootfloppy verfügbar.
menue der FreeBSD Bootfloppy verf|gbar.
VORBEHALT: Obwohl FreeBSD alles versucht Ihre Daten gegen zufdlligen VORBEHALT: Obwohl FreeBSD alles versucht, vorhandene Daten gegen versehent-
Verlust zu sch|tzen, ist es mit dieser Installation mehr als nur mvglich lichen Verlust zu schützen, ist es mit dieser Installation mehr als nur
IHRE GESAMTE FESTPLATTE ZU LVSCHEN! Bitte fahren Sie nicht mit der möglich, DIE GESAMTE FESTPLATTE ZU LÖSCHEN! Bitte nicht mit der endgül-
endg|ltigen Installation von FreeBSD fort, ohne zuerst alle wichtigen tigen Installation von FreeBSD fortfahren, ohne zuerst alle wichtigen Daten
Daten angemessen gesichert zu haben! Wir empfehlen es eindringlichst! angemessen gesichert zu haben! Wir empfehlen es eindringlichst!
Technische Kommentare dieser Release sollten an: Technische Kommentare zu diesem Release sollten an:
hackers@FreeBSD.org hackers@FreeBSD.org
gesandt werden. gesandt werden (wenn möglich, in englisch).
Fehlermeldungen sollten bei erfolgreicher Installation mittels des Fehlermeldungen sollten bei erfolgreicher Installation mittels des
`send-pr' Kommandos, ansonsten an: `send-pr'-Kommandos, ansonsten an:
bugs@FreeBSD.org bugs@FreeBSD.org
gesandt werden. gesandt werden.
Bitte stellen Sie sicher, da_ die von Ihnen genutzte FreeBSD-VERSION Bitte in jeder Fehlermeldung die genutzte FreeBSD-VERSION nennen!
in jeder Fehlermeldung genannt wird!
Allgemeine Fragen sollten an: Allgemeine Fragen sollten an:
@ -86,24 +84,23 @@ Allgemeine Fragen sollten an:
gesandt werden. gesandt werden.
Wir bitten um Geduld, wenn Ihre Fragen nicht sofort beantwortet werden - Wir bitten um Geduld, wenn die Fragen nicht sofort beantwortet werden -
dieses sind besonders arbeitsintensive Zeiten f|r uns, und unsere dieses sind besonders arbeitsintensive Zeiten für uns, und unsere Resourcen
Resourcen i(auf freiwilliger Basis) sind oft bis an die Grenzen ausgereizt! (auf freiwilliger Basis) sind oft bis an die Grenzen ausgereizt! Mittels
Mittels send-pr verschickte Fehlermeldungen werden registriert und in send-pr verschickte Fehlermeldungen werden registriert und in unserer
unserer Datenbank verfolgt. Sie werden |ber Statusdnderungen |ber die Datenbank verfolgt. Über Statusänderungen wird über die gesamte Lebensdauer
gesamte Lebensdauer des Fehlers (oder der Forderung nach einem Feature) des Fehlers (oder der Forderung nach einem Feature) informiert.
auf dem Laufenden gehalten.
Unsere WEB Site, http://www.freebsd.org, ist ebenfalls eine gute Quelle Unsere WEB Site, http://www.freebsd.org, ist ebenfalls eine gute Quelle
f|r neue Informationen und enthdlt einige weitere, fortf|hrende Infor- für neue Informationen und enthält einige weitere, fortführende Infor-
mationen. Sie kvnnen die BSDI-Version von Netscape zum browsen (bldttern) mationen. Man kann die BSDI-Version von Netscape zum Browsen (Blättern)
im World Wide Web direkt aus FreeBSD heraus nutzen. im World Wide Web direkt aus FreeBSD heraus nutzen.
Wir empfehlen auch in /usr/share/FAQ und /usr/share/doc zu weiteren Wir empfehlen auch in /usr/share/FAQ und /usr/share/doc zu weiteren
Informationen zum System nachzuschauen. Informationen zum System nachzuschauen.
Wir danken Ihnen f|r Ihre Aufmerksamkeit und hoffen, da_ Ihnen dieses Wir danken für die Aufmerksamkeit und hoffen, daß dieses Release von
Release von FreeBSD viel Freude bereitet. FreeBSD viel Freude bereitet.
Jordan Hubbard, Jordan Hubbard,
f|r das FreeBSD Projekt für das FreeBSD Projekt

View File

@ -10,7 +10,6 @@ PFEIL NACH RECHTS Zum n
SHIFT-TAB Zum vorherigen Feld oder zur vorherigen Gruppe. SHIFT-TAB Zum vorherigen Feld oder zur vorherigen Gruppe.
PFEIL NACH LINKS Zum vorherigen Feld oder zur vorherigen Gruppe (wie SH-TAB). PFEIL NACH LINKS Zum vorherigen Feld oder zur vorherigen Gruppe (wie SH-TAB).
RETURN Menüpunkt auswählen. 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 OBEN Innerhalb von Textkästen: eine Seite zurück.
BILD NACH UNTEN Innerhalb von Textkästen: eine Seite vor. BILD NACH UNTEN Innerhalb von Textkästen: eine Seite vor.
LEERTASTE In Menüs mit mehreren Auswahlmöglichkeiten: umschalten. LEERTASTE In Menüs mit mehreren Auswahlmöglichkeiten: umschalten.

View File

@ -1,608 +1,500 @@
README for XFree86 3.1.1u1 on FreeBSD 2.0.5 README for XFree86 3.1.1u1 on FreeBSD 2.0.5
Rich Murphey, David Dawes Rich Murphey, David Dawes
20 January 1995 20 January 1995
1. What and Where is XFree86? 1. What and Where is XFree86?
------------------------------
XFree86 is a port of X11R6 that supports several versions of Intel- 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 based Unix. It is derived from X386 1.2, which was the X server
distributed with X11R5. This release consists of many new features distributed with X11R5. This release consists of many new features
and performance improvements as well as many bug fixes. The release and performance improvements as well as many bug fixes. The release
is available as source patches against the X Consortium X11R6 code, as is available as source patches against the X Consortium X11R6 code, as
well as binary distributions for many architectures. well as binary distributions for many architectures.
See the Copyright Notice (COPYRIGHT.html). 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.XFree86.org:/pub/XFree86/current
(ftp://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.XFree86.org:/pub/XFree86/current/binaries/FreeBSD-2.0
(ftp://ftp.XFree86.org/pub/XFree86/current/binaries/FreeBSD-2.0) (ftp://ftp.XFree86.org/pub/XFree86/current/binaries/FreeBSD-2.0)
XFree86.cdrom.com:/pub/XFree86/current/binaries/FreeBSD-2.0 XFree86.cdrom.com:/pub/XFree86/current/binaries/FreeBSD-2.0
(ftp://XFree86.cdrom.com/pub/XFree86/current/binaries/FreeBSD-2.0) (ftp://XFree86.cdrom.com/pub/XFree86/current/binaries/FreeBSD-2.0)
Send email to Rich-Murphey@Rice.edu or XFree86@XFree86.org if you have Send email to Rich-Murphey@Rice.edu or XFree86@XFree86.org if you have
comments or suggestions about this file and we'll revise it. comments or suggestions about this file and we'll revise it.
2. Installing the Binaries
---------------------------
2. Installing the Binaries 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 want to save space, first select which archives you want to If you can't decide what to pick and you have 52Mb of disk
unpack. If you can't decide what to pick and you have 52Mb of disk space, it's safe to unpack everything.
space, it's safe to unpack everything.
At a minimum you need to unpack the 'required' X311*.tgz archives plus What follows is a description of the various distribution files
at least one server that matches your vga card. You'll need 9Mb for comprising XFree86. If you are installing this as part of FreeBSD
the minimum required run-time binaries only. 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):
Required (6.7Mb): X311bin.tgz
all the executable X client applications and shared libs
X311bin.tgz X311fnts.tgz
all the executable X client applications and shared libs the misc and 75 dpi fonts
X311lib.tgz
data files needed at runtime
X311fnts.tgz
the misc and 75 dpi fonts
Required unless you have already customized your configuration
files:
X311lib.tgz X311xicf.tgz
data files needed at runtime customizable xinit runtime configuration file
X311xdcf.tgz
customizable xdm runtime configuration file
Required unless you have already customized your configuration Choose at least one server ( 2.3Mb):
files:
X311xicf.tgz X3118514.tgz
customizable xinit runtime configuration file 8-bit color for IBM 8514 and true compatibles.
X311AGX.tgz
8-bit color for AGX boards.
X311xdcf.tgz X311Mch3.tgz
customizable xdm runtime configuration file 8 and 16-bit color for ATI Mach32 boards.
X311Mch8.tgz
8-bit color for ATI Mach8 boards.
Choose at least one server ( 2.3Mb): X311Mono.tgz
1-bit monochrome for VGA, Super-VGA, Hercules, and others.
X3118514.tgz X311P9K.tgz
8-bit color for IBM 8514 and true compatibles. 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)
X311AGX.tgz X311SVGA.tgz
8-bit color for AGX boards. 8-bit color for Super-VGA cards.
X311VG16.tgz
4-bit color for VGA and Super-VGA cards
X311Mch3.tgz X311W32.tgz
8 and 16-bit color for ATI Mach32 boards. 8-bit Color for ET4000/W32, /W32i and /W32p cards.
X311nest.tgz
A nested server running as a client window on another
display.
X311Mch8.tgz Optional:
8-bit color for ATI Mach8 boards.
X311doc.tgz
(.5Mb) READMEs and XFree86 specific man pages
X311Mono.tgz X311man.tgz
1-bit monochrome for VGA, Super-VGA, Hercules, and others. (1.7Mb) man pages except XFree86 specific ones in etc archive
X311f100.tgz
(1.8Mb) 100dpi fonts
X311P9K.tgz X311fscl.tgz
8, 16, and 24-bit color for Weitek P9000 boards (Diamond (1.6Mb) Speedo and Type1 fonts
Viper).
X311fnon.tgz
(3.3Mb) Japanese, Chinese and other non-English fonts
X311S3.tgz X311fsrv.tgz
8, 16 and 24-bit color for S3 boards (#9 GXE, Actix GE32, (.3Mb) the font server and it's man page
SPEA Mercury, STB Pegasus)
X311prog.tgz
(3.9Mb) config, lib*.a and *.h files needed only for
compiling
X311SVGA.tgz X311link.tgz
8-bit color for Super-VGA cards. (7.8Mb) X server reconfiguration kit
X311pex.tgz
(.5Mb) PEX fonts and shared libs needed by PEX applications.
X311VG16.tgz X311lbx.tgz
4-bit color for VGA and Super-VGA cards (.2Mb) low bandwidth X proxy server and libraries.
Note that there is no longer a separate xdm archive. FreeBSD 2.0
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.
X311W32.tgz
8-bit Color for ET4000/W32, /W32i and /W32p cards.
2.1. Full Install:
-------------------
X311nest.tgz [ Note: Unless you're installing XFree86 3.1.1u1 manually, that is
A nested server running as a client window on another to say not as part of the FreeBSD 2.0.5 installation, you may skip
display. 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
abort if you unpack it as an ordinary user. You must also use a
``umask'' value of 022 because the X server requires special
permissions.
Optional: % su
# umask 022
X311doc.tgz 2. If you have 52Mb free in the /usr partition ``cd /usr'' and skip
(.5Mb) READMEs and XFree86 specific man pages 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
X311man.tgz
(1.7Mb) man pages except XFree86 specific ones in etc archive
3. Unpack everything:
X311f100.tgz If you are using sh (as root usually does):
(1.8Mb) 100dpi fonts
X311fscl.tgz
(1.6Mb) Speedo and Type1 fonts
# for i in X311*.tgz; do
# tar -xzf $i
# done
X311fnon.tgz
(3.3Mb) Japanese, Chinese and other non-english fonts
Else, if you are using csh:
X311fsrv.tgz % foreach i (X311*.tgz)
(.3Mb) the font server and it's man page % tar -xzf $i
% end
X311prog.tgz 4. Create a symbolic link ``X'' that points to the server that
(3.9Mb) config, lib*.a and *.h files needed only for matches your video card. The XF86_* man pages list which vga
compiling 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
X311link.tgz
(7.8Mb) X server reconfiguration kit
2.2. Minimal Install:
----------------------
X311pex.tgz First do numbers 1 and 2 above. Then unpack the required archives:
(.5Mb) PEX fonts and shared libs needed by PEX applications.
# for i in bin fnts lib xicf; do
# tar -xzf X311$i.tgz
# done
X311lbx.tgz
(.2Mb) low bandwidth X proxy server and libraries.
Note that there is no longer a separate xdm archive. FreeBSD 2.0 Then unpack a server archive corresponding to your vga card. The
handles this in shared libraries now, so that the xdm binary does not server man pages, X11R6/man/man1/XF86_*, list the vga chip sets
itself contain des and there is no more need for us to provide supported by each server. For example, if you have an ET4000 based
separate tar balls. card you will use the XF86_SVGA server:
# tar -xzf X311SVGA.tgz
# cd /usr/X11R6/bin; rm X; ln -s XF86_SVGA X
2.1. Full Install: 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:
1. You must be logged in as root to unpack the archives because # echo 'set path = ($path /usr/X11R6/bin)' >>/etc/csh.login
several executables are set-user-id. Otherwise the server may # echo 'PATH=$PATH:/usr/X11R6/bin' >>/etc/profile
abort if you unpack it as an ordinary user. You must also use a
``umask'' value of 022 because the X server requires special
permissions.
% su
# umask 022
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
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:
If you had already configured X11R6/lib/X11/xinit/xinitrc or
X11R6/lib/X11/xdm/* omit the xinit-config or xdm-config archive or
unpack it separately and merge in your customizations.
# cd /usr/local The fscl and f100 archives are optional and can be omitted if you are
# mkdir X11R6 short on space. The optional link archive allows you to reconfigure
# ln -s /usr/local/X11R6 /usr/X11R6 and customize a X server binary. The optional prog archive is needed
only for writing or compiling X applications. The optional pex
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
abort with the message ``could not open default font
'fixed'''.
3. Installing The Display Manager (xdm)
----------------------------------------
3. Unpack everything: The display manager makes your PC look like an X terminal. That is,
it presents you with a login screen that runs under X.
If you are using sh (as root usually does): The easiest way to automatically start the display manager on boot is
to add a line in /etc/ttys to start it on one of the unoccupied
virtual terminals:
# for i in X311*.tgz; do ttyv4 "/usr/X11R6/bin/xdm -nodaemon" xterm on secure
# tar -xzf $i
# done
You should also make sure that /usr/X11R6/bin/X is a symbolic link to
the Xserver that matches your video card or edit the file Xservers in
/usr/X11R6/lib/X11/xdm to specify the pathname of the X server.
The change to /etc/ttys won't take effect until you either reboot or
``kill -HUP 1'' to force initd to reread /etc/ttys. You can also test
the display manager manually by loging in as root on the console and
typing ``xdm -nodaemon''.
Else, if you are using csh: 4. Configuring X for Your Hardware
-----------------------------------
% foreach i (X311*.tgz) The XF86Config file tells the X server what kind of monitor, video
% tar -xzf $i card and mouse you have. You must create it to tell the server what
% end specific hardware you have.
XFree86 3.1 uses a new configuration file format. Consult the
XF86Config man page and the general INSTALL (INSTALL.html) file for
instructions.
If you have a Xconfig file for XFree86 2.x, use reconfig to translate
part of it into the new format:
# reconfig <Xconfig >XF86Config
4. Create a symbolic link ``X'' that points to the server that and complete the rest according to the XF86Config man page and the
matches your video card. The XF86_* man pages list which vga XF86Config.sample file as a template.
chip sets are supported by each server. For example, if you
have an ET4000 based card you will use the XF86_SVGA server:
In order to protect your hardware from damage, the server no longer
will read XF86Config files from a user's home directory, but requires
that it be in /etc/XF86Config, /usr/X11R6/lib/X11/XF86Config.hostname
or /usr/X11R6/lib/X11/XF86Config.
# cd /usr/X11R6/bin; rm X; ln -s XF86_SVGA X 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).
o Your monitor's sync frequencies.
2.2. Minimal Install: The easiest way to find which device your mouse is plugged into is to
use ``cat'' or ``kermit'' to look at the output of the mouse. Connect
to it and just make sure that it generates output when the mouse is
moved or clicked:
First do numbers 1 and 2 above. Then unpack the required archives: % 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:
# for i in bin fnts lib xicf; do % dmesg|grep sio
# tar -xzf X311$i.tgz sio0 at 0x3f8-0x3ff irq 4 on isa
# done
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 cuaa0
Then unpack a server archive corresponding to your vga card. The If you plan to fine tune the screen size or position on your monitor
server man pages, X11R6/man/man1/XF86_*, list the vga chip sets you'll need the specs for sync frequencies from your monitor's manual.
supported by each server. For example, if you have an ET4000 based
card you will use the XF86_SVGA server:
# tar -xzf X311SVGA.tgz 5. Running X
# cd /usr/X11R6/bin; rm X; ln -s XF86_SVGA 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
memory themselves. Even if their resident set size is smaller, on a
8Mb system that leaves very space for other applications such as gcc
that expect a few meg free. The R6 X servers may work with 4Mb of
memory, but in practice compilation while running X can take 5 or 10
times as long due to constant paging.
The easiest way for new users to start X windows is to type ``startx
>& startx.log''. Error messages are lost unless you redirect them
because the server takes over the screen.
To get out of X windows, type: ``exit'' in the console xterm. You can
2.3. After either Full or Minimal Install above: customize your X by creating .xinitrc, .xserverrc, and .twmrc files in
your home directory as described in the xinit and startx man pages.
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
If you had already configured X11R6/lib/X11/xinit/xinitrc or
X11R6/lib/X11/xdm/* omit the xinit-config or xdm-config archive or
unpack it separately and merge in your customizations.
The fscl and f100 archives are optional and can be omitted if you are
short on space. The optional link archive allows you to reconfigure
and customize a X server binary. The optional prog archive is needed
only for writing or compiling X applications. The optional pex
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
abort with the message ``could not open default font
'fixed'''.
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.
The easiest way to automatically start the display manager on boot is
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
the Xserver that matches your video card or edit the file Xservers in
/usr/X11R6/lib/X11/xdm to specify the pathname of the X server.
The change to /etc/ttys won't take effect until you either reboot or
``kill -HUP 1'' to force initd to reread /etc/ttys. You can also test
the display manager manually by loging in as root on the console and
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
specific hardware you have.
XFree86 3.1 uses a new configuration file format. Consult the
XF86Config man page and the general INSTALL (INSTALL.html) file for
instructions.
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.
In order to protect your hardware from damage, the server no longer
will read XF86Config files from a user's home directory, but requires
that it be in /etc/XF86Config, /usr/X11R6/lib/X11/XF86Config.hostname
or /usr/X11R6/lib/X11/XF86Config.
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).
o Your monitor's sync frequencies.
The easiest way to find which device your mouse is plugged into is to
use ``cat'' or ``kermit'' to look at the output of the mouse. Connect
to it and just make sure that it generates output when the mouse is
moved or clicked:
% cat < /dev/tty00
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
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
memory themselves. Even if their resident set size is smaller, on a
8Mb system that leaves very space for other applications such as gcc
that expect a few meg free. The R6 X servers may work with 4Mb of
memory, but in practice compilation while running X can take 5 or 10
times as long due to constant paging.
The easiest way for new users to start X windows is to type ``startx
>& startx.log''. Error messages are lost unless you redirect them
because the server takes over the screen.
To get out of X windows, type: ``exit'' in the console xterm. You can
customize your X by creating .xinitrc, .xserverrc, and .twmrc files in
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
GENERIC kernel or any kernel configuration which is a superset.
For a general description of BSD kernel configuration get
smm.02.config.ps.Z
(ftp://gatekeeper.dec.com/pub/BSD/manuals/smm.02.config.ps.Z). It is
a ready-to-print postscript copy of the kernel configuration chapter
from the system maintainers manual.
If you do decide to reduce your kernel configuration file, do not
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
Otherwise, the default without a line like this is 12. You must have
more VTs than gettys as described in the end of section 3, and 4 is a
reasonable minimum.
The server supports several console drivers: pccons, syscons and pcvt.
The syscons driver is the default in FreeBSD 1.1.5 and higher. They
are detected at runtime and no configuration of the server itself is
required.
The pcvt console driver is bundled into FreeBSD and may be enabled
by changing the `sc0' line in your kernel configuration file to
`vt0'. See /sys/i386/conf/LINT for more details.
The XFree86 servers include support for the MIT-SHM extension. The
GENERIC kernel does not support this, so if you want to make use of
this, you will need a kernel configured with SYSV shared memory
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.
S3 cards and serial port COM 4 cannot be installed together on a
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
site.def, type ``./mkmf' and ``make'' to link the server. See
README.LinkKit (LinkKit.html) for more info.
The source tree takes about 114Mb before compiling and an additional
100Mb after ``make World''. You should configure the distribution by
editing xf86site.def and site.def in xc/config/cf before compiling.
By default, the config files are set up to build shared libraries. If
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
Makefiles, then type ``make''. Whenever you install additional man
pages you should update whatis.db by running ``makewhatis
/usr/X11R6/man''.
Note: Starting with XFree86 2.1 and FreeBSD 1.1, the symbol __386BSD__
no longer gets defined either by the compiler or via the X config
files for FreeBSD systems. When porting clients to BSD systems, make
use of the symbol BSD for code which is truly BSD-specific. The value
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
used to protect the inclusion of <sys/param.h>.
For code that really is specific to a particular i386 BSD port, use
__FreeBSD__ for FreeBSD, __NetBSD__ for NetBSD, __386BSD__ for 386BSD,
and __bsdi__ for BSD/386.
9. Thanks
Many thanks to:
o Pace Willison for providing initial *BSD support.
o Amancio Hasty for 386BSD kernel and S3 chipset support.
o David Greenman, Nate Williams, Jordan Hubbard for FreeBSD kernel
support.
o Rod Grimes, Jordan Hubbard and Jack Velte for the use of Walnut
Creek Cdrom's hardware.
o Orest Zborowski, Simon Cooper and Dirk Hohndel for ideas from
the Linux distribution.
$XConsortium: FreeBSD.sgml,v 1.3 95/01/23 15:34:41 kaleb Exp $
Generated from XFree86: xc/programs/Xserver/hw/xfree86/doc/sgml/FreeBSD.sgml,v 3.10 1995/01/28 16:01:28 dawes Exp $
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
GENERIC kernel or any kernel configuration which is a superset.
For a general description of BSD kernel configuration get
smm.02.config.ps.Z
(ftp://gatekeeper.dec.com/pub/BSD/manuals/smm.02.config.ps.Z). It is
a ready-to-print postscript copy of the kernel configuration chapter
from the system maintainers manual.
If you do decide to reduce your kernel configuration file, do not
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
Otherwise, the default without a line like this is 12. You must have
more VTs than gettys as described in the end of section 3, and 4 is a
reasonable minimum.
The server supports several console drivers: pccons, syscons and pcvt.
The syscons driver is the default in FreeBSD 1.1.5 and higher. They
are detected at runtime and no configuration of the server itself is
required.
The pcvt console driver is bundled into FreeBSD and may be enabled
by changing the `sc0' line in your kernel configuration file to
`vt0'. See /sys/i386/conf/LINT for more details.
The XFree86 servers include support for the MIT-SHM extension. The
GENERIC kernel does not support this, so if you want to make use of
this, you will need a kernel configured with SYSV shared memory
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.
S3 cards and serial port COM 4 cannot be installed together on a
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
site.def, type ``./mkmf' and ``make'' to link the server. See
README.LinkKit (LinkKit.html) for more info.
The source tree takes about 114Mb before compiling and an additional
100Mb after ``make World''. You should configure the distribution by
editing xf86site.def and site.def in xc/config/cf before compiling.
By default, the config files are set up to build shared libraries. If
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
Makefiles, then type ``make''. Whenever you install additional man
pages you should update whatis.db by running ``makewhatis
/usr/X11R6/man''.
Note: Starting with XFree86 2.1 and FreeBSD 1.1, the symbol __386BSD__
no longer gets defined either by the compiler or via the X config
files for FreeBSD systems. When porting clients to BSD systems, make
use of the symbol BSD for code which is truly BSD-specific. The value
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
used to protect the inclusion of <sys/param.h>.
For code that really is specific to a particular i386 BSD port, use
__FreeBSD__ for FreeBSD, __NetBSD__ for NetBSD, __386BSD__ for 386BSD,
and __bsdi__ for BSD/386.
9. Thanks
----------
Many thanks to:
o Pace Willison for providing initial *BSD support.
o Amancio Hasty for 386BSD kernel and S3 chipset support.
o David Greenman, Nate Williams, Jordan Hubbard for FreeBSD kernel
support.
o Rod Grimes, Jordan Hubbard and Jack Velte for the use of Walnut
Creek Cdrom's hardware.
o Orest Zborowski, Simon Cooper and Dirk Hohndel for ideas from
the Linux distribution.
$XConsortium: FreeBSD.sgml,v 1.3 95/01/23 15:34:41 kaleb Exp $
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 $ $XFree86: xc/programs/Xserver/hw/xfree86/doc/READ.FreeBSD,v 3.12 1995/01/28 16:19:37 dawes Exp $

View File

@ -1,11 +1,14 @@
This menu lets you configure your system a little after it's This menu allows you to configure your system after the installation process
installed. In particular, you should probably set the system is complete. At the minimum, you should probably set the system manager's
manager's password and the system time zone. password and the system time zone.
For extra goodies like bash, emacs, pascal, etc. you should almost For extra goodies like bash, emacs, pascal, etc., you should look at the
certainly look at the Packages item in this menu. Note that this is Packages item in this menu. Currently, the Packages option is only useful
currently only really useful if you have a CDROM or an existing if you have a CDROM or an existing packages collection somewhere in the
packages collection somewhere in the file system hierarchy where the file system hierarchy where the package management tool can locate it.
package management tool can get to it. Automatic transfer of packages The automatic transfer of packages via FTP is not yet supported!
over 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.

View 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 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 drive then PLEASE BE VERY CERTAIN that the Geometry reported in the
Partition Editor (see Installation Menu) is the correct one for your 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 utility such as that by OnTrack Systems. In these cases, knowing
the correct geometry gets even more complicated as it's not something 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 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 best way of verifying that your geometry is being correctly calculated
DOS (from the hard disk, not a floppy!) and run the ``pfdisk'' utility in such situations is to boot DOS (from the hard disk, not a floppy!)
provided in the tools/ subdirectory of the FreeBSD CDROM or FTP site. and run the ``pfdisk'' utility provided in the tools/ subdirectory of the
It will report the geometry that DOS sees, which is generally the FreeBSD CDROM or FTP site. It will report the geometry that DOS sees,
correct one. which is generally the correct one.
FreeBSD does its best to guess all of this automatically, of course, If you have no DOS partition sharing the disk at all, then you may find that
but it sometimes fails which is why it's a good idea to check it. The you have better luck with Geometry detection if you create a very small
Partition Editor has a `(G)eometry' command that will allow you to DOS partition first, before installing FreeBSD. Once FreeBSD is installed
change it as necessary. 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.

View File

@ -1,20 +1,37 @@
INSTALLATION GUIDE FOR FreeBSD 2.0.5 INSTALLATION GUIDE FOR FreeBSD 2.0.5
This manual documents the process of installing FreeBSD on your 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 installation instructions (how to configure your hardware, what sorts
of things to watch out for, etc). of things to watch out for, etc) before starting a new installation.
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.
+==========================================+ Table of Contents:
|1. DOS user's Question and Answer section | ==================
+==========================================+
1.1 Help! I have no space! Do I need to delete everything first? 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?
If your machine is already running DOS and has little or no free space If your machine is already running DOS and has little or no free space
available for FreeBSD's installation, all is not lost! You may find available for FreeBSD's installation, all is not lost! You may find
@ -31,7 +48,7 @@ Distributions menu for an estimation of how much free space you'll
need for the kind of installation you want. need for the kind of installation you want.
1.2 Can I use compressed DOS filesystems from FreeBSD? 1.2 Can I use compressed DOS filesystems from FreeBSD?
No. If you are using a utility such as Stacker(tm) or DoubleSpace(tm), No. If you are using a utility such as Stacker(tm) or DoubleSpace(tm),
FreeBSD will only be able to use whatever portion of the filesystem FreeBSD will only be able to use whatever portion of the filesystem
@ -43,44 +60,57 @@ It is probably better to create another uncompressed DOS primary
partition and use this for communications between DOS and FreeBSD. partition and use this for communications between DOS and FreeBSD.
1.3 Can I mount my DOS extended partitions? 1.3 Can I mount my DOS extended partitions?
This feature isn't in FreeBSD 2.0.5 but should be in 2.1. We've laid This feature isn't in FreeBSD 2.0.5 but should be in 2.1. We've laid
all the groundwork for making this happen, now we just need to do the all the groundwork for making this happen, now we just need to do the
last 1% of the work involved. last 1% of the work involved.
1.4 Can I run DOS binaries under FreeBSD? 1.4 Can I run DOS binaries under FreeBSD?
Not yet! We'd like to add support for this someday, but are still 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.0 Preparing for the installation
|2. PREPARING FOR THE INSTALLATION | === ==============================
+==================================+
2.1 Before installing from CDROM: 2.1 Before installing from CDROM:
If your CDROM is of an unsupported type, such as an IDE CDROM, then 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 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 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 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" CD installation directly from DOS using Walnut Creek's supplied
batch file or you can make a boot floppy by writing the supplied image ``install.bat'' batch file or you can make a boot floppy with
(floppies/boot.flp) onto a floppy. Under DOS, a good utility for this the ``makeflp.bat'' command.
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.
Once you've booted one way or the other, you should be able to select For the easiest interface of all (from DOS), type "go". This
CDROM as the media type when asked and load the entire distribution will bring up a DOS menu utility that leads you through all
from CDROM. No other media will be required. 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 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 hard disk, you should find the CD mounted on the directory /cdrom. A
@ -89,15 +119,35 @@ may also find useful: It allows you to create "link tree" directories
to things on Read-Only media like CDROM. One example might be to things on Read-Only media like CDROM. One example might be
something like this: something like this:
mkdir /usr/ports mkdir /usr/ports
lndir /cdrom/ports /usr/ports lndir /cdrom/ports /usr/ports
Which would allow you to then "cd /usr/ports; make" and get all the 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 sources from the CD, but yet create all the intermediate files in
/usr/ports, which is presumably on a more writable media! :-) /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.
2.2 Before installing from Floppy: 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:
If you must install from floppy disks, either due to unsupported If you must install from floppy disks, either due to unsupported
hardware or just because you enjoy doing things the hard way, you must hardware or just because you enjoy doing things the hard way, you must
@ -108,66 +158,89 @@ 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 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 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 on a UNIX Workstation (see notes in section 2.1 concerning the
``floppies/boot.flp'' image). Once this floppy is made, put it aside. ``floppies/boot.flp'' image). Once this floppy is made, go on
You'll be asked for it later. to make the distribution set floppies:
You will also need, at minimum, as many 1.44MB or 1.2MB floppies as it You will need, at minimum, as many 1.44MB or 1.2MB floppies as it takes
takes to hold all files in the bin (binary distribution) directory. to hold all files in the bin (binary distribution) directory. THESE
THESE floppies *must* be formatted using MS-DOS, using with the FORMAT floppies *must* be formatted using MS-DOS, using the FORMAT command in
command in MS-DOS or the File Manager format command in Microsoft MS-DOS or the File Manager format command in Microsoft Windows(tm).
Windows(tm). Factory preformatted floppies will also work well, Don't trust Factory Preformatted floppies! Format them again yourself,
provided that they haven't been previously used for something else. just to make sure!
Many problems reported by our users in the past have turned out to be Many problems reported by our users in the past have resulted from the
from the use of improperly formatted media, so we simply take special use of improperly formatted media, so we simply take special care to
care to mention it here! mention it here!
After you've DOS formatted the floppies, you'll need to copy the files After you've DOS formatted the floppies, you'll need to copy the files
onto them. The distribution files are split into chunks conveniently 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 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 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 one, until you've got all the distributions you want packed up in this
fashion. Select ``Floppy'' from the Media menu at installation time fashion. Each distribution should go into a subdirectory on the
and you will be prompted for everything after that. 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: 2.3 Before installing from a DOS partition:
To prepare for installation from an MS-DOS partition, you should To prepare for installation from an MS-DOS partition you should
simply copy the files from the distribution into a directory with the simply copy the files from the distribution into a directory called
same name as the distribution. For example, if you are preparing to "FREEBSD". For example, to do a minimal installation of FreeBSD from
install the bin distribution set, then make a directory on your C: DOS using files copied from the CDROM, you might do something like
drive named C:\FREEBSD\BIN and copy the files there. Copying the this:
distributions into subdirectories of the FREEBSD directory allows the
installation program to find the files automatically. 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: 2.4 Before installing from QIC/SCSI Tape:
Installing from tape is probably the easiest method, short of an Installing from tape is probably the easiest method, short of an
on-line install using FTP or installing from a CDROM. The on-line install using FTP or a CDROM install. The installation program
installation program expects the files to be simply tar'ed onto the expects the files to be simply tar'ed onto the tape, so after getting
tape, so after getting all of the files for distribution you're all of the files for distribution you're interested in, simply tar
interested in, simply tar them onto the tape with a command like: them onto the tape with a command like:
cd /freebsd/distdir cd /freebsd/distdir
tar cvf /dev/rwt0 (or /dev/rst0) dist1 .. dist2 tar cvf /dev/rwt0 (or /dev/rst0) dist1 .. dist2
When you go to do the installation, you should make sure that you Make sure that the `floppies/' directory is one of the "dists" given
leave enough room in the /usr/tmp directory to accomdate the FULL above, since the installation will look for `floppies/root.flp' on
contents of the tape you've created. Due to the non-random access the tape.
nature of tapes, this method of installation requires quite a bit of
temporary storage! You should expect to require as much temporary When you go to do the installation, you should also make sure that you
storage as you have stuff written on tape! 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: 2.5 Before installing over a network:
You can do network installations over 3 types of communications links: You can do network installations over 3 types of communications links:
Serial port: SLIP / PPP Serial port: SLIP / PPP
Parallel port: PLIP (laplink cable) Parallel port: PLIP (laplink cable)
Ethernet: A standard ethernet controller (includes some PCMCIA). Ethernet: A standard ethernet controller (includes some PCMCIA).
SLIP support is rather primitive, and limited primarily to hard-wired SLIP support is rather primitive, and limited primarily to hard-wired
links, such as a serial cable running between a laptop computer and links, such as a serial cable running between a laptop computer and
@ -189,52 +262,186 @@ terminal emulator.
If a hard-wired connection to another FreeBSD (2.0R or later) machine If a hard-wired connection to another FreeBSD (2.0R or later) machine
is available, you might also consider installing over a "laplink" is available, you might also consider installing over a "laplink"
parallel port cable. The data rate over the parallel port is much 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. 50k/sec), thus resulting in a quicker installation.
Finally, for the fastest possible installation, an ethernet adaptor is Finally, for the fastest possible network installation, an ethernet
always a good choice! FreeBSD supports most common PC ethernet cards, adaptor is always a good choice! FreeBSD supports most common PC
a table of supported cards (and their required settings) provided as ethernet cards, a table of supported cards (and their required
part of the FreeBSD Hardware Guide - see the Documentation menu on the settings) is provided as part of the FreeBSD Hardware Guide - see the
boot floppy. If you are using one of the supported PCMCIA ethernet Documentation menu on the boot floppy. If you are using one of the
cards, also be sure that it's plugged in _before_ the laptop is supported PCMCIA ethernet cards, also be sure that it's plugged in
powered on! FreeBSD does not, unfortunately, currently support "hot _before_ the laptop is powered on! FreeBSD does not, unfortunately,
insertion" of PCMCIA cards. currently support "hot insertion" of PCMCIA cards.
You will also need to know your IP address on the network, the the 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. "netmask" value for your address class, and the name of your machine.
Your system administrator can tell you which values to use for your Your system administrator can tell you which values to use for your
particular network setup. If you will be referring to other hosts by 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 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 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 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 really probably talk to your system administrator _first_ before
trying this type of installation! trying this type of installation!
Once you have a network link of some sort working, the installation Once you have a network link of some sort working, the installation
can continue over NFS or FTP. can continue over NFS or FTP.
NFS installation is fairly straight-forward: Simply copy the FreeBSD 2.5.1 Preparing for NFS installation:
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.
FTP installation may be done from any mirror site containing a NFS installation is fairly straight-forward: Simply copy the
reasonably up-to-date version of FreeBSD 2.0.5. A full menu of FreeBSD distribution files you want onto a server somewhere
reasonable choices from almost anywhere in the world is provided in and then point the NFS media selection at it.
the FTP site menu.
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
|2. INSTALLING FREEBSD 2.0.5 |
+============================+
Once you've done the appropriate preinstallation steps, you should install FTP installation may be done from any mirror site containing a
FreeBSD! reasonably up-to-date version of FreeBSD 2.0.5. A full menu of
reasonable choices from almost anywhere in the world is provided
by the FTP site menu.
/* XXX Put some more text in this section.. :-) XXX */ 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.
3. Installing FreeBSD
-- ------------------
Once you've taken note of the appropriate preinstallation steps, you
should be able to install FreeBSD without any further trouble.
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 ---

View File

@ -9,6 +9,6 @@ I18N features to meet various standards.
Until these improvements are made, you may find it easier to simply Until these improvements are made, you may find it easier to simply
edit the /etc/sysconfig file yourself once the system is fully edit the /etc/sysconfig file yourself once the system is fully
installed. There are a number of comments in that file that detail 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. non-english setups.

View File

@ -1,8 +1,8 @@
You can do network installations over 3 types of communications links: You can do network installations over 3 types of communications links:
Serial port: SLIP / PPP Serial port: SLIP / PPP
Parallel port: PLIP (laplink cable) Parallel port: PLIP (laplink cable)
Ethernet: A standard ethernet controller (includes some PCMCIA). Ethernet: A standard ethernet controller (includes some PCMCIA).
SLIP support is rather primitive and limited primarily to hard-wired SLIP support is rather primitive and limited primarily to hard-wired
links, such as a serial cable running between a laptop computer and links, such as a serial cable running between a laptop computer and
@ -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 If a hard-wired connection to another FreeBSD (2.0R or later) machine
is available, you might also consider installing over a "laplink" is available, you might also consider installing over a "laplink"
parallel port cable. The data rate over the parallel port is much parallel port cable. The data rate over the parallel port is much
higher than is what's typically possible over a serial line, with higher than what is typically possible over a serial line with
speeds of up to 50k/sec. not at all uncommon. speeds of up to 50k/sec.
Finally, for the fastest possible installation, an ethernet adaptor is Finally, for the fastest possible network installation, an ethernet
always a good choice! FreeBSD supports most common PC ethernet cards, adaptor is always a good choice! FreeBSD supports most common PC
a table of required settings for which is provided in the FreeBSD ethernet cards, a table of which is provided in the FreeBSD
Hardware Guide - see the Documentation menu on the boot floppy. Hardware Guide (see the Documentation menu on the boot floppy).
If you are using one of the supported PCMCIA ethernet cards, also If you are using one of the supported PCMCIA ethernet cards, also be
be sure that it's plugged in _before_ the laptop is powered on! sure that it's plugged in _before_ the laptop is powered on! FreeBSD
FreeBSD does not, unfortunately, currently support "hot insertion" does not, unfortunately, currently support "hot insertion" of PCMCIA
of PCMCIA cards. cards.
You will also need to know your IP address on the network, the the You will also need to know your IP address on the network, the "netmask"
"netmask" value for your address class and the name of your machine. value for your address class, and the name of your machine.
Your system administrator can tell you which values to use for your Your system administrator can tell you which values to use for your
particular network setup. If you will be referring to other hosts by 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 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 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 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 really probably talk to your system administrator _first_ before
trying this type of installation! trying this type of installation!

View File

@ -10,7 +10,6 @@ RIGHT ARROW Move to next item or group (same as TAB).
SHIFT-TAB Move to previous item or group. SHIFT-TAB Move to previous item or group.
LEFT ARROW Move to previous item or group (same as SHIFT-TAB). LEFT ARROW Move to previous item or group (same as SHIFT-TAB).
RETURN Select item. RETURN Select item.
ESC Spawn a sub-shell for diagnostic purposes. Exit returns.
PAGE UP In text boxes, scrolls up one page. PAGE UP In text boxes, scrolls up one page.
PAGE DOWN In text boxes, scrolls down one page. PAGE DOWN In text boxes, scrolls down one page.
SPACE In "radio" or multiple choice menus, toggle the current item. 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 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. be specially highlighted in the item name.
The console driver also contains a scroll-back buffer for reviewing 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 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 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. 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 You can create more by editing the /etc/ttys file, once the system is up,
to a maximum of 12. for a maximum of 12.

View File

@ -1,608 +1,500 @@
README for XFree86 3.1.1u1 on FreeBSD 2.0.5 README for XFree86 3.1.1u1 on FreeBSD 2.0.5
Rich Murphey, David Dawes Rich Murphey, David Dawes
20 January 1995 20 January 1995
1. What and Where is XFree86? 1. What and Where is XFree86?
------------------------------
XFree86 is a port of X11R6 that supports several versions of Intel- 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 based Unix. It is derived from X386 1.2, which was the X server
distributed with X11R5. This release consists of many new features distributed with X11R5. This release consists of many new features
and performance improvements as well as many bug fixes. The release and performance improvements as well as many bug fixes. The release
is available as source patches against the X Consortium X11R6 code, as is available as source patches against the X Consortium X11R6 code, as
well as binary distributions for many architectures. well as binary distributions for many architectures.
See the Copyright Notice (COPYRIGHT.html). 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.XFree86.org:/pub/XFree86/current
(ftp://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.XFree86.org:/pub/XFree86/current/binaries/FreeBSD-2.0
(ftp://ftp.XFree86.org/pub/XFree86/current/binaries/FreeBSD-2.0) (ftp://ftp.XFree86.org/pub/XFree86/current/binaries/FreeBSD-2.0)
XFree86.cdrom.com:/pub/XFree86/current/binaries/FreeBSD-2.0 XFree86.cdrom.com:/pub/XFree86/current/binaries/FreeBSD-2.0
(ftp://XFree86.cdrom.com/pub/XFree86/current/binaries/FreeBSD-2.0) (ftp://XFree86.cdrom.com/pub/XFree86/current/binaries/FreeBSD-2.0)
Send email to Rich-Murphey@Rice.edu or XFree86@XFree86.org if you have Send email to Rich-Murphey@Rice.edu or XFree86@XFree86.org if you have
comments or suggestions about this file and we'll revise it. comments or suggestions about this file and we'll revise it.
2. Installing the Binaries
---------------------------
2. Installing the Binaries 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 want to save space, first select which archives you want to If you can't decide what to pick and you have 52Mb of disk
unpack. If you can't decide what to pick and you have 52Mb of disk space, it's safe to unpack everything.
space, it's safe to unpack everything.
At a minimum you need to unpack the 'required' X311*.tgz archives plus What follows is a description of the various distribution files
at least one server that matches your vga card. You'll need 9Mb for comprising XFree86. If you are installing this as part of FreeBSD
the minimum required run-time binaries only. 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):
Required (6.7Mb): X311bin.tgz
all the executable X client applications and shared libs
X311bin.tgz X311fnts.tgz
all the executable X client applications and shared libs the misc and 75 dpi fonts
X311lib.tgz
data files needed at runtime
X311fnts.tgz
the misc and 75 dpi fonts
Required unless you have already customized your configuration
files:
X311lib.tgz X311xicf.tgz
data files needed at runtime customizable xinit runtime configuration file
X311xdcf.tgz
customizable xdm runtime configuration file
Required unless you have already customized your configuration Choose at least one server ( 2.3Mb):
files:
X311xicf.tgz X3118514.tgz
customizable xinit runtime configuration file 8-bit color for IBM 8514 and true compatibles.
X311AGX.tgz
8-bit color for AGX boards.
X311xdcf.tgz X311Mch3.tgz
customizable xdm runtime configuration file 8 and 16-bit color for ATI Mach32 boards.
X311Mch8.tgz
8-bit color for ATI Mach8 boards.
Choose at least one server ( 2.3Mb): X311Mono.tgz
1-bit monochrome for VGA, Super-VGA, Hercules, and others.
X3118514.tgz X311P9K.tgz
8-bit color for IBM 8514 and true compatibles. 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)
X311AGX.tgz X311SVGA.tgz
8-bit color for AGX boards. 8-bit color for Super-VGA cards.
X311VG16.tgz
4-bit color for VGA and Super-VGA cards
X311Mch3.tgz X311W32.tgz
8 and 16-bit color for ATI Mach32 boards. 8-bit Color for ET4000/W32, /W32i and /W32p cards.
X311nest.tgz
A nested server running as a client window on another
display.
X311Mch8.tgz Optional:
8-bit color for ATI Mach8 boards.
X311doc.tgz
(.5Mb) READMEs and XFree86 specific man pages
X311Mono.tgz X311man.tgz
1-bit monochrome for VGA, Super-VGA, Hercules, and others. (1.7Mb) man pages except XFree86 specific ones in etc archive
X311f100.tgz
(1.8Mb) 100dpi fonts
X311P9K.tgz X311fscl.tgz
8, 16, and 24-bit color for Weitek P9000 boards (Diamond (1.6Mb) Speedo and Type1 fonts
Viper).
X311fnon.tgz
(3.3Mb) Japanese, Chinese and other non-English fonts
X311S3.tgz X311fsrv.tgz
8, 16 and 24-bit color for S3 boards (#9 GXE, Actix GE32, (.3Mb) the font server and it's man page
SPEA Mercury, STB Pegasus)
X311prog.tgz
(3.9Mb) config, lib*.a and *.h files needed only for
compiling
X311SVGA.tgz X311link.tgz
8-bit color for Super-VGA cards. (7.8Mb) X server reconfiguration kit
X311pex.tgz
(.5Mb) PEX fonts and shared libs needed by PEX applications.
X311VG16.tgz X311lbx.tgz
4-bit color for VGA and Super-VGA cards (.2Mb) low bandwidth X proxy server and libraries.
Note that there is no longer a separate xdm archive. FreeBSD 2.0
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.
X311W32.tgz
8-bit Color for ET4000/W32, /W32i and /W32p cards.
2.1. Full Install:
-------------------
X311nest.tgz [ Note: Unless you're installing XFree86 3.1.1u1 manually, that is
A nested server running as a client window on another to say not as part of the FreeBSD 2.0.5 installation, you may skip
display. 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
abort if you unpack it as an ordinary user. You must also use a
``umask'' value of 022 because the X server requires special
permissions.
Optional: % su
# umask 022
X311doc.tgz 2. If you have 52Mb free in the /usr partition ``cd /usr'' and skip
(.5Mb) READMEs and XFree86 specific man pages 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
X311man.tgz
(1.7Mb) man pages except XFree86 specific ones in etc archive
3. Unpack everything:
X311f100.tgz If you are using sh (as root usually does):
(1.8Mb) 100dpi fonts
X311fscl.tgz
(1.6Mb) Speedo and Type1 fonts
# for i in X311*.tgz; do
# tar -xzf $i
# done
X311fnon.tgz
(3.3Mb) Japanese, Chinese and other non-english fonts
Else, if you are using csh:
X311fsrv.tgz % foreach i (X311*.tgz)
(.3Mb) the font server and it's man page % tar -xzf $i
% end
X311prog.tgz 4. Create a symbolic link ``X'' that points to the server that
(3.9Mb) config, lib*.a and *.h files needed only for matches your video card. The XF86_* man pages list which vga
compiling 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
X311link.tgz
(7.8Mb) X server reconfiguration kit
2.2. Minimal Install:
----------------------
X311pex.tgz First do numbers 1 and 2 above. Then unpack the required archives:
(.5Mb) PEX fonts and shared libs needed by PEX applications.
# for i in bin fnts lib xicf; do
# tar -xzf X311$i.tgz
# done
X311lbx.tgz
(.2Mb) low bandwidth X proxy server and libraries.
Note that there is no longer a separate xdm archive. FreeBSD 2.0 Then unpack a server archive corresponding to your vga card. The
handles this in shared libraries now, so that the xdm binary does not server man pages, X11R6/man/man1/XF86_*, list the vga chip sets
itself contain des and there is no more need for us to provide supported by each server. For example, if you have an ET4000 based
separate tar balls. card you will use the XF86_SVGA server:
# tar -xzf X311SVGA.tgz
# cd /usr/X11R6/bin; rm X; ln -s XF86_SVGA X
2.1. Full Install: 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:
1. You must be logged in as root to unpack the archives because # echo 'set path = ($path /usr/X11R6/bin)' >>/etc/csh.login
several executables are set-user-id. Otherwise the server may # echo 'PATH=$PATH:/usr/X11R6/bin' >>/etc/profile
abort if you unpack it as an ordinary user. You must also use a
``umask'' value of 022 because the X server requires special
permissions.
% su
# umask 022
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
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:
If you had already configured X11R6/lib/X11/xinit/xinitrc or
X11R6/lib/X11/xdm/* omit the xinit-config or xdm-config archive or
unpack it separately and merge in your customizations.
# cd /usr/local The fscl and f100 archives are optional and can be omitted if you are
# mkdir X11R6 short on space. The optional link archive allows you to reconfigure
# ln -s /usr/local/X11R6 /usr/X11R6 and customize a X server binary. The optional prog archive is needed
only for writing or compiling X applications. The optional pex
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
abort with the message ``could not open default font
'fixed'''.
3. Installing The Display Manager (xdm)
----------------------------------------
3. Unpack everything: The display manager makes your PC look like an X terminal. That is,
it presents you with a login screen that runs under X.
If you are using sh (as root usually does): The easiest way to automatically start the display manager on boot is
to add a line in /etc/ttys to start it on one of the unoccupied
virtual terminals:
# for i in X311*.tgz; do ttyv4 "/usr/X11R6/bin/xdm -nodaemon" xterm on secure
# tar -xzf $i
# done
You should also make sure that /usr/X11R6/bin/X is a symbolic link to
the Xserver that matches your video card or edit the file Xservers in
/usr/X11R6/lib/X11/xdm to specify the pathname of the X server.
The change to /etc/ttys won't take effect until you either reboot or
``kill -HUP 1'' to force initd to reread /etc/ttys. You can also test
the display manager manually by loging in as root on the console and
typing ``xdm -nodaemon''.
Else, if you are using csh: 4. Configuring X for Your Hardware
-----------------------------------
% foreach i (X311*.tgz) The XF86Config file tells the X server what kind of monitor, video
% tar -xzf $i card and mouse you have. You must create it to tell the server what
% end specific hardware you have.
XFree86 3.1 uses a new configuration file format. Consult the
XF86Config man page and the general INSTALL (INSTALL.html) file for
instructions.
If you have a Xconfig file for XFree86 2.x, use reconfig to translate
part of it into the new format:
# reconfig <Xconfig >XF86Config
4. Create a symbolic link ``X'' that points to the server that and complete the rest according to the XF86Config man page and the
matches your video card. The XF86_* man pages list which vga XF86Config.sample file as a template.
chip sets are supported by each server. For example, if you
have an ET4000 based card you will use the XF86_SVGA server:
In order to protect your hardware from damage, the server no longer
will read XF86Config files from a user's home directory, but requires
that it be in /etc/XF86Config, /usr/X11R6/lib/X11/XF86Config.hostname
or /usr/X11R6/lib/X11/XF86Config.
# cd /usr/X11R6/bin; rm X; ln -s XF86_SVGA X 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).
o Your monitor's sync frequencies.
2.2. Minimal Install: The easiest way to find which device your mouse is plugged into is to
use ``cat'' or ``kermit'' to look at the output of the mouse. Connect
to it and just make sure that it generates output when the mouse is
moved or clicked:
First do numbers 1 and 2 above. Then unpack the required archives: % 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:
# for i in bin fnts lib xicf; do % dmesg|grep sio
# tar -xzf X311$i.tgz sio0 at 0x3f8-0x3ff irq 4 on isa
# done
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 cuaa0
Then unpack a server archive corresponding to your vga card. The If you plan to fine tune the screen size or position on your monitor
server man pages, X11R6/man/man1/XF86_*, list the vga chip sets you'll need the specs for sync frequencies from your monitor's manual.
supported by each server. For example, if you have an ET4000 based
card you will use the XF86_SVGA server:
# tar -xzf X311SVGA.tgz 5. Running X
# cd /usr/X11R6/bin; rm X; ln -s XF86_SVGA 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
memory themselves. Even if their resident set size is smaller, on a
8Mb system that leaves very space for other applications such as gcc
that expect a few meg free. The R6 X servers may work with 4Mb of
memory, but in practice compilation while running X can take 5 or 10
times as long due to constant paging.
The easiest way for new users to start X windows is to type ``startx
>& startx.log''. Error messages are lost unless you redirect them
because the server takes over the screen.
To get out of X windows, type: ``exit'' in the console xterm. You can
2.3. After either Full or Minimal Install above: customize your X by creating .xinitrc, .xserverrc, and .twmrc files in
your home directory as described in the xinit and startx man pages.
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
If you had already configured X11R6/lib/X11/xinit/xinitrc or
X11R6/lib/X11/xdm/* omit the xinit-config or xdm-config archive or
unpack it separately and merge in your customizations.
The fscl and f100 archives are optional and can be omitted if you are
short on space. The optional link archive allows you to reconfigure
and customize a X server binary. The optional prog archive is needed
only for writing or compiling X applications. The optional pex
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
abort with the message ``could not open default font
'fixed'''.
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.
The easiest way to automatically start the display manager on boot is
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
the Xserver that matches your video card or edit the file Xservers in
/usr/X11R6/lib/X11/xdm to specify the pathname of the X server.
The change to /etc/ttys won't take effect until you either reboot or
``kill -HUP 1'' to force initd to reread /etc/ttys. You can also test
the display manager manually by loging in as root on the console and
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
specific hardware you have.
XFree86 3.1 uses a new configuration file format. Consult the
XF86Config man page and the general INSTALL (INSTALL.html) file for
instructions.
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.
In order to protect your hardware from damage, the server no longer
will read XF86Config files from a user's home directory, but requires
that it be in /etc/XF86Config, /usr/X11R6/lib/X11/XF86Config.hostname
or /usr/X11R6/lib/X11/XF86Config.
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).
o Your monitor's sync frequencies.
The easiest way to find which device your mouse is plugged into is to
use ``cat'' or ``kermit'' to look at the output of the mouse. Connect
to it and just make sure that it generates output when the mouse is
moved or clicked:
% cat < /dev/tty00
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
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
memory themselves. Even if their resident set size is smaller, on a
8Mb system that leaves very space for other applications such as gcc
that expect a few meg free. The R6 X servers may work with 4Mb of
memory, but in practice compilation while running X can take 5 or 10
times as long due to constant paging.
The easiest way for new users to start X windows is to type ``startx
>& startx.log''. Error messages are lost unless you redirect them
because the server takes over the screen.
To get out of X windows, type: ``exit'' in the console xterm. You can
customize your X by creating .xinitrc, .xserverrc, and .twmrc files in
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
GENERIC kernel or any kernel configuration which is a superset.
For a general description of BSD kernel configuration get
smm.02.config.ps.Z
(ftp://gatekeeper.dec.com/pub/BSD/manuals/smm.02.config.ps.Z). It is
a ready-to-print postscript copy of the kernel configuration chapter
from the system maintainers manual.
If you do decide to reduce your kernel configuration file, do not
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
Otherwise, the default without a line like this is 12. You must have
more VTs than gettys as described in the end of section 3, and 4 is a
reasonable minimum.
The server supports several console drivers: pccons, syscons and pcvt.
The syscons driver is the default in FreeBSD 1.1.5 and higher. They
are detected at runtime and no configuration of the server itself is
required.
The pcvt console driver is bundled into FreeBSD and may be enabled
by changing the `sc0' line in your kernel configuration file to
`vt0'. See /sys/i386/conf/LINT for more details.
The XFree86 servers include support for the MIT-SHM extension. The
GENERIC kernel does not support this, so if you want to make use of
this, you will need a kernel configured with SYSV shared memory
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.
S3 cards and serial port COM 4 cannot be installed together on a
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
site.def, type ``./mkmf' and ``make'' to link the server. See
README.LinkKit (LinkKit.html) for more info.
The source tree takes about 114Mb before compiling and an additional
100Mb after ``make World''. You should configure the distribution by
editing xf86site.def and site.def in xc/config/cf before compiling.
By default, the config files are set up to build shared libraries. If
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
Makefiles, then type ``make''. Whenever you install additional man
pages you should update whatis.db by running ``makewhatis
/usr/X11R6/man''.
Note: Starting with XFree86 2.1 and FreeBSD 1.1, the symbol __386BSD__
no longer gets defined either by the compiler or via the X config
files for FreeBSD systems. When porting clients to BSD systems, make
use of the symbol BSD for code which is truly BSD-specific. The value
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
used to protect the inclusion of <sys/param.h>.
For code that really is specific to a particular i386 BSD port, use
__FreeBSD__ for FreeBSD, __NetBSD__ for NetBSD, __386BSD__ for 386BSD,
and __bsdi__ for BSD/386.
9. Thanks
Many thanks to:
o Pace Willison for providing initial *BSD support.
o Amancio Hasty for 386BSD kernel and S3 chipset support.
o David Greenman, Nate Williams, Jordan Hubbard for FreeBSD kernel
support.
o Rod Grimes, Jordan Hubbard and Jack Velte for the use of Walnut
Creek Cdrom's hardware.
o Orest Zborowski, Simon Cooper and Dirk Hohndel for ideas from
the Linux distribution.
$XConsortium: FreeBSD.sgml,v 1.3 95/01/23 15:34:41 kaleb Exp $
Generated from XFree86: xc/programs/Xserver/hw/xfree86/doc/sgml/FreeBSD.sgml,v 3.10 1995/01/28 16:01:28 dawes Exp $
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
GENERIC kernel or any kernel configuration which is a superset.
For a general description of BSD kernel configuration get
smm.02.config.ps.Z
(ftp://gatekeeper.dec.com/pub/BSD/manuals/smm.02.config.ps.Z). It is
a ready-to-print postscript copy of the kernel configuration chapter
from the system maintainers manual.
If you do decide to reduce your kernel configuration file, do not
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
Otherwise, the default without a line like this is 12. You must have
more VTs than gettys as described in the end of section 3, and 4 is a
reasonable minimum.
The server supports several console drivers: pccons, syscons and pcvt.
The syscons driver is the default in FreeBSD 1.1.5 and higher. They
are detected at runtime and no configuration of the server itself is
required.
The pcvt console driver is bundled into FreeBSD and may be enabled
by changing the `sc0' line in your kernel configuration file to
`vt0'. See /sys/i386/conf/LINT for more details.
The XFree86 servers include support for the MIT-SHM extension. The
GENERIC kernel does not support this, so if you want to make use of
this, you will need a kernel configured with SYSV shared memory
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.
S3 cards and serial port COM 4 cannot be installed together on a
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
site.def, type ``./mkmf' and ``make'' to link the server. See
README.LinkKit (LinkKit.html) for more info.
The source tree takes about 114Mb before compiling and an additional
100Mb after ``make World''. You should configure the distribution by
editing xf86site.def and site.def in xc/config/cf before compiling.
By default, the config files are set up to build shared libraries. If
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
Makefiles, then type ``make''. Whenever you install additional man
pages you should update whatis.db by running ``makewhatis
/usr/X11R6/man''.
Note: Starting with XFree86 2.1 and FreeBSD 1.1, the symbol __386BSD__
no longer gets defined either by the compiler or via the X config
files for FreeBSD systems. When porting clients to BSD systems, make
use of the symbol BSD for code which is truly BSD-specific. The value
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
used to protect the inclusion of <sys/param.h>.
For code that really is specific to a particular i386 BSD port, use
__FreeBSD__ for FreeBSD, __NetBSD__ for NetBSD, __386BSD__ for 386BSD,
and __bsdi__ for BSD/386.
9. Thanks
----------
Many thanks to:
o Pace Willison for providing initial *BSD support.
o Amancio Hasty for 386BSD kernel and S3 chipset support.
o David Greenman, Nate Williams, Jordan Hubbard for FreeBSD kernel
support.
o Rod Grimes, Jordan Hubbard and Jack Velte for the use of Walnut
Creek Cdrom's hardware.
o Orest Zborowski, Simon Cooper and Dirk Hohndel for ideas from
the Linux distribution.
$XConsortium: FreeBSD.sgml,v 1.3 95/01/23 15:34:41 kaleb Exp $
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 $ $XFree86: xc/programs/Xserver/hw/xfree86/doc/READ.FreeBSD,v 3.12 1995/01/28 16:19:37 dawes Exp $

View File

@ -1,11 +1,14 @@
This menu lets you configure your system a little after it's This menu allows you to configure your system after the installation process
installed. In particular, you should probably set the system is complete. At the minimum, you should probably set the system manager's
manager's password and the system time zone. password and the system time zone.
For extra goodies like bash, emacs, pascal, etc. you should almost For extra goodies like bash, emacs, pascal, etc., you should look at the
certainly look at the Packages item in this menu. Note that this is Packages item in this menu. Currently, the Packages option is only useful
currently only really useful if you have a CDROM or an existing if you have a CDROM or an existing packages collection somewhere in the
packages collection somewhere in the file system hierarchy where the file system hierarchy where the package management tool can locate it.
package management tool can get to it. Automatic transfer of packages The automatic transfer of packages via FTP is not yet supported!
over 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.

View 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 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 drive then PLEASE BE VERY CERTAIN that the Geometry reported in the
Partition Editor (see Installation Menu) is the correct one for your 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 utility such as that by OnTrack Systems. In these cases, knowing
the correct geometry gets even more complicated as it's not something 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 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 best way of verifying that your geometry is being correctly calculated
DOS (from the hard disk, not a floppy!) and run the ``pfdisk'' utility in such situations is to boot DOS (from the hard disk, not a floppy!)
provided in the tools/ subdirectory of the FreeBSD CDROM or FTP site. and run the ``pfdisk'' utility provided in the tools/ subdirectory of the
It will report the geometry that DOS sees, which is generally the FreeBSD CDROM or FTP site. It will report the geometry that DOS sees,
correct one. which is generally the correct one.
FreeBSD does its best to guess all of this automatically, of course, If you have no DOS partition sharing the disk at all, then you may find that
but it sometimes fails which is why it's a good idea to check it. The you have better luck with Geometry detection if you create a very small
Partition Editor has a `(G)eometry' command that will allow you to DOS partition first, before installing FreeBSD. Once FreeBSD is installed
change it as necessary. 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.

View File

@ -1,20 +1,37 @@
INSTALLATION GUIDE FOR FreeBSD 2.0.5 INSTALLATION GUIDE FOR FreeBSD 2.0.5
This manual documents the process of installing FreeBSD on your 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 installation instructions (how to configure your hardware, what sorts
of things to watch out for, etc). of things to watch out for, etc) before starting a new installation.
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.
+==========================================+ Table of Contents:
|1. DOS user's Question and Answer section | ==================
+==========================================+
1.1 Help! I have no space! Do I need to delete everything first? 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?
If your machine is already running DOS and has little or no free space If your machine is already running DOS and has little or no free space
available for FreeBSD's installation, all is not lost! You may find available for FreeBSD's installation, all is not lost! You may find
@ -31,7 +48,7 @@ Distributions menu for an estimation of how much free space you'll
need for the kind of installation you want. need for the kind of installation you want.
1.2 Can I use compressed DOS filesystems from FreeBSD? 1.2 Can I use compressed DOS filesystems from FreeBSD?
No. If you are using a utility such as Stacker(tm) or DoubleSpace(tm), No. If you are using a utility such as Stacker(tm) or DoubleSpace(tm),
FreeBSD will only be able to use whatever portion of the filesystem FreeBSD will only be able to use whatever portion of the filesystem
@ -43,44 +60,57 @@ It is probably better to create another uncompressed DOS primary
partition and use this for communications between DOS and FreeBSD. partition and use this for communications between DOS and FreeBSD.
1.3 Can I mount my DOS extended partitions? 1.3 Can I mount my DOS extended partitions?
This feature isn't in FreeBSD 2.0.5 but should be in 2.1. We've laid This feature isn't in FreeBSD 2.0.5 but should be in 2.1. We've laid
all the groundwork for making this happen, now we just need to do the all the groundwork for making this happen, now we just need to do the
last 1% of the work involved. last 1% of the work involved.
1.4 Can I run DOS binaries under FreeBSD? 1.4 Can I run DOS binaries under FreeBSD?
Not yet! We'd like to add support for this someday, but are still 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.0 Preparing for the installation
|2. PREPARING FOR THE INSTALLATION | === ==============================
+==================================+
2.1 Before installing from CDROM: 2.1 Before installing from CDROM:
If your CDROM is of an unsupported type, such as an IDE CDROM, then 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 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 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 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" CD installation directly from DOS using Walnut Creek's supplied
batch file or you can make a boot floppy by writing the supplied image ``install.bat'' batch file or you can make a boot floppy with
(floppies/boot.flp) onto a floppy. Under DOS, a good utility for this the ``makeflp.bat'' command.
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.
Once you've booted one way or the other, you should be able to select For the easiest interface of all (from DOS), type "go". This
CDROM as the media type when asked and load the entire distribution will bring up a DOS menu utility that leads you through all
from CDROM. No other media will be required. 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 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 hard disk, you should find the CD mounted on the directory /cdrom. A
@ -89,15 +119,35 @@ may also find useful: It allows you to create "link tree" directories
to things on Read-Only media like CDROM. One example might be to things on Read-Only media like CDROM. One example might be
something like this: something like this:
mkdir /usr/ports mkdir /usr/ports
lndir /cdrom/ports /usr/ports lndir /cdrom/ports /usr/ports
Which would allow you to then "cd /usr/ports; make" and get all the 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 sources from the CD, but yet create all the intermediate files in
/usr/ports, which is presumably on a more writable media! :-) /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.
2.2 Before installing from Floppy: 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:
If you must install from floppy disks, either due to unsupported If you must install from floppy disks, either due to unsupported
hardware or just because you enjoy doing things the hard way, you must hardware or just because you enjoy doing things the hard way, you must
@ -108,66 +158,89 @@ 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 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 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 on a UNIX Workstation (see notes in section 2.1 concerning the
``floppies/boot.flp'' image). Once this floppy is made, put it aside. ``floppies/boot.flp'' image). Once this floppy is made, go on
You'll be asked for it later. to make the distribution set floppies:
You will also need, at minimum, as many 1.44MB or 1.2MB floppies as it You will need, at minimum, as many 1.44MB or 1.2MB floppies as it takes
takes to hold all files in the bin (binary distribution) directory. to hold all files in the bin (binary distribution) directory. THESE
THESE floppies *must* be formatted using MS-DOS, using with the FORMAT floppies *must* be formatted using MS-DOS, using the FORMAT command in
command in MS-DOS or the File Manager format command in Microsoft MS-DOS or the File Manager format command in Microsoft Windows(tm).
Windows(tm). Factory preformatted floppies will also work well, Don't trust Factory Preformatted floppies! Format them again yourself,
provided that they haven't been previously used for something else. just to make sure!
Many problems reported by our users in the past have turned out to be Many problems reported by our users in the past have resulted from the
from the use of improperly formatted media, so we simply take special use of improperly formatted media, so we simply take special care to
care to mention it here! mention it here!
After you've DOS formatted the floppies, you'll need to copy the files After you've DOS formatted the floppies, you'll need to copy the files
onto them. The distribution files are split into chunks conveniently 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 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 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 one, until you've got all the distributions you want packed up in this
fashion. Select ``Floppy'' from the Media menu at installation time fashion. Each distribution should go into a subdirectory on the
and you will be prompted for everything after that. 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: 2.3 Before installing from a DOS partition:
To prepare for installation from an MS-DOS partition, you should To prepare for installation from an MS-DOS partition you should
simply copy the files from the distribution into a directory with the simply copy the files from the distribution into a directory called
same name as the distribution. For example, if you are preparing to "FREEBSD". For example, to do a minimal installation of FreeBSD from
install the bin distribution set, then make a directory on your C: DOS using files copied from the CDROM, you might do something like
drive named C:\FREEBSD\BIN and copy the files there. Copying the this:
distributions into subdirectories of the FREEBSD directory allows the
installation program to find the files automatically. 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: 2.4 Before installing from QIC/SCSI Tape:
Installing from tape is probably the easiest method, short of an Installing from tape is probably the easiest method, short of an
on-line install using FTP or installing from a CDROM. The on-line install using FTP or a CDROM install. The installation program
installation program expects the files to be simply tar'ed onto the expects the files to be simply tar'ed onto the tape, so after getting
tape, so after getting all of the files for distribution you're all of the files for distribution you're interested in, simply tar
interested in, simply tar them onto the tape with a command like: them onto the tape with a command like:
cd /freebsd/distdir cd /freebsd/distdir
tar cvf /dev/rwt0 (or /dev/rst0) dist1 .. dist2 tar cvf /dev/rwt0 (or /dev/rst0) dist1 .. dist2
When you go to do the installation, you should make sure that you Make sure that the `floppies/' directory is one of the "dists" given
leave enough room in the /usr/tmp directory to accomdate the FULL above, since the installation will look for `floppies/root.flp' on
contents of the tape you've created. Due to the non-random access the tape.
nature of tapes, this method of installation requires quite a bit of
temporary storage! You should expect to require as much temporary When you go to do the installation, you should also make sure that you
storage as you have stuff written on tape! 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: 2.5 Before installing over a network:
You can do network installations over 3 types of communications links: You can do network installations over 3 types of communications links:
Serial port: SLIP / PPP Serial port: SLIP / PPP
Parallel port: PLIP (laplink cable) Parallel port: PLIP (laplink cable)
Ethernet: A standard ethernet controller (includes some PCMCIA). Ethernet: A standard ethernet controller (includes some PCMCIA).
SLIP support is rather primitive, and limited primarily to hard-wired SLIP support is rather primitive, and limited primarily to hard-wired
links, such as a serial cable running between a laptop computer and links, such as a serial cable running between a laptop computer and
@ -189,52 +262,186 @@ terminal emulator.
If a hard-wired connection to another FreeBSD (2.0R or later) machine If a hard-wired connection to another FreeBSD (2.0R or later) machine
is available, you might also consider installing over a "laplink" is available, you might also consider installing over a "laplink"
parallel port cable. The data rate over the parallel port is much 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. 50k/sec), thus resulting in a quicker installation.
Finally, for the fastest possible installation, an ethernet adaptor is Finally, for the fastest possible network installation, an ethernet
always a good choice! FreeBSD supports most common PC ethernet cards, adaptor is always a good choice! FreeBSD supports most common PC
a table of supported cards (and their required settings) provided as ethernet cards, a table of supported cards (and their required
part of the FreeBSD Hardware Guide - see the Documentation menu on the settings) is provided as part of the FreeBSD Hardware Guide - see the
boot floppy. If you are using one of the supported PCMCIA ethernet Documentation menu on the boot floppy. If you are using one of the
cards, also be sure that it's plugged in _before_ the laptop is supported PCMCIA ethernet cards, also be sure that it's plugged in
powered on! FreeBSD does not, unfortunately, currently support "hot _before_ the laptop is powered on! FreeBSD does not, unfortunately,
insertion" of PCMCIA cards. currently support "hot insertion" of PCMCIA cards.
You will also need to know your IP address on the network, the the 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. "netmask" value for your address class, and the name of your machine.
Your system administrator can tell you which values to use for your Your system administrator can tell you which values to use for your
particular network setup. If you will be referring to other hosts by 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 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 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 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 really probably talk to your system administrator _first_ before
trying this type of installation! trying this type of installation!
Once you have a network link of some sort working, the installation Once you have a network link of some sort working, the installation
can continue over NFS or FTP. can continue over NFS or FTP.
NFS installation is fairly straight-forward: Simply copy the FreeBSD 2.5.1 Preparing for NFS installation:
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.
FTP installation may be done from any mirror site containing a NFS installation is fairly straight-forward: Simply copy the
reasonably up-to-date version of FreeBSD 2.0.5. A full menu of FreeBSD distribution files you want onto a server somewhere
reasonable choices from almost anywhere in the world is provided in and then point the NFS media selection at it.
the FTP site menu.
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
|2. INSTALLING FREEBSD 2.0.5 |
+============================+
Once you've done the appropriate preinstallation steps, you should install FTP installation may be done from any mirror site containing a
FreeBSD! reasonably up-to-date version of FreeBSD 2.0.5. A full menu of
reasonable choices from almost anywhere in the world is provided
by the FTP site menu.
/* XXX Put some more text in this section.. :-) XXX */ 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.
3. Installing FreeBSD
-- ------------------
Once you've taken note of the appropriate preinstallation steps, you
should be able to install FreeBSD without any further trouble.
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 ---

View File

@ -9,6 +9,6 @@ I18N features to meet various standards.
Until these improvements are made, you may find it easier to simply Until these improvements are made, you may find it easier to simply
edit the /etc/sysconfig file yourself once the system is fully edit the /etc/sysconfig file yourself once the system is fully
installed. There are a number of comments in that file that detail 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. non-english setups.

View File

@ -1,8 +1,8 @@
You can do network installations over 3 types of communications links: You can do network installations over 3 types of communications links:
Serial port: SLIP / PPP Serial port: SLIP / PPP
Parallel port: PLIP (laplink cable) Parallel port: PLIP (laplink cable)
Ethernet: A standard ethernet controller (includes some PCMCIA). Ethernet: A standard ethernet controller (includes some PCMCIA).
SLIP support is rather primitive and limited primarily to hard-wired SLIP support is rather primitive and limited primarily to hard-wired
links, such as a serial cable running between a laptop computer and links, such as a serial cable running between a laptop computer and
@ -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 If a hard-wired connection to another FreeBSD (2.0R or later) machine
is available, you might also consider installing over a "laplink" is available, you might also consider installing over a "laplink"
parallel port cable. The data rate over the parallel port is much parallel port cable. The data rate over the parallel port is much
higher than is what's typically possible over a serial line, with higher than what is typically possible over a serial line with
speeds of up to 50k/sec. not at all uncommon. speeds of up to 50k/sec.
Finally, for the fastest possible installation, an ethernet adaptor is Finally, for the fastest possible network installation, an ethernet
always a good choice! FreeBSD supports most common PC ethernet cards, adaptor is always a good choice! FreeBSD supports most common PC
a table of required settings for which is provided in the FreeBSD ethernet cards, a table of which is provided in the FreeBSD
Hardware Guide - see the Documentation menu on the boot floppy. Hardware Guide (see the Documentation menu on the boot floppy).
If you are using one of the supported PCMCIA ethernet cards, also If you are using one of the supported PCMCIA ethernet cards, also be
be sure that it's plugged in _before_ the laptop is powered on! sure that it's plugged in _before_ the laptop is powered on! FreeBSD
FreeBSD does not, unfortunately, currently support "hot insertion" does not, unfortunately, currently support "hot insertion" of PCMCIA
of PCMCIA cards. cards.
You will also need to know your IP address on the network, the the You will also need to know your IP address on the network, the "netmask"
"netmask" value for your address class and the name of your machine. value for your address class, and the name of your machine.
Your system administrator can tell you which values to use for your Your system administrator can tell you which values to use for your
particular network setup. If you will be referring to other hosts by 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 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 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 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 really probably talk to your system administrator _first_ before
trying this type of installation! trying this type of installation!

View File

@ -10,7 +10,6 @@ RIGHT ARROW Move to next item or group (same as TAB).
SHIFT-TAB Move to previous item or group. SHIFT-TAB Move to previous item or group.
LEFT ARROW Move to previous item or group (same as SHIFT-TAB). LEFT ARROW Move to previous item or group (same as SHIFT-TAB).
RETURN Select item. RETURN Select item.
ESC Spawn a sub-shell for diagnostic purposes. Exit returns.
PAGE UP In text boxes, scrolls up one page. PAGE UP In text boxes, scrolls up one page.
PAGE DOWN In text boxes, scrolls down one page. PAGE DOWN In text boxes, scrolls down one page.
SPACE In "radio" or multiple choice menus, toggle the current item. 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 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. be specially highlighted in the item name.
The console driver also contains a scroll-back buffer for reviewing 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 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 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. 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 You can create more by editing the /etc/ttys file, once the system is up,
to a maximum of 12. for a maximum of 12.

View File

@ -10,7 +10,6 @@ FLECHA DERECHA Ir al siguiente elemento o grupo (Ide'ntico a TAB).
MAYUSCULAS-TAB Ir al elemento anterior o grupo. MAYUSCULAS-TAB Ir al elemento anterior o grupo.
FLECHA IZQ. Ir al elemento anterior o grupo (Ide'ntico a MAYUSCULAS-TAB). FLECHA IZQ. Ir al elemento anterior o grupo (Ide'ntico a MAYUSCULAS-TAB).
RETORNO Seleccionar el elemento. 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 ARRIBA Regresa una pa'gina, en a'reas de texto.
PAGINA ABAJO Presenta la siguiente pa'gina, en areas 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 ESPACIO En menus de opcio'n mu'ltiple (radio), cambia el elemento actual

View File

@ -10,7 +10,6 @@ FLECHA DERECHA Ir al siguiente elemento o grupo (Ide'ntico a TAB).
MAYUSCULAS-TAB Ir al elemento anterior o grupo. MAYUSCULAS-TAB Ir al elemento anterior o grupo.
FLECHA IZQ. Ir al elemento anterior o grupo (Ide'ntico a MAYUSCULAS-TAB). FLECHA IZQ. Ir al elemento anterior o grupo (Ide'ntico a MAYUSCULAS-TAB).
RETORNO Seleccionar el elemento. 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 ARRIBA Regresa una pa'gina, en a'reas de texto.
PAGINA ABAJO Presenta la siguiente pa'gina, en areas 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 ESPACIO En menus de opcio'n mu'ltiple (radio), cambia el elemento actual

View File

@ -13,7 +13,7 @@ consid
que des nouveautés par douzaines. Pour <----. __ / __ \ que des nouveautés par douzaines. Pour <----. __ / __ \
obtenir plus de détails concernant ces <----|====O)))==) \) /==== obtenir plus de détails concernant ces <----|====O)))==) \) /====
nouveautés, consultez le fichier <----' `--' `.__,' \ nouveautés, consultez le fichier <----' `--' `.__,' \
<< release notes >>. | | RELNOTES | |
\ / /\ \ / /\
______( (_ / \______/ ______( (_ / \______/
,' ,-----' | ,' ,-----' |
@ -30,11 +30,11 @@ FreeBSD !
Cette version de FreeBSD contient tout ce dont vous pouvez avoir Cette version de FreeBSD contient tout ce dont vous pouvez avoir
besoin pour implanter ce système sur votre machine. Les sources de besoin pour implanter ce système sur votre machine. Les sources de
tous les programmes étant fournis, vous pouvez recompiler à loisir la 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 étudiants, les chercheurs et tous ceux qui sont simplement curieux de
voir comment est conçu un tel système. 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, aussi fournie pour vous aider à obtenir et à installer sur FreeBSD,
les logiciels traditionnels du domaine UNIX. Plus de 270 ports sont les logiciels traditionnels du domaine UNIX. Plus de 270 ports sont
ainsi disponibles, des éditeurs de texte aux langages de programmation, 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. capable de rivaliser avec beaucoup de stations de travail.
En complément, il est recommandé d'acquérir les ouvrages relatifs à En complément, il est recommandé d'acquérir les ouvrages relatifs à
4.4BSD, chez << O'Reilly Associates >> et << USENIX Association >>, 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 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. ouvrages, nous sommes simplement des lecteurs satisfaits.
Il est conseillé de lire le guide des configurations matérielles avant 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 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 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 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 renseignements indiquant comment configurer votre machine et quels
symptômes rechercher en cas de problème. Ce guide est disponible par symptômes rechercher en cas de problème. Ce guide est disponible par
le menu Documentation de la disquette de démarrage de FreeBSD. le menu Documentation de la disquette de démarrage de FreeBSD.
@ -68,8 +68,8 @@ adress
hackers@FreeBSD.org (en anglais) hackers@FreeBSD.org (en anglais)
Les rapports de disfonctionnement << bug reports >> peuvent être Les rapports de dysfonctionnement « bug reports » peuvent être
notifiés par la commande << send-pr >> dès que votre système est notifiés par la commande « send-pr » dès que votre système est
installé. Dans le cas contraire, ils peuvent être adressés à : installé. Dans le cas contraire, ils peuvent être adressés à :
bugs@FreeBSD.org (en anglais) 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 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 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 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 automatiquement répertoriés dans une base de données. Vous resterez
informés de toute évolution concernant votre demande. 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 source pour obtenir les dernières informations en date. Ce site
propose de nombreuses facilités de documentation. La version de propose de nombreuses facilités de documentation. La version de
Netscape compilée pour BSDI peut être utilisée pour découvrir le 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 Pour de plus amples détails, consultez les fichiers contenus dans les
répertoires /usr/share/FAQ et /usr/share/doc. répertoires /usr/share/FAQ et /usr/share/doc.

View File

@ -10,7 +10,6 @@ FL
MAJ-TAB Aller sur la rubrique ou le groupe précédent. 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). FLÈCHE GAUCHE Aller sur la rubrique précédente. (même chose que MAJ-TAB).
ENTRÉE Sélectionne la rubrique. 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 PRÉC. Remonte d'une page, dans les boîtes de texte.
PAGE SUIV. Descend 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). ESPACE Sélectionne/désélectionne l'élément (menus à choix multiples).

View File

@ -13,7 +13,7 @@ consid
que des nouveautés par douzaines. Pour <----. __ / __ \ que des nouveautés par douzaines. Pour <----. __ / __ \
obtenir plus de détails concernant ces <----|====O)))==) \) /==== obtenir plus de détails concernant ces <----|====O)))==) \) /====
nouveautés, consultez le fichier <----' `--' `.__,' \ nouveautés, consultez le fichier <----' `--' `.__,' \
<< release notes >>. | | RELNOTES | |
\ / /\ \ / /\
______( (_ / \______/ ______( (_ / \______/
,' ,-----' | ,' ,-----' |
@ -30,11 +30,11 @@ FreeBSD !
Cette version de FreeBSD contient tout ce dont vous pouvez avoir Cette version de FreeBSD contient tout ce dont vous pouvez avoir
besoin pour implanter ce système sur votre machine. Les sources de besoin pour implanter ce système sur votre machine. Les sources de
tous les programmes étant fournis, vous pouvez recompiler à loisir la 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 étudiants, les chercheurs et tous ceux qui sont simplement curieux de
voir comment est conçu un tel système. 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, aussi fournie pour vous aider à obtenir et à installer sur FreeBSD,
les logiciels traditionnels du domaine UNIX. Plus de 270 ports sont les logiciels traditionnels du domaine UNIX. Plus de 270 ports sont
ainsi disponibles, des éditeurs de texte aux langages de programmation, 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. capable de rivaliser avec beaucoup de stations de travail.
En complément, il est recommandé d'acquérir les ouvrages relatifs à En complément, il est recommandé d'acquérir les ouvrages relatifs à
4.4BSD, chez << O'Reilly Associates >> et << USENIX Association >>, 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 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. ouvrages, nous sommes simplement des lecteurs satisfaits.
Il est conseillé de lire le guide des configurations matérielles avant 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 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 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 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 renseignements indiquant comment configurer votre machine et quels
symptômes rechercher en cas de problème. Ce guide est disponible par symptômes rechercher en cas de problème. Ce guide est disponible par
le menu Documentation de la disquette de démarrage de FreeBSD. le menu Documentation de la disquette de démarrage de FreeBSD.
@ -68,8 +68,8 @@ adress
hackers@FreeBSD.org (en anglais) hackers@FreeBSD.org (en anglais)
Les rapports de disfonctionnement << bug reports >> peuvent être Les rapports de dysfonctionnement « bug reports » peuvent être
notifiés par la commande << send-pr >> dès que votre système est notifiés par la commande « send-pr » dès que votre système est
installé. Dans le cas contraire, ils peuvent être adressés à : installé. Dans le cas contraire, ils peuvent être adressés à :
bugs@FreeBSD.org (en anglais) 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 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 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 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 automatiquement répertoriés dans une base de données. Vous resterez
informés de toute évolution concernant votre demande. 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 source pour obtenir les dernières informations en date. Ce site
propose de nombreuses facilités de documentation. La version de propose de nombreuses facilités de documentation. La version de
Netscape compilée pour BSDI peut être utilisée pour découvrir le 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 Pour de plus amples détails, consultez les fichiers contenus dans les
répertoires /usr/share/FAQ et /usr/share/doc. répertoires /usr/share/FAQ et /usr/share/doc.

View File

@ -10,7 +10,6 @@ FL
MAJ-TAB Aller sur la rubrique ou le groupe précédent. 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). FLÈCHE GAUCHE Aller sur la rubrique précédente. (même chose que MAJ-TAB).
ENTRÉE Sélectionne la rubrique. 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 PRÉC. Remonte d'une page, dans les boîtes de texte.
PAGE SUIV. Descend 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). ESPACE Sélectionne/désélectionne l'élément (menus à choix multiples).

View File

@ -1,5 +1,3 @@
COME USARE QUESTO SISTEMA COME USARE QUESTO SISTEMA
========================= =========================
@ -12,7 +10,6 @@ FRECCIA A DESTRA voce o gruppo successivo (come TAB)
SHIFT-TAB voce o gruppo precedente SHIFT-TAB voce o gruppo precedente
FRECCIA A SINISTRA voce o gruppo precedente (come SHIFT-TAB) FRECCIA A SINISTRA voce o gruppo precedente (come SHIFT-TAB)
RETURN selezione voce corrente 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 SU nelle aree di testo, va alla pagina precedente
PAGINA GIU nelle aree di testo, va alla pagina successiva PAGINA GIU nelle aree di testo, va alla pagina successiva
SPAZIO cambia stato alla voce corrente (menu "radio") SPAZIO cambia stato alla voce corrente (menu "radio")

View File

@ -1,5 +1,3 @@
COME USARE QUESTO SISTEMA COME USARE QUESTO SISTEMA
========================= =========================
@ -12,7 +10,6 @@ FRECCIA A DESTRA voce o gruppo successivo (come TAB)
SHIFT-TAB voce o gruppo precedente SHIFT-TAB voce o gruppo precedente
FRECCIA A SINISTRA voce o gruppo precedente (come SHIFT-TAB) FRECCIA A SINISTRA voce o gruppo precedente (come SHIFT-TAB)
RETURN selezione voce corrente 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 SU nelle aree di testo, va alla pagina precedente
PAGINA GIU nelle aree di testo, va alla pagina successiva PAGINA GIU nelle aree di testo, va alla pagina successiva
SPAZIO cambia stato alla voce corrente (menu "radio") SPAZIO cambia stato alla voce corrente (menu "radio")

View File

@ -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 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) 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 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 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 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 SPACE $B!V%i%8%*%\%?%s!W$dJ#?t$NA*Br;h$,$"$k%a%K%e!<$G!"8=:_$N(B

View File

@ -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 LEFT ARROW mae no koumoku mataha group ni idou shimasu. (SHIFT-TAB to
onaji). onaji).
RETURN koumoku wo sentaku shimasu. 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 UP text box de, mae no page ni modorimasu.
PAGE DOWN text box de, tsugi no page ni susumimasu. PAGE DOWN text box de, tsugi no page ni susumimasu.
SPACE "radio button" ya fukusuu no sentakushi ga aru menu de, SPACE "radio button" ya fukusuu no sentakushi ga aru menu de,

View File

@ -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 SHIFT-TAB Ga naar het vorige item of groep
PIJL LINKS Ga naar het vorige item of groep (hetzelfde als SHIFT-TAB) PIJL LINKS Ga naar het vorige item of groep (hetzelfde als SHIFT-TAB)
RETURN Selecteer item 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 UP Ga een pagina omhoog in tekst vensters
PAGE DOWN Ga een pagina omlaag in tekst vensters PAGE DOWN Ga een pagina omlaag in tekst vensters
SPATIEBALK Selecteer/deselecteer het huidige item in "radio" of 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. 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 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 bewaarde regels bladeren. Druk nogmaals op "Scroll Lock" om deze
modus te beindigen. 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 sub-shell zit of andere expert-modes gebruikt die geen menus
hebben. hebben.

View File

@ -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 SHIFT-TAB Ga naar het vorige item of groep
PIJL LINKS Ga naar het vorige item of groep (hetzelfde als SHIFT-TAB) PIJL LINKS Ga naar het vorige item of groep (hetzelfde als SHIFT-TAB)
RETURN Selecteer item 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 UP Ga een pagina omhoog in tekst vensters
PAGE DOWN Ga een pagina omlaag in tekst vensters PAGE DOWN Ga een pagina omlaag in tekst vensters
SPATIEBALK Selecteer/deselecteer het huidige item in "radio" of 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. 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 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 bewaarde regels bladeren. Druk nogmaals op "Scroll Lock" om deze
modus te beindigen. 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 sub-shell zit of andere expert-modes gebruikt die geen menus
hebben. hebben.

View File

@ -11,7 +11,6 @@ SKIFT-TAB Flytte til forrige dataelement eller gruppe.
VENSTRE PIL Flytte til forrige dataelement eller gruppe (samme VENSTRE PIL Flytte til forrige dataelement eller gruppe (samme
som SKIFT-TAB). som SKIFT-TAB).
RETUR Velge dataelement. RETUR Velge dataelement.
ESC Starte et underordnet skall i diagnostiserings-øyemed.
SIDE OPP I tekstbokser, ruller opp en side. SIDE OPP I tekstbokser, ruller opp en side.
SIDE NED I tekstbokser, ruller ned en side. SIDE NED I tekstbokser, ruller ned en side.
MELLOMROM I "radio" eller flervalgs menyer, markere inneværende 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 til å inspisere ting som har rullet ut av skjermen. For å bruke
rulle-tilbake funksjonen, trykk på "Scroll Lock" tasten på tastaturet. rulle-tilbake funksjonen, trykk på "Scroll Lock" tasten på tastaturet.
Piltastene og Side Opp/Ned tastene kan nå brukes til å gå 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 å trykk på "Scroll Lock" tasten igjen. Dette momentet er best egnet for å
håndtere underordnede-skjell og andre "vidundermoduser" som ikke bruker håndtere underordnede-skjell og andre "vidundermoduser" som ikke bruker
menyer. 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.

View File

@ -11,7 +11,6 @@ SKIFT-TAB Flytte til forrige dataelement eller gruppe.
VENSTRE PIL Flytte til forrige dataelement eller gruppe (samme VENSTRE PIL Flytte til forrige dataelement eller gruppe (samme
som SKIFT-TAB). som SKIFT-TAB).
RETUR Velge dataelement. RETUR Velge dataelement.
ESC Starte et underordnet skall i diagnostiserings-øyemed.
SIDE OPP I tekstbokser, ruller opp en side. SIDE OPP I tekstbokser, ruller opp en side.
SIDE NED I tekstbokser, ruller ned en side. SIDE NED I tekstbokser, ruller ned en side.
MELLOMROM I "radio" eller flervalgs menyer, markere inneværende 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 til å inspisere ting som har rullet ut av skjermen. For å bruke
rulle-tilbake funksjonen, trykk på "Scroll Lock" tasten på tastaturet. rulle-tilbake funksjonen, trykk på "Scroll Lock" tasten på tastaturet.
Piltastene og Side Opp/Ned tastene kan nå brukes til å gå 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 å trykk på "Scroll Lock" tasten igjen. Dette momentet er best egnet for å
håndtere underordnede-skjell og andre "vidundermoduser" som ikke bruker håndtere underordnede-skjell og andre "vidundermoduser" som ikke bruker
menyer. 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.

View File

@ -2,18 +2,18 @@
FreeBSD 2.0.5 --- RELEASE Version , , FreeBSD 2.0.5 --- RELEASE Version , ,
----------------------------------------- /( )` ----------------------------------------- /( )`
\ \___ / | \ \___ / |
Добро пожаловать в версию 2.0.5 FreeBSD! 2.0.5 - /- _ `-/ ' Добро пожаловать в релиз 2.0.5 FreeBSD! 2.0.5 - /- _ `-/ '
это промежуточная версия FreeBSD, заполняющая (/\/ \ \ /\ это промежуточная версия FreeBSD, заполняющая (/\/ \ \ /\
необходимый промежуток мажду 2.0 (которая была / / | ` \ необходимый промежуток мажду релизами 2.0 (был / / | ` \
выпущена в ноябре 1994) и 2.1, которая будет O O ) / | выпущен в ноябре 1994) и 2.1, который будет O O ) / |
выпущена в конце июля 95-го. FreeBSD 2.0.5 `-^--'`< ' выпущен в конце июля 95-го. FreeBSD 2.0.5 `-^--'`< '
содержит множество значительных усовершенствований, (_.) _ ) / содержит множество значительных усовершенствований, (_.) _ ) /
не последнее из которых - большая стабильность `.___/` / не последнее из которых - увеличенная стабильность `.___/` /
(в приемлемых пределах), десятки новых `-----' / (уже в приемлемых пределах), десятки новых `-----' /
возможностей, значительно улучшенная <----. __ / __ \ возможностей, значительно улучшенная <----. __ / __ \
программа установки. В подробностях <----|====O)))==) \) /==== программа установки. В подробностях <----|====O)))==) \) /====
новые возможности FreeBSD 2.0.5 <----' `--' `.__,' \ новые возможности FreeBSD 2.0.5 <----' `--' `.__,' \
описаны в описании версии! | | описаны в описании релиза! | |
\ / /\ \ / /\
______( (_ / \______/ ______( (_ / \______/
,' ,-----' | ,' ,-----' |
@ -21,14 +21,14 @@
Что такое FreeBSD? FreeBSD - это операционная система, основанная на Что такое FreeBSD? FreeBSD - это операционная система, основанная на
4.4 BSD Lite, для персональных компьютеров, основанных на процессорах 4.4 BSD Lite, предназначенная для персональных компьютеров, основанных
"x86" фирм Intel, AMD, Cyrix или NexGen. Она поддерживает множество на процессорах "x86" фирм Intel, AMD, Cyrix или NexGen. Она поддерживает
различных периферийных устройств и конфигураций ПК и может быть множество различных периферийных устройств и конфигураций ПК и может быть
использована для чего угодно начиная от разработки программ и использована для чего угодно начиная от разработки программ и
заканчивая предоставлением сервиса через сеть Internet; самый заканчивая предоставлением сервиса через сеть Internet; самый
загруженный сервер в Internet, ftp.cdrom.com работает под FreeBSD! загруженный сервер в Internet, ftp.cdrom.com работает под FreeBSD!
Эта версия FreeBSD содержит все, что вам надо для работы такой В этой версии FreeBSD есть все, что вам надо для работы такой
системы, плюс исходные тексты для всего этого. Если у вас установлены системы, плюс исходные тексты для всего этого. Если у вас установлены
исходные тексты, то вы можете заново скомпилировать всю систему исходные тексты, то вы можете заново скомпилировать всю систему
с нуля буквально одной командой, что делает ее идеальной для с нуля буквально одной командой, что делает ее идеальной для
@ -39,18 +39,19 @@
программного обеспечения, перенесенного под FreeBSD ("ports программного обеспечения, перенесенного под FreeBSD ("ports
collection"), облегчающая для вас добывание и установку ваших collection"), облегчающая для вас добывание и установку ваших
любимых традиционных утилит UNIX для FreeBSD. Она состоит из более 270 любимых традиционных утилит UNIX для FreeBSD. Она состоит из более 270
пакетов, от редактора EMACS и до компилятора Лиспа, и делает FreeBSD пакетов, от текстовых редакторов и языков программирования до графических
мощной и всеохватывающей системой, которая может посоревноваться с пакетов, и делает FreeBSD мощной и всеохватывающей системой, которая
операционными системами мощных рабочих станций в мощности и количестве может посоревноваться с операционными системами мощных рабочих станций
утилит. в мощности и предоставляемом сервисе.
Чтобы получить более полную документацию на систему, мы советуем вам Чтобы получить более полную документацию на систему, мы советуем вам
приобрести набор книг по BSD 4.4 от издательства O'Reilly Associates и приобрести набор книг по BSD 4.4 от издательства O'Reilly Associates и
ассоциации USENIX, ISBN 1-56592-082-1. Мы не связаны с O'Reilly, мы ассоциации USENIX, ISBN 1-56592-082-1. Мы не связаны с O'Reilly, мы
лишь удовлетворенные покупатели! (В России книги O'Reilly продает, лишь удовлетворенные покупатели! (В России книги O'Reilly продает,
например, фирма SWD в Санкт-Петербурге - прим.пер.) например, фирма SWD в Санкт-Петербурге - прим.пер. - я с ними не
связан, просто я знаю, где были куплены книги, которые я читал)
Перед тем, как продолжить установку, вы можете прочитать "Руководство Перед тем, как продолжить установку, вы можете почитать "Руководство
по аппаратуре" (HARDWARE GUIDE). Конфигурирование аппаратуры ПК для по аппаратуре" (HARDWARE GUIDE). Конфигурирование аппаратуры ПК для
чего угодно кроме DOS/Windows (которые на самом деле используют не все чего угодно кроме DOS/Windows (которые на самом деле используют не все
возможности аппаратуры) всегда оказывается несколько сложнее, чем может возможности аппаратуры) всегда оказывается несколько сложнее, чем может
@ -58,8 +59,8 @@ collection"),
это значит лишь то, что вы работаете с ним недостаточно долго! :) Это это значит лишь то, что вы работаете с ним недостаточно долго! :) Это
руководство даст вам некоторые наметки насчет конфигурирования руководство даст вам некоторые наметки насчет конфигурирования
аппаратуры и симптомов, за которыми нужно следить при возникновении аппаратуры и симптомов, за которыми нужно следить при возникновении
проблем. Это руководство доступно через меню "Documentation" на проблем. Оно доступно через меню "Documentation" на загрузочной дискете
загрузочной дискете FreeBSD. FreeBSD.
ПРЕДОСТЕРЕЖЕНИЕ: Хотя FreeBSD делает все от нее зависящее, чтобы ПРЕДОСТЕРЕЖЕНИЕ: Хотя FreeBSD делает все от нее зависящее, чтобы
предотвратить случайную потерю данных, все равно вполне вероятно, что предотвратить случайную потерю данных, все равно вполне вероятно, что
@ -67,19 +68,21 @@ collection"),
продолжайте установку, пока вы не сделаете архивную копию всей вашей продолжайте установку, пока вы не сделаете архивную копию всей вашей
важной информации! Мы не шутим! важной информации! Мы не шутим!
Технические комментарии про эту версию посылайте по адресу: Технические комментарии про эту версию посылайте по адресу (на
английском языке):
hackers@FreeBSD.org hackers@FreeBSD.org
Сообщения об ошибках следует посылать с помощью программы `send-pr', Сообщения об ошибках следует посылать с помощью программы `send-pr',
если вам удалось установить систему, иначе по адресу: если вам удалось установить систему, иначе по адресу (и то и другое на
английском языке):
bugs@FreeBSD.org bugs@FreeBSD.org
Пожалуйста, в любом вашем сообщении об ошибках указывайте, в КАКОЙ Пожалуйста, в любом вашем сообщении об ошибках указывайте, в КАКОЙ
ВЕРСИИ FreeBSD вы их обнаружили! ВЕРСИИ FreeBSD вы их обнаружили!
Вопросы общего характера надо посылать по адресу: Вопросы общего характера надо посылать по адресу (тоже на английском):
questions@FreeBSD.org questions@FreeBSD.org
@ -93,11 +96,11 @@ collection"),
Еще один очень хороший источник обновленной информации - это Еще один очень хороший источник обновленной информации - это
наш сервер WWW, http:://www.freebsd.org, который кроме того содержит наш сервер WWW, http:://www.freebsd.org, который кроме того содержит
дополнительную документацию. Для получения доступа к WWW прямо из дополнительную документацию. Для доступа к WWW прямо из FreeBSD вы
FreeBSD вы можете использовать версию Netscape от BSDI. можете использовать версию Netscape от BSDI.
Для получения дальнейшей информации о системе вы можете просмотреть Дальнейшая информация о системе содержится в каталогах /usr/share/FAQ
каталоги /usr/share/FAQ и /usr/share/DOC. (частые вопросы и ответы) и /usr/share/DOC (документация).
Спасибо вам за то, что вы все это прочли, и мы очень надеемся, что Спасибо вам за то, что вы все это прочли, и мы очень надеемся, что
работа с этой версией FreeBSD доставит вам удовольствие! работа с этой версией FreeBSD доставит вам удовольствие!

View File

@ -10,7 +10,6 @@ PIL H
SHIFT-TAB Flytta till föregående fält. SHIFT-TAB Flytta till föregående fält.
PIL VÄNSTER Flytta till föregående fält (samma som SHIFT-TAB). PIL VÄNSTER Flytta till föregående fält (samma som SHIFT-TAB).
RETURN Markera rad eller utför handling. 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 UP Flyttar upp texten en sida i textfält.
PAGE DOWN Flyttar ner texten en sida i textfält. PAGE DOWN Flyttar ner texten en sida i textfält.
MELLANSLAG Markera/avmarkera gällande val i flervalsmenyer. 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 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 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. öppna samtidigt. Använd ALT-F<n> för att byta mellan dem.
Från början finns det fyra skärmar att byta mellan. När systemet till 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. slut är uppe kan du ändra det genom att editera filen /etc/ttys.
Maximalt antal virtuella skärmar är 12. Maximalt antal virtuella skärmar är 12.

View File

@ -10,7 +10,6 @@ PIL H
SHIFT-TAB Flytta till föregående fält. SHIFT-TAB Flytta till föregående fält.
PIL VÄNSTER Flytta till föregående fält (samma som SHIFT-TAB). PIL VÄNSTER Flytta till föregående fält (samma som SHIFT-TAB).
RETURN Markera rad eller utför handling. 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 UP Flyttar upp texten en sida i textfält.
PAGE DOWN Flyttar ner texten en sida i textfält. PAGE DOWN Flyttar ner texten en sida i textfält.
MELLANSLAG Markera/avmarkera gällande val i flervalsmenyer. 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 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 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. öppna samtidigt. Använd ALT-F<n> för att byta mellan dem.
Från början finns det fyra skärmar att byta mellan. När systemet till 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. slut är uppe kan du ändra det genom att editera filen /etc/ttys.
Maximalt antal virtuella skärmar är 12. Maximalt antal virtuella skärmar är 12.

View File

@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next * This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite. * 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 * Copyright (c) 1995
* Jordan Hubbard. All rights reserved. * Jordan Hubbard. All rights reserved.
@ -49,11 +49,11 @@
#include <sys/wait.h> #include <sys/wait.h>
#include <unistd.h> #include <unistd.h>
Boolean SystemWasInstalled; Boolean SystemWasInstalled = FALSE;
static void make_filesystems(void); static Boolean make_filesystems(void);
static void copy_self(void); static Boolean copy_self(void);
static void root_extract(void); static Boolean root_extract(void);
static Chunk *rootdev; static Chunk *rootdev;
@ -62,9 +62,10 @@ checkLabels(void)
{ {
Device **devs; Device **devs;
Disk *disk; Disk *disk;
Chunk *c1, *c2, *swapdev = NULL; Chunk *c1, *c2, *swapdev, *usrdev;
int i; int i;
rootdev = swapdev = usrdev = NULL;
devs = deviceFind(NULL, DEVICE_TYPE_DISK); devs = deviceFind(NULL, DEVICE_TYPE_DISK);
/* First verify that we have a root device */ /* First verify that we have a root device */
for (i = 0; devs[i]; i++) { for (i = 0; devs[i]; i++) {
@ -77,9 +78,21 @@ checkLabels(void)
for (c1 = disk->chunks->part; c1; c1 = c1->next) { for (c1 = disk->chunks->part; c1; c1 = c1->next) {
if (c1->type == freebsd) { if (c1->type == freebsd) {
for (c2 = c1->part; c2; c2 = c2->next) { 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) {
rootdev = c2; if (c2->flags & CHUNK_IS_ROOT) {
break; if (rootdev) {
msgConfirm("WARNING: You have more than one root device set?!\nUsing the first one found.");
continue;
}
rootdev = c2;
}
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."); msgConfirm("No swap devices found - you must create at least one\nswap partition.");
return FALSE; 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; return TRUE;
} }
@ -128,7 +143,6 @@ installInitial(void)
Device **devs; Device **devs;
int i; int i;
static Boolean alreadyDone = FALSE; static Boolean alreadyDone = FALSE;
char *cp;
if (alreadyDone) if (alreadyDone)
return TRUE; return TRUE;
@ -145,14 +159,21 @@ installInitial(void)
return FALSE; return FALSE;
/* Figure out what kind of MBR the user wants */ /* Figure out what kind of MBR the user wants */
dmenuOpenSimple(&MenuMBRType); if (!dmenuOpenSimple(&MenuMBRType))
mbrContents = NULL; return FALSE;
cp = getenv("bootManager");
if (cp) { switch (BootMgr) {
if (!strcmp(cp, "bteasy")) case 0:
mbrContents = bteasy17; mbrContents = bteasy17;
else if (!strcmp(cp, "mbr")) break;
mbrContents = mbr;
case 1:
mbrContents = mbr;
break;
case 2:
default:
mbrContents = NULL;
} }
/* If we refuse to proceed, bail. */ /* If we refuse to proceed, bail. */
@ -190,32 +211,38 @@ installInitial(void)
} }
} }
} }
make_filesystems(); if (!make_filesystems()) {
copy_self(); 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(); dialog_clear();
chroot("/mnt"); chroot("/mnt");
chdir("/"); chdir("/");
variable_set2(RUNNING_ON_ROOT, "yes"); variable_set2(RUNNING_ON_ROOT, "yes");
/* stick a helpful shell over on the 4th VTY */ /* stick a helpful shell over on the 4th VTY */
msgDebug("Sticking a potentially helpful shell over on the 4th screen\n"); if (OnVTY && !fork()) {
if (!fork()) {
int i, fd; int i, fd;
extern int login_tty(int); extern int login_tty(int);
msgDebug("Starting an emergency holographic shell over on the 4th screen\n");
for (i = 0; i < 64; i++) for (i = 0; i < 64; i++)
close(i); close(i);
fd = open("/dev/ttyv3", O_RDWR); fd = open("/dev/ttyv3", O_RDWR);
ioctl(0, TIOCSCTTY, &fd); ioctl(0, TIOCSCTTY, &fd);
dup2(0, 1); dup2(0, 1);
dup2(0, 2); dup2(0, 2);
if (login_tty(fd)==-1) { if (login_tty(fd) == -1) {
msgConfirm("Can't set controlling terminal"); msgNotify("Can't set controlling terminal");
exit(1); exit(1);
} }
printf("Warning: This shell is chroot()'d to /mnt\n");
execlp("sh", "-sh", 0); execlp("sh", "-sh", 0);
exit(1); exit(1);
} }
root_extract();
alreadyDone = TRUE; alreadyDone = TRUE;
return TRUE; return TRUE;
} }
@ -229,8 +256,8 @@ installInitial(void)
int int
installCommit(char *str) installCommit(char *str)
{ {
FILE *fp; Device **devs;
static Boolean hostsModified = FALSE; int i;
if (!Dists) { if (!Dists) {
msgConfirm("You haven't told me what distributions to load yet!\nPlease select a distribution from the Distributions menu."); 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()) if (!mediaVerify())
return 0; return 0;
if (RunningAsInit) { if (RunningAsInit && !SystemWasInstalled) {
if (!installInitial()) if (!installInitial())
return 0; return 0;
configFstab(); 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(); distExtractAll();
/* Tack ourselves at the end of /etc/hosts */ if (!SystemWasInstalled && access("/kernel", R_OK)) {
if (RunningAsInit && getenv(VAR_IPADDR) && !hostsModified) { if (vsystem("ln -f /kernel.GENERIC /kernel")) {
fp = fopen("/etc/hosts", "a"); msgConfirm("Unable to link /kernel into place!");
fprintf(fp, "%s\t\t%s\n", getenv(VAR_IPADDR), getenv(VAR_HOSTNAME)); return 0;
fclose(fp); }
hostsModified = TRUE;
} }
/* 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; SystemWasInstalled = TRUE;
return 0; return 0;
} }
/* Go newfs and/or mount all the filesystems we've been asked to */ /* Go newfs and/or mount all the filesystems we've been asked to */
static void static Boolean
make_filesystems(void) make_filesystems(void)
{ {
int i; int i;
@ -273,6 +343,7 @@ make_filesystems(void)
Device **devs; Device **devs;
char dname[40]; char dname[40];
PartInfo *p = (PartInfo *)rootdev->private; PartInfo *p = (PartInfo *)rootdev->private;
Boolean RootReadOnly;
command_clear(); command_clear();
devs = deviceFind(NULL, DEVICE_TYPE_DISK); devs = deviceFind(NULL, DEVICE_TYPE_DISK);
@ -289,10 +360,12 @@ make_filesystems(void)
i = vsystem("%s %s", p->newfs_cmd, dname); i = vsystem("%s %s", p->newfs_cmd, dname);
if (i) { if (i) {
msgConfirm("Unable to make new root filesystem! Command returned status %d", i); msgConfirm("Unable to make new root filesystem! Command returned status %d", i);
return; return FALSE;
} }
RootReadOnly = FALSE;
} }
else { 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."); 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); sprintf(dname, "/dev/r%sa", rootdev->disk->name);
msgNotify("Checking integrity of existing %s filesystem", dname); msgNotify("Checking integrity of existing %s filesystem", dname);
@ -303,19 +376,7 @@ make_filesystems(void)
sprintf(dname, "/dev/%sa", rootdev->disk->name); sprintf(dname, "/dev/%sa", rootdev->disk->name);
if (Mount("/mnt", dname)) { if (Mount("/mnt", dname)) {
msgConfirm("Unable to mount the root file system! Giving up."); msgConfirm("Unable to mount the root file system! Giving up.");
return; return FALSE;
}
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("/");
} }
/* Now buzz through the rest of the partitions and mount them too */ /* Now buzz through the rest of the partitions and mount them too */
@ -324,12 +385,16 @@ make_filesystems(void)
continue; continue;
disk = (Disk *)devs[i]->private; disk = (Disk *)devs[i]->private;
if (!disk->chunks) if (!disk->chunks) {
msgFatal("No chunk list found for %s!", disk->name); msgConfirm("No chunk list found for %s!", disk->name);
return FALSE;
}
/* Make the proper device mount points in /mnt/dev */ /* Make the proper device mount points in /mnt/dev */
MakeDevDisk(disk, "/mnt/dev"); if (!(RootReadOnly && disk == rootdev->disk)) {
Mkdir("/mnt/dev", NULL);
MakeDevDisk(disk, "/mnt/dev");
}
for (c1 = disk->chunks->part; c1; c1 = c1->next) { for (c1 = disk->chunks->part; c1; c1 = c1->next) {
if (c1->type == freebsd) { if (c1->type == freebsd) {
for (c2 = c1->part; c2; c2 = c2->next) { for (c2 = c1->part; c2; c2 = c2->next) {
@ -358,90 +423,103 @@ make_filesystems(void)
} }
} }
} }
else if (c1->type == fat) { else if (c1->type == fat && c1->private && !RootReadOnly) {
PartInfo *tmp = (PartInfo *)c1->private; char name[FILENAME_MAX];
if (!tmp) sprintf(name, "/mnt%s", ((PartInfo *)c1->private)->mountpoint);
continue; Mkdir(name, NULL);
command_func_add(tmp->mountpoint, Mount_DOS, c1->name);
} }
} }
} }
/* 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_sort();
command_execute(); command_execute();
return TRUE;
} }
/* Copy the boot floppy contents into /stand */ /* Copy the boot floppy contents into /stand */
static void static Boolean
copy_self(void) copy_self(void)
{ {
int i; int i;
msgWeHaveOutput("Copying the boot floppy to /stand on root filesystem"); msgWeHaveOutput("Copying the boot floppy to /stand on root filesystem");
i = vsystem("find -x /stand | cpio -pdmV /mnt"); i = vsystem("find -x /stand | cpio -pdmV /mnt");
if (i) if (i) {
msgConfirm("Copy returned error status of %d!", i); msgConfirm("Copy returned error status of %d!", i);
return FALSE;
}
/* Copy the /etc files into their rightful place */ /* Copy the /etc files into their rightful place */
(void)vsystem("cd /mnt/stand; find etc | cpio -pdmv /mnt"); if (vsystem("cd /mnt/stand; find etc | cpio -pdmV /mnt")) {
msgConfirm("Couldn't copy up the /etc files!");
return TRUE;
}
return TRUE;
} }
static void loop_on_root_floppy(); static Boolean loop_on_root_floppy(void);
static void static Boolean
root_extract(void) root_extract(void)
{ {
int fd; 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 (mediaDevice) {
if (isDebug())
msgDebug("Attempting to extract root image from %s device\n", mediaDevice->description);
switch(mediaDevice->type) { switch(mediaDevice->type) {
case DEVICE_TYPE_TAPE:
case DEVICE_TYPE_FLOPPY: case DEVICE_TYPE_FLOPPY:
loop_on_root_floppy(); alreadyExtracted = loop_on_root_floppy();
break; break;
default: default:
if (mediaDevice->init) if (!(*mediaDevice->init)(mediaDevice))
if (!(*mediaDevice->init)(mediaDevice)) break;
break; fd = (*mediaDevice->get)(mediaDevice, "floppies/root.flp", NULL);
fd = (*mediaDevice->get)("floppies/root.flp"); if (fd < 0) {
if (fd != -1) { msgConfirm("Couldn't get root image from %s!\nWill try to get it from floppy.", mediaDevice->name);
msgNotify("Loading root floppy from %s", mediaDevice->name); (*mediaDevice->shutdown)(mediaDevice);
(void)mediaExtractDist("/", fd); alreadyExtracted = loop_on_root_floppy();
if (mediaDevice->close)
(*mediaDevice->close)(mediaDevice, fd);
else
close(fd);
} }
else { else {
msgConfirm("Couldn't get root floppy image from %s\n, falling back to floppy.", mediaDevice->name); msgNotify("Loading root image from %s", mediaDevice->name);
if (mediaDevice->shutdown) alreadyExtracted = mediaExtractDist("/", fd);
(*mediaDevice->shutdown)(mediaDevice); (*mediaDevice->close)(mediaDevice, fd);
loop_on_root_floppy();
} }
break; break;
} }
} }
else else
loop_on_root_floppy(); alreadyExtracted = loop_on_root_floppy();
return alreadyExtracted;
} }
static void static Boolean
loop_on_root_floppy(void) loop_on_root_floppy(void)
{ {
int fd; int fd;
int status = FALSE;
while (1) { while (1) {
fd = getRootFloppy(); fd = getRootFloppy();
if (fd != -1) { if (fd != -1) {
mediaExtractDist("/", fd); msgNotify("Extracting root floppy..");
status = mediaExtractDist("/", fd);
close(fd);
break; break;
} }
} }
return status;
} }

View File

@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next * This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite. * 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 * Copyright (c) 1995
* Jordan Hubbard. All rights reserved. * Jordan Hubbard. All rights reserved.
@ -171,7 +171,10 @@ static PartInfo *
new_part(char *mpoint, Boolean newfs, u_long size) new_part(char *mpoint, Boolean newfs, u_long size)
{ {
PartInfo *ret; PartInfo *ret;
u_long target,divisor; u_long target, divisor;
if (!mpoint)
mpoint = "/change_me";
ret = (PartInfo *)safe_malloc(sizeof(PartInfo)); ret = (PartInfo *)safe_malloc(sizeof(PartInfo));
strncpy(ret->mountpoint, mpoint, FILENAME_MAX); strncpy(ret->mountpoint, mpoint, FILENAME_MAX);
@ -382,8 +385,8 @@ static void
print_command_summary() print_command_summary()
{ {
mvprintw(17, 0, "The following commands are valid here (upper or lower case):"); 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(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 "); mvprintw(21, 0, "The default target will be displayed in ");
attrset(A_REVERSE); attrset(A_REVERSE);
@ -400,7 +403,7 @@ diskLabelEditor(char *str)
int sz, i, key = 0; int sz, i, key = 0;
Boolean labeling; Boolean labeling;
char *msg = NULL; char *msg = NULL;
PartInfo *p; PartInfo *p, *oldp;
PartType type; PartType type;
Device **devs; Device **devs;
@ -459,7 +462,7 @@ diskLabelEditor(char *str)
case KEY_F(1): case KEY_F(1):
case '?': case '?':
systemDisplayFile("disklabel.hlp"); systemDisplayFile("partition.hlp");
break; break;
case 'C': case 'C':
@ -580,9 +583,11 @@ diskLabelEditor(char *str)
case PART_FAT: case PART_FAT:
case PART_FILESYSTEM: case PART_FILESYSTEM:
oldp = label_chunk_info[here].c->private;
p = get_mountpoint(label_chunk_info[here].c); p = get_mountpoint(label_chunk_info[here].c);
if (p) { if (p) {
p->newfs = FALSE; if (!oldp)
p->newfs = FALSE;
if (label_chunk_info[here].type == PART_FAT if (label_chunk_info[here].type == PART_FAT
&& (!strcmp(p->mountpoint, "/") || !strcmp(p->mountpoint, "/usr") && (!strcmp(p->mountpoint, "/") || !strcmp(p->mountpoint, "/usr")
|| !strcmp(p->mountpoint, "/var"))) { || !strcmp(p->mountpoint, "/var"))) {
@ -608,10 +613,9 @@ diskLabelEditor(char *str)
break; break;
case 'T': /* Toggle newfs state */ case 'T': /* Toggle newfs state */
if (label_chunk_info[here].type == PART_FILESYSTEM && if (label_chunk_info[here].type == PART_FILESYSTEM) {
label_chunk_info[here].c->private) {
PartInfo *pi = ((PartInfo *)label_chunk_info[here].c->private); 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); safe_free(pi);
label_chunk_info[here].c->private_free = safe_free; label_chunk_info[here].c->private_free = safe_free;
} }
@ -659,7 +663,7 @@ diskLabelEditor(char *str)
msg = "A most prudent choice!"; msg = "A most prudent choice!";
break; break;
case 27: /* ESC */ case 'Q':
labeling = FALSE; labeling = FALSE;
break; break;

View File

@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next * This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite. * 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 * Copyright (c) 1995
* Jordan Hubbard. All rights reserved. * Jordan Hubbard. All rights reserved.
@ -48,9 +48,9 @@ u_char default_scrnmap[256];
void void
lang_set_Danish(char *str) lang_set_Danish(char *str)
{ {
systemChangeFont(font_iso_8x16);
systemChangeLang("da_DK.ISO8859-1");
systemChangeScreenmap(default_scrnmap); systemChangeScreenmap(default_scrnmap);
systemChangeLang("da_DK.ISO8859-1");
systemChangeFont(font_iso_8x16);
systemChangeTerminal("cons25l1", termcap_cons25l1, systemChangeTerminal("cons25l1", termcap_cons25l1,
"cons25l1-m", termcap_cons25l1_m); "cons25l1-m", termcap_cons25l1_m);
} }
@ -58,45 +58,45 @@ lang_set_Danish(char *str)
void void
lang_set_Dutch(char *str) lang_set_Dutch(char *str)
{ {
systemChangeFont(font_iso_8x16);
systemChangeLang("nl_NL.ISO8859-1");
systemChangeScreenmap(default_scrnmap); systemChangeScreenmap(default_scrnmap);
systemChangeLang("nl_NL.ISO8859-1");
systemChangeFont(font_iso_8x16);
systemChangeTerminal("cons25l1", termcap_cons25l1, "cons25l1-m", termcap_cons25l1_m); systemChangeTerminal("cons25l1", termcap_cons25l1, "cons25l1-m", termcap_cons25l1_m);
} }
void void
lang_set_English(char *str) lang_set_English(char *str)
{ {
systemChangeFont(font_cp850_8x16);
systemChangeLang("en_US.ISO8859-1");
systemChangeScreenmap(default_scrnmap); systemChangeScreenmap(default_scrnmap);
systemChangeLang("en_US.ISO8859-1");
systemChangeFont(font_cp850_8x16);
systemChangeTerminal("cons25", termcap_cons25, "cons25-m", termcap_cons25_m); systemChangeTerminal("cons25", termcap_cons25, "cons25-m", termcap_cons25_m);
} }
void void
lang_set_French(char *str) lang_set_French(char *str)
{ {
systemChangeFont(font_iso_8x16);
systemChangeLang("fr_FR.ISO8859-1");
systemChangeScreenmap(default_scrnmap); systemChangeScreenmap(default_scrnmap);
systemChangeLang("fr_FR.ISO8859-1");
systemChangeFont(font_iso_8x16);
systemChangeTerminal("cons25l1", termcap_cons25l1, "cons25l1-m", termcap_cons25l1_m); systemChangeTerminal("cons25l1", termcap_cons25l1, "cons25l1-m", termcap_cons25l1_m);
} }
void void
lang_set_German(char *str) lang_set_German(char *str)
{ {
systemChangeFont(font_iso_8x16);
systemChangeLang("de_DE.ISO8859-1");
systemChangeScreenmap(default_scrnmap); systemChangeScreenmap(default_scrnmap);
systemChangeLang("de_DE.ISO8859-1");
systemChangeFont(font_iso_8x16);
systemChangeTerminal("cons25l1", termcap_cons25l1, "cons25l1-m", termcap_cons25l1_m); systemChangeTerminal("cons25l1", termcap_cons25l1, "cons25l1-m", termcap_cons25l1_m);
} }
void void
lang_set_Italian(char *str) lang_set_Italian(char *str)
{ {
systemChangeFont(font_iso_8x16);
systemChangeLang("it_IT.ISO8859-1");
systemChangeScreenmap(default_scrnmap); systemChangeScreenmap(default_scrnmap);
systemChangeLang("it_IT.ISO8859-1");
systemChangeFont(font_iso_8x16);
systemChangeTerminal("cons25l1", termcap_cons25l1, "cons25l1-m", termcap_cons25l1_m); systemChangeTerminal("cons25l1", termcap_cons25l1, "cons25l1-m", termcap_cons25l1_m);
} }
@ -104,44 +104,44 @@ lang_set_Italian(char *str)
void void
lang_set_Japanese(char *str) lang_set_Japanese(char *str)
{ {
systemChangeFont(font_cp850_8x16); /* must prepare JIS X0201 font? */
systemChangeLang("ja_JP.ROMAJI");
systemChangeScreenmap(default_scrnmap); 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); systemChangeTerminal("cons25", termcap_cons25, "cons25-m", termcap_cons25_m);
} }
void void
lang_set_Norwegian(char *str) lang_set_Norwegian(char *str)
{ {
systemChangeFont(font_iso_8x16);
systemChangeLang("no_NO.ISO8859-1");
systemChangeScreenmap(default_scrnmap); systemChangeScreenmap(default_scrnmap);
systemChangeLang("no_NO.ISO8859-1");
systemChangeFont(font_iso_8x16);
systemChangeTerminal("cons25l1", termcap_cons25l1, "cons25l1-m", termcap_cons25l1_m); systemChangeTerminal("cons25l1", termcap_cons25l1, "cons25l1-m", termcap_cons25l1_m);
} }
void void
lang_set_Russian(char *str) lang_set_Russian(char *str)
{ {
systemChangeFont(font_cp866_8x16);
systemChangeLang("ru_SU.KOI8-R");
systemChangeScreenmap(koi8_r2cp866); systemChangeScreenmap(koi8_r2cp866);
systemChangeLang("ru_SU.KOI8-R");
systemChangeFont(font_cp866_8x16);
systemChangeTerminal("cons25r", termcap_cons25r, "cons25r-m", termcap_cons25r_m); systemChangeTerminal("cons25r", termcap_cons25r, "cons25r-m", termcap_cons25r_m);
} }
void void
lang_set_Spanish(char *str) lang_set_Spanish(char *str)
{ {
systemChangeFont(font_iso_8x16);
systemChangeLang("es_ES.ISO8859-1");
systemChangeScreenmap(default_scrnmap); systemChangeScreenmap(default_scrnmap);
systemChangeLang("es_ES.ISO8859-1");
systemChangeFont(font_iso_8x16);
systemChangeTerminal("cons25l1", termcap_cons25l1, "cons25l1-m", termcap_cons25l1_m); systemChangeTerminal("cons25l1", termcap_cons25l1, "cons25l1-m", termcap_cons25l1_m);
} }
void void
lang_set_Swedish(char *str) lang_set_Swedish(char *str)
{ {
systemChangeFont(font_iso_8x16);
systemChangeLang("sv_SV.ISO8859-1");
systemChangeScreenmap(default_scrnmap); systemChangeScreenmap(default_scrnmap);
systemChangeLang("sv_SE.ISO8859-1");
systemChangeFont(font_iso_8x16);
systemChangeTerminal("cons25l1", termcap_cons25l1, "cons25l1-m", termcap_cons25l1_m); systemChangeTerminal("cons25l1", termcap_cons25l1, "cons25l1-m", termcap_cons25l1_m);
} }

View File

@ -4,7 +4,7 @@
* This is probably the last attempt in the `sysinstall' line, the next * This is probably the last attempt in the `sysinstall' line, the next
* generation being slated for what's essentially a complete rewrite. * 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 * Copyright (c) 1995
* Jordan Hubbard. All rights reserved. * Jordan Hubbard. All rights reserved.
@ -42,6 +42,7 @@
*/ */
#include "sysinstall.h" #include "sysinstall.h"
#include <stdio.h>
int int
main(int argc, char **argv) main(int argc, char **argv)
@ -55,17 +56,19 @@ main(int argc, char **argv)
/* Set up whatever things need setting up */ /* Set up whatever things need setting up */
systemInitialize(argc, argv); 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 */ /* Probe for all relevant devices on the system */
deviceGetAll(); deviceGetAll();
/* Welcome user to FreeBSD */
systemWelcome();
/* Default to English */ /* Default to English */
lang_set_English(NULL); lang_set_English(NULL);
/* Default to passive mode ftp since it's the only thing we currently support :-( */ /* 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 */ /* Begin user dialog at outer menu */
while (1) { while (1) {
@ -76,7 +79,8 @@ main(int argc, char **argv)
} }
/* Write out any changes to /etc/sysconfig */ /* Write out any changes to /etc/sysconfig */
configSysconfig(); if (SystemWasInstalled)
configSysconfig();
/* Say goodnight, Gracie */ /* Say goodnight, Gracie */
systemShutdown(); systemShutdown();

View File

@ -4,7 +4,7 @@
* This is probably the last attempt in the `sysinstall' line, the next * This is probably the last attempt in the `sysinstall' line, the next
* generation being slated to essentially a complete rewrite. * 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 * Copyright (c) 1995
* Jordan Hubbard. All rights reserved. * Jordan Hubbard. All rights reserved.
@ -82,35 +82,26 @@ mediaSetCDROM(char *str)
Device **devs; Device **devs;
int cnt; int cnt;
if (OnCDROM == TRUE) { devs = deviceFind(NULL, DEVICE_TYPE_CDROM);
static Device bootCD; cnt = deviceCount(devs);
if (!cnt) {
/* This may need to be extended a little, but the basic idea is sound */ msgConfirm("No CDROM devices found! Please check that your system's\nconfiguration is correct and that the CDROM drive is of a supported\ntype. For more information, consult the hardware guide\nin the Doc menu.");
strcpy(bootCD.name, "bootCD"); return 0;
bootCD.type = DEVICE_TYPE_CDROM;
bootCD.get = mediaGetCDROM;
mediaDevice = &bootCD;
return 1;
} }
else { else if (cnt > 1) {
devs = deviceFind(NULL, DEVICE_TYPE_CDROM); DMenu *menu;
cnt = deviceCount(devs); int status;
if (!cnt) {
msgConfirm("No CDROM devices found! Please check that your system's\nconfiguration is correct and that the CDROM drive is of a supported\ntype. For more information, consult the hardware guide\nin the Doc menu."); menu = deviceCreateMenu(&MenuMediaCDROM, DEVICE_TYPE_CDROM, cdromHook);
if (!menu)
msgFatal("Unable to create CDROM menu! Something is seriously wrong.");
status = dmenuOpenSimple(menu);
free(menu);
if (!status)
return 0; return 0;
}
else if (cnt > 1) {
DMenu *menu;
menu = deviceCreateMenu(&MenuMediaCDROM, DEVICE_TYPE_CDROM, cdromHook);
if (!menu)
msgFatal("Unable to create CDROM menu! Something is seriously wrong.");
dmenuOpenSimple(menu);
free(menu);
}
else
mediaDevice = devs[0];
} }
else
mediaDevice = devs[0];
return mediaDevice ? 1 : 0; return mediaDevice ? 1 : 0;
} }
@ -138,12 +129,15 @@ mediaSetFloppy(char *str)
} }
else if (cnt > 1) { else if (cnt > 1) {
DMenu *menu; DMenu *menu;
int status;
menu = deviceCreateMenu(&MenuMediaFloppy, DEVICE_TYPE_FLOPPY, floppyHook); menu = deviceCreateMenu(&MenuMediaFloppy, DEVICE_TYPE_FLOPPY, floppyHook);
if (!menu) if (!menu)
msgFatal("Unable to create Floppy menu! Something is seriously wrong."); msgFatal("Unable to create Floppy menu! Something is seriously wrong.");
dmenuOpenSimple(menu); status = dmenuOpenSimple(menu);
free(menu); free(menu);
if (!status)
return 0;
} }
else else
mediaDevice = devs[0]; mediaDevice = devs[0];
@ -174,12 +168,15 @@ mediaSetDOS(char *str)
} }
else if (cnt > 1) { else if (cnt > 1) {
DMenu *menu; DMenu *menu;
int status;
menu = deviceCreateMenu(&MenuMediaDOS, DEVICE_TYPE_DOS, DOSHook); menu = deviceCreateMenu(&MenuMediaDOS, DEVICE_TYPE_DOS, DOSHook);
if (!menu) if (!menu)
msgFatal("Unable to create DOS menu! Something is seriously wrong."); msgFatal("Unable to create DOS menu! Something is seriously wrong.");
dmenuOpenSimple(menu); status = dmenuOpenSimple(menu);
free(menu); free(menu);
if (!status)
return 0;
} }
else else
mediaDevice = devs[0]; mediaDevice = devs[0];
@ -210,15 +207,27 @@ mediaSetTape(char *str)
} }
else if (cnt > 1) { else if (cnt > 1) {
DMenu *menu; DMenu *menu;
int status;
menu = deviceCreateMenu(&MenuMediaTape, DEVICE_TYPE_TAPE, tapeHook); menu = deviceCreateMenu(&MenuMediaTape, DEVICE_TYPE_TAPE, tapeHook);
if (!menu) if (!menu)
msgFatal("Unable to create tape drive menu! Something is seriously wrong."); msgFatal("Unable to create tape drive menu! Something is seriously wrong.");
dmenuOpenSimple(menu); status = dmenuOpenSimple(menu);
free(menu); free(menu);
if (!status)
return 0;
} }
else else
mediaDevice = devs[0]; 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; return mediaDevice ? 1 : 0;
} }
@ -232,25 +241,30 @@ mediaSetFTP(char *str)
static Device ftpDevice; static Device ftpDevice;
char *cp; char *cp;
dmenuOpenSimple(&MenuMediaFTP); if (!dmenuOpenSimple(&MenuMediaFTP))
return 0;
cp = getenv("ftp"); cp = getenv("ftp");
if (!cp) if (!cp)
return 0; return 0;
if (!strcmp(cp, "other")) { 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)) if (!cp || strncmp("ftp://", cp, 6))
return 0; return 0;
else else
variable_set2("ftp", cp); variable_set2("ftp", cp);
} }
tcpDeviceSelect(NULL);
strcpy(ftpDevice.name, cp); 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.type = DEVICE_TYPE_FTP;
ftpDevice.init = mediaInitFTP; ftpDevice.init = mediaInitFTP;
ftpDevice.get = mediaGetFTP; ftpDevice.get = mediaGetFTP;
ftpDevice.close = mediaCloseFTP; ftpDevice.close = mediaCloseFTP;
ftpDevice.shutdown = mediaShutdownFTP; ftpDevice.shutdown = mediaShutdownFTP;
ftpDevice.private = mediaDevice; ftpDevice.private = mediaDevice; /* Set to network device by tcpDeviceSelect() */
mediaDevice = &ftpDevice; mediaDevice = &ftpDevice;
return 1; return 1;
} }
@ -261,12 +275,15 @@ mediaSetUFS(char *str)
static Device ufsDevice; static Device ufsDevice;
char *val; 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) if (!val)
return 0; return 0;
strcpy(ufsDevice.name, "ufs"); strcpy(ufsDevice.name, "ufs");
ufsDevice.type = DEVICE_TYPE_UFS; ufsDevice.type = DEVICE_TYPE_UFS;
ufsDevice.init = dummyInit;
ufsDevice.get = mediaGetUFS; ufsDevice.get = mediaGetUFS;
ufsDevice.close = dummyClose;
ufsDevice.shutdown = dummyShutdown;
ufsDevice.private = strdup(val); ufsDevice.private = strdup(val);
mediaDevice = &ufsDevice; mediaDevice = &ufsDevice;
return 1; 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"); 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) if (!val)
return 0; return 0;
tcpDeviceSelect(NULL);
strncpy(nfsDevice.name, val, DEV_NAME_MAX); strncpy(nfsDevice.name, val, DEV_NAME_MAX);
if (!tcpDeviceSelect())
return 0;
nfsDevice.type = DEVICE_TYPE_NFS; nfsDevice.type = DEVICE_TYPE_NFS;
nfsDevice.init = mediaInitNFS; nfsDevice.init = mediaInitNFS;
nfsDevice.get = mediaGetNFS; nfsDevice.get = mediaGetNFS;
nfsDevice.close = dummyClose;
nfsDevice.shutdown = mediaShutdownNFS; nfsDevice.shutdown = mediaShutdownNFS;
nfsDevice.private = mediaDevice; nfsDevice.private = mediaDevice;
mediaDevice = &nfsDevice; mediaDevice = &nfsDevice;
@ -436,7 +455,8 @@ mediaExtractDist(char *dir, int fd)
Boolean Boolean
mediaGetType(void) mediaGetType(void)
{ {
dmenuOpenSimple(&MenuMedia); if (!dmenuOpenSimple(&MenuMedia))
return FALSE;
return TRUE; return TRUE;
} }

View File

@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next * This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite. * 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 * Copyright (c) 1995
* Jordan Hubbard. All rights reserved. * Jordan Hubbard. All rights reserved.
@ -57,7 +57,7 @@ DMenu MenuInitial = {
"This is the main menu of the FreeBSD installation system. Please\n\ "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\ 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\ 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 */ "Press F1 for usage instructions", /* help line */
"usage.hlp", /* help file */ "usage.hlp", /* help file */
{ { "Usage", "Quick start - How to use this menu system.", /* U */ { { "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 }, DMENU_SUBMENU, &MenuOptions, 0, 0 },
{ "Proceed", "Go to the installation menu", /* P */ { "Proceed", "Go to the installation menu", /* P */
DMENU_SUBMENU, &MenuInstall, 0, 0 }, DMENU_SUBMENU, &MenuInstall, 0, 0 },
{ "Quit", "Exit this installation utility", /* Q */ { "Quit", "Exit this menu (and the installation)", /* Q */
DMENU_CANCEL, NULL, 0, 0 }, DMENU_CANCEL, NULL, 0, 0 },
{ NULL } }, { NULL } },
}; };
@ -83,8 +83,7 @@ DMenu MenuDocumentation = {
or are looking to build a system specifically for FreeBSD, read the\n\ or are looking to build a system specifically for FreeBSD, read the\n\
Hardware guide! New users should also read the Install document for\n\ Hardware guide! New users should also read the Install document for\n\
a step-by-step tutorial on installing FreeBSD. For general information,\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\ consult the README file.",
answers in the FAQ.",
"Confused? Press F1 for help.", "Confused? Press F1 for help.",
"usage.hlp", /* help file */ "usage.hlp", /* help file */
{ { "README", "Read this for a general description of FreeBSD", /* R */ { { "README", "Read this for a general description of FreeBSD", /* R */
@ -97,22 +96,18 @@ answers in the FAQ.",
DMENU_DISPLAY_FILE, "COPYRIGHT", 0, 0 }, DMENU_DISPLAY_FILE, "COPYRIGHT", 0, 0 },
{ "Release", "The release notes for this version of FreeBSD.", /* R */ { "Release", "The release notes for this version of FreeBSD.", /* R */
DMENU_DISPLAY_FILE, "RELNOTES", 0, 0 }, DMENU_DISPLAY_FILE, "RELNOTES", 0, 0 },
{ "FAQ", "Frequently Asked Questions about FreeBSD.", /* F */ { "Exit", "Exit this menu (returning to previous)", /* E */
DMENU_DISPLAY_FILE, "faq.hlp", 0, 0 }, DMENU_CANCEL, NULL, 0, 0 },
{ NULL } }, { NULL } },
}; };
/* /*
* The language selection menu. * 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 MenuOptionsLanguage = {
DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS, DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
"Natural language selection", /* title */ "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\ 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\ 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\ and types of system documentation that may be written in your\n\
@ -150,8 +145,8 @@ DMenu MenuMediaCDROM = {
DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS, DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
"Choose a CDROM type", "Choose a CDROM type",
"FreeBSD can be installed directly from a CDROM containing a valid\n\ "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\ FreeBSD 2.0.5 distribution. If you are seeing this menu it is because\n\
more than one CDROM drive on your system was found. Please select one\n\ more than one CDROM drive was found on your system. Please select one\n\
of the following CDROM drives as your installation drive.", of the following CDROM drives as your installation drive.",
"Press F1 to read the installation guide", "Press F1 to read the installation guide",
"install.hlp", "install.hlp",
@ -161,8 +156,8 @@ of the following CDROM drives as your installation drive.",
DMenu MenuMediaFloppy = { DMenu MenuMediaFloppy = {
DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS, DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
"Choose a Floppy drive", "Choose a Floppy drive",
"You have more than one floppy drive. Please chose the floppy\n\ "You have more than one floppy drive. Please chose the drive\n\
drive you'd like to use for this operation", you would like to use for this operation",
NULL, NULL,
NULL, NULL,
{ { NULL } }, { { NULL } },
@ -171,13 +166,14 @@ drive you'd like to use for this operation",
DMenu MenuMediaDOS = { DMenu MenuMediaDOS = {
DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS, DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
"Choose a DOS partition", "Choose a DOS partition",
"FreeBSD can be installed directly from a DOS partition,\n\ "FreeBSD can be installed directly from a DOS partition\n\
assuming of course that you've copied the relevant distributions\n\ assuming, of course, that you have copied the relevant\n\
into your DOS partition before starting this installation. If\n\ distributions into your DOS partition before starting this\n\
such is not the case, then you should reboot DOS at this time\n\ installation. If this is not the case then you should reboot\n\
and copy the distributions you want to install into a subdirectory\n\ DOS at this time and copy the distributions you wish to install\n\
on one of your DOS partitions. Otherwise, please select the\n\ into a \"FREEBSD\" subdirectory on one of your DOS partitions.\n\
DOS partition containing the FreeBSD distribution files.", Otherwise, please select the DOS partition containing the FreeBSD\n\
distribution files.",
"Press F1 to read the installation guide", "Press F1 to read the installation guide",
"install.hlp", "install.hlp",
{ { NULL } }, { { 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\ Distributions other than the basic user set are only guaranteed to be\n\
available from the Primary site.\n\n\ available from the Primary site.\n\n\
If the first site selected doesn't respond, try one of the alternates.\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\".", To specify a URL not in this list, chose \"other\".",
"Select a site that's close!", "Select a site that's close!",
"install.hlp", "install.hlp",
{ { "Primary Site", "ftp.freebsd.org", { { "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", { "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", { "Other", "Specify some other ftp site by URL",
DMENU_SET_VARIABLE, "ftp=other", 0, 0 }, DMENU_SET_VARIABLE, "ftp=other", 0, 0 },
{ "Australia", "ftp.physics.usyd.edu.au", { "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", { "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", { "France", "ftp.ibp.fr",
DMENU_SET_VARIABLE, "ftp=ftp://ftp.ibp.fr/pub/FreeBSD/2.0.5-ALPHA", 0, 0 }, DMENU_SET_VARIABLE, "ftp=ftp://ftp.ibp.fr/pub/FreeBSD/2.0.5-RELEASE", 0, 0 },
{ "Germany", "ftp.uni-duisburg.de", { "Germany", "ftp.fb9dv.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.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", { "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", { "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", { "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", { "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", { "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", { "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 }, DMENU_SET_VARIABLE, "ftp=ftp://ftpsv1.u-aizu.ac.jp/pub/os/FreeBSD/2.0.5-RELEASE", 0, 0 },
{ "Japan #6", "tutserver.tutcc.tut.ac.jp", { "Japan #6", "ftp.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.tut.ac.jp/FreeBSD/2.0.5-RELEASE", 0, 0 },
{ "Japan #7", "ftp.ee.uec.ac.jp", { "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", { "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", { "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", { "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", { "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", { "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", { "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", { "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", { "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", { "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", { "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", { "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", { "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", { "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 } } { NULL } }
}; };
@ -274,8 +278,8 @@ DMenu MenuNetworkDevice = {
"Choose a network interface type", "Choose a network interface type",
"FreeBSD can be installed directly over a network, using NFS or FTP.\n "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\ 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\ to a direct ethernet connection, then you may first need to dial your\n\
service provider using a special utility we provide for that purpose.\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\ 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\ 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\ 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\ 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\ type of system in question. If you would prefer to pick and choose\n\
the list of distributions yourself, simply select \"custom\".", the list of distributions yourself, simply select \"custom\".",
NULL, "Press F1 for more information on these options.",
NULL, "distributions.hlp",
{ { "Developer", "Full sources, binaries and doc but no games [171MB]", { { "Developer", "Full sources, binaries and doc but no games [171MB]",
DMENU_CALL, distSetDeveloper, 0, 0 }, DMENU_CALL, distSetDeveloper, 0, 0 },
{ "X-Developer", "Same as above, but includes XFree86 [196MB]", { "X-Developer", "Same as above, but includes XFree86 [196MB]",
DMENU_CALL, distSetXDeveloper, 0, 0 }, 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]", { "User", "Average user - binaries and doc but no sources [19MB]",
DMENU_CALL, distSetUser, 0, 0 }, DMENU_CALL, distSetUser, 0, 0 },
{ "X-User", "Same as above, but includes XFree86 [45MB]", { "X-User", "Same as above, but includes XFree86 [45MB]",
@ -339,46 +345,93 @@ the list of distributions yourself, simply select \"custom\".",
DMENU_CALL, distSetEverything, 0, 0 }, DMENU_CALL, distSetEverything, 0, 0 },
{ "Custom", "Specify your own distribution set [?]", { "Custom", "Specify your own distribution set [?]",
DMENU_SUBMENU, &MenuDistributions, 0, 0 }, DMENU_SUBMENU, &MenuDistributions, 0, 0 },
{ "Reset", "Reset selected distribution list to None", { "Clear", "Reset selected distribution list to None",
DMENU_CALL, distReset, 0, 0 }, DMENU_CALL, distReset, 0, 0 },
{ NULL } }, { 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 MenuDistributions = {
DMENU_MULTIPLE_TYPE | DMENU_SELECTION_RETURNS, DMENU_MULTIPLE_TYPE | DMENU_SELECTION_RETURNS,
"Select the distributions you wish to install.", "Select the distributions you wish to install.",
"Please check off the distributions you wish to install. Some\n "Please check off the distributions you wish to install. At the\n\
of the most generally useful distributions are already checked, and\n\ very minimum, this should be \"bin\". WARNING: Do not export the\n\
selecting OK at this stage will chose them as defaults.", DES distribution out of the U.S.! It is for U.S. customers only.",
NULL, NULL,
NULL, NULL,
{ { "*bin", "Binary base distribution (required) [36MB]", { { "bin", "Binary base distribution (required) [36MB]",
DMENU_SET_FLAG, &Dists, DIST_BIN, 0 }, DMENU_SET_FLAG, &Dists, DIST_BIN, 0, dmenuFlagCheck },
{ "commercial", "Commercial demos and shareware [10MB]", { "commercial", "Commercial demos and shareware [10MB]",
DMENU_SET_FLAG, &Dists, DIST_COMMERCIAL, 0 }, DMENU_SET_FLAG, &Dists, DIST_COMMERCIAL, 0, dmenuFlagCheck },
{ "compat1x", "FreeBSD 1.x binary compatability package [2MB]", { "compat1x", "FreeBSD 1.x binary compatibility package [2MB]",
DMENU_SET_FLAG, &Dists, DIST_COMPAT1X, 0 }, DMENU_SET_FLAG, &Dists, DIST_COMPAT1X, 0, dmenuFlagCheck },
{ "compat20", "FreeBSD 2.0 binary compatability package [2MB]", { "compat20", "FreeBSD 2.0 binary compatibility package [2MB]",
DMENU_SET_FLAG, &Dists, DIST_COMPAT20, 0 }, DMENU_SET_FLAG, &Dists, DIST_COMPAT20, 0, dmenuFlagCheck },
{ "DES", "DES encryption code and sources [.3MB]", { "DES", "NOT FOR EXPORT! DES encryption code [.3MB]",
DMENU_SET_FLAG, &Dists, DIST_DES, 0 }, DMENU_CALL, distSetDES, 0, 0, DESFlagCheck },
{ "dict", "Spelling checker disctionary files [4.2MB]", { "dict", "Spelling checker dictionary files [4.2MB]",
DMENU_SET_FLAG, &Dists, DIST_DICT, 0 }, DMENU_SET_FLAG, &Dists, DIST_DICT, 0, dmenuFlagCheck },
{ "games", "Games and other amusements (non-commercial) [6.4MB]", { "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]", { "info", "GNU info files [4.1MB]",
DMENU_SET_FLAG, &Dists, DIST_INFO, 0 }, DMENU_SET_FLAG, &Dists, DIST_INFO, 0, dmenuFlagCheck },
{ "*man", "System manual pages - strongly recommended [3.3MB]", { "man", "System manual pages - strongly recommended [3.3MB]",
DMENU_SET_FLAG, &Dists, DIST_MANPAGES, 0 }, DMENU_SET_FLAG, &Dists, DIST_MANPAGES, 0, dmenuFlagCheck },
{ "proflibs", "Profiled versions of the libraries [3.3MB]", { "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]", { "src", "Sources for everything but DES [120MB]",
DMENU_CALL, distSetSrc, 0 }, DMENU_CALL, distSetSrc, 0, 0, srcFlagCheck },
{ "XFree86", "The XFree86 3.1.1L distribution [?]", { "XFree86", "The XFree86 3.1.1u1 distribution [?]",
DMENU_SUBMENU, &MenuXF86Select, 0 }, DMENU_CALL, distSetXF86, 0, 0, x11FlagCheck },
{ "Experimental", "Work in progress!",
DMENU_SET_FLAG, &Dists, DIST_EXPERIMENTAL, 0, dmenuFlagCheck },
{ NULL } }, { 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 } },
};
DMenu MenuSrcDistributions = { DMenu MenuSrcDistributions = {
DMENU_MULTIPLE_TYPE | DMENU_SELECTION_RETURNS, DMENU_MULTIPLE_TYPE | DMENU_SELECTION_RETURNS,
"Select the sub-components of src you wish to install.", "Select the sub-components of src you wish to install.",
@ -387,81 +440,93 @@ you wish to install.",
NULL, NULL,
NULL, NULL,
{ { "base", "top-level files in /usr/src [300K]", { { "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]]", { "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]", { "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]", { "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]", { "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]", { "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]", { "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]", { "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]", { "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]", { "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]", { "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]", { "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]", { "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]", { "usbin", "/usr/src/usr.sbin (aux system binaries) [14MB]",
DMENU_SET_FLAG, &SrcDists, DIST_SRC_USBIN, 0 }, DMENU_SET_FLAG, &SrcDists, DIST_SRC_USBIN, 0, dmenuFlagCheck },
{ "XFree86", "XFree86 3.1.1L source + contrib distribution [200MB]",
DMENU_SET_FLAG, &SrcDists, DIST_SRC_XF86, 0 },
{ NULL } }, { NULL } },
}; };
static int
clearx11(char *str)
{
XF86Dists = 0;
XF86ServerDists = 0;
XF86FontDists = 0;
Dists &= ~DIST_XF86;
return 0;
}
DMenu MenuXF86Select = { DMenu MenuXF86Select = {
DMENU_NORMAL_TYPE, DMENU_NORMAL_TYPE,
"XFree86 3.1.1u1 Distribution", "XFree86 3.1.1u1 Distribution",
"Please select the components you need from the XFree86 3.1.1u1\n\ "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\ 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\ components set and at least one entry from the Server and Font set menus.",
When you're finished, select Cancel.",
"Press F1 to read the XFree86 release notes for FreeBSD", "Press F1 to read the XFree86 release notes for FreeBSD",
"XF86.hlp", "XF86.hlp",
{ { "Basic", "Basic component menu (required)", { { "Basic", "Basic component menu (required)", /* B */
DMENU_SUBMENU, &MenuXF86SelectCore, 0, 0 }, DMENU_SUBMENU, &MenuXF86SelectCore, 0, 0 },
{ "Server", "X server menu", { "Server", "X server menu", /* S */
DMENU_SUBMENU, &MenuXF86SelectServer, 0, 0 }, DMENU_SUBMENU, &MenuXF86SelectServer, 0, 0 },
{ "Fonts", "Font set menu", { "Fonts", "Font set menu", /* F */
DMENU_SUBMENU, &MenuXF86SelectFonts, 0, 0 }, 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 } }, { NULL } },
}; };
DMenu MenuXF86SelectCore = { DMenu MenuXF86SelectCore = {
DMENU_MULTIPLE_TYPE | DMENU_SELECTION_RETURNS, DMENU_MULTIPLE_TYPE | DMENU_SELECTION_RETURNS,
"XFree86 3.1.1 base distribution types", "XFree86 3.1.1 base distribution types",
"Please check off the basic XFree86 components you wish to install.\n\ "Please check off the basic XFree86 components you wish to install.",
Those deemed most generally useful are already checked off for you.",
"Press F1 to read the XFree86 release notes for FreeBSD", "Press F1 to read the XFree86 release notes for FreeBSD",
"XF86.hlp", "XF86.hlp",
{ { "*bin", "X client applications and shared libs [4MB].", { { "bin", "X client applications and shared libs [4MB].",
DMENU_SET_FLAG, &XF86Dists, DIST_XF86_BIN, 0 }, DMENU_SET_FLAG, &XF86Dists, DIST_XF86_BIN, 0, dmenuFlagCheck },
{ "*lib", "Data files needed at runtime [600K]", { "lib", "Data files needed at runtime [600K]",
DMENU_SET_FLAG, &XF86Dists, DIST_XF86_LIB, 0 }, DMENU_SET_FLAG, &XF86Dists, DIST_XF86_LIB, 0, dmenuFlagCheck },
{ "xicf", "Customizable xinit runtime configuration file [100K]", { "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]", { "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]", { "doc", "READMEs and XFree86 specific man pages [500K]",
DMENU_SET_FLAG, &XF86Dists, DIST_XF86_DOC, 0 }, DMENU_SET_FLAG, &XF86Dists, DIST_XF86_DOC, 0, dmenuFlagCheck },
{ "*man", "Man pages (except XFree86 specific ones) [1.2MB]", { "man", "Man pages (except XFree86 specific ones) [1.2MB]",
DMENU_SET_FLAG, &XF86Dists, DIST_XF86_MAN, 0 }, DMENU_SET_FLAG, &XF86Dists, DIST_XF86_MAN, 0, dmenuFlagCheck },
{ "prog", "Programmer's header and library files [4MB]", { "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]", { "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]", { "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 } }, { NULL } },
}; };
@ -474,16 +539,16 @@ install. At the minimum, you should install the standard\n\
(these are selected by default).", (these are selected by default).",
"Press F1 to read the XFree86 release notes for FreeBSD", "Press F1 to read the XFree86 release notes for FreeBSD",
"XF86.hlp", "XF86.hlp",
{ { "*fnts", "Standard 75 DPI and miscellaneous fonts [3.6MB]", { { "fnts", "Standard 75 DPI and miscellaneous fonts [3.6MB]",
DMENU_SET_FLAG, &XF86FontDists, DIST_XF86_FONTS_MISC, 0 }, DMENU_SET_FLAG, &XF86FontDists, DIST_XF86_FONTS_MISC, 0, dmenuFlagCheck },
{ "f100", "100 DPI fonts [1.8MB]", { "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]", { "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]", { "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]", { "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 } }, { 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).", Mono servers are particularly well-suited to most LCD displays).",
"Press F1 to read the XFree86 release notes for FreeBSD", "Press F1 to read the XFree86 release notes for FreeBSD",
"XF86.hlp", "XF86.hlp",
{ { "*SVGA", "Standard VGA or Super VGA display [1MB]", { { "SVGA", "Standard VGA or Super VGA display [1MB]",
DMENU_SET_FLAG, &XF86ServerDists, DIST_XF86_SERVER_SVGA, 0 }, DMENU_SET_FLAG, &XF86ServerDists, DIST_XF86_SERVER_SVGA, 0, dmenuFlagCheck },
{ "VGA16", "Standard 16 color VGA display [1MB]", { "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]", { "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]", { "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]", { "AGX", "8-bit AGX card [1MB]",
DMENU_SET_FLAG, &XF86ServerDists, DIST_XF86_SERVER_AGX, 0 }, DMENU_SET_FLAG, &XF86ServerDists, DIST_XF86_SERVER_AGX, 0, dmenuFlagCheck },
{ "Mch3", "8 and 16-bit (65K color) for ATI Mach32 card [1MB]", { "Ma8", "8-bit ATI Mach8 card [1MB]",
DMENU_SET_FLAG, &XF86ServerDists, DIST_XF86_SERVER_MACH32, 0 }, DMENU_SET_FLAG, &XF86ServerDists, DIST_XF86_SERVER_MACH8, 0, dmenuFlagCheck },
{ "Mch8", "8-bit ATI Mach8 card [1MB]", { "Ma32", "8 and 16-bit (65K color) for ATI Mach32 card [1MB]",
DMENU_SET_FLAG, &XF86ServerDists, DIST_XF86_SERVER_MACH8, 0 }, 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]", { "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]", { "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]", { "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]", { "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 } }, { 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\ 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\ 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\ 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!", "Press F1 for important information regarding geometry!",
"drives.hlp", "drives.hlp",
{ { NULL } }, { { 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 */ /* The installation options menu */
DMenu MenuOptions = { DMenu MenuOptions = {
DMENU_NORMAL_TYPE, DMENU_MULTIPLE_TYPE | DMENU_SELECTION_RETURNS,
"Choose Installation Options", "Choose Installation Options",
"The following options control how this utility will deal\n\ "The following options control how this utility will deal\n\
with various possible error conditions and how verbose it will\n\ with various possible error conditions and how verbose it will\n\
be at various stages.\n\n\ be at various stages.",
When you're done setting options, select Cancel", "Press F1 for more help on these options",
NULL, "options.hlp",
NULL, { { "NFS Secure", "NFS server talks only on a secure port",
{ { "Ftp Options", "Ftp options menu", DMENU_SET_FLAG, &OptFlags, OPT_NFS_SECURE, 0, dmenuFlagCheck },
DMENU_SUBMENU, &MenuOptionsFTP, 0, 0 },
{ "NFS Secure", "NFS server talks only on a secure port",
DMENU_SET_VARIABLE, "nfsServerSecure=yes", 0, 0 },
{ "NFS Slow", "User is using a slow PC or ethernet card", { "NFS Slow", "User is using a slow PC or ethernet card",
DMENU_SET_VARIABLE, "nfsSlowPC=yes", 0, 0 }, DMENU_SET_FLAG, &OptFlags, OPT_SLOW_ETHER, 0, dmenuFlagCheck },
{ "Extra Debugging", "Toggle the extra debugging flag", { "FTP Abort", "On transfer failure, abort",
DMENU_SET_VARIABLE, "debug=yes", 0, 0 }, DMENU_SET_FLAG, &OptFlags, OPT_FTP_ABORT, 0, ftpFlagCheck },
{ "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 },
{ "FTP Reselect", "On transfer failure, ask for another host", { "FTP Reselect", "On transfer failure, ask for another host",
DMENU_SET_VARIABLE, "ftpRetryType=reselect", 0, 0 }, DMENU_SET_FLAG, &OptFlags, OPT_FTP_RESELECT, 0, ftpFlagCheck },
{ "FTP Abort", "On transfer failure, abort installation", { "FTP active", "Use \"active mode\" for standard FTP",
DMENU_SET_VARIABLE, "ftpRetryType=abort", 0, 0 }, DMENU_SET_FLAG, &OptFlags, OPT_FTP_ACTIVE, 0, ftpFlagCheck },
{ "FTP passive", "Use \"passive mode\" for firewalled FTP", { "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 } }, { 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\ 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\ 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\ 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", "Press F1 to read the installation guide",
"install.hlp", "install.hlp",
{ { "Partition", "Allocate disk space for FreeBSD", /* P */ { { "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 }, DMENU_SUBMENU, &MenuInstallType, 0, 0 },
{ "Media", "Choose the installation media type", /* M */ { "Media", "Choose the installation media type", /* M */
DMENU_SUBMENU, &MenuMedia, 0, 0 }, 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 }, DMENU_CALL, installCommit, 0, 0 },
{ "Configure", "Do post-install configuration of FreeBSD", /* C */ { "Configure", "Do post-install configuration of FreeBSD", /* C */
DMENU_SUBMENU, &MenuConfigure, 0, 0 }, DMENU_SUBMENU, &MenuConfigure, 0, 0 },
{ "Exit", "Exit this menu (returning to previous)",
DMENU_CANCEL, NULL, 0, 0 },
{ NULL } }, { NULL } },
}; };
@ -623,12 +716,12 @@ one, select \"standard\". If you would prefer your Master Boot\n\
Record to remain untouched, then select \"none\".", Record to remain untouched, then select \"none\".",
"Press F1 to read the installation guide", "Press F1 to read the installation guide",
"install.hlp", "install.hlp",
{ { "*BootMgr", "Install the FreeBSD Boot Manager (\"Booteasy\")", /* B */ { { "BootMgr", "Install the FreeBSD Boot Manager (\"Booteasy\")", /* B */
DMENU_SET_VARIABLE, "bootManager=bteasy", 0, 0 }, DMENU_SET_VALUE, &BootMgr, 0, 0, dmenuRadioCheck },
{ "Standard", "Use a standard MBR (no boot manager)", /* S */ { "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 */ { "None", "Leave the Master Boot Record untouched", /* N */
DMENU_SET_VARIABLE, "bootManager=none", 0, 0 }, DMENU_SET_VALUE, &BootMgr, 2, 0, dmenuRadioCheck },
{ NULL } }, { NULL } },
}; };
@ -639,8 +732,7 @@ DMenu MenuConfigure = {
"If you've already installed FreeBSD, you may use this menu to\n\ "If you've already installed FreeBSD, you may use this menu to\n\
customize it somewhat to suit your particular configuration. Most\n\ customize it somewhat to suit your particular configuration. Most\n\
importantly, you can use the Packages utility to load extra \"3rd party\"\n\ importantly, you can use the Packages utility to load extra \"3rd party\"\n\
software not provided in the base distributions.\n\n\ software not provided in the base distributions.",
When you're done, select Cancel",
"Press F1 for more information on these options", "Press F1 for more information on these options",
"configure.hlp", "configure.hlp",
{ { "Add User", "Add users to the system", { { "Add User", "Add users to the system",
@ -650,7 +742,7 @@ When you're done, select Cancel",
{ "Networking", "Configure additional network services", { "Networking", "Configure additional network services",
DMENU_SUBMENU, &MenuNetworking, 0, 0 }, DMENU_SUBMENU, &MenuNetworking, 0, 0 },
{ "Time Zone", "Set which time zone you're in", { "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", { "Packages", "Install extra FreeBSD packaged software",
DMENU_CALL, configPackages, 0, 0 }, DMENU_CALL, configPackages, 0, 0 },
{ "Ports", "Enable the FreeBSD Ports Collection from CD", { "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", { "Root Password", "Set the system manager's password",
DMENU_SYSTEM_COMMAND, "passwd root", 0, 0 }, DMENU_SYSTEM_COMMAND, "passwd root", 0, 0 },
{ "XFree86", "Configure XFree86 (if installed)", { "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 } }, { NULL } },
}; };
static char *
menuCheckNTP(DMenuItem *item)
{
return getenv("ntpdate") ? "ON" : "OFF";
}
static char *
menuCheckRouted(DMenuItem *item)
{
return getenv("routedflags") ? "ON" : "OFF";
}
DMenu MenuNetworking = { DMenu MenuNetworking = {
DMENU_NORMAL_TYPE, DMENU_MULTIPLE_TYPE | DMENU_SELECTION_RETURNS,
"Network Services Menu", "Network Services Menu",
"You may have already configured one network device (and the\n\ "You may have already configured one network device (and the\n\
other various hostname/gateway/name server parameters) in the process\n\ other various hostname/gateway/name server parameters) in the process\n\
of installing FreeBSD. This menu allows you to configure other\n\ of installing FreeBSD. This menu allows you to configure other\n\
aspects of your system's network configuration.\n\n\ aspects of your system's network configuration.",
When you are done, select Cancel.",
NULL, NULL,
NULL, NULL,
{ { "NFS client", "This machine will be an NFS client", { { "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", { "NFS server", "This machine will be an NFS server",
DMENU_SET_VARIABLE, "nfs_server=YES", 0, 0 }, DMENU_SET_VARIABLE, "nfs_server=YES", 0, 0, dmenuVarCheck },
{ "interfaces", "Configure additional interfaces", { "Interfaces", "Configure network interfaces",
DMENU_CALL, tcpDeviceSelect, 0, 0 }, DMENU_CALL, tcpMenuSelect, 0, 0 },
{ "ntpdate", "Select a clock-syncronization server", { "ntpdate", "Select a clock-syncronization server",
DMENU_SUBMENU, &MenuNTP, 0, 0 }, DMENU_SUBMENU, &MenuNTP, 0, 0, menuCheckNTP },
{ "routed", "Set flags for routed (default: -q)", { "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", { "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 } }, { 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.", close to you to have your system time syncronized accordingly.",
"These are the primary open-access NTP servers", "These are the primary open-access NTP servers",
NULL, 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 }, DMENU_SET_VARIABLE, "ntpdate=ntp.syd.dms.csiro.au", 0, 0 },
{ "Canada", "tick.usask.ca (GOES clock)", { "Canada", "tick.usask.ca (GOES clock)",
DMENU_SET_VARIABLE, "ntpdate=tick.usask.ca", 0, 0 }, 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 }, DMENU_SUBMENU, &MenuSysconsKeyrate, 0, 0 },
{ "Saver", "Configure the screen saver", { "Saver", "Configure the screen saver",
DMENU_SUBMENU, &MenuSysconsSaver, 0, 0 }, DMENU_SUBMENU, &MenuSysconsSaver, 0, 0 },
{ "Exit", "Exit this menu (returning to previous)",
DMENU_CANCEL, NULL, 0, 0 },
{ NULL } }, { NULL } },
}; };
DMenu MenuSysconsKeymap = { DMenu MenuSysconsKeymap = {
DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS, DMENU_RADIO_TYPE | DMENU_SELECTION_RETURNS,
"System Console Keymap", "System Console Keymap",
"The default system console driver for FreeBSD (syscons) defaults\n\ "The default system console driver for FreeBSD (syscons) defaults\n\
to a standard \"American\" keyboard map. Users in other countries\n\ to a standard \"American\" keyboard map. Users in other countries\n\
@ -764,54 +875,60 @@ the other keymaps below.",
"Choose a keyboard map", "Choose a keyboard map",
NULL, NULL,
{ { "Danish CP865", "Danish Code Page 865 keymap", { { "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", { "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", { "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", { "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", { "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", { "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", { "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", { "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", { "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", { "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", { "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", { "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", { "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 } }, { NULL } },
}; };
DMenu MenuSysconsKeyrate = { DMenu MenuSysconsKeyrate = {
DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS, DMENU_RADIO_TYPE | DMENU_SELECTION_RETURNS,
"System Console Keyboard Repeat Rate", "System Console Keyboard Repeat Rate",
"This menu allows you to set the speed at which keys repeat\n\ "This menu allows you to set the speed at which keys repeat\n\
when held down.", when held down.",
"Choose a keyboard repeat rate", "Choose a keyboard repeat rate",
NULL, NULL,
{ { "Slow", "Slow keyboard repeat rate", { { "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", { "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", { "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", { "Default", "Use default keyboard repeat rate",
DMENU_SET_VARIABLE, "keyrate=NO", 0, 0 }, DMENU_SET_VARIABLE, "keyrate=NO", 0, 0, dmenuVarCheck },
{ NULL } }, { NULL } },
}; };
static char *
menuSaverTimeoutCheck(DMenuItem *item)
{
return getenv("blanktime") ? "ON" : "OFF";
}
DMenu MenuSysconsSaver = { DMenu MenuSysconsSaver = {
DMENU_NORMAL_TYPE, DMENU_MULTIPLE_TYPE | DMENU_SELECTION_RETURNS,
"System Console Screen Saver", "System Console Screen Saver",
"By default, the console driver will not attempt to do anything\n\ "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\ 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", "Choose a nifty-looking screen saver",
NULL, NULL,
{ { "blank", "Simply blank the screen", { { "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)", { "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", { "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", { "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", { "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 } }, { NULL } },
}; };

View File

@ -1,7 +1,7 @@
/* /*
* Miscellaneous support routines.. * 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 * Copyright (c) 1995
* Jordan Hubbard. All rights reserved. * Jordan Hubbard. All rights reserved.
@ -243,34 +243,3 @@ Mount(char *mountp, void *dev)
} }
return 0; 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;
}

View File

@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next * This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite. * 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 * Copyright (c) 1995
* Jordan Hubbard. All rights reserved. * Jordan Hubbard. All rights reserved.
@ -52,10 +52,7 @@
Boolean Boolean
isDebug(void) isDebug(void)
{ {
char *cp; if (OptFlags & OPT_DEBUG)
cp = getenv("debug");
if (cp && !strcmp(cp, "yes"))
return TRUE; return TRUE;
return FALSE; return FALSE;
} }
@ -220,7 +217,7 @@ msgConfirm(char *fmt, ...)
w = dupwin(newscr); w = dupwin(newscr);
if (OnVTY) { if (OnVTY) {
msgDebug("Switching back to VTY 0\n"); msgDebug("Switching back to VTY 0\n");
ioctl(0, VT_RELDISP, 1); ioctl(0, VT_ACTIVATE, 1);
msgInfo(NULL); msgInfo(NULL);
} }
dialog_notify(errstr); dialog_notify(errstr);
@ -268,7 +265,7 @@ msgYesNo(char *fmt, ...)
w = dupwin(newscr); w = dupwin(newscr);
if (OnVTY) { if (OnVTY) {
msgDebug("Switching back to VTY 0\n"); msgDebug("Switching back to VTY 0\n");
ioctl(0, VT_RELDISP, 1); /* Switch back */ ioctl(0, VT_ACTIVATE, 1); /* Switch back */
msgInfo(NULL); msgInfo(NULL);
} }
ret = dialog_yesno("User Confirmation Requested", errstr, -1, -1); ret = dialog_yesno("User Confirmation Requested", errstr, -1, -1);
@ -302,7 +299,7 @@ msgGetInput(char *buf, char *fmt, ...)
w = dupwin(newscr); w = dupwin(newscr);
if (OnVTY) { if (OnVTY) {
msgDebug("Switching back to VTY 0\n"); msgDebug("Switching back to VTY 0\n");
ioctl(0, VT_RELDISP, 1); /* Switch back */ ioctl(0, VT_ACTIVATE, 1); /* Switch back */
msgInfo(NULL); msgInfo(NULL);
} }
rval = dialog_inputbox("Value Required", errstr, -1, -1, input_buffer); rval = dialog_inputbox("Value Required", errstr, -1, -1, input_buffer);

View File

@ -4,12 +4,10 @@
* This is probably the last attempt in the `sysinstall' line, the next * This is probably the last attempt in the `sysinstall' line, the next
* generation being slated to essentially a complete rewrite. * 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 * Copyright (c) 1995
* Jordan Hubbard. All rights reserved. * 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 * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
@ -47,10 +45,12 @@
#include "sysinstall.h" #include "sysinstall.h"
#include <sys/fcntl.h> #include <sys/fcntl.h>
#include <signal.h>
#include <sys/stat.h> #include <sys/stat.h>
static Boolean networkInitialized; static Boolean networkInitialized;
static Boolean startPPP(Device *devp); static pid_t pppPid;
static pid_t startPPP(Device *devp);
Boolean Boolean
mediaInitNetwork(Device *dev) mediaInitNetwork(Device *dev)
@ -58,16 +58,18 @@ mediaInitNetwork(Device *dev)
int i; int i;
char *rp; char *rp;
if (networkInitialized) if (networkInitialized || (dev->flags & OPT_LEAVE_NETWORK_UP))
return TRUE; return TRUE;
configResolv(); configResolv();
if (!strncmp("cuaa", dev->name, 4)) { 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 (!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."); msgConfirm("Unable to start PPP! This installation method\ncannot be used.");
return FALSE; return FALSE;
} }
networkInitialized = TRUE;
return TRUE;
} }
else { else {
char *val; 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."); 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) if (!val)
return FALSE; return FALSE;
else if (!vsystem(attach)) else
strcpy(attach, val);
if (!vsystem(attach)) {
dev->private = NULL;
return TRUE; return TRUE;
}
else { else {
msgConfirm("slattach returned a bad status! Please verify that\nthe command is correct and try again."); msgConfirm("slattach returned a bad status! Please verify that\nthe command is correct and try again.");
return FALSE; return FALSE;
@ -103,9 +109,8 @@ mediaInitNetwork(Device *dev)
} }
rp = getenv(VAR_GATEWAY); rp = getenv(VAR_GATEWAY);
if (!rp) if (!rp || *rp == '0')
msgConfirm("No gateway has been set. You will not be able to access hosts\n msgConfirm("No gateway has been set. You may be unable to access hosts\nnot on your local network\n");
not on the local network\n");
else else
vsystem("route add default %s", rp); vsystem("route add default %s", rp);
networkInitialized = TRUE; networkInitialized = TRUE;
@ -117,10 +122,9 @@ mediaShutdownNetwork(Device *dev)
{ {
char *cp; char *cp;
if (!networkInitialized) if (!networkInitialized || (dev->flags & OPT_LEAVE_NETWORK_UP))
return; 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)) { if (strncmp("cuaa", dev->name, 4)) {
int i; int i;
char ifconfig[64]; char ifconfig[64];
@ -137,38 +141,53 @@ mediaShutdownNetwork(Device *dev)
vsystem("route delete default"); vsystem("route delete default");
networkInitialized = FALSE; networkInitialized = FALSE;
} }
} else if (pppPid != 0) {
kill(pppPid, SIGTERM);
int pppPid = 0;
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 */ /* Start PPP on the 3rd screen */
static Boolean static pid_t
startPPP(Device *devp) startPPP(Device *devp)
{ {
int fd, fd2; int vfd, fd2;
FILE *fp; FILE *fp;
char *val; char *val;
char myaddr[16], provider[16]; pid_t pid;
char myaddr[16], provider[16], speed[16];
fd = open("/dev/ttyv2", O_RDWR); /* We're going over to VTY2 */
if (fd == -1) vfd = open("/dev/ttyv2", O_RDWR);
return FALSE; if (vfd == -1)
return 0;
/* These are needed to make ppp work */
Mkdir("/var/log", NULL); Mkdir("/var/log", NULL);
Mkdir("/var/spool/lock", NULL); Mkdir("/var/spool/lock", NULL);
Mkdir("/etc/ppp", NULL); Mkdir("/etc/ppp", NULL);
fd2 = open("/etc/ppp/ppp.linkup", O_CREAT);
if (fd2 != -1) { /* Get any important user values */
fchmod(fd2, 0755); val = msgGetInput("115200",
close(fd2); "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); fd2 = open("/etc/ppp/ppp.secret", O_CREAT);
if (fd2 != -1) { if (fd2 != -1) {
@ -178,35 +197,27 @@ startPPP(Device *devp)
fp = fopen("/etc/ppp/ppp.conf", "w"); fp = fopen("/etc/ppp/ppp.conf", "w");
if (!fp) { if (!fp) {
msgConfirm("Couldn't open /etc/ppp/ppp.conf file! This isn't going to work"); 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, "default:\n");
fprintf(fp, " set speed %s\n", speed);
fprintf(fp, " set device %s\n", devp->devname); fprintf(fp, " set device %s\n", devp->devname);
val = msgGetInput("115200", fprintf(fp, " set ifaddr %s %s\n", myaddr, provider);
"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);
fclose(fp); fclose(fp);
if (!fork()) {
dup2(fd, 0); if (isDebug())
dup2(fd, 1); msgDebug("Creating /dev/tun0 device.\n");
dup2(fd, 2); 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); execl("/stand/ppp", "/stand/ppp", (char *)NULL);
exit(1); 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!"); 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;
} }

View File

@ -4,7 +4,7 @@
* This is probably the last attempt in the `sysinstall' line, the next * This is probably the last attempt in the `sysinstall' line, the next
* generation being slated to essentially a complete rewrite. * 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 * Copyright (c) 1995
* Jordan Hubbard. All rights reserved. * Jordan Hubbard. All rights reserved.
@ -58,17 +58,14 @@ mediaInitNFS(Device *dev)
if (NFSMounted) if (NFSMounted)
return TRUE; return TRUE;
if (netDevice->init) if (!(*netDevice->init)(netDevice))
if (!(*netDevice->init)(netDevice)) return FALSE;
return FALSE;
if (Mkdir("/nfs", NULL)) if (Mkdir("/nfs", NULL))
return FALSE; return FALSE;
if (!vsystem("mount_nfs %s %s %s /nfs", getenv("nfsSlowPC") ? "-r 1024 -w 1024" : "", if (vsystem("mount_nfs %s %s %s /nfs", (OptFlags & OPT_SLOW_ETHER) ? "-r 1024 -w 1024" : "",
getenv("nfsServerSecure") ? "-P" : "", dev->name)) (OptFlags & OPT_NFS_SECURE) ? "-P" : "", dev->name)) {
return TRUE;
else {
msgConfirm("Error mounting %s on /nfs: %s (%u)\n", dev->name, strerror(errno), errno); msgConfirm("Error mounting %s on /nfs: %s (%u)\n", dev->name, strerror(errno), errno);
return FALSE; return FALSE;
} }
@ -77,13 +74,13 @@ mediaInitNFS(Device *dev)
} }
int int
mediaGetNFS(char *file) mediaGetNFS(Device *dev, char *file, Attribs *dist_attrs)
{ {
char buf[PATH_MAX]; char buf[PATH_MAX];
snprintf(buf, PATH_MAX, "/nfs/%s", file); snprintf(buf, PATH_MAX, "/nfs/%s", file);
if (!access(buf, R_OK)) if (!access(buf, R_OK))
return open(buf, O_RDONLY); return open(buf, O_RDONLY);
snprintf(buf, PATH_MAX, "/nfs/dists/%s", file); snprintf(buf, PATH_MAX, "/nfs/dists/%s", file);
return open(buf, O_RDONLY); return open(buf, O_RDONLY);
} }
@ -96,12 +93,11 @@ mediaShutdownNFS(Device *dev)
if (!NFSMounted) if (!NFSMounted)
return; return;
msgDebug("Unmounting /nfs\n"); 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)); msgConfirm("Could not unmount the NFS partition: %s\n", strerror(errno));
if (isDebug()) if (isDebug())
msgDebug("Unmount returned\n"); msgDebug("Unmount returned\n");
if (netdev->shutdown) (*netdev->shutdown)(netdev);
(*netdev->shutdown)(netdev);
NFSMounted = FALSE; NFSMounted = FALSE;
return; return;
} }

View File

@ -4,7 +4,7 @@
* This is probably the last attempt in the `sysinstall' line, the next * This is probably the last attempt in the `sysinstall' line, the next
* generation being slated to essentially a complete rewrite. * 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 * Copyright (c) 1995
* Jordan Hubbard. All rights reserved. * Jordan Hubbard. All rights reserved.
@ -69,6 +69,7 @@
#define DEV_NAME_MAX 128 /* The maximum length of a device name */ #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 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 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 * I make some pretty gross assumptions about having a max of 50 chunks
@ -85,7 +86,20 @@
#define DISK_LABELLED "_diskLabelled" #define DISK_LABELLED "_diskLabelled"
#define RUNNING_ON_ROOT "_runningOnRoot" #define RUNNING_ON_ROOT "_runningOnRoot"
#define TCP_CONFIGURED "_tcpConfigured" #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_HOSTNAME "hostname"
#define VAR_DOMAINNAME "domainname" #define VAR_DOMAINNAME "domainname"
@ -105,13 +119,13 @@ typedef struct disk Disk;
typedef struct chunk Chunk; typedef struct chunk Chunk;
typedef enum { typedef enum {
DMENU_SHELL_ESCAPE, /* Fork a shell */
DMENU_DISPLAY_FILE, /* Display a file's contents */ DMENU_DISPLAY_FILE, /* Display a file's contents */
DMENU_SUBMENU, /* Recurse into another menu */ DMENU_SUBMENU, /* Recurse into another menu */
DMENU_SYSTEM_COMMAND, /* Run shell commmand */ DMENU_SYSTEM_COMMAND, /* Run shell commmand */
DMENU_SYSTEM_COMMAND_BOX, /* Same as above, but in prgbox */ DMENU_SYSTEM_COMMAND_BOX, /* Same as above, but in prgbox */
DMENU_SET_VARIABLE, /* Set an environment/system var */ DMENU_SET_VARIABLE, /* Set an environment/system var */
DMENU_SET_FLAG, /* Set flag in an unsigned int */ 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_CALL, /* Call back a C function */
DMENU_CANCEL, /* Cancel out of this menu */ DMENU_CANCEL, /* Cancel out of this menu */
DMENU_NOP, /* Do nothing special for item */ DMENU_NOP, /* Do nothing special for item */
@ -124,6 +138,7 @@ typedef struct _dmenuItem {
void *ptr; /* Generic data ptr */ void *ptr; /* Generic data ptr */
u_long parm; /* Parameter for above */ u_long parm; /* Parameter for above */
Boolean disabled; /* Are we temporarily disabled? */ Boolean disabled; /* Are we temporarily disabled? */
char * (*check)(struct _dmenuItem *); /* Our state */
} DMenuItem; } DMenuItem;
typedef struct _dmenu { typedef struct _dmenu {
@ -172,11 +187,12 @@ typedef struct _device {
char *devname; char *devname;
DeviceType type; DeviceType type;
Boolean enabled; Boolean enabled;
Boolean (*init)(struct _device *); Boolean (*init)(struct _device *dev);
int (*get)(char *file); int (*get)(struct _device *dev, char *file, Attribs *dist_attrs);
Boolean (*close)(struct _device *, int fd); Boolean (*close)(struct _device *dev, int fd);
void (*shutdown)(struct _device *); void (*shutdown)(struct _device *dev);
void *private; void *private;
unsigned int flags;
} Device; } Device;
/* Some internal representations of partitions */ /* Some internal representations of partitions */
@ -213,8 +229,6 @@ typedef struct _devPriv {
/*** Externs ***/ /*** Externs ***/
extern int DebugFD; /* Where diagnostic output goes */ 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 SystemWasInstalled; /* Did we install it? */
extern Boolean RunningAsInit; /* Are we running stand-alone? */ extern Boolean RunningAsInit; /* Are we running stand-alone? */
extern Boolean DialogActive; /* Is the dialog() stuff up? */ 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 Variable *VarHead; /* The head of the variable chain */
extern Device *mediaDevice; /* Where we're getting our distribution from */ extern Device *mediaDevice; /* Where we're getting our distribution from */
extern unsigned int Dists; /* Which distributions we want */ 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 SrcDists; /* Which src distributions we want */
extern unsigned int XF86Dists; /* Which XFree86 dists we want */ extern unsigned int XF86Dists; /* Which XFree86 dists we want */
extern unsigned int XF86ServerDists; /* The XFree86 servers we want */ extern unsigned int XF86ServerDists; /* The XFree86 servers we want */
extern unsigned int XF86FontDists; /* The XFree86 fonts 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 MenuInitial; /* Initial installation menu */
extern DMenu MenuMBRType; /* Type of MBR to write on the disk */ 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 MenuDocumentation; /* Documentation menu */
extern DMenu MenuOptions; /* Installation options */ extern DMenu MenuOptions; /* Installation options */
extern DMenu MenuOptionsLanguage; /* Language options menu */ extern DMenu MenuOptionsLanguage; /* Language options menu */
extern DMenu MenuOptionsFTP; /* FTP options menu */
extern DMenu MenuMedia; /* Media type menu */ extern DMenu MenuMedia; /* Media type menu */
extern DMenu MenuMediaCDROM; /* CDROM media menu */ extern DMenu MenuMediaCDROM; /* CDROM media menu */
extern DMenu MenuMediaDOS; /* DOS 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 MenuInstall; /* Installation menu */
extern DMenu MenuInstallType; /* Installation type menu */ extern DMenu MenuInstallType; /* Installation type menu */
extern DMenu MenuDistributions; /* Distribution menu */ extern DMenu MenuDistributions; /* Distribution menu */
extern DMenu MenuDESDistributions; /* DES distribution menu */
extern DMenu MenuSrcDistributions; /* Source distribution menu */ extern DMenu MenuSrcDistributions; /* Source distribution menu */
extern DMenu MenuXF86; /* XFree86 main menu */ extern DMenu MenuXF86; /* XFree86 main menu */
extern DMenu MenuXF86Select; /* XFree86 distribution selection menu */ extern DMenu MenuXF86Select; /* XFree86 distribution selection menu */
@ -268,7 +287,7 @@ extern int attr_parse(Attribs **attr, char *file);
/* cdrom.c */ /* cdrom.c */
extern Boolean mediaInitCDROM(Device *dev); 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); extern void mediaShutdownCDROM(Device *dev);
/* command.c */ /* command.c */
@ -285,6 +304,11 @@ extern void configResolv(void);
extern int configPorts(char *str); extern int configPorts(char *str);
extern int configPackages(char *str); extern int configPackages(char *str);
extern int configSaverTimeout(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 */ /* decode.c */
extern DMenuItem *decode(DMenu *menu, char *name); extern DMenuItem *decode(DMenu *menu, char *name);
@ -298,9 +322,13 @@ extern Device **deviceFind(char *name, DeviceType type);
extern int deviceCount(Device **devs); extern int deviceCount(Device **devs);
extern Device *new_device(char *name); extern Device *new_device(char *name);
extern Device *deviceRegister(char *name, char *desc, char *devname, DeviceType type, Boolean enabled, 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), Boolean (*close)(Device *mediadev, int fd), void (*shutDown)(Device *mediadev),
void *private); 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 */ /* disks.c */
extern int diskPartitionEditor(char *unused); extern int diskPartitionEditor(char *unused);
@ -309,34 +337,40 @@ extern int diskPartitionEditor(char *unused);
extern int distReset(char *str); extern int distReset(char *str);
extern int distSetDeveloper(char *str); extern int distSetDeveloper(char *str);
extern int distSetXDeveloper(char *str); extern int distSetXDeveloper(char *str);
extern int distSetKernDeveloper(char *str);
extern int distSetUser(char *str); extern int distSetUser(char *str);
extern int distSetXUser(char *str); extern int distSetXUser(char *str);
extern int distSetMinimum(char *str); extern int distSetMinimum(char *str);
extern int distSetEverything(char *str); extern int distSetEverything(char *str);
extern int distSetDES(char *str);
extern int distSetSrc(char *str); extern int distSetSrc(char *str);
extern int distSetXF86(char *str);
extern void distExtractAll(void); extern void distExtractAll(void);
/* dmenu.c */ /* dmenu.c */
extern void dmenuOpen(DMenu *menu, int *choice, int *scroll, extern Boolean dmenuOpen(DMenu *menu, int *choice, int *scroll, int *curr, int *max);
int *curr, int *max); extern Boolean dmenuOpenSimple(DMenu *menu);
extern void dmenuOpenSimple(DMenu *menu); extern char *dmenuVarCheck(DMenuItem *item);
extern char *dmenuFlagCheck(DMenuItem *item);
extern char *dmenuRadioCheck(DMenuItem *item);
/* dos.c */ /* dos.c */
extern Boolean mediaInitDOS(Device *dev); 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); extern void mediaShutdownDOS(Device *dev);
/* floppy.c */ /* floppy.c */
extern int getRootFloppy(void); extern int getRootFloppy(void);
extern Boolean mediaInitFloppy(Device *dev); 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); extern void mediaShutdownFloppy(Device *dev);
/* ftp_strat.c */ /* ftp_strat.c */
extern Boolean mediaCloseFTP(Device *dev, int fd); extern Boolean mediaCloseFTP(Device *dev, int fd);
extern Boolean mediaInitFTP(Device *dev); 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 void mediaShutdownFTP(Device *dev);
extern int mediaSetFtpUserPass(char *str);
/* globals.c */ /* globals.c */
extern void globalsInit(void); 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 void items_free(char **list, int *curr, int *max);
extern int Mkdir(char *, void *data); extern int Mkdir(char *, void *data);
extern int Mount(char *, void *data); extern int Mount(char *, void *data);
extern int Mount_DOS(char *, void *data);
/* msg.c */ /* msg.c */
extern Boolean isDebug(void); extern Boolean isDebug(void);
@ -422,19 +455,16 @@ extern char *msgGetInput(char *buf, char *fmt, ...);
/* network.c */ /* network.c */
extern Boolean mediaInitNetwork(Device *dev); extern Boolean mediaInitNetwork(Device *dev);
extern void mediaShutdownNetwork(Device *dev); extern void mediaShutdownNetwork(Device *dev);
extern int configRoutedFlags(char *str);
/* nfs.c */ /* nfs.c */
extern Boolean mediaInitNFS(Device *dev); 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); extern void mediaShutdownNFS(Device *dev);
/* system.c */ /* system.c */
extern void systemInitialize(int argc, char **argv); extern void systemInitialize(int argc, char **argv);
extern void systemShutdown(void); extern void systemShutdown(void);
extern void systemWelcome(void);
extern int systemExecute(char *cmd); extern int systemExecute(char *cmd);
extern int systemShellEscape(void);
extern int systemDisplayFile(char *file); extern int systemDisplayFile(char *file);
extern char *systemHelpFile(char *file, char *buf); extern char *systemHelpFile(char *file, char *buf);
extern void systemChangeFont(const u_char font[]); extern void systemChangeFont(const u_char font[]);
@ -446,12 +476,13 @@ extern int vsystem(char *fmt, ...);
/* tape.c */ /* tape.c */
extern Boolean mediaInitTape(Device *dev); 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); extern void mediaShutdownTape(Device *dev);
/* tcpip.c */ /* tcpip.c */
extern int tcpOpenDialog(Device *dev); extern int tcpOpenDialog(Device *dev);
extern int tcpDeviceSelect(char *str); extern int tcpMenuSelect(char *str);
extern Boolean tcpDeviceSelect(void);
/* termcap.c */ /* termcap.c */
extern int set_termcap(void); extern int set_termcap(void);
@ -459,7 +490,7 @@ extern int set_termcap(void);
/* ufs.c */ /* ufs.c */
extern void mediaShutdownUFS(Device *dev); extern void mediaShutdownUFS(Device *dev);
extern Boolean mediaInitUFS(Device *dev); extern Boolean mediaInitUFS(Device *dev);
extern int mediaGetUFS(char *file); extern int mediaGetUFS(Device *dev, char *file, Attribs *dist_attrs);
/* variables.c */ /* variables.c */
extern void variable_set(char *var); extern void variable_set(char *var);

View File

@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next * This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite. * 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 * Jordan Hubbard
* *
@ -36,13 +36,6 @@ handle_intr(int sig)
systemShutdown(); systemShutdown();
} }
/* Welcome the user to the system */
void
systemWelcome(void)
{
printf("Installation system initializing..\n");
}
/* Initialize system defaults */ /* Initialize system defaults */
void void
systemInitialize(int argc, char **argv) systemInitialize(int argc, char **argv)
@ -55,23 +48,14 @@ systemInitialize(int argc, char **argv)
/* Are we running as init? */ /* Are we running as init? */
if (getpid() == 1) { if (getpid() == 1) {
setsid(); setsid();
if (argc > 1 && strchr(argv[1],'C')) { close(0); open("/dev/ttyv0", O_RDWR);
/* Kernel told us that we are on a CDROM root */ close(1); dup(0);
close(0); open("/bootcd/dev/console", O_RDWR); close(2); dup(0);
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]); printf("%s running as init\n", argv[0]);
i = ioctl(0, TIOCSCTTY, (char *)NULL); i = ioctl(0, TIOCSCTTY, (char *)NULL);
setlogin("root"); 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(stdin, 0);
setbuf(stderr, 0); setbuf(stderr, 0);
} }
@ -103,7 +87,7 @@ systemShutdown(void)
/* REALLY exit! */ /* REALLY exit! */
if (RunningAsInit) { if (RunningAsInit) {
/* Put the console back */ /* Put the console back */
ioctl(DebugFD, VT_RELDISP, 1); ioctl(0, VT_ACTIVATE, 2);
reboot(RB_HALT); reboot(RB_HALT);
} }
else else
@ -127,39 +111,6 @@ systemExecute(char *command)
return status; 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 */ /* Display a file in a filebox */
int int
systemDisplayFile(char *file) systemDisplayFile(char *file)
@ -197,43 +148,41 @@ systemHelpFile(char *file, char *buf)
{ {
char *cp; char *cp;
static char oldfile[64]; /* Should be FILENAME_MAX but I don't feel like wasting that much space */ 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) if (!file)
return NULL; return NULL;
if ((cp = getenv("LANG")) != NULL) { if ((cp = getenv("LANG")) == NULL)
snprintf(buf, FILENAME_MAX, "%s/%s", cp, file); cp = default_lang;
if (oldfile[0]) {
if (!strcmp(buf, oldfile)) for (i = 0; i < 2; i++) {
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); snprintf(buf, FILENAME_MAX, "/stand/%s/%s", cp, file);
if (file_readable(buf)) { if (file_readable(buf))
strcpy(oldfile, buf);
return buf; return buf;
} if (*oldfile) {
} int i;
/* Fall back to normal imperialistic mode :-) */
cp = "en_US.ISO8859-1"; i = unlink(oldfile);
snprintf(buf, FILENAME_MAX, "%s/%s", cp, file); if (isDebug())
if (oldfile[0]) { msgDebug("Unlink(%s) = %d\n", oldfile, i);
if (!strcmp(buf, oldfile)) i = rmdir(oldlang);
return oldfile; if (isDebug())
else { msgDebug("rmdir(%s) = %d\n", oldlang, i);
unlink(oldfile);
oldfile[0] = '\0'; oldfile[0] = '\0';
} }
} snprintf(extract, 64, "%s/%s", cp, file);
vsystem("cd /stand && zcat help.tgz | cpio --format=tar -idv %s > /dev/null 2>&1",buf); vsystem("cd /stand && zcat help.tgz | cpio --format=tar -idv %s > /dev/null 2>&1", extract);
snprintf(buf, FILENAME_MAX, "/stand/%s/%s", cp, file); if (file_readable(buf)) {
if (file_readable(buf)) { strcpy(oldfile, buf);
strcpy(oldfile, buf); sprintf(oldlang, "/stand/%s", cp);
return buf; return buf;
}
if (cp == default_lang)
break;
cp = default_lang;
} }
return NULL; return NULL;
} }
@ -245,7 +194,6 @@ systemChangeFont(const u_char font[])
if (ioctl(0, PIO_FONT8x16, font) < 0) if (ioctl(0, PIO_FONT8x16, font) < 0)
msgConfirm("Sorry! Unable to load font for %s", getenv("LANG")); msgConfirm("Sorry! Unable to load font for %s", getenv("LANG"));
} }
dialog_clear();
} }
void void
@ -277,8 +225,10 @@ systemChangeTerminal(char *color, const u_char c_term[],
init_acs(); init_acs();
cbreak(); noecho(); cbreak(); noecho();
} }
dialog_clear();
} }
clear();
refresh();
dialog_clear();
} }
void void
@ -289,7 +239,6 @@ systemChangeScreenmap(const u_char newmap[])
msgConfirm("Sorry! Unable to load the screenmap for %s", msgConfirm("Sorry! Unable to load the screenmap for %s",
getenv("LANG")); getenv("LANG"));
} }
dialog_clear();
} }
int int

View File

@ -4,12 +4,10 @@
* This is probably the last attempt in the `sysinstall' line, the next * This is probably the last attempt in the `sysinstall' line, the next
* generation being slated to essentially a complete rewrite. * 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 * Copyright (c) 1995
* Jordan Hubbard. All rights reserved. * 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 * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
@ -59,17 +57,15 @@ mediaInitTape(Device *dev)
if (tapeInitted) if (tapeInitted)
return TRUE; return TRUE;
Mkdir("/usr/tmp/tape", NULL); Mkdir(dev->private, NULL);
if (chdir("/usr/tmp/tape")) { if (chdir(dev->private))
Mkdir("/var/tmp/tape", NULL);
if (chdir("/var/tmp/tape"))
return FALSE; return FALSE;
}
msgConfirm("Insert tape into %s and press return", dev->description); msgConfirm("Insert tape into %s and press return", dev->description);
msgNotify("Attempting to extract from %s...", dev->description);
if (!strcmp(dev->name, "ft0")) if (!strcmp(dev->name, "ft0"))
i = vsystem("ft | tar xvf -"); i = vsystem("ft | cpio -iduVm -H tar");
else else
i = vsystem("tar xvf %s", dev->devname); i = vsystem("cpio -iBduVm -H tar -I %s", dev->devname);
if (!i) { if (!i) {
tapeInitted = TRUE; tapeInitted = TRUE;
return TRUE; return TRUE;
@ -80,14 +76,14 @@ mediaInitTape(Device *dev)
} }
int int
mediaGetTape(char *file) mediaGetTape(Device *dev, char *file, Attribs *dist_attrs)
{ {
char buf[PATH_MAX]; char buf[PATH_MAX];
sprintf(buf, "/usr/tmp/tape/%s", file); sprintf(buf, "%s/%s", (char *)dev->private, file);
if (!access(buf, R_OK)) if (file_readable(buf))
return open(buf, O_RDONLY); 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); return open(buf, O_RDONLY);
} }
@ -96,9 +92,9 @@ mediaShutdownTape(Device *dev)
{ {
if (!tapeInitted) if (!tapeInitted)
return; return;
if (!access("/usr/tmp/tape", X_OK)) if (!access(dev->private, X_OK)) {
(void)vsystem("rm -rf /usr/tmp/tape"); msgNotify("Cleaning up results of tape extract..");
else if (!access("/var/tmp/tape", X_OK)) (void)vsystem("rm -rf %s", (char *)dev->private);
(void)vsystem("rm -rf /var/tmp/tape"); }
tapeInitted = FALSE; tapeInitted = FALSE;
} }

View File

@ -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 * Copyright (c) 1995
* Gary J Palmer. All rights reserved. * Gary J Palmer. All rights reserved.
@ -83,7 +83,7 @@ typedef struct _layout {
static Layout layout[] = { static Layout layout[] = {
{ 1, 2, 25, HOSTNAME_FIELD_LEN - 1, { 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 }, hostname, STRINGOBJ, NULL },
#define LAYOUT_HOSTNAME 0 #define LAYOUT_HOSTNAME 0
{ 1, 35, 20, HOSTNAME_FIELD_LEN - 1, { 1, 35, 20, HOSTNAME_FIELD_LEN - 1,
@ -392,9 +392,11 @@ tcpOpenDialog(Device *devp)
if (!cancel) { if (!cancel) {
DevInfo *di; DevInfo *di;
char temp[512], ifn[64]; char temp[512], ifn[64];
char *ifaces;
variable_set2(VAR_HOSTNAME, hostname); variable_set2(VAR_HOSTNAME, hostname);
variable_set2(VAR_DOMAINNAME, domainname); if (domainname[0])
variable_set2(VAR_DOMAINNAME, domainname);
if (gateway[0]) if (gateway[0])
variable_set2(VAR_GATEWAY, gateway); variable_set2(VAR_GATEWAY, gateway);
if (nameserver[0]) if (nameserver[0])
@ -410,8 +412,14 @@ tcpOpenDialog(Device *devp)
sprintf(temp, "inet %s %s netmask %s", ipaddr, extras, netmask); sprintf(temp, "inet %s %s netmask %s", ipaddr, extras, netmask);
sprintf(ifn, "%s%s", VAR_IFCONFIG, devp->name); sprintf(ifn, "%s%s", VAR_IFCONFIG, devp->name);
variable_set2(ifn, temp); variable_set2(ifn, temp);
sprintf(ifn, "%s %s", devp->name, getenv(VAR_INTERFACES) ? getenv(VAR_INTERFACES) : ""); ifaces = getenv(VAR_INTERFACES);
variable_set2(VAR_INTERFACES, ifn); 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]) if (ipaddr[0])
variable_set2(VAR_IPADDR, ipaddr); variable_set2(VAR_IPADDR, ipaddr);
return 0; return 0;
@ -438,15 +446,41 @@ netHook(char *str)
} }
/* Get a network device */ /* Get a network device */
int Boolean
tcpDeviceSelect(char *str) tcpDeviceSelect(void)
{ {
DMenu *menu; DMenu *menu;
Device **devs;
int cnt;
int status;
menu = deviceCreateMenu(&MenuNetworkDevice, DEVICE_TYPE_NETWORK, netHook); devs = deviceFind(NULL, DEVICE_TYPE_NETWORK);
if (!menu) cnt = deviceCount(devs);
msgFatal("Unable to create network device menu! Argh!"); if (!cnt) {
dmenuOpenSimple(menu); msgConfirm("No network devices available!");
free(menu); 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!");
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; return 0;
} }

View File

@ -29,21 +29,16 @@ set_termcap(void)
char *term; char *term;
int stat; int stat;
OnVTY = OnSerial = FALSE; OnVTY = RunningAsInit = FALSE;
if (getpid() != 1)
DebugFD = open("sysinstall.debug", O_WRONLY|O_CREAT|O_TRUNC, 0644);
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));
RunningAsInit = TRUE;
OnVTY = TRUE;
}
term = getenv("TERM"); term = getenv("TERM");
stat = ioctl(STDERR_FILENO, GIO_COLOR, &ColorDisplay); 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 (stat < 0) {
if (!term) { if (!term) {
if (setenv("TERM", "vt100", 1) < 0) if (setenv("TERM", "vt100", 1) < 0)
@ -53,9 +48,15 @@ set_termcap(void)
} }
if (DebugFD == -1) if (DebugFD == -1)
DebugFD = dup(1); DebugFD = dup(1);
OnSerial = TRUE;
} }
else { 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 (ColorDisplay) {
if (!term) { if (!term) {
if (setenv("TERM", "cons25", 1) < 0) if (setenv("TERM", "cons25", 1) < 0)
@ -72,7 +73,6 @@ set_termcap(void)
return -1; return -1;
} }
} }
OnVTY = TRUE;
} }
return 0; return 0;
} }

View File

@ -4,7 +4,7 @@
* This is probably the last attempt in the `sysinstall' line, the next * This is probably the last attempt in the `sysinstall' line, the next
* generation being slated to essentially a complete rewrite. * 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 * Copyright (c) 1995
* Jordan Hubbard. All rights reserved. * Jordan Hubbard. All rights reserved.
@ -50,13 +50,13 @@
/* No init or shutdown routines necessary - all done in mediaSetUFS() */ /* No init or shutdown routines necessary - all done in mediaSetUFS() */
int int
mediaGetUFS(char *file) mediaGetUFS(Device *dev, char *file, Attribs *dist_attrs)
{ {
char buf[PATH_MAX]; 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)) if (!access(buf, R_OK))
return open(buf, O_RDONLY); 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); return open(buf, O_RDONLY);
} }

View File

@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next * This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite. * 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 * Copyright (c) 1995
* Jordan Hubbard. All rights reserved. * Jordan Hubbard. All rights reserved.
@ -50,6 +50,14 @@ make_variable(char *var, char *value)
{ {
Variable *newvar; 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); setenv(var, value, 1);
newvar = (Variable *)safe_malloc(sizeof(Variable)); newvar = (Variable *)safe_malloc(sizeof(Variable));
strncpy(newvar->name, var, VAR_NAME_MAX); strncpy(newvar->name, var, VAR_NAME_MAX);
@ -57,7 +65,8 @@ make_variable(char *var, char *value)
newvar->next = VarHead; newvar->next = VarHead;
VarHead = newvar; VarHead = newvar;
setenv(newvar->name, newvar->value, 1); 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 void

Some files were not shown because too many files have changed in this diff Show More