mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-14 10:09:48 +00:00
1. Copy the boot floppy into /stand before extracting the CPIO floppy.
2. On Justin's advice, remind the user when they should switch back from the debugging screen, if they're looking over there.
This commit is contained in:
parent
deb139317a
commit
87b47edc82
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=8628
@ -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.28 1995/05/18 22:00:01 phk Exp $
|
||||
* $Id: install.c,v 1.29 1995/05/19 01:49:57 gpalmer Exp $
|
||||
*
|
||||
* Copyright (c) 1995
|
||||
* Jordan Hubbard. All rights reserved.
|
||||
@ -50,6 +50,7 @@
|
||||
Boolean SystemWasInstalled;
|
||||
|
||||
static void make_filesystems(void);
|
||||
static void copy_self(void);
|
||||
static void cpio_extract(void);
|
||||
static void install_configuration_files(void);
|
||||
static void do_final_setup(void);
|
||||
@ -126,6 +127,7 @@ installCommit(char *str)
|
||||
}
|
||||
}
|
||||
make_filesystems();
|
||||
copy_self();
|
||||
cpio_extract();
|
||||
distExtractAll();
|
||||
install_configuration_files();
|
||||
@ -188,6 +190,8 @@ make_filesystems(void)
|
||||
|| chdir("/mnt/dev")
|
||||
|| makedevs())
|
||||
msgConfirm("Failed to make some of the devices in /mnt!");
|
||||
if (Mkdir("/mnt/stand", NULL))
|
||||
msgConfirm("Unable to make /mnt/stand directory!");
|
||||
chdir("/");
|
||||
break;
|
||||
}
|
||||
@ -228,6 +232,19 @@ make_filesystems(void)
|
||||
command_execute();
|
||||
}
|
||||
|
||||
/* Copy the boot floppy contents into /stand */
|
||||
static void
|
||||
copy_self(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
msgNotify("Copying the boot floppy to /stand on root filesystem");
|
||||
chdir("/");
|
||||
i = vsystem("find -x . | cpio -pdmv /mnt/stand");
|
||||
if (i)
|
||||
msgConfirm("Copy returned error status of %d!", i);
|
||||
}
|
||||
|
||||
static void
|
||||
cpio_extract(void)
|
||||
{
|
||||
@ -254,7 +271,14 @@ cpio_extract(void)
|
||||
close(0); dup(pfd[0]); close(pfd[0]);
|
||||
close(CpioFD);
|
||||
close(pfd[1]);
|
||||
close(1); open("/dev/null", O_WRONLY);
|
||||
if (DebugFD != -1) {
|
||||
dup2(DebugFD, 1);
|
||||
dup2(DebugFD, 2);
|
||||
}
|
||||
else {
|
||||
close(1); open("/dev/null", O_WRONLY);
|
||||
dup2(1, 2);
|
||||
}
|
||||
chdir("/mnt");
|
||||
i = execl("/stand/cpio", "/stand/cpio", "-iduvm", 0);
|
||||
msgDebug("/stand/cpio command returns %d status\n", i);
|
||||
|
@ -4,7 +4,7 @@
|
||||
* This is probably the last program in the `sysinstall' line - the next
|
||||
* generation being essentially a complete rewrite.
|
||||
*
|
||||
* $Id: msg.c,v 1.12 1995/05/18 12:57:54 jkh Exp $
|
||||
* $Id: msg.c,v 1.13 1995/05/18 14:11:16 jkh Exp $
|
||||
*
|
||||
* Copyright (c) 1995
|
||||
* Jordan Hubbard. All rights reserved.
|
||||
@ -61,6 +61,8 @@ msgYap(char *fmt, ...)
|
||||
mvaddstr(23, 0, errstr);
|
||||
attrset(attrs);
|
||||
refresh();
|
||||
if (OnVTY)
|
||||
msgDebug("Informational message `%s'\n", errstr);
|
||||
free(errstr);
|
||||
}
|
||||
|
||||
@ -81,6 +83,8 @@ msgInfo(char *fmt, ...)
|
||||
mvaddstr(23, 0, errstr);
|
||||
attrset(attrs);
|
||||
refresh();
|
||||
if (OnVTY)
|
||||
msgDebug("Informational message `%s'\n", errstr);
|
||||
free(errstr);
|
||||
}
|
||||
|
||||
@ -103,6 +107,8 @@ msgWarn(char *fmt, ...)
|
||||
mvaddstr(23, 0, errstr);
|
||||
attrset(attrs);
|
||||
refresh();
|
||||
if (OnVTY)
|
||||
msgDebug("Warning message `%s'\n", errstr);
|
||||
free(errstr);
|
||||
}
|
||||
|
||||
@ -125,6 +131,8 @@ msgError(char *fmt, ...)
|
||||
mvaddstr(23, 0, errstr);
|
||||
attrset(attrs);
|
||||
refresh();
|
||||
if (OnVTY)
|
||||
msgDebug("Error message `%s'\n", errstr);
|
||||
free(errstr);
|
||||
}
|
||||
|
||||
@ -153,6 +161,8 @@ msgFatal(char *fmt, ...)
|
||||
addstr("QUIT");
|
||||
attrset(attrs);
|
||||
refresh();
|
||||
if (OnVTY)
|
||||
msgDebug("Fatal error `%s'!\n", errstr);
|
||||
free(errstr);
|
||||
getch();
|
||||
systemShutdown();
|
||||
@ -171,6 +181,8 @@ msgConfirm(char *fmt, ...)
|
||||
va_end(args);
|
||||
use_helpline(NULL);
|
||||
use_helpfile(NULL);
|
||||
if (OnVTY)
|
||||
msgDebug("User confirmation requested (type ALT-F1)\n");
|
||||
dialog_notify(errstr);
|
||||
free(errstr);
|
||||
}
|
||||
@ -189,7 +201,7 @@ msgNotify(char *fmt, ...)
|
||||
va_end(args);
|
||||
use_helpline(NULL);
|
||||
use_helpfile(NULL);
|
||||
msgDebug("[%s]\n", errstr);
|
||||
msgDebug("Notify: %s\n", errstr);
|
||||
w = dupwin(newscr);
|
||||
dialog_msgbox("Information Dialog", errstr, -1, -1, 0);
|
||||
touchwin(w);
|
||||
@ -214,11 +226,12 @@ msgYesNo(char *fmt, ...)
|
||||
use_helpline(NULL);
|
||||
use_helpfile(NULL);
|
||||
w = dupwin(newscr);
|
||||
if (OnVTY)
|
||||
msgDebug("User decision requested (type ALT-F1)\n");
|
||||
ret = dialog_yesno("User Confirmation Requested", errstr, -1, -1);
|
||||
touchwin(w);
|
||||
wrefresh(w);
|
||||
delwin(w);
|
||||
msgDebug("[User answers %s to \"%s\"]\n", ret ? "no" : "yes", errstr);
|
||||
free(errstr);
|
||||
return ret;
|
||||
}
|
||||
@ -244,11 +257,12 @@ msgGetInput(char *buf, char *fmt, ...)
|
||||
else
|
||||
input_buffer[0] = '\0';
|
||||
w = dupwin(newscr);
|
||||
if (OnVTY)
|
||||
msgDebug("User input requested (type ALT-F1)\n");
|
||||
rval = dialog_inputbox("Value Required", errstr, -1, -1, input_buffer);
|
||||
touchwin(w);
|
||||
wrefresh(w);
|
||||
delwin(w);
|
||||
msgDebug("[input request \"%s\" returns %d status]\n", errstr, rval);
|
||||
free(errstr);
|
||||
if (!rval)
|
||||
return input_buffer;
|
||||
|
@ -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.28 1995/05/18 22:00:01 phk Exp $
|
||||
* $Id: install.c,v 1.29 1995/05/19 01:49:57 gpalmer Exp $
|
||||
*
|
||||
* Copyright (c) 1995
|
||||
* Jordan Hubbard. All rights reserved.
|
||||
@ -50,6 +50,7 @@
|
||||
Boolean SystemWasInstalled;
|
||||
|
||||
static void make_filesystems(void);
|
||||
static void copy_self(void);
|
||||
static void cpio_extract(void);
|
||||
static void install_configuration_files(void);
|
||||
static void do_final_setup(void);
|
||||
@ -126,6 +127,7 @@ installCommit(char *str)
|
||||
}
|
||||
}
|
||||
make_filesystems();
|
||||
copy_self();
|
||||
cpio_extract();
|
||||
distExtractAll();
|
||||
install_configuration_files();
|
||||
@ -188,6 +190,8 @@ make_filesystems(void)
|
||||
|| chdir("/mnt/dev")
|
||||
|| makedevs())
|
||||
msgConfirm("Failed to make some of the devices in /mnt!");
|
||||
if (Mkdir("/mnt/stand", NULL))
|
||||
msgConfirm("Unable to make /mnt/stand directory!");
|
||||
chdir("/");
|
||||
break;
|
||||
}
|
||||
@ -228,6 +232,19 @@ make_filesystems(void)
|
||||
command_execute();
|
||||
}
|
||||
|
||||
/* Copy the boot floppy contents into /stand */
|
||||
static void
|
||||
copy_self(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
msgNotify("Copying the boot floppy to /stand on root filesystem");
|
||||
chdir("/");
|
||||
i = vsystem("find -x . | cpio -pdmv /mnt/stand");
|
||||
if (i)
|
||||
msgConfirm("Copy returned error status of %d!", i);
|
||||
}
|
||||
|
||||
static void
|
||||
cpio_extract(void)
|
||||
{
|
||||
@ -254,7 +271,14 @@ cpio_extract(void)
|
||||
close(0); dup(pfd[0]); close(pfd[0]);
|
||||
close(CpioFD);
|
||||
close(pfd[1]);
|
||||
close(1); open("/dev/null", O_WRONLY);
|
||||
if (DebugFD != -1) {
|
||||
dup2(DebugFD, 1);
|
||||
dup2(DebugFD, 2);
|
||||
}
|
||||
else {
|
||||
close(1); open("/dev/null", O_WRONLY);
|
||||
dup2(1, 2);
|
||||
}
|
||||
chdir("/mnt");
|
||||
i = execl("/stand/cpio", "/stand/cpio", "-iduvm", 0);
|
||||
msgDebug("/stand/cpio command returns %d status\n", i);
|
||||
|
@ -4,7 +4,7 @@
|
||||
* This is probably the last program in the `sysinstall' line - the next
|
||||
* generation being essentially a complete rewrite.
|
||||
*
|
||||
* $Id: msg.c,v 1.12 1995/05/18 12:57:54 jkh Exp $
|
||||
* $Id: msg.c,v 1.13 1995/05/18 14:11:16 jkh Exp $
|
||||
*
|
||||
* Copyright (c) 1995
|
||||
* Jordan Hubbard. All rights reserved.
|
||||
@ -61,6 +61,8 @@ msgYap(char *fmt, ...)
|
||||
mvaddstr(23, 0, errstr);
|
||||
attrset(attrs);
|
||||
refresh();
|
||||
if (OnVTY)
|
||||
msgDebug("Informational message `%s'\n", errstr);
|
||||
free(errstr);
|
||||
}
|
||||
|
||||
@ -81,6 +83,8 @@ msgInfo(char *fmt, ...)
|
||||
mvaddstr(23, 0, errstr);
|
||||
attrset(attrs);
|
||||
refresh();
|
||||
if (OnVTY)
|
||||
msgDebug("Informational message `%s'\n", errstr);
|
||||
free(errstr);
|
||||
}
|
||||
|
||||
@ -103,6 +107,8 @@ msgWarn(char *fmt, ...)
|
||||
mvaddstr(23, 0, errstr);
|
||||
attrset(attrs);
|
||||
refresh();
|
||||
if (OnVTY)
|
||||
msgDebug("Warning message `%s'\n", errstr);
|
||||
free(errstr);
|
||||
}
|
||||
|
||||
@ -125,6 +131,8 @@ msgError(char *fmt, ...)
|
||||
mvaddstr(23, 0, errstr);
|
||||
attrset(attrs);
|
||||
refresh();
|
||||
if (OnVTY)
|
||||
msgDebug("Error message `%s'\n", errstr);
|
||||
free(errstr);
|
||||
}
|
||||
|
||||
@ -153,6 +161,8 @@ msgFatal(char *fmt, ...)
|
||||
addstr("QUIT");
|
||||
attrset(attrs);
|
||||
refresh();
|
||||
if (OnVTY)
|
||||
msgDebug("Fatal error `%s'!\n", errstr);
|
||||
free(errstr);
|
||||
getch();
|
||||
systemShutdown();
|
||||
@ -171,6 +181,8 @@ msgConfirm(char *fmt, ...)
|
||||
va_end(args);
|
||||
use_helpline(NULL);
|
||||
use_helpfile(NULL);
|
||||
if (OnVTY)
|
||||
msgDebug("User confirmation requested (type ALT-F1)\n");
|
||||
dialog_notify(errstr);
|
||||
free(errstr);
|
||||
}
|
||||
@ -189,7 +201,7 @@ msgNotify(char *fmt, ...)
|
||||
va_end(args);
|
||||
use_helpline(NULL);
|
||||
use_helpfile(NULL);
|
||||
msgDebug("[%s]\n", errstr);
|
||||
msgDebug("Notify: %s\n", errstr);
|
||||
w = dupwin(newscr);
|
||||
dialog_msgbox("Information Dialog", errstr, -1, -1, 0);
|
||||
touchwin(w);
|
||||
@ -214,11 +226,12 @@ msgYesNo(char *fmt, ...)
|
||||
use_helpline(NULL);
|
||||
use_helpfile(NULL);
|
||||
w = dupwin(newscr);
|
||||
if (OnVTY)
|
||||
msgDebug("User decision requested (type ALT-F1)\n");
|
||||
ret = dialog_yesno("User Confirmation Requested", errstr, -1, -1);
|
||||
touchwin(w);
|
||||
wrefresh(w);
|
||||
delwin(w);
|
||||
msgDebug("[User answers %s to \"%s\"]\n", ret ? "no" : "yes", errstr);
|
||||
free(errstr);
|
||||
return ret;
|
||||
}
|
||||
@ -244,11 +257,12 @@ msgGetInput(char *buf, char *fmt, ...)
|
||||
else
|
||||
input_buffer[0] = '\0';
|
||||
w = dupwin(newscr);
|
||||
if (OnVTY)
|
||||
msgDebug("User input requested (type ALT-F1)\n");
|
||||
rval = dialog_inputbox("Value Required", errstr, -1, -1, input_buffer);
|
||||
touchwin(w);
|
||||
wrefresh(w);
|
||||
delwin(w);
|
||||
msgDebug("[input request \"%s\" returns %d status]\n", errstr, rval);
|
||||
free(errstr);
|
||||
if (!rval)
|
||||
return input_buffer;
|
||||
|
@ -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.28 1995/05/18 22:00:01 phk Exp $
|
||||
* $Id: install.c,v 1.29 1995/05/19 01:49:57 gpalmer Exp $
|
||||
*
|
||||
* Copyright (c) 1995
|
||||
* Jordan Hubbard. All rights reserved.
|
||||
@ -50,6 +50,7 @@
|
||||
Boolean SystemWasInstalled;
|
||||
|
||||
static void make_filesystems(void);
|
||||
static void copy_self(void);
|
||||
static void cpio_extract(void);
|
||||
static void install_configuration_files(void);
|
||||
static void do_final_setup(void);
|
||||
@ -126,6 +127,7 @@ installCommit(char *str)
|
||||
}
|
||||
}
|
||||
make_filesystems();
|
||||
copy_self();
|
||||
cpio_extract();
|
||||
distExtractAll();
|
||||
install_configuration_files();
|
||||
@ -188,6 +190,8 @@ make_filesystems(void)
|
||||
|| chdir("/mnt/dev")
|
||||
|| makedevs())
|
||||
msgConfirm("Failed to make some of the devices in /mnt!");
|
||||
if (Mkdir("/mnt/stand", NULL))
|
||||
msgConfirm("Unable to make /mnt/stand directory!");
|
||||
chdir("/");
|
||||
break;
|
||||
}
|
||||
@ -228,6 +232,19 @@ make_filesystems(void)
|
||||
command_execute();
|
||||
}
|
||||
|
||||
/* Copy the boot floppy contents into /stand */
|
||||
static void
|
||||
copy_self(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
msgNotify("Copying the boot floppy to /stand on root filesystem");
|
||||
chdir("/");
|
||||
i = vsystem("find -x . | cpio -pdmv /mnt/stand");
|
||||
if (i)
|
||||
msgConfirm("Copy returned error status of %d!", i);
|
||||
}
|
||||
|
||||
static void
|
||||
cpio_extract(void)
|
||||
{
|
||||
@ -254,7 +271,14 @@ cpio_extract(void)
|
||||
close(0); dup(pfd[0]); close(pfd[0]);
|
||||
close(CpioFD);
|
||||
close(pfd[1]);
|
||||
close(1); open("/dev/null", O_WRONLY);
|
||||
if (DebugFD != -1) {
|
||||
dup2(DebugFD, 1);
|
||||
dup2(DebugFD, 2);
|
||||
}
|
||||
else {
|
||||
close(1); open("/dev/null", O_WRONLY);
|
||||
dup2(1, 2);
|
||||
}
|
||||
chdir("/mnt");
|
||||
i = execl("/stand/cpio", "/stand/cpio", "-iduvm", 0);
|
||||
msgDebug("/stand/cpio command returns %d status\n", i);
|
||||
|
@ -4,7 +4,7 @@
|
||||
* This is probably the last program in the `sysinstall' line - the next
|
||||
* generation being essentially a complete rewrite.
|
||||
*
|
||||
* $Id: msg.c,v 1.12 1995/05/18 12:57:54 jkh Exp $
|
||||
* $Id: msg.c,v 1.13 1995/05/18 14:11:16 jkh Exp $
|
||||
*
|
||||
* Copyright (c) 1995
|
||||
* Jordan Hubbard. All rights reserved.
|
||||
@ -61,6 +61,8 @@ msgYap(char *fmt, ...)
|
||||
mvaddstr(23, 0, errstr);
|
||||
attrset(attrs);
|
||||
refresh();
|
||||
if (OnVTY)
|
||||
msgDebug("Informational message `%s'\n", errstr);
|
||||
free(errstr);
|
||||
}
|
||||
|
||||
@ -81,6 +83,8 @@ msgInfo(char *fmt, ...)
|
||||
mvaddstr(23, 0, errstr);
|
||||
attrset(attrs);
|
||||
refresh();
|
||||
if (OnVTY)
|
||||
msgDebug("Informational message `%s'\n", errstr);
|
||||
free(errstr);
|
||||
}
|
||||
|
||||
@ -103,6 +107,8 @@ msgWarn(char *fmt, ...)
|
||||
mvaddstr(23, 0, errstr);
|
||||
attrset(attrs);
|
||||
refresh();
|
||||
if (OnVTY)
|
||||
msgDebug("Warning message `%s'\n", errstr);
|
||||
free(errstr);
|
||||
}
|
||||
|
||||
@ -125,6 +131,8 @@ msgError(char *fmt, ...)
|
||||
mvaddstr(23, 0, errstr);
|
||||
attrset(attrs);
|
||||
refresh();
|
||||
if (OnVTY)
|
||||
msgDebug("Error message `%s'\n", errstr);
|
||||
free(errstr);
|
||||
}
|
||||
|
||||
@ -153,6 +161,8 @@ msgFatal(char *fmt, ...)
|
||||
addstr("QUIT");
|
||||
attrset(attrs);
|
||||
refresh();
|
||||
if (OnVTY)
|
||||
msgDebug("Fatal error `%s'!\n", errstr);
|
||||
free(errstr);
|
||||
getch();
|
||||
systemShutdown();
|
||||
@ -171,6 +181,8 @@ msgConfirm(char *fmt, ...)
|
||||
va_end(args);
|
||||
use_helpline(NULL);
|
||||
use_helpfile(NULL);
|
||||
if (OnVTY)
|
||||
msgDebug("User confirmation requested (type ALT-F1)\n");
|
||||
dialog_notify(errstr);
|
||||
free(errstr);
|
||||
}
|
||||
@ -189,7 +201,7 @@ msgNotify(char *fmt, ...)
|
||||
va_end(args);
|
||||
use_helpline(NULL);
|
||||
use_helpfile(NULL);
|
||||
msgDebug("[%s]\n", errstr);
|
||||
msgDebug("Notify: %s\n", errstr);
|
||||
w = dupwin(newscr);
|
||||
dialog_msgbox("Information Dialog", errstr, -1, -1, 0);
|
||||
touchwin(w);
|
||||
@ -214,11 +226,12 @@ msgYesNo(char *fmt, ...)
|
||||
use_helpline(NULL);
|
||||
use_helpfile(NULL);
|
||||
w = dupwin(newscr);
|
||||
if (OnVTY)
|
||||
msgDebug("User decision requested (type ALT-F1)\n");
|
||||
ret = dialog_yesno("User Confirmation Requested", errstr, -1, -1);
|
||||
touchwin(w);
|
||||
wrefresh(w);
|
||||
delwin(w);
|
||||
msgDebug("[User answers %s to \"%s\"]\n", ret ? "no" : "yes", errstr);
|
||||
free(errstr);
|
||||
return ret;
|
||||
}
|
||||
@ -244,11 +257,12 @@ msgGetInput(char *buf, char *fmt, ...)
|
||||
else
|
||||
input_buffer[0] = '\0';
|
||||
w = dupwin(newscr);
|
||||
if (OnVTY)
|
||||
msgDebug("User input requested (type ALT-F1)\n");
|
||||
rval = dialog_inputbox("Value Required", errstr, -1, -1, input_buffer);
|
||||
touchwin(w);
|
||||
wrefresh(w);
|
||||
delwin(w);
|
||||
msgDebug("[input request \"%s\" returns %d status]\n", errstr, rval);
|
||||
free(errstr);
|
||||
if (!rval)
|
||||
return input_buffer;
|
||||
|
Loading…
Reference in New Issue
Block a user