mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-12-18 05:53:36 +01:00
Make the save_userconfig() stuff conditional and turned off by default
(for now - still a few more wrinkles here). Add more debugging code and some cosmetic tweaks.
This commit is contained in:
parent
4ed8e95bc0
commit
f5e8e60f1f
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=18711
@ -4,7 +4,7 @@
|
|||||||
* This is probably the last program in the `sysinstall' line - the next
|
* This is probably the last program in the `sysinstall' line - the next
|
||||||
* generation being essentially a complete rewrite.
|
* generation being essentially a complete rewrite.
|
||||||
*
|
*
|
||||||
* $Id: install.c,v 1.128 1996/10/04 14:53:50 jkh Exp $
|
* $Id: install.c,v 1.129 1996/10/05 10:43:47 jkh Exp $
|
||||||
*
|
*
|
||||||
* Copyright (c) 1995
|
* Copyright (c) 1995
|
||||||
* Jordan Hubbard. All rights reserved.
|
* Jordan Hubbard. All rights reserved.
|
||||||
@ -51,7 +51,9 @@
|
|||||||
#include <sys/mount.h>
|
#include <sys/mount.h>
|
||||||
|
|
||||||
static void create_termcap(void);
|
static void create_termcap(void);
|
||||||
|
#ifdef SAVE_USERCONFIG
|
||||||
static void save_userconfig_to_kernel(char *);
|
static void save_userconfig_to_kernel(char *);
|
||||||
|
#endif
|
||||||
|
|
||||||
#define TERMCAP_FILE "/usr/share/misc/termcap"
|
#define TERMCAP_FILE "/usr/share/misc/termcap"
|
||||||
|
|
||||||
@ -594,10 +596,10 @@ installFixup(dialogMenuItem *self)
|
|||||||
|
|
||||||
if (!file_readable("/kernel")) {
|
if (!file_readable("/kernel")) {
|
||||||
if (file_readable("/kernel.GENERIC")) {
|
if (file_readable("/kernel.GENERIC")) {
|
||||||
|
#ifdef SAVE_USERCONFIG
|
||||||
/* Snapshot any boot -c changes back to the GENERIC kernel */
|
/* Snapshot any boot -c changes back to the GENERIC kernel */
|
||||||
save_userconfig_to_kernel("/kernel.GENERIC");
|
save_userconfig_to_kernel("/kernel.GENERIC");
|
||||||
dialog_clear();
|
#endif
|
||||||
|
|
||||||
if (vsystem("cp -p /kernel.GENERIC /kernel")) {
|
if (vsystem("cp -p /kernel.GENERIC /kernel")) {
|
||||||
msgConfirm("Unable to link /kernel into place!");
|
msgConfirm("Unable to link /kernel into place!");
|
||||||
return DITEM_FAILURE;
|
return DITEM_FAILURE;
|
||||||
@ -680,7 +682,7 @@ installFilesystems(dialogMenuItem *self)
|
|||||||
Boolean upgrade = FALSE;
|
Boolean upgrade = FALSE;
|
||||||
|
|
||||||
/* If we've already done this, bail out */
|
/* If we've already done this, bail out */
|
||||||
if (variable_get(DISK_PREPARED))
|
if ((str = variable_get(DISK_LABELLED)) && !strcmp(str, "written"))
|
||||||
return DITEM_SUCCESS;
|
return DITEM_SUCCESS;
|
||||||
|
|
||||||
str = variable_get(SYSTEM_STATE);
|
str = variable_get(SYSTEM_STATE);
|
||||||
@ -823,7 +825,6 @@ installFilesystems(dialogMenuItem *self)
|
|||||||
|
|
||||||
command_sort();
|
command_sort();
|
||||||
command_execute();
|
command_execute();
|
||||||
variable_set2(DISK_PREPARED, "yes");
|
|
||||||
return DITEM_SUCCESS;
|
return DITEM_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -901,49 +902,48 @@ create_termcap(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *isa_list[] = {
|
|
||||||
"device",
|
|
||||||
"ioport",
|
|
||||||
"irq",
|
|
||||||
"drq",
|
|
||||||
"iomem",
|
|
||||||
"iosize",
|
|
||||||
"flags",
|
|
||||||
"alive",
|
|
||||||
"enabled",
|
|
||||||
};
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
save_userconfig_to_kernel(char *kern)
|
save_userconfig_to_kernel(char *kern)
|
||||||
{
|
{
|
||||||
struct kernel *core, *boot;
|
struct kernel *core, *boot;
|
||||||
struct list *c_isa, *c_dev, *b_dev;
|
struct list *c_isa, *b_isa, *c_dev, *b_dev;
|
||||||
int i, d;
|
int i, d;
|
||||||
|
|
||||||
if ((core = uc_open("-incore")) == NULL) {
|
if ((core = uc_open("-incore")) == NULL) {
|
||||||
msgDebug("Can't read in-core information for kernel.\n");
|
msgDebug("save_userconf: Can't read in-core information for kernel.\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((boot = uc_open(kern)) == NULL) {
|
if ((boot = uc_open(kern)) == NULL) {
|
||||||
msgDebug("Can't read device information for kernel image %s\n", kern);
|
msgDebug("save_userconf: Can't read device information for kernel image %s\n", kern);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
msgNotify("Saving any boot -c changes to new kernel...");
|
||||||
c_isa = uc_getdev(core, "-isa");
|
c_isa = uc_getdev(core, "-isa");
|
||||||
|
b_isa = uc_getdev(boot, "-isa");
|
||||||
|
if (isDebug())
|
||||||
|
msgDebug("save_userconf: got %d ISA device entries from core, %d from boot.\n", c_isa->ac, b_isa->ac);
|
||||||
for (d = 0; d < c_isa->ac; d++) {
|
for (d = 0; d < c_isa->ac; d++) {
|
||||||
if (isDebug())
|
if (isDebug())
|
||||||
msgDebug("Outer loop, c_isa->av[%d] = %s\n", d, c_isa->av[d]);
|
msgDebug("save_userconf: ISA device loop, c_isa->av[%d] = %s\n", d, c_isa->av[d]);
|
||||||
if (strcmp(c_isa->av[d], "npx0")) { /* special case npx0, which
|
if (strcmp(c_isa->av[d], "npx0")) { /* special case npx0, which mucks with its id_irq member */
|
||||||
mucks with its id_irq member */
|
|
||||||
c_dev = uc_getdev(core, c_isa->av[d]);
|
c_dev = uc_getdev(core, c_isa->av[d]);
|
||||||
b_dev = uc_getdev(boot, c_isa->av[d]);
|
b_dev = uc_getdev(boot, b_isa->av[d]);
|
||||||
|
if (!c_dev || !b_dev) {
|
||||||
|
msgDebug("save_userconf: c_dev: %x b_dev: %x\n", c_dev, b_dev);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (isDebug())
|
||||||
|
msgDebug("save_userconf: ISA device %s: %d config parameters (core), %d (boot)\n",
|
||||||
|
c_isa->av[d], c_dev->ac, b_dev->ac);
|
||||||
for (i = 0; i < c_dev->ac; i++) {
|
for (i = 0; i < c_dev->ac; i++) {
|
||||||
if (isDebug())
|
if (isDebug())
|
||||||
msgDebug("Inner loop, c_dev->av[%d] = %s\n", i, c_dev->av[i]);
|
msgDebug("save_userconf: c_dev->av[%d] = %s, b_dev->av[%d] = %s\n", i, c_dev->av[i], i, b_dev->av[i]);
|
||||||
if (strcmp(c_dev->av[i], b_dev->av[i])) {
|
if (strcmp(c_dev->av[i], b_dev->av[i])) {
|
||||||
if (isDebug())
|
if (isDebug())
|
||||||
msgDebug("%s %s changed: %s (boot) -> %s (core)\n",
|
msgDebug("save_userconf: %s (boot) -> %s (core)\n",
|
||||||
c_dev->av[0], isa_list[i], b_dev->av[i], c_dev->av[i]);
|
c_dev->av[i], b_dev->av[i]);
|
||||||
isa_setdev(boot, c_dev);
|
isa_setdev(boot, c_dev);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* This is probably the last attempt in the `sysinstall' line, the next
|
* This is probably the last attempt in the `sysinstall' line, the next
|
||||||
* generation being slated to essentially a complete rewrite.
|
* generation being slated to essentially a complete rewrite.
|
||||||
*
|
*
|
||||||
* $Id: sysinstall.h,v 1.79 1996/10/01 12:13:25 jkh Exp $
|
* $Id: sysinstall.h,v 1.80 1996/10/04 13:33:44 jkh Exp $
|
||||||
*
|
*
|
||||||
* Copyright (c) 1995
|
* Copyright (c) 1995
|
||||||
* Jordan Hubbard. All rights reserved.
|
* Jordan Hubbard. All rights reserved.
|
||||||
@ -74,7 +74,6 @@
|
|||||||
#define DISK_PARTITIONED "_diskPartitioned"
|
#define DISK_PARTITIONED "_diskPartitioned"
|
||||||
#define DISK_LABELLED "_diskLabelled"
|
#define DISK_LABELLED "_diskLabelled"
|
||||||
#define DISK_SELECTED "_diskSelected"
|
#define DISK_SELECTED "_diskSelected"
|
||||||
#define DISK_PREPARED "_diskPrepared"
|
|
||||||
#define SYSTEM_STATE "_systemState"
|
#define SYSTEM_STATE "_systemState"
|
||||||
#define RUNNING_ON_ROOT "_runningOnRoot"
|
#define RUNNING_ON_ROOT "_runningOnRoot"
|
||||||
#define TCP_CONFIGURED "_tcpConfigured"
|
#define TCP_CONFIGURED "_tcpConfigured"
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* $Id: tcpip.c,v 1.46 1996/09/01 08:17:14 jkh Exp $
|
* $Id: tcpip.c,v 1.47 1996/10/05 12:16:49 jkh Exp $
|
||||||
*
|
*
|
||||||
* Copyright (c) 1995
|
* Copyright (c) 1995
|
||||||
* Gary J Palmer. All rights reserved.
|
* Gary J Palmer. All rights reserved.
|
||||||
@ -249,8 +249,7 @@ tcpOpenDialog(Device *devp)
|
|||||||
msgFatal("Cannot open TCP/IP dialog window!!");
|
msgFatal("Cannot open TCP/IP dialog window!!");
|
||||||
|
|
||||||
/* Say where our help comes from */
|
/* Say where our help comes from */
|
||||||
systemHelpFile(TCP_HELPFILE, help);
|
use_helpfile(systemHelpFile(TCP_HELPFILE, help));
|
||||||
use_helpfile(help);
|
|
||||||
|
|
||||||
/* Setup a nice screen for us to splat stuff onto */
|
/* Setup a nice screen for us to splat stuff onto */
|
||||||
draw_box(ds_win, TCP_DIALOG_Y, TCP_DIALOG_X, TCP_DIALOG_HEIGHT, TCP_DIALOG_WIDTH, dialog_attr, border_attr);
|
draw_box(ds_win, TCP_DIALOG_Y, TCP_DIALOG_X, TCP_DIALOG_HEIGHT, TCP_DIALOG_WIDTH, dialog_attr, border_attr);
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
* library functions for userconfig library
|
* library functions for userconfig library
|
||||||
*
|
*
|
||||||
* $Id: uc_main.c,v 1.8 1996/10/05 11:56:50 jkh Exp $
|
* $Id: uc_main.c,v 1.9 1996/10/05 13:30:43 jkh Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
@ -79,10 +79,9 @@ uc_open(char *name){
|
|||||||
strncpy(kname, getbootfile(), 79);
|
strncpy(kname, getbootfile(), 79);
|
||||||
else
|
else
|
||||||
strncpy(kname, name, 79);
|
strncpy(kname, name, 79);
|
||||||
|
|
||||||
if (isDebug())
|
if (isDebug())
|
||||||
msgDebug("uc_open: kernel name is %s, incore = %d\n", kname, incore);
|
msgDebug("uc_open: kernel name is %s, incore = %d\n", kname, incore);
|
||||||
|
|
||||||
kern = (struct kernel *)malloc(sizeof(struct kernel));
|
kern = (struct kernel *)malloc(sizeof(struct kernel));
|
||||||
|
|
||||||
#ifdef KERN_NO_SYMBOLS
|
#ifdef KERN_NO_SYMBOLS
|
||||||
@ -103,23 +102,29 @@ uc_open(char *name){
|
|||||||
nl = (struct nlist *)malloc((size + 1) * sizeof(struct nlist));
|
nl = (struct nlist *)malloc((size + 1) * sizeof(struct nlist));
|
||||||
for (i = 0; i < size; i++) {
|
for (i = 0; i < size; i++) {
|
||||||
char name[255];
|
char name[255];
|
||||||
|
int c1;
|
||||||
|
unsigned int uc1;
|
||||||
|
short d1;
|
||||||
|
unsigned long v1;
|
||||||
|
|
||||||
if (fgets(name, 255, fp) == NULL) {
|
if (fscanf(fp, "%s %u %d %hd %ld\n", name, &uc1, &c1, &d1, &v1) == 5) {
|
||||||
msgDebug("Unable to read symbol name from symbol file.\n");
|
nl[i].n_name = strdup(name);
|
||||||
free(kern);
|
nl[i].n_type = (unsigned char)uc1;
|
||||||
return NULL;
|
nl[i].n_other = (char)c1;
|
||||||
|
nl[i].n_desc = d1;
|
||||||
|
nl[i].n_value = v1;
|
||||||
|
if (isDebug())
|
||||||
|
msgDebug("Entry %d, decoded: \"%s\", %d %d %hd %ld\n", i, nl[i].n_name, nl[i].n_type, nl[i].n_other, nl[i].n_desc, nl[i].n_value);
|
||||||
}
|
}
|
||||||
if (name[0] == '\n')
|
else {
|
||||||
name[0] = '\0';
|
nl[i].n_name = "";
|
||||||
nl[i].n_name = strdup(name);
|
|
||||||
if (fscanf(fp, "%d %d %d %ld\n",
|
|
||||||
&(nl[i].n_type), &(nl[i].n_other), &(nl[i].n_desc), &(nl[i].n_value)) != 4) {
|
|
||||||
nl[i].n_type = 0;
|
nl[i].n_type = 0;
|
||||||
nl[i].n_other = 0;
|
nl[i].n_other = 0;
|
||||||
nl[i].n_desc = 0;
|
nl[i].n_desc = 0;
|
||||||
nl[i].n_value = 0;
|
nl[i].n_value = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
nl[i].n_name = NULL;
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
kern->nl = nl;
|
kern->nl = nl;
|
||||||
i = 0;
|
i = 0;
|
||||||
@ -148,7 +153,6 @@ uc_open(char *name){
|
|||||||
msgDebug("uc_open: Unable to open /dev/kmem.\n");
|
msgDebug("uc_open: Unable to open /dev/kmem.\n");
|
||||||
return kern;
|
return kern;
|
||||||
}
|
}
|
||||||
|
|
||||||
kern->core = (caddr_t)NULL;
|
kern->core = (caddr_t)NULL;
|
||||||
kern->incore = 1;
|
kern->incore = 1;
|
||||||
kern->size = 0;
|
kern->size = 0;
|
||||||
@ -194,9 +198,8 @@ uc_open(char *name){
|
|||||||
return kern;
|
return kern;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
kern->fd = kd;
|
kern->fd = kd;
|
||||||
|
|
||||||
if (isDebug())
|
if (isDebug())
|
||||||
msgDebug("uc_open: getting isa information\n");
|
msgDebug("uc_open: getting isa information\n");
|
||||||
get_isa_info(kern);
|
get_isa_info(kern);
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* This is probably the last program in the `sysinstall' line - the next
|
* This is probably the last program in the `sysinstall' line - the next
|
||||||
* generation being essentially a complete rewrite.
|
* generation being essentially a complete rewrite.
|
||||||
*
|
*
|
||||||
* $Id: install.c,v 1.128 1996/10/04 14:53:50 jkh Exp $
|
* $Id: install.c,v 1.129 1996/10/05 10:43:47 jkh Exp $
|
||||||
*
|
*
|
||||||
* Copyright (c) 1995
|
* Copyright (c) 1995
|
||||||
* Jordan Hubbard. All rights reserved.
|
* Jordan Hubbard. All rights reserved.
|
||||||
@ -51,7 +51,9 @@
|
|||||||
#include <sys/mount.h>
|
#include <sys/mount.h>
|
||||||
|
|
||||||
static void create_termcap(void);
|
static void create_termcap(void);
|
||||||
|
#ifdef SAVE_USERCONFIG
|
||||||
static void save_userconfig_to_kernel(char *);
|
static void save_userconfig_to_kernel(char *);
|
||||||
|
#endif
|
||||||
|
|
||||||
#define TERMCAP_FILE "/usr/share/misc/termcap"
|
#define TERMCAP_FILE "/usr/share/misc/termcap"
|
||||||
|
|
||||||
@ -594,10 +596,10 @@ installFixup(dialogMenuItem *self)
|
|||||||
|
|
||||||
if (!file_readable("/kernel")) {
|
if (!file_readable("/kernel")) {
|
||||||
if (file_readable("/kernel.GENERIC")) {
|
if (file_readable("/kernel.GENERIC")) {
|
||||||
|
#ifdef SAVE_USERCONFIG
|
||||||
/* Snapshot any boot -c changes back to the GENERIC kernel */
|
/* Snapshot any boot -c changes back to the GENERIC kernel */
|
||||||
save_userconfig_to_kernel("/kernel.GENERIC");
|
save_userconfig_to_kernel("/kernel.GENERIC");
|
||||||
dialog_clear();
|
#endif
|
||||||
|
|
||||||
if (vsystem("cp -p /kernel.GENERIC /kernel")) {
|
if (vsystem("cp -p /kernel.GENERIC /kernel")) {
|
||||||
msgConfirm("Unable to link /kernel into place!");
|
msgConfirm("Unable to link /kernel into place!");
|
||||||
return DITEM_FAILURE;
|
return DITEM_FAILURE;
|
||||||
@ -680,7 +682,7 @@ installFilesystems(dialogMenuItem *self)
|
|||||||
Boolean upgrade = FALSE;
|
Boolean upgrade = FALSE;
|
||||||
|
|
||||||
/* If we've already done this, bail out */
|
/* If we've already done this, bail out */
|
||||||
if (variable_get(DISK_PREPARED))
|
if ((str = variable_get(DISK_LABELLED)) && !strcmp(str, "written"))
|
||||||
return DITEM_SUCCESS;
|
return DITEM_SUCCESS;
|
||||||
|
|
||||||
str = variable_get(SYSTEM_STATE);
|
str = variable_get(SYSTEM_STATE);
|
||||||
@ -823,7 +825,6 @@ installFilesystems(dialogMenuItem *self)
|
|||||||
|
|
||||||
command_sort();
|
command_sort();
|
||||||
command_execute();
|
command_execute();
|
||||||
variable_set2(DISK_PREPARED, "yes");
|
|
||||||
return DITEM_SUCCESS;
|
return DITEM_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -901,49 +902,48 @@ create_termcap(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *isa_list[] = {
|
|
||||||
"device",
|
|
||||||
"ioport",
|
|
||||||
"irq",
|
|
||||||
"drq",
|
|
||||||
"iomem",
|
|
||||||
"iosize",
|
|
||||||
"flags",
|
|
||||||
"alive",
|
|
||||||
"enabled",
|
|
||||||
};
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
save_userconfig_to_kernel(char *kern)
|
save_userconfig_to_kernel(char *kern)
|
||||||
{
|
{
|
||||||
struct kernel *core, *boot;
|
struct kernel *core, *boot;
|
||||||
struct list *c_isa, *c_dev, *b_dev;
|
struct list *c_isa, *b_isa, *c_dev, *b_dev;
|
||||||
int i, d;
|
int i, d;
|
||||||
|
|
||||||
if ((core = uc_open("-incore")) == NULL) {
|
if ((core = uc_open("-incore")) == NULL) {
|
||||||
msgDebug("Can't read in-core information for kernel.\n");
|
msgDebug("save_userconf: Can't read in-core information for kernel.\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((boot = uc_open(kern)) == NULL) {
|
if ((boot = uc_open(kern)) == NULL) {
|
||||||
msgDebug("Can't read device information for kernel image %s\n", kern);
|
msgDebug("save_userconf: Can't read device information for kernel image %s\n", kern);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
msgNotify("Saving any boot -c changes to new kernel...");
|
||||||
c_isa = uc_getdev(core, "-isa");
|
c_isa = uc_getdev(core, "-isa");
|
||||||
|
b_isa = uc_getdev(boot, "-isa");
|
||||||
|
if (isDebug())
|
||||||
|
msgDebug("save_userconf: got %d ISA device entries from core, %d from boot.\n", c_isa->ac, b_isa->ac);
|
||||||
for (d = 0; d < c_isa->ac; d++) {
|
for (d = 0; d < c_isa->ac; d++) {
|
||||||
if (isDebug())
|
if (isDebug())
|
||||||
msgDebug("Outer loop, c_isa->av[%d] = %s\n", d, c_isa->av[d]);
|
msgDebug("save_userconf: ISA device loop, c_isa->av[%d] = %s\n", d, c_isa->av[d]);
|
||||||
if (strcmp(c_isa->av[d], "npx0")) { /* special case npx0, which
|
if (strcmp(c_isa->av[d], "npx0")) { /* special case npx0, which mucks with its id_irq member */
|
||||||
mucks with its id_irq member */
|
|
||||||
c_dev = uc_getdev(core, c_isa->av[d]);
|
c_dev = uc_getdev(core, c_isa->av[d]);
|
||||||
b_dev = uc_getdev(boot, c_isa->av[d]);
|
b_dev = uc_getdev(boot, b_isa->av[d]);
|
||||||
|
if (!c_dev || !b_dev) {
|
||||||
|
msgDebug("save_userconf: c_dev: %x b_dev: %x\n", c_dev, b_dev);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (isDebug())
|
||||||
|
msgDebug("save_userconf: ISA device %s: %d config parameters (core), %d (boot)\n",
|
||||||
|
c_isa->av[d], c_dev->ac, b_dev->ac);
|
||||||
for (i = 0; i < c_dev->ac; i++) {
|
for (i = 0; i < c_dev->ac; i++) {
|
||||||
if (isDebug())
|
if (isDebug())
|
||||||
msgDebug("Inner loop, c_dev->av[%d] = %s\n", i, c_dev->av[i]);
|
msgDebug("save_userconf: c_dev->av[%d] = %s, b_dev->av[%d] = %s\n", i, c_dev->av[i], i, b_dev->av[i]);
|
||||||
if (strcmp(c_dev->av[i], b_dev->av[i])) {
|
if (strcmp(c_dev->av[i], b_dev->av[i])) {
|
||||||
if (isDebug())
|
if (isDebug())
|
||||||
msgDebug("%s %s changed: %s (boot) -> %s (core)\n",
|
msgDebug("save_userconf: %s (boot) -> %s (core)\n",
|
||||||
c_dev->av[0], isa_list[i], b_dev->av[i], c_dev->av[i]);
|
c_dev->av[i], b_dev->av[i]);
|
||||||
isa_setdev(boot, c_dev);
|
isa_setdev(boot, c_dev);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* This is probably the last attempt in the `sysinstall' line, the next
|
* This is probably the last attempt in the `sysinstall' line, the next
|
||||||
* generation being slated to essentially a complete rewrite.
|
* generation being slated to essentially a complete rewrite.
|
||||||
*
|
*
|
||||||
* $Id: sysinstall.h,v 1.79 1996/10/01 12:13:25 jkh Exp $
|
* $Id: sysinstall.h,v 1.80 1996/10/04 13:33:44 jkh Exp $
|
||||||
*
|
*
|
||||||
* Copyright (c) 1995
|
* Copyright (c) 1995
|
||||||
* Jordan Hubbard. All rights reserved.
|
* Jordan Hubbard. All rights reserved.
|
||||||
@ -74,7 +74,6 @@
|
|||||||
#define DISK_PARTITIONED "_diskPartitioned"
|
#define DISK_PARTITIONED "_diskPartitioned"
|
||||||
#define DISK_LABELLED "_diskLabelled"
|
#define DISK_LABELLED "_diskLabelled"
|
||||||
#define DISK_SELECTED "_diskSelected"
|
#define DISK_SELECTED "_diskSelected"
|
||||||
#define DISK_PREPARED "_diskPrepared"
|
|
||||||
#define SYSTEM_STATE "_systemState"
|
#define SYSTEM_STATE "_systemState"
|
||||||
#define RUNNING_ON_ROOT "_runningOnRoot"
|
#define RUNNING_ON_ROOT "_runningOnRoot"
|
||||||
#define TCP_CONFIGURED "_tcpConfigured"
|
#define TCP_CONFIGURED "_tcpConfigured"
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* This is probably the last program in the `sysinstall' line - the next
|
* This is probably the last program in the `sysinstall' line - the next
|
||||||
* generation being essentially a complete rewrite.
|
* generation being essentially a complete rewrite.
|
||||||
*
|
*
|
||||||
* $Id: install.c,v 1.128 1996/10/04 14:53:50 jkh Exp $
|
* $Id: install.c,v 1.129 1996/10/05 10:43:47 jkh Exp $
|
||||||
*
|
*
|
||||||
* Copyright (c) 1995
|
* Copyright (c) 1995
|
||||||
* Jordan Hubbard. All rights reserved.
|
* Jordan Hubbard. All rights reserved.
|
||||||
@ -51,7 +51,9 @@
|
|||||||
#include <sys/mount.h>
|
#include <sys/mount.h>
|
||||||
|
|
||||||
static void create_termcap(void);
|
static void create_termcap(void);
|
||||||
|
#ifdef SAVE_USERCONFIG
|
||||||
static void save_userconfig_to_kernel(char *);
|
static void save_userconfig_to_kernel(char *);
|
||||||
|
#endif
|
||||||
|
|
||||||
#define TERMCAP_FILE "/usr/share/misc/termcap"
|
#define TERMCAP_FILE "/usr/share/misc/termcap"
|
||||||
|
|
||||||
@ -594,10 +596,10 @@ installFixup(dialogMenuItem *self)
|
|||||||
|
|
||||||
if (!file_readable("/kernel")) {
|
if (!file_readable("/kernel")) {
|
||||||
if (file_readable("/kernel.GENERIC")) {
|
if (file_readable("/kernel.GENERIC")) {
|
||||||
|
#ifdef SAVE_USERCONFIG
|
||||||
/* Snapshot any boot -c changes back to the GENERIC kernel */
|
/* Snapshot any boot -c changes back to the GENERIC kernel */
|
||||||
save_userconfig_to_kernel("/kernel.GENERIC");
|
save_userconfig_to_kernel("/kernel.GENERIC");
|
||||||
dialog_clear();
|
#endif
|
||||||
|
|
||||||
if (vsystem("cp -p /kernel.GENERIC /kernel")) {
|
if (vsystem("cp -p /kernel.GENERIC /kernel")) {
|
||||||
msgConfirm("Unable to link /kernel into place!");
|
msgConfirm("Unable to link /kernel into place!");
|
||||||
return DITEM_FAILURE;
|
return DITEM_FAILURE;
|
||||||
@ -680,7 +682,7 @@ installFilesystems(dialogMenuItem *self)
|
|||||||
Boolean upgrade = FALSE;
|
Boolean upgrade = FALSE;
|
||||||
|
|
||||||
/* If we've already done this, bail out */
|
/* If we've already done this, bail out */
|
||||||
if (variable_get(DISK_PREPARED))
|
if ((str = variable_get(DISK_LABELLED)) && !strcmp(str, "written"))
|
||||||
return DITEM_SUCCESS;
|
return DITEM_SUCCESS;
|
||||||
|
|
||||||
str = variable_get(SYSTEM_STATE);
|
str = variable_get(SYSTEM_STATE);
|
||||||
@ -823,7 +825,6 @@ installFilesystems(dialogMenuItem *self)
|
|||||||
|
|
||||||
command_sort();
|
command_sort();
|
||||||
command_execute();
|
command_execute();
|
||||||
variable_set2(DISK_PREPARED, "yes");
|
|
||||||
return DITEM_SUCCESS;
|
return DITEM_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -901,49 +902,48 @@ create_termcap(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *isa_list[] = {
|
|
||||||
"device",
|
|
||||||
"ioport",
|
|
||||||
"irq",
|
|
||||||
"drq",
|
|
||||||
"iomem",
|
|
||||||
"iosize",
|
|
||||||
"flags",
|
|
||||||
"alive",
|
|
||||||
"enabled",
|
|
||||||
};
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
save_userconfig_to_kernel(char *kern)
|
save_userconfig_to_kernel(char *kern)
|
||||||
{
|
{
|
||||||
struct kernel *core, *boot;
|
struct kernel *core, *boot;
|
||||||
struct list *c_isa, *c_dev, *b_dev;
|
struct list *c_isa, *b_isa, *c_dev, *b_dev;
|
||||||
int i, d;
|
int i, d;
|
||||||
|
|
||||||
if ((core = uc_open("-incore")) == NULL) {
|
if ((core = uc_open("-incore")) == NULL) {
|
||||||
msgDebug("Can't read in-core information for kernel.\n");
|
msgDebug("save_userconf: Can't read in-core information for kernel.\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((boot = uc_open(kern)) == NULL) {
|
if ((boot = uc_open(kern)) == NULL) {
|
||||||
msgDebug("Can't read device information for kernel image %s\n", kern);
|
msgDebug("save_userconf: Can't read device information for kernel image %s\n", kern);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
msgNotify("Saving any boot -c changes to new kernel...");
|
||||||
c_isa = uc_getdev(core, "-isa");
|
c_isa = uc_getdev(core, "-isa");
|
||||||
|
b_isa = uc_getdev(boot, "-isa");
|
||||||
|
if (isDebug())
|
||||||
|
msgDebug("save_userconf: got %d ISA device entries from core, %d from boot.\n", c_isa->ac, b_isa->ac);
|
||||||
for (d = 0; d < c_isa->ac; d++) {
|
for (d = 0; d < c_isa->ac; d++) {
|
||||||
if (isDebug())
|
if (isDebug())
|
||||||
msgDebug("Outer loop, c_isa->av[%d] = %s\n", d, c_isa->av[d]);
|
msgDebug("save_userconf: ISA device loop, c_isa->av[%d] = %s\n", d, c_isa->av[d]);
|
||||||
if (strcmp(c_isa->av[d], "npx0")) { /* special case npx0, which
|
if (strcmp(c_isa->av[d], "npx0")) { /* special case npx0, which mucks with its id_irq member */
|
||||||
mucks with its id_irq member */
|
|
||||||
c_dev = uc_getdev(core, c_isa->av[d]);
|
c_dev = uc_getdev(core, c_isa->av[d]);
|
||||||
b_dev = uc_getdev(boot, c_isa->av[d]);
|
b_dev = uc_getdev(boot, b_isa->av[d]);
|
||||||
|
if (!c_dev || !b_dev) {
|
||||||
|
msgDebug("save_userconf: c_dev: %x b_dev: %x\n", c_dev, b_dev);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (isDebug())
|
||||||
|
msgDebug("save_userconf: ISA device %s: %d config parameters (core), %d (boot)\n",
|
||||||
|
c_isa->av[d], c_dev->ac, b_dev->ac);
|
||||||
for (i = 0; i < c_dev->ac; i++) {
|
for (i = 0; i < c_dev->ac; i++) {
|
||||||
if (isDebug())
|
if (isDebug())
|
||||||
msgDebug("Inner loop, c_dev->av[%d] = %s\n", i, c_dev->av[i]);
|
msgDebug("save_userconf: c_dev->av[%d] = %s, b_dev->av[%d] = %s\n", i, c_dev->av[i], i, b_dev->av[i]);
|
||||||
if (strcmp(c_dev->av[i], b_dev->av[i])) {
|
if (strcmp(c_dev->av[i], b_dev->av[i])) {
|
||||||
if (isDebug())
|
if (isDebug())
|
||||||
msgDebug("%s %s changed: %s (boot) -> %s (core)\n",
|
msgDebug("save_userconf: %s (boot) -> %s (core)\n",
|
||||||
c_dev->av[0], isa_list[i], b_dev->av[i], c_dev->av[i]);
|
c_dev->av[i], b_dev->av[i]);
|
||||||
isa_setdev(boot, c_dev);
|
isa_setdev(boot, c_dev);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* This is probably the last attempt in the `sysinstall' line, the next
|
* This is probably the last attempt in the `sysinstall' line, the next
|
||||||
* generation being slated to essentially a complete rewrite.
|
* generation being slated to essentially a complete rewrite.
|
||||||
*
|
*
|
||||||
* $Id: sysinstall.h,v 1.79 1996/10/01 12:13:25 jkh Exp $
|
* $Id: sysinstall.h,v 1.80 1996/10/04 13:33:44 jkh Exp $
|
||||||
*
|
*
|
||||||
* Copyright (c) 1995
|
* Copyright (c) 1995
|
||||||
* Jordan Hubbard. All rights reserved.
|
* Jordan Hubbard. All rights reserved.
|
||||||
@ -74,7 +74,6 @@
|
|||||||
#define DISK_PARTITIONED "_diskPartitioned"
|
#define DISK_PARTITIONED "_diskPartitioned"
|
||||||
#define DISK_LABELLED "_diskLabelled"
|
#define DISK_LABELLED "_diskLabelled"
|
||||||
#define DISK_SELECTED "_diskSelected"
|
#define DISK_SELECTED "_diskSelected"
|
||||||
#define DISK_PREPARED "_diskPrepared"
|
|
||||||
#define SYSTEM_STATE "_systemState"
|
#define SYSTEM_STATE "_systemState"
|
||||||
#define RUNNING_ON_ROOT "_runningOnRoot"
|
#define RUNNING_ON_ROOT "_runningOnRoot"
|
||||||
#define TCP_CONFIGURED "_tcpConfigured"
|
#define TCP_CONFIGURED "_tcpConfigured"
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* $Id: tcpip.c,v 1.46 1996/09/01 08:17:14 jkh Exp $
|
* $Id: tcpip.c,v 1.47 1996/10/05 12:16:49 jkh Exp $
|
||||||
*
|
*
|
||||||
* Copyright (c) 1995
|
* Copyright (c) 1995
|
||||||
* Gary J Palmer. All rights reserved.
|
* Gary J Palmer. All rights reserved.
|
||||||
@ -249,8 +249,7 @@ tcpOpenDialog(Device *devp)
|
|||||||
msgFatal("Cannot open TCP/IP dialog window!!");
|
msgFatal("Cannot open TCP/IP dialog window!!");
|
||||||
|
|
||||||
/* Say where our help comes from */
|
/* Say where our help comes from */
|
||||||
systemHelpFile(TCP_HELPFILE, help);
|
use_helpfile(systemHelpFile(TCP_HELPFILE, help));
|
||||||
use_helpfile(help);
|
|
||||||
|
|
||||||
/* Setup a nice screen for us to splat stuff onto */
|
/* Setup a nice screen for us to splat stuff onto */
|
||||||
draw_box(ds_win, TCP_DIALOG_Y, TCP_DIALOG_X, TCP_DIALOG_HEIGHT, TCP_DIALOG_WIDTH, dialog_attr, border_attr);
|
draw_box(ds_win, TCP_DIALOG_Y, TCP_DIALOG_X, TCP_DIALOG_HEIGHT, TCP_DIALOG_WIDTH, dialog_attr, border_attr);
|
||||||
|
Loading…
Reference in New Issue
Block a user