summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1999-04-28 10:51:01 +0000
committerjkh <jkh@FreeBSD.org>1999-04-28 10:51:01 +0000
commita444f336d9c283cad668b319a9f82fedb66e7d51 (patch)
treeb0143183a838931e22cd64e84bb51af3c25f8c1b /usr.sbin
parent4791ab9d40f3d6b6093c4935e77aebf5f389b98c (diff)
downloadFreeBSD-src-a444f336d9c283cad668b319a9f82fedb66e7d51.zip
FreeBSD-src-a444f336d9c283cad668b319a9f82fedb66e7d51.tar.gz
Deal with new loader syntax in determining how/when to load a userconfig
script. Submitted by: "Daniel C. Sobral" <dcs@newsguy.com> Avoided by: jkh Demanded by: The Users
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/sade/install.c23
-rw-r--r--usr.sbin/sysinstall/install.c23
2 files changed, 14 insertions, 32 deletions
diff --git a/usr.sbin/sade/install.c b/usr.sbin/sade/install.c
index a8a961e..703a760 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.231 1999/04/24 01:53:54 jkh Exp $
+ * $Id: install.c,v 1.232 1999/04/27 14:33:25 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -752,21 +752,12 @@ installFixupBin(dialogMenuItem *self)
"to it. See the debug screen (ALT-F2) for details.");
}
else {
- if (!file_readable("/boot/loader.rc")) {
- FILE *fp;
-
- if ((fp = fopen("/boot/loader.rc", "w")) != NULL) {
- fprintf(fp, "load /kernel\n");
- fprintf(fp, "load -t userconfig_script /boot/kernel.conf\n");
- fprintf(fp, "autoboot 5\n");
- fclose(fp);
- }
- }
- else {
- msgConfirm("You already have a /boot/loader.rc file so I won't touch it.\n"
- "You will need to add a: load -t userconfig_script /boot/kernel.conf\n"
- "line to your /boot/loader.rc before your saved kernel changes\n"
- "(if any) can go into effect.");
+ 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
diff --git a/usr.sbin/sysinstall/install.c b/usr.sbin/sysinstall/install.c
index a8a961e..703a760 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.231 1999/04/24 01:53:54 jkh Exp $
+ * $Id: install.c,v 1.232 1999/04/27 14:33:25 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -752,21 +752,12 @@ installFixupBin(dialogMenuItem *self)
"to it. See the debug screen (ALT-F2) for details.");
}
else {
- if (!file_readable("/boot/loader.rc")) {
- FILE *fp;
-
- if ((fp = fopen("/boot/loader.rc", "w")) != NULL) {
- fprintf(fp, "load /kernel\n");
- fprintf(fp, "load -t userconfig_script /boot/kernel.conf\n");
- fprintf(fp, "autoboot 5\n");
- fclose(fp);
- }
- }
- else {
- msgConfirm("You already have a /boot/loader.rc file so I won't touch it.\n"
- "You will need to add a: load -t userconfig_script /boot/kernel.conf\n"
- "line to your /boot/loader.rc before your saved kernel changes\n"
- "(if any) can go into effect.");
+ 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
OpenPOWER on IntegriCloud