o Make package matching for specific package loading use the Latest/

feature of packages now so that no version info is embedded.

o Add a default X desktop menu offering afterstep, enlightenment, KDE, GNOME
  and Windowmaker desktops instead of the boring twm(1) based one if the
  user so chooses.  This will require a little testing.
This commit is contained in:
Jordan K. Hubbard 1999-04-27 14:33:29 +00:00
parent 1c308b817a
commit 4d24621b10
19 changed files with 328 additions and 96 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: config.c,v 1.124 1999/02/14 21:35:01 jkh Exp $
* $Id: config.c,v 1.125 1999/04/24 01:53:53 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -448,8 +448,63 @@ configUsers(dialogMenuItem *self)
return DITEM_SUCCESS | DITEM_RESTORE;
}
static void
write_root_xprofile(char *str)
{
FILE *fp;
/* take care of both xdm and startx */
fp = fopen("/root/.xinitrc", "w");
if (fp) {
fwrite(str, 1, strlen(str), fp);
fclose(fp);
}
fp = fopen("/root/.xsession", "w");
if (fp) {
fwrite(str, 1, strlen(str), fp);
fclose(fp);
}
}
int
configXEnvironment(dialogMenuItem *self)
configXDesktop(dialogMenuItem *self)
{
char *desk;
int ret;
if (!dmenuOpenSimple(&MenuXDesktops, FALSE) ||
!(desk = variable_get(VAR_DESKSTYLE)))
return DITEM_FAILURE;
if (!strcmp(desk, "kde")) {
ret = package_add("@kde");
if (DITEM_STATUS(ret) != DITEM_FAILURE)
write_root_xprofile("exec startkde\n");
}
else if (!strcmp(desk, "gnome")) {
ret = package_add("@gnomecore");
if (DITEM_STATUS(ret) != DITEM_FAILURE)
write_root_xprofile("exec gnome-session\n");
}
else if (!strcmp(desk, "afterstep")) {
ret = package_add("@afterstep");
if (DITEM_STATUS(ret) != DITEM_FAILURE)
write_root_xprofile("xterm &\nexec afterstep\n");
}
else if (!strcmp(desk, "windowmaker")) {
ret = package_add("@windowmaker");
if (DITEM_STATUS(ret) != DITEM_FAILURE)
write_root_xprofile("xterm &\nexec windowmaker\n");
}
else if (!strcmp(desk, "enlightenment")) {
ret = package_add("@enlightenment");
if (DITEM_STATUS(ret) != DITEM_FAILURE)
write_root_xprofile("xterm &\nexec enlightenment\n");
}
return ret;
}
int
configXSetup(dialogMenuItem *self)
{
char *config, *execfile;
char *moused;
@ -489,6 +544,7 @@ tryagain:
systemExecute(execfile);
if (!file_readable("/etc/XF86Config") && !msgYesNo("The XFree86 configuration process seems to have\nfailed. Would you like to try again?"))
goto tryagain;
configXDesktop(self);
return DITEM_SUCCESS | DITEM_RESTORE;
}
else {
@ -572,7 +628,7 @@ configRouter(dialogMenuItem *self)
if (cp && strcmp(cp, "NO")) {
variable_set2(VAR_ROUTER_ENABLE, "YES", 1);
if (!strcmp(cp, "gated")) {
if (package_add(variable_get(VAR_GATED_PKG)) != DITEM_SUCCESS) {
if (package_add("@gated") != DITEM_SUCCESS) {
msgConfirm("Unable to load gated package. Falling back to no router.");
variable_unset(VAR_ROUTER);
variable_unset(VAR_ROUTERFLAGS);
@ -680,16 +736,12 @@ configPackages(dialogMenuItem *self)
int
configPCNFSD(dialogMenuItem *self)
{
int ret = DITEM_SUCCESS;
int ret;
if (variable_get(VAR_PCNFSD))
variable_unset(VAR_PCNFSD);
else {
ret = package_add(variable_get(VAR_PCNFSD_PKG));
if (DITEM_STATUS(ret) == DITEM_SUCCESS) {
variable_set2(VAR_PCNFSD, "YES", 0);
variable_set2("mountd_flags", "-n", 1);
}
ret = package_add("@pcnfsd");
if (DITEM_STATUS(ret) == DITEM_SUCCESS) {
variable_set2(VAR_PCNFSD, "YES", 0);
variable_set2("mountd_flags", "-n", 1);
}
return 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: dispatch.c,v 1.27 1999/02/05 22:15:48 jkh Exp $
* $Id: dispatch.c,v 1.28 1999/04/24 01:53:54 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -57,7 +57,8 @@ static struct _word {
{ "configPCNFSD", configPCNFSD },
{ "configPackages", configPackages },
{ "configUsers", configUsers },
{ "configXEnvironment", configXEnvironment },
{ "configXSetup", configXSetup },
{ "configXDesktop", configXDesktop },
{ "diskPartitionEditor", diskPartitionEditor },
{ "diskPartitionWrite", diskPartitionWrite },
{ "diskLabelEditor", diskLabelEditor },

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.230 1999/03/11 09:38:06 jkh Exp $
* $Id: install.c,v 1.231 1999/04/24 01:53:54 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -601,7 +601,7 @@ nodisks:
if (directory_exists("/usr/X11R6")) {
dialog_clear_norefresh();
if (!msgYesNo("Would you like to configure your X server at this time?"))
configXEnvironment(self);
configXSetup(self);
}
dialog_clear_norefresh();
@ -1046,13 +1046,11 @@ installVarDefaults(dialogMenuItem *self)
cp = "/usr/bin/ee";
variable_set2(VAR_EDITOR, cp, 0);
variable_set2(VAR_FTP_USER, "ftp", 0);
variable_set2(VAR_BROWSER_PACKAGE, "lynx", 0);
variable_set2(VAR_BROWSER_PACKAGE, "@lynx", 0);
variable_set2(VAR_BROWSER_BINARY, "/usr/local/bin/lynx", 0);
variable_set2(VAR_FTP_STATE, "passive", 0);
variable_set2(VAR_NFS_SECURE, "YES", 0);
variable_set2(VAR_PKG_TMPDIR, "/usr/tmp", 0);
variable_set2(VAR_GATED_PKG, "gated", 0);
variable_set2(VAR_PCNFSD_PKG, "pcnfsd", 0);
variable_set2(VAR_MEDIA_TIMEOUT, itoa(MEDIA_TIMEOUT), 0);
if (getpid() != 1)
variable_set2(SYSTEM_STATE, "update", 0);

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.194 1999/04/21 07:22:37 obrien Exp $
* $Id: menus.c,v 1.195 1999/04/24 01:53:54 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -446,6 +446,31 @@ DMenu MenuXF86Config = {
{ NULL } },
};
DMenu MenuXDesktops = {
DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
"Please select the default X desktop to use.",
"By default, XFree86 comes with a fairly vanilla desktop which\n"
"is based around the twm(1) window manager and does not offer\n"
"much in the way of features. It does have the advantage of\n"
"being a standard part of X so you don't need to load anything\n"
"extra in order to use it. If, however, you have access to a\n"
"reasonably full packages collection on your installation media,\n"
"you can choose any one of the following desktops as alternatives.",
NULL,
NULL,
{ { "Gnome", "The GNOME desktop environment.",
NULL, dmenuSetVariable, NULL, VAR_DESKSTYLE "=gnome" },
{ "KDE", "The K Desktop Environment.",
NULL, dmenuSetVariable, NULL, VAR_DESKSTYLE "=kde" },
{ "Afterstep", "The Afterstep Window manager",
NULL, dmenuSetVariable, NULL, VAR_DESKSTYLE "=afterstep" },
{ "Windowmaker", "The Windowmaker Window manager",
NULL, dmenuSetVariable, NULL, VAR_DESKSTYLE "=windowmaker" },
{ "Enlightenment","The E Window manager (24 bit recommended)",
NULL, dmenuSetVariable, NULL, VAR_DESKSTYLE "=enlightenment" },
{ NULL } },
};
DMenu MenuMediaCDROM = {
DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
"Choose a CDROM type",
@ -1165,7 +1190,7 @@ DMenu MenuConfigure = {
{ "D HTML Docs", "Go to the HTML documentation menu (post-install)",
NULL, docBrowser },
{ "X XFree86", "Configure XFree86",
NULL, configXEnvironment },
NULL, configXSetup },
{ "E Exit", "Exit this menu (returning to previous)",
NULL, dmenuExit },
{ NULL } },

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: options.c,v 1.57 1999/02/05 22:15:51 jkh Exp $
* $Id: options.c,v 1.58 1999/04/06 08:25:53 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -101,8 +101,6 @@ mediaCheck(Option opt)
#define PKG_PROMPT "Please specify a temporary directory with lots of free space:"
#define INSTROOT_PROMPT "Please specify a root directory if installing somewhere other than /"
#define TIMEOUT_PROMPT "Please specify the number of seconds to wait for slow media:"
#define GATED_PKG_PROMPT "Please specify the package name for the gated software:"
#define PCNFSD_PKG_PROMPT "Please specify the package name for the PCNFSD server:"
static Option Options[] = {
{ "NFS Secure", "NFS server talks only on a secure port",
@ -137,10 +135,6 @@ static Option Options[] = {
OPT_IS_VAR, TIMEOUT_PROMPT, VAR_MEDIA_TIMEOUT, varCheck },
{ "Package Temp", "The directory where package temporary files should go",
OPT_IS_VAR, PKG_PROMPT, VAR_PKG_TMPDIR, varCheck },
{ "Gated package", "The name of the gated package to install if requested",
OPT_IS_VAR, GATED_PKG_PROMPT, VAR_GATED_PKG, varCheck },
{ "PCNFSD package", "The name of the PCNFSD package to install if requested",
OPT_IS_VAR, PCNFSD_PKG_PROMPT, VAR_PCNFSD_PKG, varCheck },
{ "Re-scan Devices", "Re-run sysinstall's initial device probe",
OPT_IS_FUNC, deviceRescan },
{ "Use Defaults", "Reset all values to startup defaults",

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: package.c,v 1.65 1997/10/15 04:37:16 jkh Exp $
* $Id: package.c,v 1.66 1999/02/05 22:15:51 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -122,7 +122,12 @@ package_extract(Device *dev, char *name, Boolean depended)
Mkdir(variable_get(VAR_PKG_TMPDIR));
vsystem("chmod 1777 %s", variable_get(VAR_PKG_TMPDIR));
if (!index(name, '/'))
if (name[0] == '@') {
/* @ at the beginning of the package name means "get latest" */
name++;
sprintf(path, "packages/Latest/%s.tgz", name);
}
else if (!index(name, '/'))
sprintf(path, "packages/All/%s%s", name, strstr(name, ".tgz") ? "" : ".tgz");
else
sprintf(path, "%s%s", name, strstr(name, ".tgz") ? "" : ".tgz");

View File

@ -4,7 +4,7 @@
* This is probably the last attempt in the `sysinstall' line, the next
* generation being slated to essentially a complete rewrite.
*
* $Id: sysinstall.h,v 1.160 1999/04/06 08:25:53 jkh Exp $
* $Id: sysinstall.h,v 1.161 1999/04/24 01:53:55 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -88,6 +88,7 @@
#define VAR_BROWSER_PACKAGE "browserPackage"
#define VAR_CPIO_VERBOSITY "cpioVerbose"
#define VAR_DEBUG "debug"
#define VAR_DESKSTYLE "_deskStyle"
#define VAR_DISK "disk"
#define VAR_DISTS "dists"
#define VAR_DIST_MAIN "distMain"
@ -109,7 +110,6 @@
#define VAR_FTP_STATE "ftpState"
#define VAR_FTP_USER "ftpUser"
#define VAR_FTP_HOST "ftpHost"
#define VAR_GATED_PKG "gated_pkg"
#define VAR_GATEWAY "defaultrouter"
#define VAR_GEOMETRY "geometry"
#define VAR_HOSTNAME "hostname"
@ -144,7 +144,6 @@
#define VAR_PACKAGE "package"
#define VAR_PARTITION "partition"
#define VAR_PCNFSD "pcnfsd"
#define VAR_PCNFSD_PKG "pcnfsd_pkg"
#define VAR_PKG_TMPDIR "PKG_TMPDIR"
#define VAR_PORTS_PATH "ports"
#define VAR_RELNAME "releaseName"
@ -367,6 +366,7 @@ extern DMenu MenuSysconsScrnmap; /* System console screenmap configuration menu
extern DMenu MenuNetworking; /* Network configuration menu */
extern DMenu MenuInstallCustom; /* Custom Installation menu */
extern DMenu MenuDistributions; /* Distribution menu */
extern DMenu MenuDiskDevices; /* Disk type devices */
extern DMenu MenuSubDistributions; /* Custom distribution menu */
extern DMenu MenuDESDistributions; /* DES distribution menu */
extern DMenu MenuSrcDistributions; /* Source distribution menu */
@ -376,7 +376,8 @@ extern DMenu MenuXF86SelectCore; /* XFree86 core distribution menu */
extern DMenu MenuXF86SelectServer; /* XFree86 server distribution menu */
extern DMenu MenuXF86SelectPC98Server; /* XFree86 server distribution menu */
extern DMenu MenuXF86SelectFonts; /* XFree86 font selection menu */
extern DMenu MenuDiskDevices; /* Disk devices menu */
extern DMenu MenuXF86SelectFonts; /* XFree86 font selection menu */
extern DMenu MenuXDesktops; /* Disk devices menu */
extern DMenu MenuHTMLDoc; /* HTML Documentation menu */
extern DMenu MenuUsermgmt; /* User management menu */
extern DMenu MenuFixit; /* Fixit floppy/CDROM/shell menu */
@ -415,7 +416,8 @@ extern int configSaver(dialogMenuItem *self);
extern int configSaverTimeout(dialogMenuItem *self);
extern int configNTP(dialogMenuItem *self);
extern int configUsers(dialogMenuItem *self);
extern int configXEnvironment(dialogMenuItem *self);
extern int configXSetup(dialogMenuItem *self);
extern int configXDesktop(dialogMenuItem *self);
extern int configRouter(dialogMenuItem *self);
extern int configPCNFSD(dialogMenuItem *self);
extern int configNFSServer(dialogMenuItem *self);

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: config.c,v 1.124 1999/02/14 21:35:01 jkh Exp $
* $Id: config.c,v 1.125 1999/04/24 01:53:53 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -448,8 +448,63 @@ configUsers(dialogMenuItem *self)
return DITEM_SUCCESS | DITEM_RESTORE;
}
static void
write_root_xprofile(char *str)
{
FILE *fp;
/* take care of both xdm and startx */
fp = fopen("/root/.xinitrc", "w");
if (fp) {
fwrite(str, 1, strlen(str), fp);
fclose(fp);
}
fp = fopen("/root/.xsession", "w");
if (fp) {
fwrite(str, 1, strlen(str), fp);
fclose(fp);
}
}
int
configXEnvironment(dialogMenuItem *self)
configXDesktop(dialogMenuItem *self)
{
char *desk;
int ret;
if (!dmenuOpenSimple(&MenuXDesktops, FALSE) ||
!(desk = variable_get(VAR_DESKSTYLE)))
return DITEM_FAILURE;
if (!strcmp(desk, "kde")) {
ret = package_add("@kde");
if (DITEM_STATUS(ret) != DITEM_FAILURE)
write_root_xprofile("exec startkde\n");
}
else if (!strcmp(desk, "gnome")) {
ret = package_add("@gnomecore");
if (DITEM_STATUS(ret) != DITEM_FAILURE)
write_root_xprofile("exec gnome-session\n");
}
else if (!strcmp(desk, "afterstep")) {
ret = package_add("@afterstep");
if (DITEM_STATUS(ret) != DITEM_FAILURE)
write_root_xprofile("xterm &\nexec afterstep\n");
}
else if (!strcmp(desk, "windowmaker")) {
ret = package_add("@windowmaker");
if (DITEM_STATUS(ret) != DITEM_FAILURE)
write_root_xprofile("xterm &\nexec windowmaker\n");
}
else if (!strcmp(desk, "enlightenment")) {
ret = package_add("@enlightenment");
if (DITEM_STATUS(ret) != DITEM_FAILURE)
write_root_xprofile("xterm &\nexec enlightenment\n");
}
return ret;
}
int
configXSetup(dialogMenuItem *self)
{
char *config, *execfile;
char *moused;
@ -489,6 +544,7 @@ tryagain:
systemExecute(execfile);
if (!file_readable("/etc/XF86Config") && !msgYesNo("The XFree86 configuration process seems to have\nfailed. Would you like to try again?"))
goto tryagain;
configXDesktop(self);
return DITEM_SUCCESS | DITEM_RESTORE;
}
else {
@ -572,7 +628,7 @@ configRouter(dialogMenuItem *self)
if (cp && strcmp(cp, "NO")) {
variable_set2(VAR_ROUTER_ENABLE, "YES", 1);
if (!strcmp(cp, "gated")) {
if (package_add(variable_get(VAR_GATED_PKG)) != DITEM_SUCCESS) {
if (package_add("@gated") != DITEM_SUCCESS) {
msgConfirm("Unable to load gated package. Falling back to no router.");
variable_unset(VAR_ROUTER);
variable_unset(VAR_ROUTERFLAGS);
@ -680,16 +736,12 @@ configPackages(dialogMenuItem *self)
int
configPCNFSD(dialogMenuItem *self)
{
int ret = DITEM_SUCCESS;
int ret;
if (variable_get(VAR_PCNFSD))
variable_unset(VAR_PCNFSD);
else {
ret = package_add(variable_get(VAR_PCNFSD_PKG));
if (DITEM_STATUS(ret) == DITEM_SUCCESS) {
variable_set2(VAR_PCNFSD, "YES", 0);
variable_set2("mountd_flags", "-n", 1);
}
ret = package_add("@pcnfsd");
if (DITEM_STATUS(ret) == DITEM_SUCCESS) {
variable_set2(VAR_PCNFSD, "YES", 0);
variable_set2("mountd_flags", "-n", 1);
}
return 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: dispatch.c,v 1.27 1999/02/05 22:15:48 jkh Exp $
* $Id: dispatch.c,v 1.28 1999/04/24 01:53:54 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -57,7 +57,8 @@ static struct _word {
{ "configPCNFSD", configPCNFSD },
{ "configPackages", configPackages },
{ "configUsers", configUsers },
{ "configXEnvironment", configXEnvironment },
{ "configXSetup", configXSetup },
{ "configXDesktop", configXDesktop },
{ "diskPartitionEditor", diskPartitionEditor },
{ "diskPartitionWrite", diskPartitionWrite },
{ "diskLabelEditor", diskLabelEditor },

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.230 1999/03/11 09:38:06 jkh Exp $
* $Id: install.c,v 1.231 1999/04/24 01:53:54 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -601,7 +601,7 @@ nodisks:
if (directory_exists("/usr/X11R6")) {
dialog_clear_norefresh();
if (!msgYesNo("Would you like to configure your X server at this time?"))
configXEnvironment(self);
configXSetup(self);
}
dialog_clear_norefresh();
@ -1046,13 +1046,11 @@ installVarDefaults(dialogMenuItem *self)
cp = "/usr/bin/ee";
variable_set2(VAR_EDITOR, cp, 0);
variable_set2(VAR_FTP_USER, "ftp", 0);
variable_set2(VAR_BROWSER_PACKAGE, "lynx", 0);
variable_set2(VAR_BROWSER_PACKAGE, "@lynx", 0);
variable_set2(VAR_BROWSER_BINARY, "/usr/local/bin/lynx", 0);
variable_set2(VAR_FTP_STATE, "passive", 0);
variable_set2(VAR_NFS_SECURE, "YES", 0);
variable_set2(VAR_PKG_TMPDIR, "/usr/tmp", 0);
variable_set2(VAR_GATED_PKG, "gated", 0);
variable_set2(VAR_PCNFSD_PKG, "pcnfsd", 0);
variable_set2(VAR_MEDIA_TIMEOUT, itoa(MEDIA_TIMEOUT), 0);
if (getpid() != 1)
variable_set2(SYSTEM_STATE, "update", 0);

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.194 1999/04/21 07:22:37 obrien Exp $
* $Id: menus.c,v 1.195 1999/04/24 01:53:54 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -446,6 +446,31 @@ DMenu MenuXF86Config = {
{ NULL } },
};
DMenu MenuXDesktops = {
DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
"Please select the default X desktop to use.",
"By default, XFree86 comes with a fairly vanilla desktop which\n"
"is based around the twm(1) window manager and does not offer\n"
"much in the way of features. It does have the advantage of\n"
"being a standard part of X so you don't need to load anything\n"
"extra in order to use it. If, however, you have access to a\n"
"reasonably full packages collection on your installation media,\n"
"you can choose any one of the following desktops as alternatives.",
NULL,
NULL,
{ { "Gnome", "The GNOME desktop environment.",
NULL, dmenuSetVariable, NULL, VAR_DESKSTYLE "=gnome" },
{ "KDE", "The K Desktop Environment.",
NULL, dmenuSetVariable, NULL, VAR_DESKSTYLE "=kde" },
{ "Afterstep", "The Afterstep Window manager",
NULL, dmenuSetVariable, NULL, VAR_DESKSTYLE "=afterstep" },
{ "Windowmaker", "The Windowmaker Window manager",
NULL, dmenuSetVariable, NULL, VAR_DESKSTYLE "=windowmaker" },
{ "Enlightenment","The E Window manager (24 bit recommended)",
NULL, dmenuSetVariable, NULL, VAR_DESKSTYLE "=enlightenment" },
{ NULL } },
};
DMenu MenuMediaCDROM = {
DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
"Choose a CDROM type",
@ -1165,7 +1190,7 @@ DMenu MenuConfigure = {
{ "D HTML Docs", "Go to the HTML documentation menu (post-install)",
NULL, docBrowser },
{ "X XFree86", "Configure XFree86",
NULL, configXEnvironment },
NULL, configXSetup },
{ "E Exit", "Exit this menu (returning to previous)",
NULL, dmenuExit },
{ NULL } },

View File

@ -4,7 +4,7 @@
* This is probably the last attempt in the `sysinstall' line, the next
* generation being slated to essentially a complete rewrite.
*
* $Id: sysinstall.h,v 1.160 1999/04/06 08:25:53 jkh Exp $
* $Id: sysinstall.h,v 1.161 1999/04/24 01:53:55 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -88,6 +88,7 @@
#define VAR_BROWSER_PACKAGE "browserPackage"
#define VAR_CPIO_VERBOSITY "cpioVerbose"
#define VAR_DEBUG "debug"
#define VAR_DESKSTYLE "_deskStyle"
#define VAR_DISK "disk"
#define VAR_DISTS "dists"
#define VAR_DIST_MAIN "distMain"
@ -109,7 +110,6 @@
#define VAR_FTP_STATE "ftpState"
#define VAR_FTP_USER "ftpUser"
#define VAR_FTP_HOST "ftpHost"
#define VAR_GATED_PKG "gated_pkg"
#define VAR_GATEWAY "defaultrouter"
#define VAR_GEOMETRY "geometry"
#define VAR_HOSTNAME "hostname"
@ -144,7 +144,6 @@
#define VAR_PACKAGE "package"
#define VAR_PARTITION "partition"
#define VAR_PCNFSD "pcnfsd"
#define VAR_PCNFSD_PKG "pcnfsd_pkg"
#define VAR_PKG_TMPDIR "PKG_TMPDIR"
#define VAR_PORTS_PATH "ports"
#define VAR_RELNAME "releaseName"
@ -367,6 +366,7 @@ extern DMenu MenuSysconsScrnmap; /* System console screenmap configuration menu
extern DMenu MenuNetworking; /* Network configuration menu */
extern DMenu MenuInstallCustom; /* Custom Installation menu */
extern DMenu MenuDistributions; /* Distribution menu */
extern DMenu MenuDiskDevices; /* Disk type devices */
extern DMenu MenuSubDistributions; /* Custom distribution menu */
extern DMenu MenuDESDistributions; /* DES distribution menu */
extern DMenu MenuSrcDistributions; /* Source distribution menu */
@ -376,7 +376,8 @@ extern DMenu MenuXF86SelectCore; /* XFree86 core distribution menu */
extern DMenu MenuXF86SelectServer; /* XFree86 server distribution menu */
extern DMenu MenuXF86SelectPC98Server; /* XFree86 server distribution menu */
extern DMenu MenuXF86SelectFonts; /* XFree86 font selection menu */
extern DMenu MenuDiskDevices; /* Disk devices menu */
extern DMenu MenuXF86SelectFonts; /* XFree86 font selection menu */
extern DMenu MenuXDesktops; /* Disk devices menu */
extern DMenu MenuHTMLDoc; /* HTML Documentation menu */
extern DMenu MenuUsermgmt; /* User management menu */
extern DMenu MenuFixit; /* Fixit floppy/CDROM/shell menu */
@ -415,7 +416,8 @@ extern int configSaver(dialogMenuItem *self);
extern int configSaverTimeout(dialogMenuItem *self);
extern int configNTP(dialogMenuItem *self);
extern int configUsers(dialogMenuItem *self);
extern int configXEnvironment(dialogMenuItem *self);
extern int configXSetup(dialogMenuItem *self);
extern int configXDesktop(dialogMenuItem *self);
extern int configRouter(dialogMenuItem *self);
extern int configPCNFSD(dialogMenuItem *self);
extern int configNFSServer(dialogMenuItem *self);

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: config.c,v 1.124 1999/02/14 21:35:01 jkh Exp $
* $Id: config.c,v 1.125 1999/04/24 01:53:53 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -448,8 +448,63 @@ configUsers(dialogMenuItem *self)
return DITEM_SUCCESS | DITEM_RESTORE;
}
static void
write_root_xprofile(char *str)
{
FILE *fp;
/* take care of both xdm and startx */
fp = fopen("/root/.xinitrc", "w");
if (fp) {
fwrite(str, 1, strlen(str), fp);
fclose(fp);
}
fp = fopen("/root/.xsession", "w");
if (fp) {
fwrite(str, 1, strlen(str), fp);
fclose(fp);
}
}
int
configXEnvironment(dialogMenuItem *self)
configXDesktop(dialogMenuItem *self)
{
char *desk;
int ret;
if (!dmenuOpenSimple(&MenuXDesktops, FALSE) ||
!(desk = variable_get(VAR_DESKSTYLE)))
return DITEM_FAILURE;
if (!strcmp(desk, "kde")) {
ret = package_add("@kde");
if (DITEM_STATUS(ret) != DITEM_FAILURE)
write_root_xprofile("exec startkde\n");
}
else if (!strcmp(desk, "gnome")) {
ret = package_add("@gnomecore");
if (DITEM_STATUS(ret) != DITEM_FAILURE)
write_root_xprofile("exec gnome-session\n");
}
else if (!strcmp(desk, "afterstep")) {
ret = package_add("@afterstep");
if (DITEM_STATUS(ret) != DITEM_FAILURE)
write_root_xprofile("xterm &\nexec afterstep\n");
}
else if (!strcmp(desk, "windowmaker")) {
ret = package_add("@windowmaker");
if (DITEM_STATUS(ret) != DITEM_FAILURE)
write_root_xprofile("xterm &\nexec windowmaker\n");
}
else if (!strcmp(desk, "enlightenment")) {
ret = package_add("@enlightenment");
if (DITEM_STATUS(ret) != DITEM_FAILURE)
write_root_xprofile("xterm &\nexec enlightenment\n");
}
return ret;
}
int
configXSetup(dialogMenuItem *self)
{
char *config, *execfile;
char *moused;
@ -489,6 +544,7 @@ tryagain:
systemExecute(execfile);
if (!file_readable("/etc/XF86Config") && !msgYesNo("The XFree86 configuration process seems to have\nfailed. Would you like to try again?"))
goto tryagain;
configXDesktop(self);
return DITEM_SUCCESS | DITEM_RESTORE;
}
else {
@ -572,7 +628,7 @@ configRouter(dialogMenuItem *self)
if (cp && strcmp(cp, "NO")) {
variable_set2(VAR_ROUTER_ENABLE, "YES", 1);
if (!strcmp(cp, "gated")) {
if (package_add(variable_get(VAR_GATED_PKG)) != DITEM_SUCCESS) {
if (package_add("@gated") != DITEM_SUCCESS) {
msgConfirm("Unable to load gated package. Falling back to no router.");
variable_unset(VAR_ROUTER);
variable_unset(VAR_ROUTERFLAGS);
@ -680,16 +736,12 @@ configPackages(dialogMenuItem *self)
int
configPCNFSD(dialogMenuItem *self)
{
int ret = DITEM_SUCCESS;
int ret;
if (variable_get(VAR_PCNFSD))
variable_unset(VAR_PCNFSD);
else {
ret = package_add(variable_get(VAR_PCNFSD_PKG));
if (DITEM_STATUS(ret) == DITEM_SUCCESS) {
variable_set2(VAR_PCNFSD, "YES", 0);
variable_set2("mountd_flags", "-n", 1);
}
ret = package_add("@pcnfsd");
if (DITEM_STATUS(ret) == DITEM_SUCCESS) {
variable_set2(VAR_PCNFSD, "YES", 0);
variable_set2("mountd_flags", "-n", 1);
}
return 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: dispatch.c,v 1.27 1999/02/05 22:15:48 jkh Exp $
* $Id: dispatch.c,v 1.28 1999/04/24 01:53:54 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -57,7 +57,8 @@ static struct _word {
{ "configPCNFSD", configPCNFSD },
{ "configPackages", configPackages },
{ "configUsers", configUsers },
{ "configXEnvironment", configXEnvironment },
{ "configXSetup", configXSetup },
{ "configXDesktop", configXDesktop },
{ "diskPartitionEditor", diskPartitionEditor },
{ "diskPartitionWrite", diskPartitionWrite },
{ "diskLabelEditor", diskLabelEditor },

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.230 1999/03/11 09:38:06 jkh Exp $
* $Id: install.c,v 1.231 1999/04/24 01:53:54 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -601,7 +601,7 @@ nodisks:
if (directory_exists("/usr/X11R6")) {
dialog_clear_norefresh();
if (!msgYesNo("Would you like to configure your X server at this time?"))
configXEnvironment(self);
configXSetup(self);
}
dialog_clear_norefresh();
@ -1046,13 +1046,11 @@ installVarDefaults(dialogMenuItem *self)
cp = "/usr/bin/ee";
variable_set2(VAR_EDITOR, cp, 0);
variable_set2(VAR_FTP_USER, "ftp", 0);
variable_set2(VAR_BROWSER_PACKAGE, "lynx", 0);
variable_set2(VAR_BROWSER_PACKAGE, "@lynx", 0);
variable_set2(VAR_BROWSER_BINARY, "/usr/local/bin/lynx", 0);
variable_set2(VAR_FTP_STATE, "passive", 0);
variable_set2(VAR_NFS_SECURE, "YES", 0);
variable_set2(VAR_PKG_TMPDIR, "/usr/tmp", 0);
variable_set2(VAR_GATED_PKG, "gated", 0);
variable_set2(VAR_PCNFSD_PKG, "pcnfsd", 0);
variable_set2(VAR_MEDIA_TIMEOUT, itoa(MEDIA_TIMEOUT), 0);
if (getpid() != 1)
variable_set2(SYSTEM_STATE, "update", 0);

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.194 1999/04/21 07:22:37 obrien Exp $
* $Id: menus.c,v 1.195 1999/04/24 01:53:54 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -446,6 +446,31 @@ DMenu MenuXF86Config = {
{ NULL } },
};
DMenu MenuXDesktops = {
DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
"Please select the default X desktop to use.",
"By default, XFree86 comes with a fairly vanilla desktop which\n"
"is based around the twm(1) window manager and does not offer\n"
"much in the way of features. It does have the advantage of\n"
"being a standard part of X so you don't need to load anything\n"
"extra in order to use it. If, however, you have access to a\n"
"reasonably full packages collection on your installation media,\n"
"you can choose any one of the following desktops as alternatives.",
NULL,
NULL,
{ { "Gnome", "The GNOME desktop environment.",
NULL, dmenuSetVariable, NULL, VAR_DESKSTYLE "=gnome" },
{ "KDE", "The K Desktop Environment.",
NULL, dmenuSetVariable, NULL, VAR_DESKSTYLE "=kde" },
{ "Afterstep", "The Afterstep Window manager",
NULL, dmenuSetVariable, NULL, VAR_DESKSTYLE "=afterstep" },
{ "Windowmaker", "The Windowmaker Window manager",
NULL, dmenuSetVariable, NULL, VAR_DESKSTYLE "=windowmaker" },
{ "Enlightenment","The E Window manager (24 bit recommended)",
NULL, dmenuSetVariable, NULL, VAR_DESKSTYLE "=enlightenment" },
{ NULL } },
};
DMenu MenuMediaCDROM = {
DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
"Choose a CDROM type",
@ -1165,7 +1190,7 @@ DMenu MenuConfigure = {
{ "D HTML Docs", "Go to the HTML documentation menu (post-install)",
NULL, docBrowser },
{ "X XFree86", "Configure XFree86",
NULL, configXEnvironment },
NULL, configXSetup },
{ "E Exit", "Exit this menu (returning to previous)",
NULL, dmenuExit },
{ NULL } },

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: options.c,v 1.57 1999/02/05 22:15:51 jkh Exp $
* $Id: options.c,v 1.58 1999/04/06 08:25:53 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -101,8 +101,6 @@ mediaCheck(Option opt)
#define PKG_PROMPT "Please specify a temporary directory with lots of free space:"
#define INSTROOT_PROMPT "Please specify a root directory if installing somewhere other than /"
#define TIMEOUT_PROMPT "Please specify the number of seconds to wait for slow media:"
#define GATED_PKG_PROMPT "Please specify the package name for the gated software:"
#define PCNFSD_PKG_PROMPT "Please specify the package name for the PCNFSD server:"
static Option Options[] = {
{ "NFS Secure", "NFS server talks only on a secure port",
@ -137,10 +135,6 @@ static Option Options[] = {
OPT_IS_VAR, TIMEOUT_PROMPT, VAR_MEDIA_TIMEOUT, varCheck },
{ "Package Temp", "The directory where package temporary files should go",
OPT_IS_VAR, PKG_PROMPT, VAR_PKG_TMPDIR, varCheck },
{ "Gated package", "The name of the gated package to install if requested",
OPT_IS_VAR, GATED_PKG_PROMPT, VAR_GATED_PKG, varCheck },
{ "PCNFSD package", "The name of the PCNFSD package to install if requested",
OPT_IS_VAR, PCNFSD_PKG_PROMPT, VAR_PCNFSD_PKG, varCheck },
{ "Re-scan Devices", "Re-run sysinstall's initial device probe",
OPT_IS_FUNC, deviceRescan },
{ "Use Defaults", "Reset all values to startup defaults",

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: package.c,v 1.65 1997/10/15 04:37:16 jkh Exp $
* $Id: package.c,v 1.66 1999/02/05 22:15:51 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -122,7 +122,12 @@ package_extract(Device *dev, char *name, Boolean depended)
Mkdir(variable_get(VAR_PKG_TMPDIR));
vsystem("chmod 1777 %s", variable_get(VAR_PKG_TMPDIR));
if (!index(name, '/'))
if (name[0] == '@') {
/* @ at the beginning of the package name means "get latest" */
name++;
sprintf(path, "packages/Latest/%s.tgz", name);
}
else if (!index(name, '/'))
sprintf(path, "packages/All/%s%s", name, strstr(name, ".tgz") ? "" : ".tgz");
else
sprintf(path, "%s%s", name, strstr(name, ".tgz") ? "" : ".tgz");

View File

@ -4,7 +4,7 @@
* This is probably the last attempt in the `sysinstall' line, the next
* generation being slated to essentially a complete rewrite.
*
* $Id: sysinstall.h,v 1.160 1999/04/06 08:25:53 jkh Exp $
* $Id: sysinstall.h,v 1.161 1999/04/24 01:53:55 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -88,6 +88,7 @@
#define VAR_BROWSER_PACKAGE "browserPackage"
#define VAR_CPIO_VERBOSITY "cpioVerbose"
#define VAR_DEBUG "debug"
#define VAR_DESKSTYLE "_deskStyle"
#define VAR_DISK "disk"
#define VAR_DISTS "dists"
#define VAR_DIST_MAIN "distMain"
@ -109,7 +110,6 @@
#define VAR_FTP_STATE "ftpState"
#define VAR_FTP_USER "ftpUser"
#define VAR_FTP_HOST "ftpHost"
#define VAR_GATED_PKG "gated_pkg"
#define VAR_GATEWAY "defaultrouter"
#define VAR_GEOMETRY "geometry"
#define VAR_HOSTNAME "hostname"
@ -144,7 +144,6 @@
#define VAR_PACKAGE "package"
#define VAR_PARTITION "partition"
#define VAR_PCNFSD "pcnfsd"
#define VAR_PCNFSD_PKG "pcnfsd_pkg"
#define VAR_PKG_TMPDIR "PKG_TMPDIR"
#define VAR_PORTS_PATH "ports"
#define VAR_RELNAME "releaseName"
@ -367,6 +366,7 @@ extern DMenu MenuSysconsScrnmap; /* System console screenmap configuration menu
extern DMenu MenuNetworking; /* Network configuration menu */
extern DMenu MenuInstallCustom; /* Custom Installation menu */
extern DMenu MenuDistributions; /* Distribution menu */
extern DMenu MenuDiskDevices; /* Disk type devices */
extern DMenu MenuSubDistributions; /* Custom distribution menu */
extern DMenu MenuDESDistributions; /* DES distribution menu */
extern DMenu MenuSrcDistributions; /* Source distribution menu */
@ -376,7 +376,8 @@ extern DMenu MenuXF86SelectCore; /* XFree86 core distribution menu */
extern DMenu MenuXF86SelectServer; /* XFree86 server distribution menu */
extern DMenu MenuXF86SelectPC98Server; /* XFree86 server distribution menu */
extern DMenu MenuXF86SelectFonts; /* XFree86 font selection menu */
extern DMenu MenuDiskDevices; /* Disk devices menu */
extern DMenu MenuXF86SelectFonts; /* XFree86 font selection menu */
extern DMenu MenuXDesktops; /* Disk devices menu */
extern DMenu MenuHTMLDoc; /* HTML Documentation menu */
extern DMenu MenuUsermgmt; /* User management menu */
extern DMenu MenuFixit; /* Fixit floppy/CDROM/shell menu */
@ -415,7 +416,8 @@ extern int configSaver(dialogMenuItem *self);
extern int configSaverTimeout(dialogMenuItem *self);
extern int configNTP(dialogMenuItem *self);
extern int configUsers(dialogMenuItem *self);
extern int configXEnvironment(dialogMenuItem *self);
extern int configXSetup(dialogMenuItem *self);
extern int configXDesktop(dialogMenuItem *self);
extern int configRouter(dialogMenuItem *self);
extern int configPCNFSD(dialogMenuItem *self);
extern int configNFSServer(dialogMenuItem *self);