summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1996-06-12 14:02:13 +0000
committerjkh <jkh@FreeBSD.org>1996-06-12 14:02:13 +0000
commita2ffbe1a9a5c0ebc9aefd39b36578a15c578c3a6 (patch)
tree3f3d08c3292608539123b69e56b62cbf8ccb7d03 /usr.sbin
parent3ff88e997b783b5d885539159b3128b761a0a023 (diff)
downloadFreeBSD-src-a2ffbe1a9a5c0ebc9aefd39b36578a15c578c3a6.zip
FreeBSD-src-a2ffbe1a9a5c0ebc9aefd39b36578a15c578c3a6.tar.gz
Fix a truly stupid bug which broke the package installation menu
for everything _but_ the multi-user case now (it was the opposite before :-). That means adding packages with the 2.2-960511-SNAP boot floppy is busted. Feh.
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/sade/dmenu.c12
-rw-r--r--usr.sbin/sade/install.c12
-rw-r--r--usr.sbin/sade/menus.c6
-rw-r--r--usr.sbin/sade/variable.c8
-rw-r--r--usr.sbin/sysinstall/dist.c47
-rw-r--r--usr.sbin/sysinstall/dmenu.c12
-rw-r--r--usr.sbin/sysinstall/index.c4
-rw-r--r--usr.sbin/sysinstall/install.c12
-rw-r--r--usr.sbin/sysinstall/menus.c6
-rw-r--r--usr.sbin/sysinstall/variable.c8
10 files changed, 108 insertions, 19 deletions
diff --git a/usr.sbin/sade/dmenu.c b/usr.sbin/sade/dmenu.c
index 7dbbd15..ee2b2e5 100644
--- a/usr.sbin/sade/dmenu.c
+++ b/usr.sbin/sade/dmenu.c
@@ -4,7 +4,7 @@
* This is probably the last attempt in the `sysinstall' line, the next
* generation being slated for what's essentially a complete rewrite.
*
- * $Id: dmenu.c,v 1.18 1996/04/25 17:31:17 jkh Exp $
+ * $Id: dmenu.c,v 1.19 1996/04/28 00:37:31 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -93,6 +93,16 @@ dmenuSetVariable(dialogMenuItem *tmp)
}
int
+dmenuToggleVariable(dialogMenuItem *tmp)
+{
+ if (!variable_get((char *)tmp->data))
+ variable_set((char *)tmp->data);
+ else
+ variable_unset((char *)tmp->data);
+ return DITEM_SUCCESS;
+}
+
+int
dmenuSetFlag(dialogMenuItem *tmp)
{
if (*((unsigned int *)tmp->data) & tmp->aux)
diff --git a/usr.sbin/sade/install.c b/usr.sbin/sade/install.c
index d8e0ec5..f973bc3 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.98 1996/05/29 01:35:28 jkh Exp $
+ * $Id: install.c,v 1.99 1996/06/11 10:16:53 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -787,7 +787,15 @@ installVarDefaults(dialogMenuItem *self)
variable_set2(VAR_RELNAME, RELEASE_NAME);
variable_set2(VAR_CPIO_VERBOSITY, "high");
variable_set2(VAR_TAPE_BLOCKSIZE, DEFAULT_TAPE_BLOCKSIZE);
- variable_set2(VAR_EDITOR, RunningAsInit ? "/stand/ee" : "/usr/bin/ee");
+ if (RunningAsInit)
+ variable_set2(VAR_EDITOR, "/stand/ee");
+ else {
+ char *cp = getenv("EDITOR");
+
+ if (!cp)
+ cp = "/usr/bin/ee";
+ variable_set2(VAR_EDITOR, cp);
+ }
variable_set2(VAR_FTP_USER, "ftp");
variable_set2(VAR_BROWSER_PACKAGE, "lynx-2.4fm");
variable_set2(VAR_BROWSER_BINARY, "/usr/local/bin/lynx");
diff --git a/usr.sbin/sade/menus.c b/usr.sbin/sade/menus.c
index f5f149e..d699774 100644
--- a/usr.sbin/sade/menus.c
+++ b/usr.sbin/sade/menus.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: menus.c,v 1.62 1996/05/16 13:30:24 jkh Exp $
+ * $Id: menus.c,v 1.63 1996/05/16 13:39:08 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -382,6 +382,8 @@ guaranteed to carry the full range of possible distributions.",
VAR_FTP_PATH "=ftp://ftp.ca.freebsd.org/pub/FreeBSD/" },
{ "Czech Republic", "sunsite.mff.cuni.cz", NULL, dmenuSetVariable, NULL,
VAR_FTP_PATH "=ftp://sunsite.mff.cuni.cz/OS/FreeBSD/" },
+ { "Estonia", "ftp.ee.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp.ee.freebsd.org/pub/FreeBSD/" },
{ "Finland", "nic.funet.fi", NULL, dmenuSetVariable, NULL,
VAR_FTP_PATH "=ftp://nic.funet.fi/pub/unix/FreeBSD/" },
{ "France", "ftp.ibp.fr", NULL, dmenuSetVariable, NULL,
@@ -400,6 +402,8 @@ guaranteed to carry the full range of possible distributions.",
VAR_FTP_PATH "=ftp://ftp6.de.freebsd.org/pub/FreeBSD/" },
{ "Germany #7", "ftp7.de.freebsd.org", NULL, dmenuSetVariable, NULL,
VAR_FTP_PATH "=ftp://ftp7.de.freebsd.org/pub/FreeBSD/" },
+ { "Holland", "ftp.nl.freebsd.ort", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp.nl.freebsd.org/pub/os/FreeBSD/cdrom/" },
{ "Hong Kong", "ftp.hk.super.net", NULL, dmenuSetVariable, NULL,
VAR_FTP_PATH "=ftp://ftp.hk.super.net/pub/FreeBSD/" },
{ "Ireland", "ftp.ie.freebsd.org", NULL, dmenuSetVariable, NULL,
diff --git a/usr.sbin/sade/variable.c b/usr.sbin/sade/variable.c
index 85b19e26..7d77d15 100644
--- a/usr.sbin/sade/variable.c
+++ b/usr.sbin/sade/variable.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: variable.c,v 1.9 1996/04/23 01:29:35 jkh Exp $
+ * $Id: variable.c,v 1.10 1996/04/29 06:47:10 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -102,8 +102,14 @@ void
variable_unset(char *var)
{
Variable *vp;
+ char name[VAR_NAME_MAX + 1], *cp;
unsetenv(var);
+ if ((cp = index(var, '=')) != NULL) {
+ strncpy(name, cp, cp - var);
+ name[cp - var] = '\0';
+ var = name;
+ }
/* Now search to see if it's in our list, if we have one.. */
if (!VarHead)
diff --git a/usr.sbin/sysinstall/dist.c b/usr.sbin/sysinstall/dist.c
index a06aa0c..c17b516 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.56 1996/05/29 03:27:31 jkh Exp $
+ * $Id: dist.c,v 1.57 1996/06/12 07:03:44 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -159,6 +159,8 @@ static Distribution XF86FontDistTable[] = {
{ NULL },
};
+static int distMaybeSetDES(dialogMenuItem *self);
+
int
distReset(dialogMenuItem *self)
{
@@ -177,7 +179,7 @@ distSetDeveloper(dialogMenuItem *self)
distReset(NULL);
Dists = _DIST_DEVELOPER;
SrcDists = DIST_SRC_ALL;
- return DITEM_SUCCESS | DITEM_REDRAW;
+ return distMaybeSetDES(self);
}
int
@@ -189,7 +191,7 @@ distSetXDeveloper(dialogMenuItem *self)
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;
- return distSetXF86(NULL);
+ return distSetXF86(NULL) | distMaybeSetDES(self);
}
int
@@ -198,7 +200,7 @@ distSetKernDeveloper(dialogMenuItem *self)
distReset(NULL);
Dists = _DIST_DEVELOPER;
SrcDists = DIST_SRC_SYS;
- return DITEM_SUCCESS | DITEM_REDRAW;
+ return distMaybeSetDES(self);
}
int
@@ -206,7 +208,7 @@ distSetUser(dialogMenuItem *self)
{
distReset(NULL);
Dists = _DIST_USER;
- return DITEM_SUCCESS | DITEM_REDRAW;
+ return distMaybeSetDES(self);
}
int
@@ -217,7 +219,7 @@ distSetXUser(dialogMenuItem *self)
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;
- return distSetXF86(NULL);
+ return distSetXF86(NULL) | distMaybeSetDES(self);
}
int
@@ -236,7 +238,7 @@ distSetEverything(dialogMenuItem *self)
XF86Dists = DIST_XF86_ALL;
XF86ServerDists = DIST_XF86_SERVER_ALL;
XF86FontDists = DIST_XF86_FONTS_ALL;
- return DITEM_SUCCESS | DITEM_REDRAW;
+ return distMaybeSetDES(self);
}
int
@@ -257,6 +259,37 @@ distSetDES(dialogMenuItem *self)
return i | DITEM_RECREATE | DITEM_RESTORE;
}
+static int
+distMaybeSetDES(dialogMenuItem *self)
+{
+ int i = DITEM_SUCCESS;
+
+ dialog_clear();
+ if (!msgYesNo("Do wish to install DES cryptographic software?\n\n"
+ "FreeBSD will otherwise use an MD5 based password scheme which,\n"
+ "while perhaps more secure, is not inter-operable with traditional\n"
+ "UNIX password file formats.\n\n"
+ "Please do NOT choose Yes at this point if you are outside the\n"
+ "United States and Canada yet are installing from a U.S. FTP server\n"
+ "as this will violate U.S. export restrictions and possibly get the\n"
+ "server site into trouble. In such cases, install everything but DES\n"
+ "software from the U.S. server then change your media type to point to\n"
+ "an international FTP server, then using the Custom menu to selected and\n"
+ "extract the DES distribution(s) in a second pass.")) {
+ if (dmenuOpenSimple(&MenuDESDistributions)) {
+ if (DESDists) {
+ if (DESDists & DIST_DES_KERBEROS)
+ DESDists |= DIST_DES_DES;
+ Dists |= DIST_DES;
+ msgDebug("SetDES Masks: DES: %0x, Dists: %0x\n", DESDists, Dists);
+ }
+ }
+ else
+ i = DITEM_FAILURE;
+ }
+ return i | DITEM_RECREATE | DITEM_RESTORE;
+}
+
int
distSetSrc(dialogMenuItem *self)
{
diff --git a/usr.sbin/sysinstall/dmenu.c b/usr.sbin/sysinstall/dmenu.c
index 7dbbd15..ee2b2e5 100644
--- a/usr.sbin/sysinstall/dmenu.c
+++ b/usr.sbin/sysinstall/dmenu.c
@@ -4,7 +4,7 @@
* This is probably the last attempt in the `sysinstall' line, the next
* generation being slated for what's essentially a complete rewrite.
*
- * $Id: dmenu.c,v 1.18 1996/04/25 17:31:17 jkh Exp $
+ * $Id: dmenu.c,v 1.19 1996/04/28 00:37:31 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -93,6 +93,16 @@ dmenuSetVariable(dialogMenuItem *tmp)
}
int
+dmenuToggleVariable(dialogMenuItem *tmp)
+{
+ if (!variable_get((char *)tmp->data))
+ variable_set((char *)tmp->data);
+ else
+ variable_unset((char *)tmp->data);
+ return DITEM_SUCCESS;
+}
+
+int
dmenuSetFlag(dialogMenuItem *tmp)
{
if (*((unsigned int *)tmp->data) & tmp->aux)
diff --git a/usr.sbin/sysinstall/index.c b/usr.sbin/sysinstall/index.c
index 79a7d72..00a88d9 100644
--- a/usr.sbin/sysinstall/index.c
+++ b/usr.sbin/sysinstall/index.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: index.c,v 1.32 1996/06/08 07:15:48 jkh Exp $
+ * $Id: index.c,v 1.33 1996/06/08 08:01:49 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -404,7 +404,7 @@ pkg_fire(dialogMenuItem *self)
sp = index_search(plist, kp->name, NULL);
/* Not already selected? */
if (!sp) {
- if (!RunningAsInit && !package_exists(kp->name)) {
+ if (RunningAsInit || !package_exists(kp->name)) {
PkgNodePtr np = (PkgNodePtr)safe_malloc(sizeof(PkgNode));
*np = *kp;
diff --git a/usr.sbin/sysinstall/install.c b/usr.sbin/sysinstall/install.c
index d8e0ec5..f973bc3 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.98 1996/05/29 01:35:28 jkh Exp $
+ * $Id: install.c,v 1.99 1996/06/11 10:16:53 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -787,7 +787,15 @@ installVarDefaults(dialogMenuItem *self)
variable_set2(VAR_RELNAME, RELEASE_NAME);
variable_set2(VAR_CPIO_VERBOSITY, "high");
variable_set2(VAR_TAPE_BLOCKSIZE, DEFAULT_TAPE_BLOCKSIZE);
- variable_set2(VAR_EDITOR, RunningAsInit ? "/stand/ee" : "/usr/bin/ee");
+ if (RunningAsInit)
+ variable_set2(VAR_EDITOR, "/stand/ee");
+ else {
+ char *cp = getenv("EDITOR");
+
+ if (!cp)
+ cp = "/usr/bin/ee";
+ variable_set2(VAR_EDITOR, cp);
+ }
variable_set2(VAR_FTP_USER, "ftp");
variable_set2(VAR_BROWSER_PACKAGE, "lynx-2.4fm");
variable_set2(VAR_BROWSER_BINARY, "/usr/local/bin/lynx");
diff --git a/usr.sbin/sysinstall/menus.c b/usr.sbin/sysinstall/menus.c
index f5f149e..d699774 100644
--- a/usr.sbin/sysinstall/menus.c
+++ b/usr.sbin/sysinstall/menus.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: menus.c,v 1.62 1996/05/16 13:30:24 jkh Exp $
+ * $Id: menus.c,v 1.63 1996/05/16 13:39:08 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -382,6 +382,8 @@ guaranteed to carry the full range of possible distributions.",
VAR_FTP_PATH "=ftp://ftp.ca.freebsd.org/pub/FreeBSD/" },
{ "Czech Republic", "sunsite.mff.cuni.cz", NULL, dmenuSetVariable, NULL,
VAR_FTP_PATH "=ftp://sunsite.mff.cuni.cz/OS/FreeBSD/" },
+ { "Estonia", "ftp.ee.freebsd.org", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp.ee.freebsd.org/pub/FreeBSD/" },
{ "Finland", "nic.funet.fi", NULL, dmenuSetVariable, NULL,
VAR_FTP_PATH "=ftp://nic.funet.fi/pub/unix/FreeBSD/" },
{ "France", "ftp.ibp.fr", NULL, dmenuSetVariable, NULL,
@@ -400,6 +402,8 @@ guaranteed to carry the full range of possible distributions.",
VAR_FTP_PATH "=ftp://ftp6.de.freebsd.org/pub/FreeBSD/" },
{ "Germany #7", "ftp7.de.freebsd.org", NULL, dmenuSetVariable, NULL,
VAR_FTP_PATH "=ftp://ftp7.de.freebsd.org/pub/FreeBSD/" },
+ { "Holland", "ftp.nl.freebsd.ort", NULL, dmenuSetVariable, NULL,
+ VAR_FTP_PATH "=ftp://ftp.nl.freebsd.org/pub/os/FreeBSD/cdrom/" },
{ "Hong Kong", "ftp.hk.super.net", NULL, dmenuSetVariable, NULL,
VAR_FTP_PATH "=ftp://ftp.hk.super.net/pub/FreeBSD/" },
{ "Ireland", "ftp.ie.freebsd.org", NULL, dmenuSetVariable, NULL,
diff --git a/usr.sbin/sysinstall/variable.c b/usr.sbin/sysinstall/variable.c
index 85b19e26..7d77d15 100644
--- a/usr.sbin/sysinstall/variable.c
+++ b/usr.sbin/sysinstall/variable.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: variable.c,v 1.9 1996/04/23 01:29:35 jkh Exp $
+ * $Id: variable.c,v 1.10 1996/04/29 06:47:10 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -102,8 +102,14 @@ void
variable_unset(char *var)
{
Variable *vp;
+ char name[VAR_NAME_MAX + 1], *cp;
unsetenv(var);
+ if ((cp = index(var, '=')) != NULL) {
+ strncpy(name, cp, cp - var);
+ name[cp - var] = '\0';
+ var = name;
+ }
/* Now search to see if it's in our list, if we have one.. */
if (!VarHead)
OpenPOWER on IntegriCloud