diff options
-rw-r--r-- | release/sysinstall/apache.c | 7 | ||||
-rw-r--r-- | release/sysinstall/config.c | 61 | ||||
-rw-r--r-- | release/sysinstall/dispatch.c | 4 | ||||
-rw-r--r-- | release/sysinstall/install.c | 6 | ||||
-rw-r--r-- | release/sysinstall/menus.c | 11 | ||||
-rw-r--r-- | release/sysinstall/package.c | 10 | ||||
-rw-r--r-- | release/sysinstall/samba.c | 4 | ||||
-rw-r--r-- | release/sysinstall/sysinstall.h | 17 | ||||
-rw-r--r-- | usr.sbin/sade/config.c | 61 | ||||
-rw-r--r-- | usr.sbin/sade/dispatch.c | 4 | ||||
-rw-r--r-- | usr.sbin/sade/install.c | 6 | ||||
-rw-r--r-- | usr.sbin/sade/menus.c | 11 | ||||
-rw-r--r-- | usr.sbin/sade/sade.h | 17 | ||||
-rw-r--r-- | usr.sbin/sysinstall/config.c | 61 | ||||
-rw-r--r-- | usr.sbin/sysinstall/dispatch.c | 4 | ||||
-rw-r--r-- | usr.sbin/sysinstall/install.c | 6 | ||||
-rw-r--r-- | usr.sbin/sysinstall/menus.c | 11 | ||||
-rw-r--r-- | usr.sbin/sysinstall/package.c | 10 | ||||
-rw-r--r-- | usr.sbin/sysinstall/sysinstall.h | 17 |
19 files changed, 192 insertions, 136 deletions
diff --git a/release/sysinstall/apache.c b/release/sysinstall/apache.c index ffd053c..d33b4cf 100644 --- a/release/sysinstall/apache.c +++ b/release/sysinstall/apache.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: apache.c,v 1.26 1996/08/03 10:10:35 jkh Exp $ + * $Id: apache.c,v 1.27 1996/09/01 08:17:13 jkh Exp $ * * Copyright (c) 1995 * Coranth Gryphon. All rights reserved. @@ -50,7 +50,6 @@ #define APACHE_HELPFILE "apache" -#define APACHE_PACKAGE "apache-1.1.1" #define FREEBSD_GIF "http://www.freebsd.org/gifs/powerlogo.gif" /* These change if the package uses different defaults */ @@ -382,12 +381,12 @@ configApache(dialogMenuItem *self) dialog_clear_norefresh(); msgConfirm("Since you elected to install the WEB server, we'll now add the\n" "Apache HTTPD package and set up a few configuration files."); - i = package_add(APACHE_PACKAGE); + i = package_add(PACKAGE_APACHE); if (DITEM_STATUS(i) != DITEM_SUCCESS) { msgConfirm("Hmmmmm. Looks like we weren't able to fetch the Apache WEB server\n" "package. You may wish to fetch and configure it by hand by looking\n" "in /usr/ports/net/apache (in the ports collection) or looking for the\n" - "precompiled apache package in packages/networking/%s.", APACHE_PACKAGE); + "precompiled apache package in packages/networking/%s.", PACKAGE_APACHE); return i | DITEM_RESTORE; } diff --git a/release/sysinstall/config.c b/release/sysinstall/config.c index 9489c89..f309840 100644 --- a/release/sysinstall/config.c +++ b/release/sysinstall/config.c @@ -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.50 1996/10/03 07:50:08 jkh Exp $ + * $Id: config.c,v 1.51 1996/10/14 21:32:25 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -428,11 +428,42 @@ skip: } int -configRoutedFlags(dialogMenuItem *self) +configRouter(dialogMenuItem *self) { - return (variable_get_value(VAR_ROUTEDFLAGS, - "Specify the flags for routed; -q is the default, -s is\n" - "a good choice for gateway machines.") ? DITEM_SUCCESS : DITEM_FAILURE) | DITEM_RESTORE; + int ret; + + ret = variable_get_value(VAR_ROUTER, + "Please specify the router you wish to use. Routed is\n" + "provided with the stock system and gated is provided\n" + "as an optional package which this installation system\n" + "will attempt to load if you select gated. Any other\n" + "choice of routing daemon will be assumed to be something\n" + "the user intends to install themselves before rebooting\n" + "the system. If you don't want any routing daemon, say NO") ? + DITEM_SUCCESS : DITEM_FAILURE; + + if (ret == DITEM_SUCCESS) { + char *cp; + + cp = variable_get(VAR_ROUTER); + if (strcmp(cp, "NO")) { + if (!strcmp(cp, "gated")) { + if (package_add(PACKAGE_GATED) != DITEM_SUCCESS) { + msgConfirm("Unable to load gated package. Falling back to routed."); + variable_set2(VAR_ROUTER, "routed"); + } + } + /* Now get the flags, if they chose a router */ + ret = variable_get_value(VAR_ROUTERFLAGS, + "Please Specify the routing daemon flags; if you're running routed\n" + "then -q is the right choice for nodes and -s for gateway hosts.\n") ? DITEM_SUCCESS : DITEM_FAILURE; + if (ret != DITEM_SUCCESS) { + variable_unset(VAR_ROUTER); + variable_unset(VAR_ROUTERFLAGS); + } + } + } + return ret | DITEM_RESTORE; } int @@ -510,22 +541,6 @@ configPackages(dialogMenuItem *self) return DITEM_SUCCESS | DITEM_RESTORE | DITEM_RECREATE; } -/* Load gated package */ -int -configGated(dialogMenuItem *self) -{ - int ret = DITEM_SUCCESS; - - if (variable_get(VAR_GATED)) - variable_unset(VAR_GATED); - else { - ret = package_add("gated-3.5a11"); - if (DITEM_STATUS(ret) == DITEM_SUCCESS) - variable_set2(VAR_GATED, "YES"); - } - return ret; -} - /* Load novell client/server package */ int configNovell(dialogMenuItem *self) @@ -539,7 +554,7 @@ configNovell(dialogMenuItem *self) if (variable_get(VAR_NOVELL)) variable_unset(VAR_NOVELL); else { - ret = package_add("commerce/netcon/bsd60"); + ret = package_add(PACKAGE_NETCON); if (DITEM_STATUS(ret) == DITEM_SUCCESS) variable_set2(VAR_NOVELL, "YES"); } @@ -555,7 +570,7 @@ configPCNFSD(dialogMenuItem *self) if (variable_get(VAR_PCNFSD)) variable_unset(VAR_PCNFSD); else { - ret = package_add("pcnfsd-93.02.16"); + ret = package_add(PACKAGE_PCNFSD); if (DITEM_STATUS(ret) == DITEM_SUCCESS) { variable_set2(VAR_PCNFSD, "YES"); variable_set2("weak_mountd_authentication", "YES"); diff --git a/release/sysinstall/dispatch.c b/release/sysinstall/dispatch.c index 3175c01..493f4d6 100644 --- a/release/sysinstall/dispatch.c +++ b/release/sysinstall/dispatch.c @@ -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.4 1996/07/02 10:57:51 jkh Exp $ + * $Id: dispatch.c,v 1.5 1996/10/01 12:13:10 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -43,7 +43,7 @@ static struct _word { } resWords[] = { { "configAnonFTP", configAnonFTP }, { "configApache", configApache }, - { "configGated", configGated }, + { "configRouter", configRouter }, { "configNFSServer", configNFSServer }, { "configSamba", configSamba }, { "configPackages", configPackages }, diff --git a/release/sysinstall/install.c b/release/sysinstall/install.c index 2a39034..d7c51d3 100644 --- a/release/sysinstall/install.c +++ b/release/sysinstall/install.c @@ -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.133 1996/10/12 23:48:33 jkh Exp $ + * $Id: install.c,v 1.134 1996/10/14 21:32:28 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -825,7 +825,7 @@ installVarDefaults(dialogMenuItem *self) char *cp; /* Set default startup options */ - variable_set2(VAR_ROUTEDFLAGS, "-q"); + variable_set2(VAR_ROUTER, "routed"); variable_set2(VAR_RELNAME, RELEASE_NAME); variable_set2(VAR_CPIO_VERBOSITY, "high"); variable_set2(VAR_TAPE_BLOCKSIZE, DEFAULT_TAPE_BLOCKSIZE); @@ -835,7 +835,7 @@ installVarDefaults(dialogMenuItem *self) cp = "/usr/bin/ee"; variable_set2(VAR_EDITOR, cp); variable_set2(VAR_FTP_USER, "ftp"); - variable_set2(VAR_BROWSER_PACKAGE, "lynx-2.5FM"); + variable_set2(VAR_BROWSER_PACKAGE, PACKAGE_LYNX); variable_set2(VAR_BROWSER_BINARY, "/usr/local/bin/lynx"); variable_set2(VAR_FTP_STATE, "passive"); variable_set2(VAR_PKG_TMPDIR, "/usr/tmp"); diff --git a/release/sysinstall/menus.c b/release/sysinstall/menus.c index 9567f4e..01a22b2 100644 --- a/release/sysinstall/menus.c +++ b/release/sysinstall/menus.c @@ -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.88 1996/10/12 19:30:23 jkh Exp $ + * $Id: menus.c,v 1.89 1996/10/14 21:32:31 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -233,7 +233,6 @@ DMenu MenuIndex = { { "Extract", "Extract selected distributions from media.", NULL, distExtractAll }, { "Fixit", "Repair mode with CDROM or floppy.", NULL, dmenuSubmenu, NULL, &MenuFixit }, { "FTP sites", "The FTP mirror site listing.", NULL, dmenuSubmenu, NULL, &MenuMediaFTP }, - { "Gated", "Load and configure gated instead of routed.", dmenuVarCheck, configGated, NULL, "gated" }, { "Gateway", "Set flag to route packets between interfaces.", dmenuVarCheck, dmenuToggleVariable, NULL, "gateway=YES" }, { "HTML Docs", "The HTML documentation menu", NULL, docBrowser }, { "Install, Novice", "A novice system installation.", NULL, installNovice }, @@ -259,7 +258,7 @@ DMenu MenuIndex = { { "Partition", "The disk Partition Editor", NULL, diskPartitionEditor }, { "PCNFSD", "Run authentication server for PC-NFS.", dmenuVarCheck, configPCNFSD, NULL, "pcnfsd" }, { "Root Password", "Set the system manager's password.", NULL, dmenuSystemCommand, NULL, "passwd root" }, - { "Routed", "Set flags for routed (default: -q)", dmenuVarCheck, configRoutedFlags, NULL, "routed" }, + { "Router", "Select routing daemon (default: routed)", dmenuVarCheck, configRouter, NULL, "router" }, { "Samba", "Configure Samba for LanManager access.", dmenuVarCheck, configSamba, NULL, "samba" }, { "Syscons", "The system console configuration menu.", NULL, dmenuSubmenu, NULL, &MenuSyscons }, { "Syscons, Keymap", "The console keymap configuration menu.", NULL, dmenuSubmenu, NULL, &MenuSysconsKeymap }, @@ -1038,14 +1037,12 @@ aspects of your system's network configuration.", dmenuVarCheck, configNFSServer, NULL, "nfs_server" }, { "Gateway", "This machine will route packets between interfaces", dmenuVarCheck, dmenuToggleVariable, NULL, "gateway=YES" }, - { "Gated", "This machine wants to run gated instead of routed", - dmenuVarCheck, configGated, NULL, "gated" }, { "Netcon", "Install the Novell client/server demo package", dmenuVarCheck, configNovell, NULL, "novell" }, { "Ntpdate", "Select a clock-syncronization server", dmenuVarCheck, dmenuSubmenu, NULL, &MenuNTP, '[', 'X', ']', (int)VAR_NTPDATE }, - { "Routed", "Set flags for routed (default: -q)", - dmenuVarCheck, configRoutedFlags, NULL, "routed" }, + { "router", "Select routing daemon (default: routed)", + dmenuVarCheck, configRouter, NULL, "router" }, { "Rwhod", "This machine wants to run the rwho daemon", dmenuVarCheck, dmenuToggleVariable, NULL, "rwhod=YES" }, { "Anon FTP", "This machine wishes to allow anonymous FTP.", diff --git a/release/sysinstall/package.c b/release/sysinstall/package.c index c85f444..5d2cfd2 100644 --- a/release/sysinstall/package.c +++ b/release/sysinstall/package.c @@ -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.47 1996/10/06 03:18:55 jkh Exp $ + * $Id: package.c,v 1.48 1996/10/12 19:30:26 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -87,14 +87,14 @@ package_extract(Device *dev, char *name, Boolean depended) char path[511]; int fd, ret; - /* If necessary, initialize the ldconfig hints */ - if (!file_readable("/var/run/ld.so.hints")) - vsystem("ldconfig /usr/lib /usr/local/lib /usr/X11R6/lib"); - /* Check to make sure it's not already there */ if (package_exists(name)) return DITEM_SUCCESS; + /* If necessary, initialize the ldconfig hints */ + if (!file_readable("/var/run/ld.so.hints")) + vsystem("ldconfig /usr/lib /usr/local/lib /usr/X11R6/lib"); + if (!dev->init(dev)) { msgConfirm("Unable to initialize media type for package extract."); return DITEM_FAILURE; diff --git a/release/sysinstall/samba.c b/release/sysinstall/samba.c index 29bbae7..4e0f367 100644 --- a/release/sysinstall/samba.c +++ b/release/sysinstall/samba.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: samba.c,v 1.8 1996/08/03 10:11:46 jkh Exp $ + * $Id: samba.c,v 1.9 1996/10/09 09:53:41 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard & Coranth Gryphon. All rights reserved. @@ -63,7 +63,7 @@ configSamba(dialogMenuItem *self) if (!dmenuOpenSimple(&MenuSamba, FALSE)) i = DITEM_FAILURE; - else if (DITEM_STATUS(package_add("samba-1.9.15p8")) != DITEM_SUCCESS) + else if (DITEM_STATUS(package_add(PACKAGE_SAMBA)) != DITEM_SUCCESS) i = DITEM_FAILURE; else { FILE *fptr; diff --git a/release/sysinstall/sysinstall.h b/release/sysinstall/sysinstall.h index d9cb1ec..bd9af57 100644 --- a/release/sysinstall/sysinstall.h +++ b/release/sysinstall/sysinstall.h @@ -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.81 1996/10/05 16:33:03 jkh Exp $ + * $Id: sysinstall.h,v 1.82 1996/10/14 21:32:33 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -50,6 +50,14 @@ /*** Defines ***/ +/* Different packages we depend on - update this when package version change! */ +#define PACKAGE_GATED "gated-3.5b3" +#define PACKAGE_APACHE "apache-1.1.1" +#define PACKAGE_NETCON "commerce/netcon/bsd60" +#define PACKAGE_PCNFSD "pcnfsd-93.02.16" +#define PACKAGE_SAMBA "samba-1.9.15p8" +#define PACKAGE_LYNX "lynx-2.6" + /* variable limits */ #define VAR_NAME_MAX 128 #define VAR_VALUE_MAX 1024 @@ -96,7 +104,6 @@ #define VAR_FTP_STATE "ftpState" #define VAR_FTP_USER "ftpUser" #define VAR_FTP_HOST "ftpHost" -#define VAR_GATED "gated" #define VAR_GATEWAY "defaultrouter" #define VAR_GEOMETRY "geometry" #define VAR_HOSTNAME "hostname" @@ -121,7 +128,8 @@ #define VAR_PORTS_PATH "ports" #define VAR_RELNAME "releaseName" #define VAR_ROOT_SIZE "rootSize" -#define VAR_ROUTEDFLAGS "routedflags" +#define VAR_ROUTER "router" +#define VAR_ROUTERFLAGS "routerflags" #define VAR_SERIAL_SPEED "serialSpeed" #define VAR_SLOW_ETHER "slowEthernetCard" #define VAR_SWAP_SIZE "swapSize" @@ -366,8 +374,7 @@ extern int configPackages(dialogMenuItem *self); extern int configSaverTimeout(dialogMenuItem *self); extern int configNTP(dialogMenuItem *self); extern int configXFree86(dialogMenuItem *self); -extern int configRoutedFlags(dialogMenuItem *self); -extern int configGated(dialogMenuItem *self); +extern int configRouter(dialogMenuItem *self); extern int configSamba(dialogMenuItem *self); extern int configPCNFSD(dialogMenuItem *self); extern int configNFSServer(dialogMenuItem *self); diff --git a/usr.sbin/sade/config.c b/usr.sbin/sade/config.c index 9489c89..f309840 100644 --- a/usr.sbin/sade/config.c +++ b/usr.sbin/sade/config.c @@ -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.50 1996/10/03 07:50:08 jkh Exp $ + * $Id: config.c,v 1.51 1996/10/14 21:32:25 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -428,11 +428,42 @@ skip: } int -configRoutedFlags(dialogMenuItem *self) +configRouter(dialogMenuItem *self) { - return (variable_get_value(VAR_ROUTEDFLAGS, - "Specify the flags for routed; -q is the default, -s is\n" - "a good choice for gateway machines.") ? DITEM_SUCCESS : DITEM_FAILURE) | DITEM_RESTORE; + int ret; + + ret = variable_get_value(VAR_ROUTER, + "Please specify the router you wish to use. Routed is\n" + "provided with the stock system and gated is provided\n" + "as an optional package which this installation system\n" + "will attempt to load if you select gated. Any other\n" + "choice of routing daemon will be assumed to be something\n" + "the user intends to install themselves before rebooting\n" + "the system. If you don't want any routing daemon, say NO") ? + DITEM_SUCCESS : DITEM_FAILURE; + + if (ret == DITEM_SUCCESS) { + char *cp; + + cp = variable_get(VAR_ROUTER); + if (strcmp(cp, "NO")) { + if (!strcmp(cp, "gated")) { + if (package_add(PACKAGE_GATED) != DITEM_SUCCESS) { + msgConfirm("Unable to load gated package. Falling back to routed."); + variable_set2(VAR_ROUTER, "routed"); + } + } + /* Now get the flags, if they chose a router */ + ret = variable_get_value(VAR_ROUTERFLAGS, + "Please Specify the routing daemon flags; if you're running routed\n" + "then -q is the right choice for nodes and -s for gateway hosts.\n") ? DITEM_SUCCESS : DITEM_FAILURE; + if (ret != DITEM_SUCCESS) { + variable_unset(VAR_ROUTER); + variable_unset(VAR_ROUTERFLAGS); + } + } + } + return ret | DITEM_RESTORE; } int @@ -510,22 +541,6 @@ configPackages(dialogMenuItem *self) return DITEM_SUCCESS | DITEM_RESTORE | DITEM_RECREATE; } -/* Load gated package */ -int -configGated(dialogMenuItem *self) -{ - int ret = DITEM_SUCCESS; - - if (variable_get(VAR_GATED)) - variable_unset(VAR_GATED); - else { - ret = package_add("gated-3.5a11"); - if (DITEM_STATUS(ret) == DITEM_SUCCESS) - variable_set2(VAR_GATED, "YES"); - } - return ret; -} - /* Load novell client/server package */ int configNovell(dialogMenuItem *self) @@ -539,7 +554,7 @@ configNovell(dialogMenuItem *self) if (variable_get(VAR_NOVELL)) variable_unset(VAR_NOVELL); else { - ret = package_add("commerce/netcon/bsd60"); + ret = package_add(PACKAGE_NETCON); if (DITEM_STATUS(ret) == DITEM_SUCCESS) variable_set2(VAR_NOVELL, "YES"); } @@ -555,7 +570,7 @@ configPCNFSD(dialogMenuItem *self) if (variable_get(VAR_PCNFSD)) variable_unset(VAR_PCNFSD); else { - ret = package_add("pcnfsd-93.02.16"); + ret = package_add(PACKAGE_PCNFSD); if (DITEM_STATUS(ret) == DITEM_SUCCESS) { variable_set2(VAR_PCNFSD, "YES"); variable_set2("weak_mountd_authentication", "YES"); diff --git a/usr.sbin/sade/dispatch.c b/usr.sbin/sade/dispatch.c index 3175c01..493f4d6 100644 --- a/usr.sbin/sade/dispatch.c +++ b/usr.sbin/sade/dispatch.c @@ -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.4 1996/07/02 10:57:51 jkh Exp $ + * $Id: dispatch.c,v 1.5 1996/10/01 12:13:10 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -43,7 +43,7 @@ static struct _word { } resWords[] = { { "configAnonFTP", configAnonFTP }, { "configApache", configApache }, - { "configGated", configGated }, + { "configRouter", configRouter }, { "configNFSServer", configNFSServer }, { "configSamba", configSamba }, { "configPackages", configPackages }, diff --git a/usr.sbin/sade/install.c b/usr.sbin/sade/install.c index 2a39034..d7c51d3 100644 --- a/usr.sbin/sade/install.c +++ b/usr.sbin/sade/install.c @@ -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.133 1996/10/12 23:48:33 jkh Exp $ + * $Id: install.c,v 1.134 1996/10/14 21:32:28 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -825,7 +825,7 @@ installVarDefaults(dialogMenuItem *self) char *cp; /* Set default startup options */ - variable_set2(VAR_ROUTEDFLAGS, "-q"); + variable_set2(VAR_ROUTER, "routed"); variable_set2(VAR_RELNAME, RELEASE_NAME); variable_set2(VAR_CPIO_VERBOSITY, "high"); variable_set2(VAR_TAPE_BLOCKSIZE, DEFAULT_TAPE_BLOCKSIZE); @@ -835,7 +835,7 @@ installVarDefaults(dialogMenuItem *self) cp = "/usr/bin/ee"; variable_set2(VAR_EDITOR, cp); variable_set2(VAR_FTP_USER, "ftp"); - variable_set2(VAR_BROWSER_PACKAGE, "lynx-2.5FM"); + variable_set2(VAR_BROWSER_PACKAGE, PACKAGE_LYNX); variable_set2(VAR_BROWSER_BINARY, "/usr/local/bin/lynx"); variable_set2(VAR_FTP_STATE, "passive"); variable_set2(VAR_PKG_TMPDIR, "/usr/tmp"); diff --git a/usr.sbin/sade/menus.c b/usr.sbin/sade/menus.c index 9567f4e..01a22b2 100644 --- a/usr.sbin/sade/menus.c +++ b/usr.sbin/sade/menus.c @@ -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.88 1996/10/12 19:30:23 jkh Exp $ + * $Id: menus.c,v 1.89 1996/10/14 21:32:31 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -233,7 +233,6 @@ DMenu MenuIndex = { { "Extract", "Extract selected distributions from media.", NULL, distExtractAll }, { "Fixit", "Repair mode with CDROM or floppy.", NULL, dmenuSubmenu, NULL, &MenuFixit }, { "FTP sites", "The FTP mirror site listing.", NULL, dmenuSubmenu, NULL, &MenuMediaFTP }, - { "Gated", "Load and configure gated instead of routed.", dmenuVarCheck, configGated, NULL, "gated" }, { "Gateway", "Set flag to route packets between interfaces.", dmenuVarCheck, dmenuToggleVariable, NULL, "gateway=YES" }, { "HTML Docs", "The HTML documentation menu", NULL, docBrowser }, { "Install, Novice", "A novice system installation.", NULL, installNovice }, @@ -259,7 +258,7 @@ DMenu MenuIndex = { { "Partition", "The disk Partition Editor", NULL, diskPartitionEditor }, { "PCNFSD", "Run authentication server for PC-NFS.", dmenuVarCheck, configPCNFSD, NULL, "pcnfsd" }, { "Root Password", "Set the system manager's password.", NULL, dmenuSystemCommand, NULL, "passwd root" }, - { "Routed", "Set flags for routed (default: -q)", dmenuVarCheck, configRoutedFlags, NULL, "routed" }, + { "Router", "Select routing daemon (default: routed)", dmenuVarCheck, configRouter, NULL, "router" }, { "Samba", "Configure Samba for LanManager access.", dmenuVarCheck, configSamba, NULL, "samba" }, { "Syscons", "The system console configuration menu.", NULL, dmenuSubmenu, NULL, &MenuSyscons }, { "Syscons, Keymap", "The console keymap configuration menu.", NULL, dmenuSubmenu, NULL, &MenuSysconsKeymap }, @@ -1038,14 +1037,12 @@ aspects of your system's network configuration.", dmenuVarCheck, configNFSServer, NULL, "nfs_server" }, { "Gateway", "This machine will route packets between interfaces", dmenuVarCheck, dmenuToggleVariable, NULL, "gateway=YES" }, - { "Gated", "This machine wants to run gated instead of routed", - dmenuVarCheck, configGated, NULL, "gated" }, { "Netcon", "Install the Novell client/server demo package", dmenuVarCheck, configNovell, NULL, "novell" }, { "Ntpdate", "Select a clock-syncronization server", dmenuVarCheck, dmenuSubmenu, NULL, &MenuNTP, '[', 'X', ']', (int)VAR_NTPDATE }, - { "Routed", "Set flags for routed (default: -q)", - dmenuVarCheck, configRoutedFlags, NULL, "routed" }, + { "router", "Select routing daemon (default: routed)", + dmenuVarCheck, configRouter, NULL, "router" }, { "Rwhod", "This machine wants to run the rwho daemon", dmenuVarCheck, dmenuToggleVariable, NULL, "rwhod=YES" }, { "Anon FTP", "This machine wishes to allow anonymous FTP.", diff --git a/usr.sbin/sade/sade.h b/usr.sbin/sade/sade.h index d9cb1ec..bd9af57 100644 --- a/usr.sbin/sade/sade.h +++ b/usr.sbin/sade/sade.h @@ -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.81 1996/10/05 16:33:03 jkh Exp $ + * $Id: sysinstall.h,v 1.82 1996/10/14 21:32:33 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -50,6 +50,14 @@ /*** Defines ***/ +/* Different packages we depend on - update this when package version change! */ +#define PACKAGE_GATED "gated-3.5b3" +#define PACKAGE_APACHE "apache-1.1.1" +#define PACKAGE_NETCON "commerce/netcon/bsd60" +#define PACKAGE_PCNFSD "pcnfsd-93.02.16" +#define PACKAGE_SAMBA "samba-1.9.15p8" +#define PACKAGE_LYNX "lynx-2.6" + /* variable limits */ #define VAR_NAME_MAX 128 #define VAR_VALUE_MAX 1024 @@ -96,7 +104,6 @@ #define VAR_FTP_STATE "ftpState" #define VAR_FTP_USER "ftpUser" #define VAR_FTP_HOST "ftpHost" -#define VAR_GATED "gated" #define VAR_GATEWAY "defaultrouter" #define VAR_GEOMETRY "geometry" #define VAR_HOSTNAME "hostname" @@ -121,7 +128,8 @@ #define VAR_PORTS_PATH "ports" #define VAR_RELNAME "releaseName" #define VAR_ROOT_SIZE "rootSize" -#define VAR_ROUTEDFLAGS "routedflags" +#define VAR_ROUTER "router" +#define VAR_ROUTERFLAGS "routerflags" #define VAR_SERIAL_SPEED "serialSpeed" #define VAR_SLOW_ETHER "slowEthernetCard" #define VAR_SWAP_SIZE "swapSize" @@ -366,8 +374,7 @@ extern int configPackages(dialogMenuItem *self); extern int configSaverTimeout(dialogMenuItem *self); extern int configNTP(dialogMenuItem *self); extern int configXFree86(dialogMenuItem *self); -extern int configRoutedFlags(dialogMenuItem *self); -extern int configGated(dialogMenuItem *self); +extern int configRouter(dialogMenuItem *self); extern int configSamba(dialogMenuItem *self); extern int configPCNFSD(dialogMenuItem *self); extern int configNFSServer(dialogMenuItem *self); diff --git a/usr.sbin/sysinstall/config.c b/usr.sbin/sysinstall/config.c index 9489c89..f309840 100644 --- a/usr.sbin/sysinstall/config.c +++ b/usr.sbin/sysinstall/config.c @@ -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.50 1996/10/03 07:50:08 jkh Exp $ + * $Id: config.c,v 1.51 1996/10/14 21:32:25 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -428,11 +428,42 @@ skip: } int -configRoutedFlags(dialogMenuItem *self) +configRouter(dialogMenuItem *self) { - return (variable_get_value(VAR_ROUTEDFLAGS, - "Specify the flags for routed; -q is the default, -s is\n" - "a good choice for gateway machines.") ? DITEM_SUCCESS : DITEM_FAILURE) | DITEM_RESTORE; + int ret; + + ret = variable_get_value(VAR_ROUTER, + "Please specify the router you wish to use. Routed is\n" + "provided with the stock system and gated is provided\n" + "as an optional package which this installation system\n" + "will attempt to load if you select gated. Any other\n" + "choice of routing daemon will be assumed to be something\n" + "the user intends to install themselves before rebooting\n" + "the system. If you don't want any routing daemon, say NO") ? + DITEM_SUCCESS : DITEM_FAILURE; + + if (ret == DITEM_SUCCESS) { + char *cp; + + cp = variable_get(VAR_ROUTER); + if (strcmp(cp, "NO")) { + if (!strcmp(cp, "gated")) { + if (package_add(PACKAGE_GATED) != DITEM_SUCCESS) { + msgConfirm("Unable to load gated package. Falling back to routed."); + variable_set2(VAR_ROUTER, "routed"); + } + } + /* Now get the flags, if they chose a router */ + ret = variable_get_value(VAR_ROUTERFLAGS, + "Please Specify the routing daemon flags; if you're running routed\n" + "then -q is the right choice for nodes and -s for gateway hosts.\n") ? DITEM_SUCCESS : DITEM_FAILURE; + if (ret != DITEM_SUCCESS) { + variable_unset(VAR_ROUTER); + variable_unset(VAR_ROUTERFLAGS); + } + } + } + return ret | DITEM_RESTORE; } int @@ -510,22 +541,6 @@ configPackages(dialogMenuItem *self) return DITEM_SUCCESS | DITEM_RESTORE | DITEM_RECREATE; } -/* Load gated package */ -int -configGated(dialogMenuItem *self) -{ - int ret = DITEM_SUCCESS; - - if (variable_get(VAR_GATED)) - variable_unset(VAR_GATED); - else { - ret = package_add("gated-3.5a11"); - if (DITEM_STATUS(ret) == DITEM_SUCCESS) - variable_set2(VAR_GATED, "YES"); - } - return ret; -} - /* Load novell client/server package */ int configNovell(dialogMenuItem *self) @@ -539,7 +554,7 @@ configNovell(dialogMenuItem *self) if (variable_get(VAR_NOVELL)) variable_unset(VAR_NOVELL); else { - ret = package_add("commerce/netcon/bsd60"); + ret = package_add(PACKAGE_NETCON); if (DITEM_STATUS(ret) == DITEM_SUCCESS) variable_set2(VAR_NOVELL, "YES"); } @@ -555,7 +570,7 @@ configPCNFSD(dialogMenuItem *self) if (variable_get(VAR_PCNFSD)) variable_unset(VAR_PCNFSD); else { - ret = package_add("pcnfsd-93.02.16"); + ret = package_add(PACKAGE_PCNFSD); if (DITEM_STATUS(ret) == DITEM_SUCCESS) { variable_set2(VAR_PCNFSD, "YES"); variable_set2("weak_mountd_authentication", "YES"); diff --git a/usr.sbin/sysinstall/dispatch.c b/usr.sbin/sysinstall/dispatch.c index 3175c01..493f4d6 100644 --- a/usr.sbin/sysinstall/dispatch.c +++ b/usr.sbin/sysinstall/dispatch.c @@ -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.4 1996/07/02 10:57:51 jkh Exp $ + * $Id: dispatch.c,v 1.5 1996/10/01 12:13:10 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -43,7 +43,7 @@ static struct _word { } resWords[] = { { "configAnonFTP", configAnonFTP }, { "configApache", configApache }, - { "configGated", configGated }, + { "configRouter", configRouter }, { "configNFSServer", configNFSServer }, { "configSamba", configSamba }, { "configPackages", configPackages }, diff --git a/usr.sbin/sysinstall/install.c b/usr.sbin/sysinstall/install.c index 2a39034..d7c51d3 100644 --- a/usr.sbin/sysinstall/install.c +++ b/usr.sbin/sysinstall/install.c @@ -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.133 1996/10/12 23:48:33 jkh Exp $ + * $Id: install.c,v 1.134 1996/10/14 21:32:28 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -825,7 +825,7 @@ installVarDefaults(dialogMenuItem *self) char *cp; /* Set default startup options */ - variable_set2(VAR_ROUTEDFLAGS, "-q"); + variable_set2(VAR_ROUTER, "routed"); variable_set2(VAR_RELNAME, RELEASE_NAME); variable_set2(VAR_CPIO_VERBOSITY, "high"); variable_set2(VAR_TAPE_BLOCKSIZE, DEFAULT_TAPE_BLOCKSIZE); @@ -835,7 +835,7 @@ installVarDefaults(dialogMenuItem *self) cp = "/usr/bin/ee"; variable_set2(VAR_EDITOR, cp); variable_set2(VAR_FTP_USER, "ftp"); - variable_set2(VAR_BROWSER_PACKAGE, "lynx-2.5FM"); + variable_set2(VAR_BROWSER_PACKAGE, PACKAGE_LYNX); variable_set2(VAR_BROWSER_BINARY, "/usr/local/bin/lynx"); variable_set2(VAR_FTP_STATE, "passive"); variable_set2(VAR_PKG_TMPDIR, "/usr/tmp"); diff --git a/usr.sbin/sysinstall/menus.c b/usr.sbin/sysinstall/menus.c index 9567f4e..01a22b2 100644 --- a/usr.sbin/sysinstall/menus.c +++ b/usr.sbin/sysinstall/menus.c @@ -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.88 1996/10/12 19:30:23 jkh Exp $ + * $Id: menus.c,v 1.89 1996/10/14 21:32:31 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -233,7 +233,6 @@ DMenu MenuIndex = { { "Extract", "Extract selected distributions from media.", NULL, distExtractAll }, { "Fixit", "Repair mode with CDROM or floppy.", NULL, dmenuSubmenu, NULL, &MenuFixit }, { "FTP sites", "The FTP mirror site listing.", NULL, dmenuSubmenu, NULL, &MenuMediaFTP }, - { "Gated", "Load and configure gated instead of routed.", dmenuVarCheck, configGated, NULL, "gated" }, { "Gateway", "Set flag to route packets between interfaces.", dmenuVarCheck, dmenuToggleVariable, NULL, "gateway=YES" }, { "HTML Docs", "The HTML documentation menu", NULL, docBrowser }, { "Install, Novice", "A novice system installation.", NULL, installNovice }, @@ -259,7 +258,7 @@ DMenu MenuIndex = { { "Partition", "The disk Partition Editor", NULL, diskPartitionEditor }, { "PCNFSD", "Run authentication server for PC-NFS.", dmenuVarCheck, configPCNFSD, NULL, "pcnfsd" }, { "Root Password", "Set the system manager's password.", NULL, dmenuSystemCommand, NULL, "passwd root" }, - { "Routed", "Set flags for routed (default: -q)", dmenuVarCheck, configRoutedFlags, NULL, "routed" }, + { "Router", "Select routing daemon (default: routed)", dmenuVarCheck, configRouter, NULL, "router" }, { "Samba", "Configure Samba for LanManager access.", dmenuVarCheck, configSamba, NULL, "samba" }, { "Syscons", "The system console configuration menu.", NULL, dmenuSubmenu, NULL, &MenuSyscons }, { "Syscons, Keymap", "The console keymap configuration menu.", NULL, dmenuSubmenu, NULL, &MenuSysconsKeymap }, @@ -1038,14 +1037,12 @@ aspects of your system's network configuration.", dmenuVarCheck, configNFSServer, NULL, "nfs_server" }, { "Gateway", "This machine will route packets between interfaces", dmenuVarCheck, dmenuToggleVariable, NULL, "gateway=YES" }, - { "Gated", "This machine wants to run gated instead of routed", - dmenuVarCheck, configGated, NULL, "gated" }, { "Netcon", "Install the Novell client/server demo package", dmenuVarCheck, configNovell, NULL, "novell" }, { "Ntpdate", "Select a clock-syncronization server", dmenuVarCheck, dmenuSubmenu, NULL, &MenuNTP, '[', 'X', ']', (int)VAR_NTPDATE }, - { "Routed", "Set flags for routed (default: -q)", - dmenuVarCheck, configRoutedFlags, NULL, "routed" }, + { "router", "Select routing daemon (default: routed)", + dmenuVarCheck, configRouter, NULL, "router" }, { "Rwhod", "This machine wants to run the rwho daemon", dmenuVarCheck, dmenuToggleVariable, NULL, "rwhod=YES" }, { "Anon FTP", "This machine wishes to allow anonymous FTP.", diff --git a/usr.sbin/sysinstall/package.c b/usr.sbin/sysinstall/package.c index c85f444..5d2cfd2 100644 --- a/usr.sbin/sysinstall/package.c +++ b/usr.sbin/sysinstall/package.c @@ -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.47 1996/10/06 03:18:55 jkh Exp $ + * $Id: package.c,v 1.48 1996/10/12 19:30:26 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -87,14 +87,14 @@ package_extract(Device *dev, char *name, Boolean depended) char path[511]; int fd, ret; - /* If necessary, initialize the ldconfig hints */ - if (!file_readable("/var/run/ld.so.hints")) - vsystem("ldconfig /usr/lib /usr/local/lib /usr/X11R6/lib"); - /* Check to make sure it's not already there */ if (package_exists(name)) return DITEM_SUCCESS; + /* If necessary, initialize the ldconfig hints */ + if (!file_readable("/var/run/ld.so.hints")) + vsystem("ldconfig /usr/lib /usr/local/lib /usr/X11R6/lib"); + if (!dev->init(dev)) { msgConfirm("Unable to initialize media type for package extract."); return DITEM_FAILURE; diff --git a/usr.sbin/sysinstall/sysinstall.h b/usr.sbin/sysinstall/sysinstall.h index d9cb1ec..bd9af57 100644 --- a/usr.sbin/sysinstall/sysinstall.h +++ b/usr.sbin/sysinstall/sysinstall.h @@ -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.81 1996/10/05 16:33:03 jkh Exp $ + * $Id: sysinstall.h,v 1.82 1996/10/14 21:32:33 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -50,6 +50,14 @@ /*** Defines ***/ +/* Different packages we depend on - update this when package version change! */ +#define PACKAGE_GATED "gated-3.5b3" +#define PACKAGE_APACHE "apache-1.1.1" +#define PACKAGE_NETCON "commerce/netcon/bsd60" +#define PACKAGE_PCNFSD "pcnfsd-93.02.16" +#define PACKAGE_SAMBA "samba-1.9.15p8" +#define PACKAGE_LYNX "lynx-2.6" + /* variable limits */ #define VAR_NAME_MAX 128 #define VAR_VALUE_MAX 1024 @@ -96,7 +104,6 @@ #define VAR_FTP_STATE "ftpState" #define VAR_FTP_USER "ftpUser" #define VAR_FTP_HOST "ftpHost" -#define VAR_GATED "gated" #define VAR_GATEWAY "defaultrouter" #define VAR_GEOMETRY "geometry" #define VAR_HOSTNAME "hostname" @@ -121,7 +128,8 @@ #define VAR_PORTS_PATH "ports" #define VAR_RELNAME "releaseName" #define VAR_ROOT_SIZE "rootSize" -#define VAR_ROUTEDFLAGS "routedflags" +#define VAR_ROUTER "router" +#define VAR_ROUTERFLAGS "routerflags" #define VAR_SERIAL_SPEED "serialSpeed" #define VAR_SLOW_ETHER "slowEthernetCard" #define VAR_SWAP_SIZE "swapSize" @@ -366,8 +374,7 @@ extern int configPackages(dialogMenuItem *self); extern int configSaverTimeout(dialogMenuItem *self); extern int configNTP(dialogMenuItem *self); extern int configXFree86(dialogMenuItem *self); -extern int configRoutedFlags(dialogMenuItem *self); -extern int configGated(dialogMenuItem *self); +extern int configRouter(dialogMenuItem *self); extern int configSamba(dialogMenuItem *self); extern int configPCNFSD(dialogMenuItem *self); extern int configNFSServer(dialogMenuItem *self); |