diff options
| author | Jordan K. Hubbard <jkh@FreeBSD.org> | 1995-10-20 14:26:15 +0000 |
|---|---|---|
| committer | Jordan K. Hubbard <jkh@FreeBSD.org> | 1995-10-20 14:26:15 +0000 |
| commit | 95d12914c46b9370ded76732baa52c2bdcaccdbc (patch) | |
| tree | 8c824cd0ebb3aa3f5a0fce0173efb0ba4212c6a7 /usr.sbin/sysinstall | |
| parent | 29dd7e5407a9be97aab0cac6c446501b8fc6a9d6 (diff) | |
Notes
Diffstat (limited to 'usr.sbin/sysinstall')
| -rw-r--r-- | usr.sbin/sysinstall/doc.c | 4 | ||||
| -rw-r--r-- | usr.sbin/sysinstall/installUpgrade.c | 9 | ||||
| -rw-r--r-- | usr.sbin/sysinstall/options.c | 7 |
3 files changed, 11 insertions, 9 deletions
diff --git a/usr.sbin/sysinstall/doc.c b/usr.sbin/sysinstall/doc.c index a173c6bc1611a..8b2c20d097ca6 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 0a837d848b992..fba52339b6b81 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 808b9a902249f..7ebb7c2d08091 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: |
