summaryrefslogtreecommitdiffstats
path: root/release/sysinstall/variable.c
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 /release/sysinstall/variable.c
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 'release/sysinstall/variable.c')
-rw-r--r--release/sysinstall/variable.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/release/sysinstall/variable.c b/release/sysinstall/variable.c
index 85b19e26..7d77d15 100644
--- a/release/sysinstall/variable.c
+++ b/release/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