Make saving kernel configuration info disable-able (may be useful in certain

situations).
This commit is contained in:
Jordan K. Hubbard 1999-05-07 11:02:58 +00:00
parent 46eede0058
commit ad4d616fa3
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=46637
8 changed files with 63 additions and 41 deletions

View file

@ -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.233 1999/04/28 10:51:01 jkh Exp $
* $Id: install.c,v 1.234 1999/05/05 11:34:02 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -734,6 +734,7 @@ int
installFixupBin(dialogMenuItem *self)
{
Device **devs;
char *cp;
int i;
/* All of this is done only as init, just to be safe */
@ -747,17 +748,20 @@ installFixupBin(dialogMenuItem *self)
}
#ifndef __alpha__
/* Snapshot any boot -c changes back to the new kernel */
if (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");
fclose(fp);
cp = variable_get(VAR_KGET);
if (cp && (*cp == 'Y' || *cp == 'y')) {
if (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");
fclose(fp);
}
}
}
#endif
@ -1029,6 +1033,7 @@ installVarDefaults(dialogMenuItem *self)
/* Set default startup options */
variable_set2(VAR_RELNAME, getRelname(), 0);
variable_set2(VAR_CPIO_VERBOSITY, "high", 0);
variable_set2(VAR_KGET, "YES", 0);
variable_set2(VAR_TAPE_BLOCKSIZE, DEFAULT_TAPE_BLOCKSIZE, 0);
variable_set2(VAR_INSTALL_ROOT, "/", 0);
variable_set2(VAR_INSTALL_CFG, "install.cfg", 0);

View file

