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
This commit is contained in:
Jordan K. Hubbard 1999-04-28 10:51:01 +00:00
parent a44388523d
commit 78e2e8ea35
3 changed files with 18 additions and 45 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.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;
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.");
if ((fp = fopen("/boot/loader.conf", "a")) != NULL) {
fprintf(fp, "# -- sysinstall generated deltas -- #\n");
fprintf(fp, "userconfig_script_load=\"YES\"\n");
fclose(fp);
}
}
#endif

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.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;
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.");
if ((fp = fopen("/boot/loader.conf", "a")) != NULL) {
fprintf(fp, "# -- sysinstall generated deltas -- #\n");
fprintf(fp, "userconfig_script_load=\"YES\"\n");
fclose(fp);
}
}
#endif

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.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;
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.");
if ((fp = fopen("/boot/loader.conf", "a")) != NULL) {
fprintf(fp, "# -- sysinstall generated deltas -- #\n");
fprintf(fp, "userconfig_script_load=\"YES\"\n");
fclose(fp);
}
}
#endif