summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
authorpst <pst@FreeBSD.org>1997-05-05 05:16:03 +0000
committerpst <pst@FreeBSD.org>1997-05-05 05:16:03 +0000
commit0d0068a444d2cef8e147134ecff104fafe7cb850 (patch)
treeb4f84cc1fa31ebf53519640b97bd9ce6530924f3 /usr.sbin
parent16cf7a49785ae5422a15ddd2e1bde74a1c660e53 (diff)
downloadFreeBSD-src-0d0068a444d2cef8e147134ecff104fafe7cb850.zip
FreeBSD-src-0d0068a444d2cef8e147134ecff104fafe7cb850.tar.gz
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
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/sade/disks.c47
-rw-r--r--usr.sbin/sade/install.c8
-rw-r--r--usr.sbin/sade/sade.h10
-rw-r--r--usr.sbin/sysinstall/disks.c47
-rw-r--r--usr.sbin/sysinstall/dist.c32
-rw-r--r--usr.sbin/sysinstall/install.c8
-rw-r--r--usr.sbin/sysinstall/sysinstall.h10
7 files changed, 111 insertions, 51 deletions
diff --git a/usr.sbin/sade/disks.c b/usr.sbin/sade/disks.c
index a6e552c..b2d78ed 100644
--- a/usr.sbin/sade/disks.c
+++ b/usr.sbin/sade/disks.c
@@ -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);
diff --git a/usr.sbin/sade/install.c b/usr.sbin/sade/install.c
index bb8bba9..f76436a 100644
--- a/usr.sbin/sade/install.c
+++ b/usr.sbin/sade/install.c
@@ -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;
diff --git a/usr.sbin/sade/sade.h b/usr.sbin/sade/sade.h
index 016ad67..a6acfea 100644
--- a/usr.sbin/sade/sade.h
+++ b/usr.sbin/sade/sade.h
@@ -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);
diff --git a/usr.sbin/sysinstall/disks.c b/usr.sbin/sysinstall/disks.c
index a6e552c..b2d78ed 100644
--- a/usr.sbin/sysinstall/disks.c
+++ b/usr.sbin/sysinstall/disks.c
@@ -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);
diff --git a/usr.sbin/sysinstall/dist.c b/usr.sbin/sysinstall/dist.c
index 4cafbbc..09f5a29 100644
--- a/usr.sbin/sysinstall/dist.c
+++ b/usr.sbin/sysinstall/dist.c
@@ -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.
@@ -202,6 +202,36 @@ distReset(dialogMenuItem *self)
}
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)
{
distReset(NULL);
diff --git a/usr.sbin/sysinstall/install.c b/usr.sbin/sysinstall/install.c
index bb8bba9..f76436a 100644
--- a/usr.sbin/sysinstall/install.c
+++ b/usr.sbin/sysinstall/install.c
@@ -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;
diff --git a/usr.sbin/sysinstall/sysinstall.h b/usr.sbin/sysinstall/sysinstall.h
index 016ad67..a6acfea 100644
--- a/usr.sbin/sysinstall/sysinstall.h
+++ b/usr.sbin/sysinstall/sysinstall.h
@@ -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);
OpenPOWER on IntegriCloud