@ -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: options.c,v 1.58 1999/04/06 08:25:53 jkh Exp $
* $Id: options.c,v 1.59 1999/04/27 14:33:28 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -135,6 +135,8 @@ static Option Options[] = {
OPT_IS_VAR, TIMEOUT_PROMPT, VAR_MEDIA_TIMEOUT, varCheck },
{ "Package Temp", "The directory where package temporary files should go",
OPT_IS_VAR, PKG_PROMPT, VAR_PKG_TMPDIR, varCheck },
{ "Config save", "Whether or not to save installation kernel config changes",
OPT_IS_VAR, NULL, VAR_KGET, varCheck },
{ "Re-scan Devices", "Re-run sysinstall's initial device probe",
OPT_IS_FUNC, deviceRescan },
{ "Use Defaults", "Reset all values to startup defaults",

View file

@ -4,7 +4,7 @@
* This is probably the last attempt in the `sysinstall' line, the next
* generation being slated to essentially a complete rewrite.
*
* $Id: sysinstall.h,v 1.161 1999/04/24 01:53:55 jkh Exp $
* $Id: sysinstall.h,v 1.162 1999/04/27 14:33:29 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -119,6 +119,7 @@
#define VAR_INSTALL_ROOT "installRoot"
#define VAR_IPADDR "ipaddr"
#define VAR_KEYMAP "keymap"
#define VAR_KGET "kget"
#define VAR_LABEL "label"
#define VAR_LABEL_COUNT "labelCount"
#define VAR_MEDIA_TYPE "mediaType"

View file

@ -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.233 1999/04/28 10:51:01 jkh Exp $
* $Id: install.c,v 1.234 1999/05/05 11:34:02 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -734,6 +734,7 @@ int
installFixupBin(dialogMenuItem *self)
{
Device **devs;
char *cp;
int i;
/* All of this is done only as init, just to be safe */
@ -747,17 +748,20 @@ installFixupBin(dialogMenuItem *self)
}
#ifndef __alpha__
/* Snapshot any boot -c changes back to the new kernel */
if (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");
fclose(fp);
cp = variable_get(VAR_KGET);
if (cp && (*cp == 'Y' || *cp == 'y')) {
if (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");
fclose(fp);
}
}
}
#endif
@ -1029,6 +1033,7 @@ installVarDefaults(dialogMenuItem *self)
/* Set default startup options */
variable_set2(VAR_RELNAME, getRelname(), 0);
variable_set2(VAR_CPIO_VERBOSITY, "high", 0);
variable_set2(VAR_KGET, "YES", 0);
variable_set2(VAR_TAPE_BLOCKSIZE, DEFAULT_TAPE_BLOCKSIZE, 0);
variable_set2(VAR_INSTALL_ROOT, "/", 0);
variable_set2(VAR_INSTALL_CFG, "install.cfg", 0);

View file

@ -4,7 +4,7 @@
* This is probably the last attempt in the `sysinstall' line, the next
* generation being slated to essentially a complete rewrite.
*
* $Id: sysinstall.h,v 1.161 1999/04/24 01:53:55 jkh Exp $
* $Id: sysinstall.h,v 1.162 1999/04/27 14:33:29 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -119,6 +119,7 @@
#define VAR_INSTALL_ROOT "installRoot"
#define VAR_IPADDR "ipaddr"
#define VAR_KEYMAP "keymap"
#define VAR_KGET "kget"
#define VAR_LABEL "label"
#define VAR_LABEL_COUNT "labelCount"
#define VAR_MEDIA_TYPE "mediaType"

View file

@ -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.233 1999/04/28 10:51:01 jkh Exp $
* $Id: install.c,v 1.234 1999/05/05 11:34:02 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -734,6 +734,7 @@ int
installFixupBin(dialogMenuItem *self)
{
Device **devs;
char *cp;
int i;
/* All of this is done only as init, just to be safe */
@ -747,17 +748,20 @@ installFixupBin(dialogMenuItem *self)
}
#ifndef __alpha__
/* Snapshot any boot -c changes back to the new kernel */
if (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");
fclose(fp);
cp = variable_get(VAR_KGET);
if (cp && (*cp == 'Y' || *cp == 'y')) {
if (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");
fclose(fp);
}
}
}
#endif
@ -1029,6 +1033,7 @@ installVarDefaults(dialogMenuItem *self)
/* Set default startup options */
variable_set2(VAR_RELNAME, getRelname(), 0);
variable_set2(VAR_CPIO_VERBOSITY, "high", 0);
variable_set2(VAR_KGET, "YES", 0);
variable_set2(VAR_TAPE_BLOCKSIZE, DEFAULT_TAPE_BLOCKSIZE, 0);
variable_set2(VAR_INSTALL_ROOT, "/", 0);
variable_set2(VAR_INSTALL_CFG, "install.cfg", 0);

View file

@ -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: options.c,v 1.58 1999/04/06 08:25:53 jkh Exp $
* $Id: options.c,v 1.59 1999/04/27 14:33:28 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -135,6 +135,8 @@ static Option Options[] = {
OPT_IS_VAR, TIMEOUT_PROMPT, VAR_MEDIA_TIMEOUT, varCheck },
{ "Package Temp", "The directory where package temporary files should go",
OPT_IS_VAR, PKG_PROMPT, VAR_PKG_TMPDIR, varCheck },
{ "Config save", "Whether or not to save installation kernel config changes",
OPT_IS_VAR, NULL, VAR_KGET, varCheck },
{ "Re-scan Devices", "Re-run sysinstall's initial device probe",
OPT_IS_FUNC, deviceRescan },
{ "Use Defaults", "Reset all values to startup defaults",

View file

@ -4,7 +4,7 @@
* This is probably the last attempt in the `sysinstall' line, the next
* generation being slated to essentially a complete rewrite.
*
* $Id: sysinstall.h,v 1.161 1999/04/24 01:53:55 jkh Exp $
* $Id: sysinstall.h,v 1.162 1999/04/27 14:33:29 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -119,6 +119,7 @@
#define VAR_INSTALL_ROOT "installRoot"
#define VAR_IPADDR "ipaddr"
#define VAR_KEYMAP "keymap"
#define VAR_KGET "kget"
#define VAR_LABEL "label"
#define VAR_LABEL_COUNT "labelCount"
#define VAR_MEDIA_TYPE "mediaType"