Add extra variables for the configuration of all packages, not just
the lynx browser. Submitted-By: David O'Brien <obrien@cs.ucdavis.edu>
This commit is contained in:
parent
66a139dd15
commit
331b576478
@ -235,7 +235,7 @@ 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(PACKAGE_APACHE);
|
||||
i = package_add(variable_get(VAR_APACHE_PKG));
|
||||
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"
|
||||
|
@ -485,7 +485,7 @@ configRouter(dialogMenuItem *self)
|
||||
cp = variable_get(VAR_ROUTER);
|
||||
if (strcmp(cp, "NO")) {
|
||||
if (!strcmp(cp, "gated")) {
|
||||
if (package_add(PACKAGE_GATED) != DITEM_SUCCESS) {
|
||||
if (package_add(variable_get(VAR_GATED_PKG)) != DITEM_SUCCESS) {
|
||||
msgConfirm("Unable to load gated package. Falling back to no router.");
|
||||
variable_set2(VAR_ROUTER, "NO");
|
||||
}
|
||||
@ -609,7 +609,7 @@ configPCNFSD(dialogMenuItem *self)
|
||||
if (variable_get(VAR_PCNFSD))
|
||||
variable_unset(VAR_PCNFSD);
|
||||
else {
|
||||
ret = package_add(PACKAGE_PCNFSD);
|
||||
ret = package_add(variable_get(VAR_PCNFSD_PKG));
|
||||
if (DITEM_STATUS(ret) == DITEM_SUCCESS) {
|
||||
variable_set2(VAR_PCNFSD, "YES");
|
||||
variable_set2("weak_mountd_authentication", "YES");
|
||||
|
@ -1004,6 +1004,10 @@ installVarDefaults(dialogMenuItem *self)
|
||||
variable_set2(VAR_BROWSER_BINARY, "/usr/local/bin/lynx");
|
||||
variable_set2(VAR_FTP_STATE, "passive");
|
||||
variable_set2(VAR_PKG_TMPDIR, "/usr/tmp");
|
||||
variable_set2(VAR_APACHE_PKG, PACKAGE_APACHE);
|
||||
variable_set2(VAR_SAMBA_PKG, PACKAGE_SAMBA);
|
||||
variable_set2(VAR_GATED_PKG, PACKAGE_GATED);
|
||||
variable_set2(VAR_PCNFSD_PKG, PACKAGE_PCNFSD);
|
||||
variable_set2(VAR_MEDIA_TIMEOUT, itoa(MEDIA_TIMEOUT));
|
||||
if (getpid() != 1)
|
||||
variable_set2(SYSTEM_STATE, "update");
|
||||
|
@ -101,6 +101,10 @@ 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 APACHE_PKG_PROMPT "Please specify the package name for the Apache WEB server:"
|
||||
#define SAMBA_PKG_PROMPT "Please specify the package name for the Samba server:"
|
||||
#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",
|
||||
@ -123,16 +127,24 @@ static Option Options[] = {
|
||||
OPT_IS_VAR, RELNAME_PROMPT, VAR_RELNAME, varCheck },
|
||||
{ "Install Root", "Which directory to unpack distributions or packages relative to",
|
||||
OPT_IS_VAR, INSTROOT_PROMPT, VAR_INSTALL_ROOT, varCheck },
|
||||
{ "Browser Pkg", "This is the browser package that will be used for viewing HTML docs",
|
||||
OPT_IS_VAR, BPKG_PROMPT, VAR_BROWSER_PACKAGE, varCheck },
|
||||
{ "Browser Exec", "This is the path to the main binary of the browser package",
|
||||
OPT_IS_VAR, BBIN_PROMPT, VAR_BROWSER_BINARY, varCheck },
|
||||
{ "Media Type", "The current installation media type.",
|
||||
OPT_IS_FUNC, mediaGetType, VAR_MEDIA_TYPE, mediaCheck },
|
||||
{ "Media Timeout", "Timeout value in seconds for slow media.",
|
||||
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 },
|
||||
{ "Browser Exec", "This is the path to the main binary of the browser package",
|
||||
OPT_IS_VAR, BBIN_PROMPT, VAR_BROWSER_BINARY, varCheck },
|
||||
{ "Browser Pkg", "This is the browser package that will be used for viewing HTML docs",
|
||||
OPT_IS_VAR, BPKG_PROMPT, VAR_BROWSER_PACKAGE, varCheck },
|
||||
{ "Apache package", "The name of the Apache package to install if requested",
|
||||
OPT_IS_VAR, APACHE_PKG_PROMPT, VAR_APACHE_PKG, varCheck },
|
||||
{ "Samba package", "The name of the Samba package to install if requested",
|
||||
OPT_IS_VAR, SAMBA_PKG_PROMPT, VAR_SAMBA_PKG, 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 },
|
||||
{ "Use Defaults", "Reset all values to startup defaults",
|
||||
OPT_IS_FUNC, installVarDefaults, 0, resetLogo },
|
||||
{ NULL },
|
||||
|
@ -63,7 +63,7 @@ configSamba(dialogMenuItem *self)
|
||||
|
||||
if (!dmenuOpenSimple(&MenuSamba, FALSE))
|
||||
i = DITEM_FAILURE;
|
||||
else if (DITEM_STATUS(package_add(PACKAGE_SAMBA)) != DITEM_SUCCESS)
|
||||
else if (DITEM_STATUS(package_add(variable_get(VAR_SAMBA_PKG))) != DITEM_SUCCESS)
|
||||
i = DITEM_FAILURE;
|
||||
else {
|
||||
FILE *fptr;
|
||||
|
@ -90,6 +90,7 @@
|
||||
#define TCP_CONFIGURED "_tcpConfigured"
|
||||
|
||||
/* Ones that can be tweaked from config files */
|
||||
#define VAR_APACHE_PKG "apache_pkg"
|
||||
#define VAR_BLANKTIME "blanktime"
|
||||
#define VAR_BOOTMGR "bootManager"
|
||||
#define VAR_BROWSER_BINARY "browserBinary"
|
||||
@ -107,6 +108,7 @@
|
||||
#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"
|
||||
@ -128,12 +130,14 @@
|
||||
#define VAR_NOVELL "novell"
|
||||
#define VAR_NTPDATE "ntpdate"
|
||||
#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"
|
||||
#define VAR_ROOT_SIZE "rootSize"
|
||||
#define VAR_ROUTER "router"
|
||||
#define VAR_ROUTERFLAGS "routerflags"
|
||||
#define VAR_SAMBA_PKG "samba_pkg"
|
||||
#define VAR_SERIAL_SPEED "serialSpeed"
|
||||
#define VAR_SLOW_ETHER "slowEthernetCard"
|
||||
#define VAR_SWAP_SIZE "swapSize"
|
||||
|
@ -485,7 +485,7 @@ configRouter(dialogMenuItem *self)
|
||||
cp = variable_get(VAR_ROUTER);
|
||||
if (strcmp(cp, "NO")) {
|
||||
if (!strcmp(cp, "gated")) {
|
||||
if (package_add(PACKAGE_GATED) != DITEM_SUCCESS) {
|
||||
if (package_add(variable_get(VAR_GATED_PKG)) != DITEM_SUCCESS) {
|
||||
msgConfirm("Unable to load gated package. Falling back to no router.");
|
||||
variable_set2(VAR_ROUTER, "NO");
|
||||
}
|
||||
@ -609,7 +609,7 @@ configPCNFSD(dialogMenuItem *self)
|
||||
if (variable_get(VAR_PCNFSD))
|
||||
variable_unset(VAR_PCNFSD);
|
||||
else {
|
||||
ret = package_add(PACKAGE_PCNFSD);
|
||||
ret = package_add(variable_get(VAR_PCNFSD_PKG));
|
||||
if (DITEM_STATUS(ret) == DITEM_SUCCESS) {
|
||||
variable_set2(VAR_PCNFSD, "YES");
|
||||
variable_set2("weak_mountd_authentication", "YES");
|
||||
|
@ -1004,6 +1004,10 @@ installVarDefaults(dialogMenuItem *self)
|
||||
variable_set2(VAR_BROWSER_BINARY, "/usr/local/bin/lynx");
|
||||
variable_set2(VAR_FTP_STATE, "passive");
|
||||
variable_set2(VAR_PKG_TMPDIR, "/usr/tmp");
|
||||
variable_set2(VAR_APACHE_PKG, PACKAGE_APACHE);
|
||||
variable_set2(VAR_SAMBA_PKG, PACKAGE_SAMBA);
|
||||
variable_set2(VAR_GATED_PKG, PACKAGE_GATED);
|
||||
variable_set2(VAR_PCNFSD_PKG, PACKAGE_PCNFSD);
|
||||
variable_set2(VAR_MEDIA_TIMEOUT, itoa(MEDIA_TIMEOUT));
|
||||
if (getpid() != 1)
|
||||
variable_set2(SYSTEM_STATE, "update");
|
||||
|
@ -90,6 +90,7 @@
|
||||
#define TCP_CONFIGURED "_tcpConfigured"
|
||||
|
||||
/* Ones that can be tweaked from config files */
|
||||
#define VAR_APACHE_PKG "apache_pkg"
|
||||
#define VAR_BLANKTIME "blanktime"
|
||||
#define VAR_BOOTMGR "bootManager"
|
||||
#define VAR_BROWSER_BINARY "browserBinary"
|
||||
@ -107,6 +108,7 @@
|
||||
#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"
|
||||
@ -128,12 +130,14 @@
|
||||
#define VAR_NOVELL "novell"
|
||||
#define VAR_NTPDATE "ntpdate"
|
||||
#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"
|
||||
#define VAR_ROOT_SIZE "rootSize"
|
||||
#define VAR_ROUTER "router"
|
||||
#define VAR_ROUTERFLAGS "routerflags"
|
||||
#define VAR_SAMBA_PKG "samba_pkg"
|
||||
#define VAR_SERIAL_SPEED "serialSpeed"
|
||||
#define VAR_SLOW_ETHER "slowEthernetCard"
|
||||
#define VAR_SWAP_SIZE "swapSize"
|
||||
|
@ -485,7 +485,7 @@ configRouter(dialogMenuItem *self)
|
||||
cp = variable_get(VAR_ROUTER);
|
||||
if (strcmp(cp, "NO")) {
|
||||
if (!strcmp(cp, "gated")) {
|
||||
if (package_add(PACKAGE_GATED) != DITEM_SUCCESS) {
|
||||
if (package_add(variable_get(VAR_GATED_PKG)) != DITEM_SUCCESS) {
|
||||
msgConfirm("Unable to load gated package. Falling back to no router.");
|
||||
variable_set2(VAR_ROUTER, "NO");
|
||||
}
|
||||
@ -609,7 +609,7 @@ configPCNFSD(dialogMenuItem *self)
|
||||
if (variable_get(VAR_PCNFSD))
|
||||
variable_unset(VAR_PCNFSD);
|
||||
else {
|
||||
ret = package_add(PACKAGE_PCNFSD);
|
||||
ret = package_add(variable_get(VAR_PCNFSD_PKG));
|
||||
if (DITEM_STATUS(ret) == DITEM_SUCCESS) {
|
||||
variable_set2(VAR_PCNFSD, "YES");
|
||||
variable_set2("weak_mountd_authentication", "YES");
|
||||
|
@ -1004,6 +1004,10 @@ installVarDefaults(dialogMenuItem *self)
|
||||
variable_set2(VAR_BROWSER_BINARY, "/usr/local/bin/lynx");
|
||||
variable_set2(VAR_FTP_STATE, "passive");
|
||||
variable_set2(VAR_PKG_TMPDIR, "/usr/tmp");
|
||||
variable_set2(VAR_APACHE_PKG, PACKAGE_APACHE);
|
||||
variable_set2(VAR_SAMBA_PKG, PACKAGE_SAMBA);
|
||||
variable_set2(VAR_GATED_PKG, PACKAGE_GATED);
|
||||
variable_set2(VAR_PCNFSD_PKG, PACKAGE_PCNFSD);
|
||||
variable_set2(VAR_MEDIA_TIMEOUT, itoa(MEDIA_TIMEOUT));
|
||||
if (getpid() != 1)
|
||||
variable_set2(SYSTEM_STATE, "update");
|
||||
|
@ -101,6 +101,10 @@ 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 APACHE_PKG_PROMPT "Please specify the package name for the Apache WEB server:"
|
||||
#define SAMBA_PKG_PROMPT "Please specify the package name for the Samba server:"
|
||||
#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",
|
||||
@ -123,16 +127,24 @@ static Option Options[] = {
|
||||
OPT_IS_VAR, RELNAME_PROMPT, VAR_RELNAME, varCheck },
|
||||
{ "Install Root", "Which directory to unpack distributions or packages relative to",
|
||||
OPT_IS_VAR, INSTROOT_PROMPT, VAR_INSTALL_ROOT, varCheck },
|
||||
{ "Browser Pkg", "This is the browser package that will be used for viewing HTML docs",
|
||||
OPT_IS_VAR, BPKG_PROMPT, VAR_BROWSER_PACKAGE, varCheck },
|
||||
{ "Browser Exec", "This is the path to the main binary of the browser package",
|
||||
OPT_IS_VAR, BBIN_PROMPT, VAR_BROWSER_BINARY, varCheck },
|
||||
{ "Media Type", "The current installation media type.",
|
||||
OPT_IS_FUNC, mediaGetType, VAR_MEDIA_TYPE, mediaCheck },
|
||||
{ "Media Timeout", "Timeout value in seconds for slow media.",
|
||||
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 },
|
||||
{ "Browser Exec", "This is the path to the main binary of the browser package",
|
||||
OPT_IS_VAR, BBIN_PROMPT, VAR_BROWSER_BINARY, varCheck },
|
||||
{ "Browser Pkg", "This is the browser package that will be used for viewing HTML docs",
|
||||
OPT_IS_VAR, BPKG_PROMPT, VAR_BROWSER_PACKAGE, varCheck },
|
||||
{ "Apache package", "The name of the Apache package to install if requested",
|
||||
OPT_IS_VAR, APACHE_PKG_PROMPT, VAR_APACHE_PKG, varCheck },
|
||||
{ "Samba package", "The name of the Samba package to install if requested",
|
||||
OPT_IS_VAR, SAMBA_PKG_PROMPT, VAR_SAMBA_PKG, 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 },
|
||||
{ "Use Defaults", "Reset all values to startup defaults",
|
||||
OPT_IS_FUNC, installVarDefaults, 0, resetLogo },
|
||||
{ NULL },
|
||||
|
@ -90,6 +90,7 @@
|
||||
#define TCP_CONFIGURED "_tcpConfigured"
|
||||
|
||||
/* Ones that can be tweaked from config files */
|
||||
#define VAR_APACHE_PKG "apache_pkg"
|
||||
#define VAR_BLANKTIME "blanktime"
|
||||
#define VAR_BOOTMGR "bootManager"
|
||||
#define VAR_BROWSER_BINARY "browserBinary"
|
||||
@ -107,6 +108,7 @@
|
||||
#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"
|
||||
@ -128,12 +130,14 @@
|
||||
#define VAR_NOVELL "novell"
|
||||
#define VAR_NTPDATE "ntpdate"
|
||||
#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"
|
||||
#define VAR_ROOT_SIZE "rootSize"
|
||||
#define VAR_ROUTER "router"
|
||||
#define VAR_ROUTERFLAGS "routerflags"
|
||||
#define VAR_SAMBA_PKG "samba_pkg"
|
||||
#define VAR_SERIAL_SPEED "serialSpeed"
|
||||
#define VAR_SLOW_ETHER "slowEthernetCard"
|
||||
#define VAR_SWAP_SIZE "swapSize"
|
||||
|
Loading…
Reference in New Issue
Block a user