Add in some more config file support -- add variables to shut up

sysinstall about the dangerously dedicated message, and other
variables to allow pre-configuring the distribution sets.

Still todo: add a variable to define an initial set of packages that
should be loaded.
Reviewed by:	jkh
This commit is contained in:
Paul Traina 1997-05-05 05:16:03 +00:00
parent b332d9a66e
commit eeb3219eef
11 changed files with 182 additions and 77 deletions

View File

@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
* $Id: disks.c,v 1.82 1997/03/11 16:27:25 joerg Exp $
* $Id: disks.c,v 1.83 1997/04/20 16:46:27 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -247,27 +247,32 @@ diskPartition(Device *dev, Disk *d)
break;
case 'A':
rv = msgYesNo("Do you want to do this with a true partition entry\n"
"so as to remain cooperative with any future possible\n"
"operating systems on the drive(s)?");
if (rv != 0) {
rv = !msgYesNo("This is dangerous in that it will make the drive totally\n"
"uncooperative with other potential operating systems on the\n"
"same disk. It will lead instead to a totally dedicated disk,\n"
"starting at the very first sector, bypassing all BIOS geometry\n"
"considerations. This precludes the existance of any boot\n"
"manager or other stuff in sector 0, since the BSD bootstrap\n"
"will live there.\n"
"You will run into serious trouble with ST-506 and ESDI drives\n"
"and possibly some IDE drives (e.g. drives running under the\n"
"control of sort of disk manager). SCSI drives are considerably\n"
"less at risk.\n\n"
"If, on the other hand, your goal is a dedicated FreeBSD machine\n"
"and nothing else, this option is for you.\n\n"
"Do you insist on dedicating the entire disk this way?");
cp = variable_get(VAR_DEDICATE_DISK);
if (!strcasecmp(cp, "always"))
rv = 1;
else {
rv = msgYesNo("Do you want to do this with a true partition entry\n"
"so as to remain cooperative with any future possible\n"
"operating systems on the drive(s)?");
if (rv != 0 && strcasecmp(cp, "nowarn")) {
rv = !msgYesNo("This is dangerous in that it will make the drive totally\n"
"uncooperative with other potential operating systems on the\n"
"same disk. It will lead instead to a totally dedicated disk,\n"
"starting at the very first sector, bypassing all BIOS geometry\n"
"considerations. This precludes the existance of any boot\n"
"manager or other stuff in sector 0, since the BSD bootstrap\n"
"will live there.\n"
"You will run into serious trouble with ST-506 and ESDI drives\n"
"and possibly some IDE drives (e.g. drives running under the\n"
"control of sort of disk manager). SCSI drives are considerably\n"
"less at risk.\n\n"
"If, on the other hand, your goal is a dedicated FreeBSD machine\n"
"and nothing else, this option is for you.\n\n"
"Do you insist on dedicating the entire disk this way?");
}
if (rv == -1)
rv = 0;
}
if (rv == -1)
rv = 0;
All_FreeBSD(d, rv);
variable_set2(DISK_PARTITIONED, "yes");
record_chunks(d);

View File

@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
* $Id: dist.c,v 1.105 1997/04/02 12:07:27 jkh Exp $
* $Id: dist.c,v 1.106 1997/04/20 16:46:28 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -201,6 +201,36 @@ distReset(dialogMenuItem *self)
return DITEM_SUCCESS | DITEM_REDRAW;
}
int
distConfig(dialogMenuItem *self)
{
char *cp;
distReset(NULL);
if ((cp = variable_get(VAR_DIST_MAIN)) != NULL)
Dists = atoi(cp);
if ((cp = variable_get(VAR_DIST_DES)) != NULL)
DESDists = atoi(cp);
if ((cp = variable_get(VAR_DIST_SRC)) != NULL)
SrcDists = atoi(cp);
#ifndef USE_XIG_ENFIRONMENT
if ((cp = variable_get(VAR_DIST_X11)) != NULL)
XF86Dists = atoi(cp);
if ((cp = variable_get(VAR_DIST_XSERVER)) != NULL)
XF86ServerDists = atoi(cp);
if ((cp = variable_get(VAR_DIST_XFONTS)) != NULL)
XF86FontDists = atoi(cp);
#endif
return DITEM_SUCCESS | DITEM_REDRAW;
}
int
distSetDeveloper(dialogMenuItem *self)
{

View File

@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
* $Id: install.c,v 1.181 1997/04/03 13:44:58 jkh Exp $
* $Id: install.c,v 1.182 1997/04/28 10:31:13 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -653,10 +653,12 @@ installCommit(dialogMenuItem *self)
char *str;
Boolean need_bin;
if (!Dists) {
if (!Dists)
distConfig(NULL);
if (!Dists)
if (!dmenuOpenSimple(&MenuDistributions, FALSE) && !Dists)
return DITEM_FAILURE | DITEM_RESTORE;
}
if (!mediaVerify())
return DITEM_FAILURE | DITEM_RESTORE;

View File

@ -4,7 +4,7 @@
* This is probably the last attempt in the `sysinstall' line, the next
* generation being slated to essentially a complete rewrite.
*
* $Id: sysinstall.h,v 1.124 1997/04/20 16:46:36 jkh Exp $
* $Id: sysinstall.h,v 1.125 1997/04/28 10:31:14 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -98,6 +98,13 @@
#define VAR_CPIO_VERBOSITY "cpioVerbose"
#define VAR_DEBUG "debug"
#define VAR_DISK "disk"
#define VAR_DIST_MAIN "distMain"
#define VAR_DIST_DES "distDES"
#define VAR_DIST_SRC "distSRC"
#define VAR_DIST_X11 "distX11"
#define VAR_DIST_XSERVER "distXserver"
#define VAR_DIST_XFONTS "distXfonts"
#define VAR_DEDICATE_DISK "dedicateDisk"
#define VAR_DOMAINNAME "domainname"
#define VAR_EDITOR "editor"
#define VAR_EXTRAS "ifconfig_"
@ -456,6 +463,7 @@ extern int dispatchCommand(char *command);
/* dist.c */
extern int distReset(dialogMenuItem *self);
extern int distConfig(dialogMenuItem *self);
extern int distSetCustom(char *str);
extern int distSetDeveloper(dialogMenuItem *self);
extern int distSetXDeveloper(dialogMenuItem *self);

View File

@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
* $Id: disks.c,v 1.82 1997/03/11 16:27:25 joerg Exp $
* $Id: disks.c,v 1.83 1997/04/20 16:46:27 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -247,27 +247,32 @@ diskPartition(Device *dev, Disk *d)
break;
case 'A':
rv = msgYesNo("Do you want to do this with a true partition entry\n"
"so as to remain cooperative with any future possible\n"
"operating systems on the drive(s)?");
if (rv != 0) {
rv = !msgYesNo("This is dangerous in that it will make the drive totally\n"
"uncooperative with other potential operating systems on the\n"
"same disk. It will lead instead to a totally dedicated disk,\n"
"starting at the very first sector, bypassing all BIOS geometry\n"
"considerations. This precludes the existance of any boot\n"
"manager or other stuff in sector 0, since the BSD bootstrap\n"
"will live there.\n"
"You will run into serious trouble with ST-506 and ESDI drives\n"
"and possibly some IDE drives (e.g. drives running under the\n"
"control of sort of disk manager). SCSI drives are considerably\n"
"less at risk.\n\n"
"If, on the other hand, your goal is a dedicated FreeBSD machine\n"
"and nothing else, this option is for you.\n\n"
"Do you insist on dedicating the entire disk this way?");
cp = variable_get(VAR_DEDICATE_DISK);
if (!strcasecmp(cp, "always"))
rv = 1;
else {
rv = msgYesNo("Do you want to do this with a true partition entry\n"
"so as to remain cooperative with any future possible\n"
"operating systems on the drive(s)?");
if (rv != 0 && strcasecmp(cp, "nowarn")) {
rv = !msgYesNo("This is dangerous in that it will make the drive totally\n"
"uncooperative with other potential operating systems on the\n"
"same disk. It will lead instead to a totally dedicated disk,\n"
"starting at the very first sector, bypassing all BIOS geometry\n"
"considerations. This precludes the existance of any boot\n"
"manager or other stuff in sector 0, since the BSD bootstrap\n"
"will live there.\n"
"You will run into serious trouble with ST-506 and ESDI drives\n"
"and possibly some IDE drives (e.g. drives running under the\n"
"control of sort of disk manager). SCSI drives are considerably\n"
"less at risk.\n\n"
"If, on the other hand, your goal is a dedicated FreeBSD machine\n"
"and nothing else, this option is for you.\n\n"
"Do you insist on dedicating the entire disk this way?");
}
if (rv == -1)
rv = 0;
}
if (rv == -1)
rv = 0;
All_FreeBSD(d, rv);
variable_set2(DISK_PARTITIONED, "yes");
record_chunks(d);

View File

@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
* $Id: install.c,v 1.181 1997/04/03 13:44:58 jkh Exp $
* $Id: install.c,v 1.182 1997/04/28 10:31:13 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -653,10 +653,12 @@ installCommit(dialogMenuItem *self)
char *str;
Boolean need_bin;
if (!Dists) {
if (!Dists)
distConfig(NULL);
if (!Dists)
if (!dmenuOpenSimple(&MenuDistributions, FALSE) && !Dists)
return DITEM_FAILURE | DITEM_RESTORE;
}
if (!mediaVerify())
return DITEM_FAILURE | DITEM_RESTORE;

View File

@ -4,7 +4,7 @@
* This is probably the last attempt in the `sysinstall' line, the next
* generation being slated to essentially a complete rewrite.
*
* $Id: sysinstall.h,v 1.124 1997/04/20 16:46:36 jkh Exp $
* $Id: sysinstall.h,v 1.125 1997/04/28 10:31:14 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -98,6 +98,13 @@
#define VAR_CPIO_VERBOSITY "cpioVerbose"
#define VAR_DEBUG "debug"
#define VAR_DISK "disk"
#define VAR_DIST_MAIN "distMain"
#define VAR_DIST_DES "distDES"
#define VAR_DIST_SRC "distSRC"
#define VAR_DIST_X11 "distX11"
#define VAR_DIST_XSERVER "distXserver"
#define VAR_DIST_XFONTS "distXfonts"
#define VAR_DEDICATE_DISK "dedicateDisk"
#define VAR_DOMAINNAME "domainname"
#define VAR_EDITOR "editor"
#define VAR_EXTRAS "ifconfig_"
@ -456,6 +463,7 @@ extern int dispatchCommand(char *command);
/* dist.c */
extern int distReset(dialogMenuItem *self);
extern int distConfig(dialogMenuItem *self);
extern int distSetCustom(char *str);
extern int distSetDeveloper(dialogMenuItem *self);
extern int distSetXDeveloper(dialogMenuItem *self);

View File

@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
* $Id: disks.c,v 1.82 1997/03/11 16:27:25 joerg Exp $
* $Id: disks.c,v 1.83 1997/04/20 16:46:27 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -247,27 +247,32 @@ diskPartition(Device *dev, Disk *d)
break;
case 'A':
rv = msgYesNo("Do you want to do this with a true partition entry\n"
"so as to remain cooperative with any future possible\n"
"operating systems on the drive(s)?");
if (rv != 0) {
rv = !msgYesNo("This is dangerous in that it will make the drive totally\n"
"uncooperative with other potential operating systems on the\n"
"same disk. It will lead instead to a totally dedicated disk,\n"
"starting at the very first sector, bypassing all BIOS geometry\n"
"considerations. This precludes the existance of any boot\n"
"manager or other stuff in sector 0, since the BSD bootstrap\n"
"will live there.\n"
"You will run into serious trouble with ST-506 and ESDI drives\n"
"and possibly some IDE drives (e.g. drives running under the\n"
"control of sort of disk manager). SCSI drives are considerably\n"
"less at risk.\n\n"
"If, on the other hand, your goal is a dedicated FreeBSD machine\n"
"and nothing else, this option is for you.\n\n"
"Do you insist on dedicating the entire disk this way?");
cp = variable_get(VAR_DEDICATE_DISK);
if (!strcasecmp(cp, "always"))
rv = 1;
else {
rv = msgYesNo("Do you want to do this with a true partition entry\n"
"so as to remain cooperative with any future possible\n"
"operating systems on the drive(s)?");
if (rv != 0 && strcasecmp(cp, "nowarn")) {
rv = !msgYesNo("This is dangerous in that it will make the drive totally\n"
"uncooperative with other potential operating systems on the\n"
"same disk. It will lead instead to a totally dedicated disk,\n"
"starting at the very first sector, bypassing all BIOS geometry\n"
"considerations. This precludes the existance of any boot\n"
"manager or other stuff in sector 0, since the BSD bootstrap\n"
"will live there.\n"
"You will run into serious trouble with ST-506 and ESDI drives\n"
"and possibly some IDE drives (e.g. drives running under the\n"
"control of sort of disk manager). SCSI drives are considerably\n"
"less at risk.\n\n"
"If, on the other hand, your goal is a dedicated FreeBSD machine\n"
"and nothing else, this option is for you.\n\n"
"Do you insist on dedicating the entire disk this way?");
}
if (rv == -1)
rv = 0;
}
if (rv == -1)
rv = 0;
All_FreeBSD(d, rv);
variable_set2(DISK_PARTITIONED, "yes");
record_chunks(d);

View File

@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
* $Id: dist.c,v 1.105 1997/04/02 12:07:27 jkh Exp $
* $Id: dist.c,v 1.106 1997/04/20 16:46:28 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -201,6 +201,36 @@ distReset(dialogMenuItem *self)
return DITEM_SUCCESS | DITEM_REDRAW;
}
int
distConfig(dialogMenuItem *self)
{
char *cp;
distReset(NULL);
if ((cp = variable_get(VAR_DIST_MAIN)) != NULL)
Dists = atoi(cp);
if ((cp = variable_get(VAR_DIST_DES)) != NULL)
DESDists = atoi(cp);
if ((cp = variable_get(VAR_DIST_SRC)) != NULL)
SrcDists = atoi(cp);
#ifndef USE_XIG_ENFIRONMENT
if ((cp = variable_get(VAR_DIST_X11)) != NULL)
XF86Dists = atoi(cp);
if ((cp = variable_get(VAR_DIST_XSERVER)) != NULL)
XF86ServerDists = atoi(cp);
if ((cp = variable_get(VAR_DIST_XFONTS)) != NULL)
XF86FontDists = atoi(cp);
#endif
return DITEM_SUCCESS | DITEM_REDRAW;
}
int
distSetDeveloper(dialogMenuItem *self)
{

View File

@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
* $Id: install.c,v 1.181 1997/04/03 13:44:58 jkh Exp $
* $Id: install.c,v 1.182 1997/04/28 10:31:13 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -653,10 +653,12 @@ installCommit(dialogMenuItem *self)
char *str;
Boolean need_bin;
if (!Dists) {
if (!Dists)
distConfig(NULL);
if (!Dists)
if (!dmenuOpenSimple(&MenuDistributions, FALSE) && !Dists)
return DITEM_FAILURE | DITEM_RESTORE;
}
if (!mediaVerify())
return DITEM_FAILURE | DITEM_RESTORE;

View File

@ -4,7 +4,7 @@
* This is probably the last attempt in the `sysinstall' line, the next
* generation being slated to essentially a complete rewrite.
*
* $Id: sysinstall.h,v 1.124 1997/04/20 16:46:36 jkh Exp $
* $Id: sysinstall.h,v 1.125 1997/04/28 10:31:14 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -98,6 +98,13 @@
#define VAR_CPIO_VERBOSITY "cpioVerbose"
#define VAR_DEBUG "debug"
#define VAR_DISK "disk"
#define VAR_DIST_MAIN "distMain"
#define VAR_DIST_DES "distDES"
#define VAR_DIST_SRC "distSRC"
#define VAR_DIST_X11 "distX11"
#define VAR_DIST_XSERVER "distXserver"
#define VAR_DIST_XFONTS "distXfonts"
#define VAR_DEDICATE_DISK "dedicateDisk"
#define VAR_DOMAINNAME "domainname"
#define VAR_EDITOR "editor"
#define VAR_EXTRAS "ifconfig_"
@ -456,6 +463,7 @@ extern int dispatchCommand(char *command);
/* dist.c */
extern int distReset(dialogMenuItem *self);
extern int distConfig(dialogMenuItem *self);
extern int distSetCustom(char *str);
extern int distSetDeveloper(dialogMenuItem *self);
extern int distSetXDeveloper(dialogMenuItem *self);