diff options
author | jkh <jkh@FreeBSD.org> | 1999-11-24 09:45:36 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 1999-11-24 09:45:36 +0000 |
commit | 8a92380eef1fe9eb95638c9cda3a6dd7d1d1df1c (patch) | |
tree | fc59e66fb865bf8fd50e4ac6d009d9c12dbc917a /release | |
parent | 1d045a004297a3742d422bdd8a030f869d78aa1e (diff) | |
download | FreeBSD-src-8a92380eef1fe9eb95638c9cda3a6dd7d1d1df1c.zip FreeBSD-src-8a92380eef1fe9eb95638c9cda3a6dd7d1d1df1c.tar.gz |
Clean up the loader.conf write-out code.
Diffstat (limited to 'release')
-rw-r--r-- | release/sysinstall/install.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/release/sysinstall/install.c b/release/sysinstall/install.c index 98f7d6f..82a5622 100644 --- a/release/sysinstall/install.c +++ b/release/sysinstall/install.c @@ -732,6 +732,8 @@ installFixupBin(dialogMenuItem *self) Device **devs; char *cp; int i; + FILE *fp; + int kstat; /* All of this is done only as init, just to be safe */ if (RunningAsInit) { @@ -747,21 +749,18 @@ installFixupBin(dialogMenuItem *self) /* Snapshot any boot -c changes back to the new kernel */ cp = variable_get(VAR_KGET); if (cp && (*cp == 'Y' || *cp == 'y')) { - if (kget("/boot/kernel.conf")) { + if (kstat = kget("/boot/kernel.conf")) { msgConfirm("Kernel copied OK, but unable to save boot -c changes\n" "to it. See the debug screen (ALT-F2) for details."); } - else if (file_readable("/boot/kernel.conf")) { - FILE *fp; - - if ((fp = fopen("/boot/loader.conf", "a")) != NULL) { - fprintf(fp, "# -- sysinstall generated deltas -- #\n"); - fprintf(fp, "userconfig_script_load=\"YES\"\n"); - if (!OnVTY) - fprintf(fp, "console=\"comconsole\"\n"); - fclose(fp); - } - } + } + if ((fp = fopen("/boot/loader.conf", "a")) != NULL) { + fprintf(fp, "# -- sysinstall generated deltas -- #\n"); + if (!kstat) + fprintf(fp, "userconfig_script_load=\"YES\"\n"); + if (!OnVTY) + fprintf(fp, "console=\"comconsole\"\n"); + fclose(fp); } #endif } |