1. Don't check CHUNK_BSD_COMPAT for now; it always returns "no" and is

getting in the way of testing right now.
2. Call system() on commands, not vsystem().  No need for vsystem() here.
3. Add a path for the shell.
This commit is contained in:
Jordan K. Hubbard 1995-05-11 09:01:35 +00:00
parent 8a5f152db3
commit 59927d47cf
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=8452
12 changed files with 66 additions and 33 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.10 1995/05/07 23:37:33 jkh Exp $
* $Id: command.c,v 1.1 1995/05/08 06:08:27 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -113,12 +113,14 @@ command_sort(void)
void
command_execute(void)
{
int i, j;
int i, j, ret;
for (i = 0; i < numCommands; i++) {
for (j = 0; j < commandStack[i]->ncmds; j++) {
msgNotify("Executing command: %s", commandStack[i]->cmds[j]);
(void)vsystem(commandStack[i]->cmds[j]);
ret = system(commandStack[i]->cmds[j]);
msgDebug("Command: %s returns status %d\n",
commandStack[i]->cmds[j], ret);
}
}
}

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: disks.c,v 1.15 1995/05/10 09:25:49 jkh Exp $
* $Id: disks.c,v 1.16 1995/05/11 06:10:48 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -184,10 +184,12 @@ get_mountpoint(struct chunk *c)
msgConfirm("This region cannot be used for your root partition as\nit is past the 1024'th cylinder mark and the system would not be\nable to boot from it. Please pick another location for your\nroot partition and try again!");
return NULL;
}
#if 0 /* This never seems to be set */
else if (!(c->flags & CHUNK_BSD_COMPAT)) {
msgConfirm("This region cannot be used for your root partition as\nthe FreeBSD boot code cannot deal with a root partition created in\nsuch a region. Please choose another partition for this.");
return NULL;
}
#endif
else
c->flags |= CHUNK_IS_ROOT;
}

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.14 1995/05/11 06:10:51 jkh Exp $
* $Id: install.c,v 1.15 1995/05/11 06:47:44 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -187,11 +187,17 @@ make_filesystems(void)
if (tmp->newfs)
command_add(tmp->mountpoint,
"%s %s", tmp->newfs_cmd, c2->name);
command_add(tmp->mountpoint,
"mkdir -p /mnt/%s", tmp->mountpoint);
command_add(tmp->mountpoint,
"mount /mnt/dev/%s /mnt/%s", c2->name,
tmp->mountpoint);
if (strcmp(tmp->mountpoint, "/")) {
command_add(tmp->mountpoint,
"mkdir -p /mnt%s", tmp->mountpoint);
command_add(tmp->mountpoint,
"mount /mnt/dev/%s /mnt%s", c2->name,
tmp->mountpoint);
}
else
command_add(tmp->mountpoint,
"mount /mnt/dev/%s /mnt", c2->name);
}
c2 = c2->next;
}

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: system.c,v 1.8 1995/05/08 06:06:29 jkh Exp $
* $Id: system.c,v 1.9 1995/05/10 18:59:51 jkh Exp $
*
* Jordan Hubbard
*
@ -140,6 +140,7 @@ systemShellEscape(void)
msgWarn("No shell available, sorry!");
return 1;
}
setenv("PATH", "/stand", 1);
setenv("PS1", "freebsd% ", 1);
dialog_clear();
dialog_update();

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.10 1995/05/07 23:37:33 jkh Exp $
* $Id: command.c,v 1.1 1995/05/08 06:08:27 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -113,12 +113,14 @@ command_sort(void)
void
command_execute(void)
{
int i, j;
int i, j, ret;
for (i = 0; i < numCommands; i++) {
for (j = 0; j < commandStack[i]->ncmds; j++) {
msgNotify("Executing command: %s", commandStack[i]->cmds[j]);
(void)vsystem(commandStack[i]->cmds[j]);
ret = system(commandStack[i]->cmds[j]);
msgDebug("Command: %s returns status %d\n",
commandStack[i]->cmds[j], ret);
}
}
}

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: disks.c,v 1.15 1995/05/10 09:25:49 jkh Exp $
* $Id: disks.c,v 1.16 1995/05/11 06:10:48 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -184,10 +184,12 @@ get_mountpoint(struct chunk *c)
msgConfirm("This region cannot be used for your root partition as\nit is past the 1024'th cylinder mark and the system would not be\nable to boot from it. Please pick another location for your\nroot partition and try again!");
return NULL;
}
#if 0 /* This never seems to be set */
else if (!(c->flags & CHUNK_BSD_COMPAT)) {
msgConfirm("This region cannot be used for your root partition as\nthe FreeBSD boot code cannot deal with a root partition created in\nsuch a region. Please choose another partition for this.");
return NULL;
}
#endif
else
c->flags |= CHUNK_IS_ROOT;
}

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.14 1995/05/11 06:10:51 jkh Exp $
* $Id: install.c,v 1.15 1995/05/11 06:47:44 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -187,11 +187,17 @@ make_filesystems(void)
if (tmp->newfs)
command_add(tmp->mountpoint,
"%s %s", tmp->newfs_cmd, c2->name);
command_add(tmp->mountpoint,
"mkdir -p /mnt/%s", tmp->mountpoint);
command_add(tmp->mountpoint,
"mount /mnt/dev/%s /mnt/%s", c2->name,
tmp->mountpoint);
if (strcmp(tmp->mountpoint, "/")) {
command_add(tmp->mountpoint,
"mkdir -p /mnt%s", tmp->mountpoint);
command_add(tmp->mountpoint,
"mount /mnt/dev/%s /mnt%s", c2->name,
tmp->mountpoint);
}
else
command_add(tmp->mountpoint,
"mount /mnt/dev/%s /mnt", c2->name);
}
c2 = c2->next;
}

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: system.c,v 1.8 1995/05/08 06:06:29 jkh Exp $
* $Id: system.c,v 1.9 1995/05/10 18:59:51 jkh Exp $
*
* Jordan Hubbard
*
@ -140,6 +140,7 @@ systemShellEscape(void)
msgWarn("No shell available, sorry!");
return 1;
}
setenv("PATH", "/stand", 1);
setenv("PS1", "freebsd% ", 1);
dialog_clear();
dialog_update();

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.10 1995/05/07 23:37:33 jkh Exp $
* $Id: command.c,v 1.1 1995/05/08 06:08:27 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -113,12 +113,14 @@ command_sort(void)
void
command_execute(void)
{
int i, j;
int i, j, ret;
for (i = 0; i < numCommands; i++) {
for (j = 0; j < commandStack[i]->ncmds; j++) {
msgNotify("Executing command: %s", commandStack[i]->cmds[j]);
(void)vsystem(commandStack[i]->cmds[j]);
ret = system(commandStack[i]->cmds[j]);
msgDebug("Command: %s returns status %d\n",
commandStack[i]->cmds[j], ret);
}
}
}

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: disks.c,v 1.15 1995/05/10 09:25:49 jkh Exp $
* $Id: disks.c,v 1.16 1995/05/11 06:10:48 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -184,10 +184,12 @@ get_mountpoint(struct chunk *c)
msgConfirm("This region cannot be used for your root partition as\nit is past the 1024'th cylinder mark and the system would not be\nable to boot from it. Please pick another location for your\nroot partition and try again!");
return NULL;
}
#if 0 /* This never seems to be set */
else if (!(c->flags & CHUNK_BSD_COMPAT)) {
msgConfirm("This region cannot be used for your root partition as\nthe FreeBSD boot code cannot deal with a root partition created in\nsuch a region. Please choose another partition for this.");
return NULL;
}
#endif
else
c->flags |= CHUNK_IS_ROOT;
}

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.14 1995/05/11 06:10:51 jkh Exp $
* $Id: install.c,v 1.15 1995/05/11 06:47:44 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -187,11 +187,17 @@ make_filesystems(void)
if (tmp->newfs)
command_add(tmp->mountpoint,
"%s %s", tmp->newfs_cmd, c2->name);
command_add(tmp->mountpoint,
"mkdir -p /mnt/%s", tmp->mountpoint);
command_add(tmp->mountpoint,
"mount /mnt/dev/%s /mnt/%s", c2->name,
tmp->mountpoint);
if (strcmp(tmp->mountpoint, "/")) {
command_add(tmp->mountpoint,
"mkdir -p /mnt%s", tmp->mountpoint);
command_add(tmp->mountpoint,
"mount /mnt/dev/%s /mnt%s", c2->name,
tmp->mountpoint);
}
else
command_add(tmp->mountpoint,
"mount /mnt/dev/%s /mnt", c2->name);
}
c2 = c2->next;
}

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: system.c,v 1.8 1995/05/08 06:06:29 jkh Exp $
* $Id: system.c,v 1.9 1995/05/10 18:59:51 jkh Exp $
*
* Jordan Hubbard
*
@ -140,6 +140,7 @@ systemShellEscape(void)
msgWarn("No shell available, sorry!");
return 1;
}
setenv("PATH", "/stand", 1);
setenv("PS1", "freebsd% ", 1);
dialog_clear();
dialog_update();