summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1995-10-20 14:26:15 +0000
committerjkh <jkh@FreeBSD.org>1995-10-20 14:26:15 +0000
commit1379346bb90a5efc64820278c249eb5f3c71c4d0 (patch)
tree8c824cd0ebb3aa3f5a0fce0173efb0ba4212c6a7 /usr.sbin
parentce5e98528963ce9b87b2bd67a3fe0b8083af63d2 (diff)
downloadFreeBSD-src-1379346bb90a5efc64820278c249eb5f3c71c4d0.zip
FreeBSD-src-1379346bb90a5efc64820278c249eb5f3c71c4d0.tar.gz
Sync for Westhill build.
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/sysinstall/doc.c4
-rw-r--r--usr.sbin/sysinstall/installUpgrade.c9
-rw-r--r--usr.sbin/sysinstall/options.c7
3 files changed, 11 insertions, 9 deletions
diff --git a/usr.sbin/sysinstall/doc.c b/usr.sbin/sysinstall/doc.c
index a173c6b..8b2c20d 100644
--- a/usr.sbin/sysinstall/doc.c
+++ b/usr.sbin/sysinstall/doc.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id$
+ * $Id: doc.c,v 1.1 1995/10/20 07:03:40 jkh Exp $
*
* Jordan Hubbard
*
@@ -28,7 +28,7 @@ docBrowser(char *junk)
char *browser = variable_get(BROWSER_PACKAGE);
/* Make sure we were started at a reasonable time */
- if (!variable_get(SYSTEM_INSTALLED)) {
+ if (!strcmp(variable_get(SYSTEM_STATE), "init")) {
msgConfirm("Sorry, it's not possible to invoke the browser until the system\n"
"is installed completely enough to support a copy of %s.", browser);
return RET_FAIL;
diff --git a/usr.sbin/sysinstall/installUpgrade.c b/usr.sbin/sysinstall/installUpgrade.c
index 0a837d8..fba5233 100644
--- a/usr.sbin/sysinstall/installUpgrade.c
+++ b/usr.sbin/sysinstall/installUpgrade.c
@@ -209,7 +209,7 @@ installUpgrade(char *str)
return RET_FAIL;
/* Note that we're now upgrading */
- variable_set2(SYSTEM_INSTALLED, "upgrade");
+ variable_set2(SYSTEM_STATE, "upgrade");
msgConfirm("OK. First, we're going to go to the disk label editor. In this editor\n"
"you will be expected to *Mount* any partitions you're interested in\n"
@@ -256,9 +256,8 @@ installUpgrade(char *str)
if (saved_etc) {
msgNotify("Preserving /etc directory..");
/* cp returns a bogus status, so we can't check the status meaningfully. Bleah. */
- (void)vsystem("cp -pr /etc/* %s", saved_etc)) {
+ (void)vsystem("cp -pr /etc/* %s", saved_etc);
}
-
if (file_readable("/kernel")) {
msgNotify("Moving old kernel to /kernel.205");
if (system("chflags noschg /mnt/kernel && mv /mnt/kernel /mnt/kernel.205"))
@@ -284,7 +283,7 @@ installUpgrade(char *str)
"/dev entries and such that a 2.1 system expects to see. I'll also perform a\n"
"few \"fixup\" operations to repair the effects of splatting a bin distribution\n"
"on top of an existing system..");
- if (installFixup() == RET_FAIL)
+ if (installFixup("upgrade") == RET_FAIL)
msgConfirm("Hmmmmm. The fixups don't seem to have been very happy.\n"
"You may wish to examine the system a little more closely when\n"
"it comes time to merge your /etc customizations back.");
@@ -293,7 +292,7 @@ installUpgrade(char *str)
if (extractingBin)
configSysconfig();
- if (installFinal() == RET_FAIL)
+ if (installFinal("upgrade") == RET_FAIL)
msgConfirm("Some of the final configuration stuff evidently failed, but\n"
"the first stage of the upgrade should otherwise be considered\n"
"a success!\n\n"
diff --git a/usr.sbin/sysinstall/options.c b/usr.sbin/sysinstall/options.c
index 808b9a9..7ebb7c2 100644
--- a/usr.sbin/sysinstall/options.c
+++ b/usr.sbin/sysinstall/options.c
@@ -52,7 +52,7 @@ ftpFlagCheck(Option opt)
optionUnset(OPT_FTP_RESELECT);
else if ((int)opt.aux == OPT_FTP_RESELECT && optionIsSet(OPT_FTP_ABORT))
optionUnset(OPT_FTP_ABORT);
- return NULL;
+ return (*(int *)opt.data) & (int)opt.aux ? "ON" : "OFF";
}
static char *
@@ -179,7 +179,10 @@ value_of(Option opt)
return ival;
case OPT_IS_FLAG:
- return (*(int *)opt.data) & (int)opt.aux ? "ON" : "OFF";
+ if (opt.check)
+ return opt.check(opt);
+ else
+ return (*(int *)opt.data) & (int)opt.aux ? "ON" : "OFF";
case OPT_IS_FUNC:
case OPT_IS_VAR:
OpenPOWER on IntegriCloud