MF22: installEnvironment() fix, reshuffle, vidcontrol on correct vty.

This commit is contained in:
Jordan K. Hubbard 1998-03-10 13:42:05 +00:00
parent f380a4f2e1
commit beb1c32dd3
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=34466
11 changed files with 78 additions and 62 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.205 1998/02/10 18:31:24 jkh Exp $
* $Id: install.c,v 1.206 1998/03/09 15:00:56 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -223,17 +223,16 @@ installInitial(void)
msgConfirm("Couldn't make filesystems properly. Aborting.");
return DITEM_FAILURE;
}
else if (isDebug())
msgDebug("installInitial: Scribbled successfully on the disk(s)\n");
if (!copySelf()) {
msgConfirm("Couldn't clone the boot floppy onto the root file system.\n"
"Aborting.");
msgConfirm("installInitial: Couldn't clone the boot floppy onto the\n"
"root file system. Aborting!");
return DITEM_FAILURE;
}
if (chroot("/mnt") == -1) {
msgConfirm("Unable to chroot to %s - this is bad!", "/mnt");
msgConfirm("installInitial: Unable to chroot to %s - this is bad!",
"/mnt");
return DITEM_FAILURE;
}
@ -704,6 +703,9 @@ try_media:
if (need_bin && !(Dists & DIST_BIN))
i = installFixup(self);
}
/* When running as init, *now* it's safe to grab the rc.foo vars */
installEnvironment();
variable_set2(SYSTEM_STATE, DITEM_STATUS(i) == DITEM_FAILURE ? "error-install" : "full-install");
return i | DITEM_RESTORE;

View File

