summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1999-05-07 11:02:58 +0000
committerjkh <jkh@FreeBSD.org>1999-05-07 11:02:58 +0000
commit492e9838b2366b7c8f6fc4233dbc72db6def40d7 (patch)
tree2e8491752a6a343ce10c5438a2c6570eb47a1228
parent693dd58bb3e5843d252e25a15e2cc8d49323cb82 (diff)
downloadFreeBSD-src-492e9838b2366b7c8f6fc4233dbc72db6def40d7.zip
FreeBSD-src-492e9838b2366b7c8f6fc4233dbc72db6def40d7.tar.gz
Make saving kernel configuration info disable-able (may be useful in certain
situations).
-rw-r--r--release/sysinstall/install.c29
-rw-r--r--release/sysinstall/options.c4
-rw-r--r--release/sysinstall/sysinstall.h3
-rw-r--r--usr.sbin/sade/install.c29
-rw-r--r--usr.sbin/sade/sade.h3
-rw-r--r--usr.sbin/sysinstall/install.c29
-rw-r--r--usr.sbin/sysinstall/options.c4
-rw-r--r--usr.sbin/sysinstall/sysinstall.h3
8 files changed, 63 insertions, 41 deletions
diff --git a/release/sysinstall/install.c b/release/sysinstall/install.c
index 9746457..ac975b7 100644
--- a/release/sysinstall/install.c
+++ b/release/sysinstall/install.c
@@ -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);
diff --git a/release/sysinstall/options.c b/release/sysinstall/options.c
index ae660d7..59b5727 100644
--- a/release/sysinstall/options.c
+++ b/release/sysinstall/options.c
@@ -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",
diff --git a/release/sysinstall/sysinstall.h b/release/sysinstall/sysinstall.h
index cccbfc8..123ed84 100644
--- a/release/sysinstall/sysinstall.h
+++ b/release/sysinstall/sysinstall.h
@@ -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"
diff --git a/usr.sbin/sade/install.c b/usr.sbin/sade/install.c
index 9746457..ac975b7 100644
--- a/usr.sbin/sade/install.c
+++ b/usr.sbin/sade/install.c
@@ -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);
diff --git a/usr.sbin/sade/sade.h b/usr.sbin/sade/sade.h
index cccbfc8..123ed84 100644
--- a/usr.sbin/sade/sade.h
+++ b/usr.sbin/sade/sade.h
@@ -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"
diff --git a/usr.sbin/sysinstall/install.c b/usr.sbin/sysinstall/install.c
index 9746457..ac975b7 100644
--- a/usr.sbin/sysinstall/install.c
+++ b/usr.sbin/sysinstall/install.c
@@ -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);
diff --git a/usr.sbin/sysinstall/options.c b/usr.sbin/sysinstall/options.c
index ae660d7..59b5727 100644
--- a/usr.sbin/sysinstall/options.c
+++ b/usr.sbin/sysinstall/options.c
@@ -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",
diff --git a/usr.sbin/sysinstall/sysinstall.h b/usr.sbin/sysinstall/sysinstall.h
index cccbfc8..123ed84 100644
--- a/usr.sbin/sysinstall/sysinstall.h
+++ b/usr.sbin/sysinstall/sysinstall.h
@@ -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"
OpenPOWER on IntegriCloud