@ -4,7 +4,7 @@
* This is probably the last attempt in the `sysinstall' line, the next
* generation being slated for what's essentially a complete rewrite.
*
* $Id: main.c,v 1.47 1997/09/16 18:57:09 jkh Exp $
* $Id: main.c,v 1.48 1998/02/22 09:54:17 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -67,7 +67,9 @@ main(int argc, char **argv)
/* Set default flag and variable values */
installVarDefaults(NULL);
installEnvironment();
/* only when multi-user is it reasonable to do this here */
if (!RunningAsInit)
installEnvironment();
if (argc > 1 && !strcmp(argv[1], "-fake")) {
variable_set2(VAR_DEBUG, "YES");

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: menus.c,v 1.157 1998/03/09 15:01:02 jkh Exp $
* $Id: menus.c,v 1.158 1998/03/10 02:37:29 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -1130,21 +1130,21 @@ DMenu MenuConfigure = {
NULL, dmenuSubmenu, NULL, &MenuStartup },
{ "8 Options", "View/Set various installation options",
NULL, optionsEditor },
{ "9 Packages", "Install pre-packaged software for FreeBSD",
{ "9 Distributions", "Install additional distribution sets",
NULL, distExtractAll },
{ "P Packages", "Install pre-packaged software for FreeBSD",
NULL, configPackages },
{ "A Root Password", "Set the system manager's password",
{ "R Root Password", "Set the system manager's password",
NULL, dmenuSystemCommand, NULL, "passwd root" },
{ "B HTML Docs", "Go to the HTML documentation menu (post-install)",
{ "D HTML Docs", "Go to the HTML documentation menu (post-install)",
NULL, docBrowser },
{ "X XFree86", "Configure XFree86",
NULL, configXEnvironment },
{ "D Distributions", "Install additional distribution sets",
NULL, distExtractAll },
{ "L Label", "The disk Label editor",
NULL, diskLabelEditor },
{ "P Partition", "The disk Slice (PC-style partition) Editor",
{ "F Fdisk", "The disk Slice (PC-style partition) Editor",
NULL, diskPartitionEditor },
{ "R Register", "Register yourself or company as a FreeBSD user.", NULL, configRegister },
{ "U Register", "Register yourself or company as a FreeBSD user.", NULL, configRegister },
{ "E Exit", "Exit this menu (returning to previous)",
NULL, dmenuExit },
{ NULL } },

View File

@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id$
* $Id: mouse.c,v 1.1 1998/03/07 08:59:28 jkh Exp $
*/
#include "sysinstall.h"
@ -49,19 +49,21 @@ mousedTest(dialogMenuItem *self)
}
msgNotify("Trying to start the mouse daemon...");
vsystem("kill `cat /var/run/moused.pid`");
vsystem("vidcontrol -m on");
if (file_readable("/var/run/moused.pid"))
vsystem("kill `cat /var/run/moused.pid`");
systemExecute("vidcontrol -m on");
vsystem("moused -t %s -p %s", type, port);
ret = msgYesNo("Now move the mouse and see if it works.\n"
"(Note that buttons don't have any effect for now.)\n\n"
" Is the mouse cursor moving?\n");
if (ret) {
vsystem("vidcontrol -m off");
vsystem("kill `cat /var/run/moused.pid`");
variable_set(VAR_MOUSED "=NO");
systemExecute("vidcontrol -m off");
if (file_readable("/var/run/moused.pid"))
vsystem("kill `cat /var/run/moused.pid`");
variable_set2(VAR_MOUSED, "NO");
} else {
variable_set(VAR_MOUSED "=YES");
variable_set2(VAR_MOUSED, "YES");
}
return DITEM_SUCCESS;

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.205 1998/02/10 18:31:24 jkh Exp $
* $Id: install.c,v 1.206 1998/03/09 15:00:56 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -223,17 +223,16 @@ installInitial(void)
msgConfirm("Couldn't make filesystems properly. Aborting.");
return DITEM_FAILURE;
}
else if (isDebug())
msgDebug("installInitial: Scribbled successfully on the disk(s)\n");
if (!copySelf()) {
msgConfirm("Couldn't clone the boot floppy onto the root file system.\n"
"Aborting.");
msgConfirm("installInitial: Couldn't clone the boot floppy onto the\n"
"root file system. Aborting!");
return DITEM_FAILURE;
}
if (chroot("/mnt") == -1) {
msgConfirm("Unable to chroot to %s - this is bad!", "/mnt");
msgConfirm("installInitial: Unable to chroot to %s - this is bad!",
"/mnt");
return DITEM_FAILURE;
}
@ -704,6 +703,9 @@ try_media:
if (need_bin && !(Dists & DIST_BIN))
i = installFixup(self);
}
/* When running as init, *now* it's safe to grab the rc.foo vars */
installEnvironment();
variable_set2(SYSTEM_STATE, DITEM_STATUS(i) == DITEM_FAILURE ? "error-install" : "full-install");
return i | DITEM_RESTORE;

View File

@ -4,7 +4,7 @@
* This is probably the last attempt in the `sysinstall' line, the next
* generation being slated for what's essentially a complete rewrite.
*
* $Id: main.c,v 1.47 1997/09/16 18:57:09 jkh Exp $
* $Id: main.c,v 1.48 1998/02/22 09:54:17 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -67,7 +67,9 @@ main(int argc, char **argv)
/* Set default flag and variable values */
installVarDefaults(NULL);
installEnvironment();
/* only when multi-user is it reasonable to do this here */
if (!RunningAsInit)
installEnvironment();
if (argc > 1 && !strcmp(argv[1], "-fake")) {
variable_set2(VAR_DEBUG, "YES");

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: menus.c,v 1.157 1998/03/09 15:01:02 jkh Exp $
* $Id: menus.c,v 1.158 1998/03/10 02:37:29 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -1130,21 +1130,21 @@ DMenu MenuConfigure = {
NULL, dmenuSubmenu, NULL, &MenuStartup },
{ "8 Options", "View/Set various installation options",
NULL, optionsEditor },
{ "9 Packages", "Install pre-packaged software for FreeBSD",
{ "9 Distributions", "Install additional distribution sets",
NULL, distExtractAll },
{ "P Packages", "Install pre-packaged software for FreeBSD",
NULL, configPackages },
{ "A Root Password", "Set the system manager's password",
{ "R Root Password", "Set the system manager's password",
NULL, dmenuSystemCommand, NULL, "passwd root" },
{ "B HTML Docs", "Go to the HTML documentation menu (post-install)",
{ "D HTML Docs", "Go to the HTML documentation menu (post-install)",
NULL, docBrowser },
{ "X XFree86", "Configure XFree86",
NULL, configXEnvironment },
{ "D Distributions", "Install additional distribution sets",
NULL, distExtractAll },
{ "L Label", "The disk Label editor",
NULL, diskLabelEditor },
{ "P Partition", "The disk Slice (PC-style partition) Editor",
{ "F Fdisk", "The disk Slice (PC-style partition) Editor",
NULL, diskPartitionEditor },
{ "R Register", "Register yourself or company as a FreeBSD user.", NULL, configRegister },
{ "U Register", "Register yourself or company as a FreeBSD user.", NULL, configRegister },
{ "E Exit", "Exit this menu (returning to previous)",
NULL, dmenuExit },
{ NULL } },

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.205 1998/02/10 18:31:24 jkh Exp $
* $Id: install.c,v 1.206 1998/03/09 15:00:56 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -223,17 +223,16 @@ installInitial(void)
msgConfirm("Couldn't make filesystems properly. Aborting.");
return DITEM_FAILURE;
}
else if (isDebug())
msgDebug("installInitial: Scribbled successfully on the disk(s)\n");
if (!copySelf()) {
msgConfirm("Couldn't clone the boot floppy onto the root file system.\n"
"Aborting.");
msgConfirm("installInitial: Couldn't clone the boot floppy onto the\n"
"root file system. Aborting!");
return DITEM_FAILURE;
}
if (chroot("/mnt") == -1) {
msgConfirm("Unable to chroot to %s - this is bad!", "/mnt");
msgConfirm("installInitial: Unable to chroot to %s - this is bad!",
"/mnt");
return DITEM_FAILURE;
}
@ -704,6 +703,9 @@ try_media:
if (need_bin && !(Dists & DIST_BIN))
i = installFixup(self);
}
/* When running as init, *now* it's safe to grab the rc.foo vars */
installEnvironment();
variable_set2(SYSTEM_STATE, DITEM_STATUS(i) == DITEM_FAILURE ? "error-install" : "full-install");
return i | DITEM_RESTORE;

View File

@ -4,7 +4,7 @@
* This is probably the last attempt in the `sysinstall' line, the next
* generation being slated for what's essentially a complete rewrite.
*
* $Id: main.c,v 1.47 1997/09/16 18:57:09 jkh Exp $
* $Id: main.c,v 1.48 1998/02/22 09:54:17 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -67,7 +67,9 @@ main(int argc, char **argv)
/* Set default flag and variable values */
installVarDefaults(NULL);
installEnvironment();
/* only when multi-user is it reasonable to do this here */
if (!RunningAsInit)
installEnvironment();
if (argc > 1 && !strcmp(argv[1], "-fake")) {
variable_set2(VAR_DEBUG, "YES");

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: menus.c,v 1.157 1998/03/09 15:01:02 jkh Exp $
* $Id: menus.c,v 1.158 1998/03/10 02:37:29 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -1130,21 +1130,21 @@ DMenu MenuConfigure = {
NULL, dmenuSubmenu, NULL, &MenuStartup },
{ "8 Options", "View/Set various installation options",
NULL, optionsEditor },
{ "9 Packages", "Install pre-packaged software for FreeBSD",
{ "9 Distributions", "Install additional distribution sets",
NULL, distExtractAll },
{ "P Packages", "Install pre-packaged software for FreeBSD",
NULL, configPackages },
{ "A Root Password", "Set the system manager's password",
{ "R Root Password", "Set the system manager's password",
NULL, dmenuSystemCommand, NULL, "passwd root" },
{ "B HTML Docs", "Go to the HTML documentation menu (post-install)",
{ "D HTML Docs", "Go to the HTML documentation menu (post-install)",
NULL, docBrowser },
{ "X XFree86", "Configure XFree86",
NULL, configXEnvironment },
{ "D Distributions", "Install additional distribution sets",
NULL, distExtractAll },
{ "L Label", "The disk Label editor",
NULL, diskLabelEditor },
{ "P Partition", "The disk Slice (PC-style partition) Editor",
{ "F Fdisk", "The disk Slice (PC-style partition) Editor",
NULL, diskPartitionEditor },
{ "R Register", "Register yourself or company as a FreeBSD user.", NULL, configRegister },
{ "U Register", "Register yourself or company as a FreeBSD user.", NULL, configRegister },
{ "E Exit", "Exit this menu (returning to previous)",
NULL, dmenuExit },
{ NULL } },

View File

@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id$
* $Id: mouse.c,v 1.1 1998/03/07 08:59:28 jkh Exp $
*/
#include "sysinstall.h"
@ -49,19 +49,21 @@ mousedTest(dialogMenuItem *self)
}
msgNotify("Trying to start the mouse daemon...");
vsystem("kill `cat /var/run/moused.pid`");
vsystem("vidcontrol -m on");
if (file_readable("/var/run/moused.pid"))
vsystem("kill `cat /var/run/moused.pid`");
systemExecute("vidcontrol -m on");
vsystem("moused -t %s -p %s", type, port);
ret = msgYesNo("Now move the mouse and see if it works.\n"
"(Note that buttons don't have any effect for now.)\n\n"
" Is the mouse cursor moving?\n");
if (ret) {
vsystem("vidcontrol -m off");
vsystem("kill `cat /var/run/moused.pid`");
variable_set(VAR_MOUSED "=NO");
systemExecute("vidcontrol -m off");
if (file_readable("/var/run/moused.pid"))
vsystem("kill `cat /var/run/moused.pid`");
variable_set2(VAR_MOUSED, "NO");
} else {
variable_set(VAR_MOUSED "=YES");
variable_set2(VAR_MOUSED, "YES");
}
return DITEM_SUCCESS;