YAMF22
This commit is contained in:
parent
4b59b68956
commit
08e6881746
@ -4,7 +4,7 @@
|
|||||||
* This is probably the last program in the `sysinstall' line - the next
|
* This is probably the last program in the `sysinstall' line - the next
|
||||||
* generation being essentially a complete rewrite.
|
* generation being essentially a complete rewrite.
|
||||||
*
|
*
|
||||||
* $Id: config.c,v 1.51.2.52 1997/06/11 08:39:26 jkh Exp $
|
* $Id: config.c,v 1.99 1997/06/11 08:41:09 jkh Exp $
|
||||||
*
|
*
|
||||||
* Copyright (c) 1995
|
* Copyright (c) 1995
|
||||||
* Jordan Hubbard. All rights reserved.
|
* Jordan Hubbard. All rights reserved.
|
||||||
@ -482,12 +482,13 @@ configNTP(dialogMenuItem *self)
|
|||||||
{
|
{
|
||||||
int status;
|
int status;
|
||||||
|
|
||||||
status = variable_get_value(VAR_NTPDATE, "Enter the name of an NTP server") ? DITEM_SUCCESS : DITEM_FAILURE;
|
status = variable_get_value("ntpdate_flags", "Enter the name of an NTP server") ? DITEM_SUCCESS : DITEM_FAILURE;
|
||||||
if (status == DITEM_SUCCESS) {
|
if (status == DITEM_SUCCESS) {
|
||||||
static char tmp[255];
|
static char tmp[255];
|
||||||
|
|
||||||
snprintf(tmp, 255, "%s=%s", VAR_NTPDATE, variable_get(VAR_NTPDATE));
|
snprintf(tmp, 255, "ntpdate_enable=YES,ntpdate_flags=%s", variable_get("ntpdate_flags"));
|
||||||
self->aux = (int)tmp;
|
self->data = tmp;
|
||||||
|
dmenuSetVariables(self);
|
||||||
}
|
}
|
||||||
return status | DITEM_RESTORE;
|
return status | DITEM_RESTORE;
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* This is probably the last attempt in the `sysinstall' line, the next
|
* This is probably the last attempt in the `sysinstall' line, the next
|
||||||
* generation being slated for what's essentially a complete rewrite.
|
* generation being slated for what's essentially a complete rewrite.
|
||||||
*
|
*
|
||||||
* $Id$
|
* $Id: dmenu.c,v 1.32 1997/02/22 14:11:35 peter Exp $
|
||||||
*
|
*
|
||||||
* Copyright (c) 1995
|
* Copyright (c) 1995
|
||||||
* Jordan Hubbard. All rights reserved.
|
* Jordan Hubbard. All rights reserved.
|
||||||
@ -174,26 +174,42 @@ dmenuFlagCheck(dialogMenuItem *item)
|
|||||||
int
|
int
|
||||||
dmenuVarCheck(dialogMenuItem *item)
|
dmenuVarCheck(dialogMenuItem *item)
|
||||||
{
|
{
|
||||||
char *w, *cp, *cp2, *cp3, tmp[256];
|
char *w;
|
||||||
|
|
||||||
w = (char *)item->aux;
|
w = (char *)item->aux;
|
||||||
if (!w)
|
if (!w)
|
||||||
w = (char *)item->data;
|
w = (char *)item->data;
|
||||||
if (!w)
|
if (!w)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
SAFE_STRCPY(tmp, w);
|
return variable_check(w);
|
||||||
if ((cp = index(tmp, '=')) != NULL) {
|
}
|
||||||
*(cp++) = '\0';
|
|
||||||
if ((cp3 = index(cp, ',')) != NULL)
|
int
|
||||||
*cp3 = '\0';
|
dmenuVarsCheck(dialogMenuItem *item)
|
||||||
cp2 = getenv(tmp);
|
{
|
||||||
if (cp2)
|
int res, init;
|
||||||
return !strcmp(cp, cp2);
|
char *w, *cp1, *cp2;
|
||||||
else
|
char *copy;
|
||||||
return FALSE;
|
|
||||||
|
w = (char *)item->aux;
|
||||||
|
if (!w)
|
||||||
|
w = (char *)item->data;
|
||||||
|
if (!w)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
copy = strdup(w);
|
||||||
|
res = TRUE;
|
||||||
|
init = FALSE;
|
||||||
|
for (cp1 = copy; cp1 != NULL;) {
|
||||||
|
init = TRUE;
|
||||||
|
cp2 = index(cp1, ',');
|
||||||
|
if (cp2 != NULL)
|
||||||
|
*cp2++ = '\0';
|
||||||
|
res = res && variable_check(cp1);
|
||||||
|
cp1 = cp2;
|
||||||
}
|
}
|
||||||
else
|
free(copy);
|
||||||
return (int)getenv(tmp);
|
return res && init;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* This is probably the last program in the `sysinstall' line - the next
|
* This is probably the last program in the `sysinstall' line - the next
|
||||||
* generation being essentially a complete rewrite.
|
* generation being essentially a complete rewrite.
|
||||||
*
|
*
|
||||||
* $Id: menus.c,v 1.137 1997/06/09 01:19:44 jkh Exp $
|
* $Id: menus.c,v 1.138 1997/06/13 14:06:10 jkh Exp $
|
||||||
*
|
*
|
||||||
* Copyright (c) 1995
|
* Copyright (c) 1995
|
||||||
* Jordan Hubbard. All rights reserved.
|
* Jordan Hubbard. All rights reserved.
|
||||||
@ -1145,7 +1145,7 @@ DMenu MenuNetworking = {
|
|||||||
dmenuVarCheck, configNovell, NULL, "novell" },
|
dmenuVarCheck, configNovell, NULL, "novell" },
|
||||||
#endif
|
#endif
|
||||||
{ "Ntpdate", "Select a clock-syncronization server",
|
{ "Ntpdate", "Select a clock-syncronization server",
|
||||||
dmenuVarCheck, dmenuSubmenu, NULL, &MenuNTP, '[', 'X', ']', (int)VAR_NTPDATE },
|
dmenuVarCheck, dmenuSubmenu, NULL, &MenuNTP, '[', 'X', ']', "ntpdate_enable=YES" },
|
||||||
{ "router", "Select routing daemon (default: routed)",
|
{ "router", "Select routing daemon (default: routed)",
|
||||||
dmenuVarCheck, configRouter, NULL, "router" },
|
dmenuVarCheck, configRouter, NULL, "router" },
|
||||||
{ "Rwhod", "This machine wants to run the rwho daemon",
|
{ "Rwhod", "This machine wants to run the rwho daemon",
|
||||||
@ -1169,46 +1169,69 @@ DMenu MenuNTP = {
|
|||||||
"close to you to have your system time syncronized accordingly.",
|
"close to you to have your system time syncronized accordingly.",
|
||||||
"These are the primary open-access NTP servers",
|
"These are the primary open-access NTP servers",
|
||||||
NULL,
|
NULL,
|
||||||
{ { "Other", "Select a site not on this list",
|
{ { "None", "No ntp server",
|
||||||
dmenuVarCheck, configNTP, NULL, NULL },
|
dmenuVarCheck, dmenuSetVariables, NULL,
|
||||||
|
"ntpdate_enable=NO,ntpdate_flags=" },
|
||||||
|
{ "Other", "Select a site not on this list",
|
||||||
|
dmenuVarsCheck, configNTP, NULL,
|
||||||
|
NULL },
|
||||||
{ "Australia", "ntp.syd.dms.csiro.au (HP 5061 Cesium Beam)",
|
{ "Australia", "ntp.syd.dms.csiro.au (HP 5061 Cesium Beam)",
|
||||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_NTPDATE "=ntp.syd.dms.csiro.au" },
|
dmenuVarsCheck, dmenuSetVariables, NULL,
|
||||||
|
"ntpdate_enable=YES,ntpdate_flags=ntp.syd.dms.csiro.au" },
|
||||||
{ "Canada", "tick.usask.ca (GOES clock)",
|
{ "Canada", "tick.usask.ca (GOES clock)",
|
||||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_NTPDATE "=tick.usask.ca" },
|
dmenuVarsCheck, dmenuSetVariables, NULL,
|
||||||
|
"ntpdate_enable=YES,ntpdate_flags=tick.usask.ca" },
|
||||||
{ "France", "canon.inria.fr (TDF clock)",
|
{ "France", "canon.inria.fr (TDF clock)",
|
||||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_NTPDATE "=canon.inria.fr" },
|
dmenuVarsCheck, dmenuSetVariables, NULL,
|
||||||
|
"ntpdate_enable=YES,ntpdate_flags=canon.inria.fr" },
|
||||||
{ "Germany", "ntps1-{0,1,2}.uni-erlangen.de (GPS)",
|
{ "Germany", "ntps1-{0,1,2}.uni-erlangen.de (GPS)",
|
||||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_NTPDATE "=ntps1-0.uni-erlangen.de" },
|
dmenuVarsCheck, dmenuSetVariables, NULL,
|
||||||
|
"ntpdate_enable=YES,ntpdate_flags=ntps1-0.uni-erlangen.de" },
|
||||||
{ "Germany #2", "ntps1-0.cs.tu-berlin.de (GPS)",
|
{ "Germany #2", "ntps1-0.cs.tu-berlin.de (GPS)",
|
||||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_NTPDATE "=ntps1-0.cs.tu-berlin.de" },
|
dmenuVarsCheck, dmenuSetVariables, NULL,
|
||||||
|
"ntpdate_enable=YES,ntpdate_flags=ntps1-0.cs.tu-berlin.de" },
|
||||||
{ "Japan", "clock.nc.fukuoka-u.ac.jp (GPS clock)",
|
{ "Japan", "clock.nc.fukuoka-u.ac.jp (GPS clock)",
|
||||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_NTPDATE "=clock.nc.fukuoka-u.ac.jp" },
|
dmenuVarsCheck, dmenuSetVariables, NULL,
|
||||||
|
"ntpdate_enable=YES,ntpdate_flags=clock.nc.fukuoka-u.ac.jp" },
|
||||||
{ "Japan #2", "clock.tl.fukuoka-u.ac.jp (GPS clock)",
|
{ "Japan #2", "clock.tl.fukuoka-u.ac.jp (GPS clock)",
|
||||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_NTPDATE "=clock.tl.fukuoka-u.ac.jp" },
|
dmenuVarsCheck, dmenuSetVariables, NULL,
|
||||||
|
"ntpdate_enable=YES,ntpdate_flags=clock.tl.fukuoka-u.ac.jp" },
|
||||||
{ "Netherlands", "ntp0.nl.net (GPS clock)",
|
{ "Netherlands", "ntp0.nl.net (GPS clock)",
|
||||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_NTPDATE "=ntp0.nl.net" },
|
dmenuVarsCheck, dmenuSetVariables, NULL,
|
||||||
|
"ntpdate_enable=YES,ntpdate_flags=ntp0.nl.net" },
|
||||||
{ "Norway", "timer.unik.no (NTP clock)",
|
{ "Norway", "timer.unik.no (NTP clock)",
|
||||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_NTPDATE "=timer.unik.no" },
|
dmenuVarsCheck, dmenuSetVariables, NULL,
|
||||||
|
"ntpdate_enable=YES,ntpdate_flags=timer.unik.no" },
|
||||||
{ "Sweden", "Time1.Stupi.SE (Cesium/GPS)",
|
{ "Sweden", "Time1.Stupi.SE (Cesium/GPS)",
|
||||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_NTPDATE "=Time1.Stupi.SE" },
|
dmenuVarsCheck, dmenuSetVariables, NULL,
|
||||||
|
"ntpdate_enable=YES,ntpdate_flags=Time1.Stupi.SE" },
|
||||||
{ "Switzerland", "swisstime.ethz.ch (DCF77 clock)",
|
{ "Switzerland", "swisstime.ethz.ch (DCF77 clock)",
|
||||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_NTPDATE "=swisstime.ethz.ch" },
|
dmenuVarsCheck, dmenuSetVariables, NULL,
|
||||||
|
"ntpdate_enable=YES,ntpdate_flags=swisstime.ethz.ch" },
|
||||||
{ "U.S. East Coast", "bitsy.mit.edu (WWV clock)",
|
{ "U.S. East Coast", "bitsy.mit.edu (WWV clock)",
|
||||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_NTPDATE "=bitsy.mit.edu" },
|
dmenuVarsCheck, dmenuSetVariables, NULL,
|
||||||
|
"ntpdate_enable=YES,ntpdate_flags=bitsy.mit.edu" },
|
||||||
{ "U.S. East Coast #2", "otc1.psu.edu (WWV clock)",
|
{ "U.S. East Coast #2", "otc1.psu.edu (WWV clock)",
|
||||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_NTPDATE "=otc1.psu.edu" },
|
dmenuVarsCheck, dmenuSetVariables, NULL,
|
||||||
|
"ntpdate_enable=YES,ntpdate_flags=otc1.psu.edu" },
|
||||||
{ "U.S. West Coast", "apple.com (WWV clock)",
|
{ "U.S. West Coast", "apple.com (WWV clock)",
|
||||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_NTPDATE "=apple.com" },
|
dmenuVarsCheck, dmenuSetVariables, NULL,
|
||||||
|
"ntpdate_enable=YES,ntpdate_flags=apple.com" },
|
||||||
{ "U.S. West Coast #2", "clepsydra.dec.com (GOES clock)",
|
{ "U.S. West Coast #2", "clepsydra.dec.com (GOES clock)",
|
||||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_NTPDATE "=clepsydra.dec.com" },
|
dmenuVarsCheck, dmenuSetVariables, NULL,
|
||||||
|
"ntpdate_enable=YES,ntpdate_flags=clepsydra.dec.com" },
|
||||||
{ "U.S. West Coast #3", "clock.llnl.gov (WWVB clock)",
|
{ "U.S. West Coast #3", "clock.llnl.gov (WWVB clock)",
|
||||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_NTPDATE "=clock.llnl.gov" },
|
dmenuVarsCheck, dmenuSetVariables, NULL,
|
||||||
|
"ntpdate_enable=YES,ntpdate_flags=clock.llnl.gov" },
|
||||||
{ "U.S. Midwest", "ncar.ucar.edu (WWVB clock)",
|
{ "U.S. Midwest", "ncar.ucar.edu (WWVB clock)",
|
||||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_NTPDATE "=ncar.ucar.edu" },
|
dmenuVarsCheck, dmenuSetVariables, NULL,
|
||||||
|
"ntpdate_enable=YES,ntpdate_flags=ncar.ucar.edu" },
|
||||||
{ "U.S. Pacific", "chantry.hawaii.net (WWV/H clock)",
|
{ "U.S. Pacific", "chantry.hawaii.net (WWV/H clock)",
|
||||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_NTPDATE "=chantry.hawaii.net" },
|
dmenuVarsCheck, dmenuSetVariables, NULL,
|
||||||
|
"ntpdate_enable=YES,ntpdate_flags=chantry.hawaii.net" },
|
||||||
{ "U.S. Southwest", "shorty.chpc.utexas.edu (WWV clock)",
|
{ "U.S. Southwest", "shorty.chpc.utexas.edu (WWV clock)",
|
||||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_NTPDATE "=shorty.chpc.utexas.edu" },
|
dmenuVarsCheck, dmenuSetVariables, NULL,
|
||||||
|
"ntpdate_enable=YES,ntpdate_flags=shorty.chpc.utexas.edu" },
|
||||||
{ NULL } },
|
{ NULL } },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* This is probably the last attempt in the `sysinstall' line, the next
|
* This is probably the last attempt in the `sysinstall' line, the next
|
||||||
* generation being slated to essentially a complete rewrite.
|
* generation being slated to essentially a complete rewrite.
|
||||||
*
|
*
|
||||||
* $Id: sysinstall.h,v 1.131 1997/06/05 09:48:01 jkh Exp $
|
* $Id: sysinstall.h,v 1.132 1997/06/09 01:19:44 jkh Exp $
|
||||||
*
|
*
|
||||||
* Copyright (c) 1995
|
* Copyright (c) 1995
|
||||||
* Jordan Hubbard. All rights reserved.
|
* Jordan Hubbard. All rights reserved.
|
||||||
@ -137,7 +137,6 @@
|
|||||||
#define VAR_NO_CONFIRM "noConfirm"
|
#define VAR_NO_CONFIRM "noConfirm"
|
||||||
#define VAR_NONINTERACTIVE "nonInteractive"
|
#define VAR_NONINTERACTIVE "nonInteractive"
|
||||||
#define VAR_NOVELL "novell"
|
#define VAR_NOVELL "novell"
|
||||||
#define VAR_NTPDATE "ntpdate"
|
|
||||||
#define VAR_PARTITION "partition"
|
#define VAR_PARTITION "partition"
|
||||||
#define VAR_PCNFSD "pcnfsd"
|
#define VAR_PCNFSD "pcnfsd"
|
||||||
#define VAR_PCNFSD_PKG "pcnfsd_pkg"
|
#define VAR_PCNFSD_PKG "pcnfsd_pkg"
|
||||||
@ -493,6 +492,7 @@ extern int dmenuSetValue(dialogMenuItem *tmp);
|
|||||||
extern Boolean dmenuOpen(DMenu *menu, int *choice, int *scroll, int *curr, int *max, Boolean buttons);
|
extern Boolean dmenuOpen(DMenu *menu, int *choice, int *scroll, int *curr, int *max, Boolean buttons);
|
||||||
extern Boolean dmenuOpenSimple(DMenu *menu, Boolean buttons);
|
extern Boolean dmenuOpenSimple(DMenu *menu, Boolean buttons);
|
||||||
extern int dmenuVarCheck(dialogMenuItem *item);
|
extern int dmenuVarCheck(dialogMenuItem *item);
|
||||||
|
extern int dmenuVarsCheck(dialogMenuItem *item);
|
||||||
extern int dmenuFlagCheck(dialogMenuItem *item);
|
extern int dmenuFlagCheck(dialogMenuItem *item);
|
||||||
extern int dmenuRadioCheck(dialogMenuItem *item);
|
extern int dmenuRadioCheck(dialogMenuItem *item);
|
||||||
|
|
||||||
@ -702,6 +702,7 @@ extern void variable_set2(char *name, char *value);
|
|||||||
extern char *variable_get(char *var);
|
extern char *variable_get(char *var);
|
||||||
extern void variable_unset(char *var);
|
extern void variable_unset(char *var);
|
||||||
extern char *variable_get_value(char *var, char *prompt);
|
extern char *variable_get_value(char *var, char *prompt);
|
||||||
|
extern int variable_check(char *data);
|
||||||
|
|
||||||
/* variable_load.c */
|
/* variable_load.c */
|
||||||
extern int variableLoad(dialogMenuItem *self);
|
extern int variableLoad(dialogMenuItem *self);
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* This is probably the last program in the `sysinstall' line - the next
|
* This is probably the last program in the `sysinstall' line - the next
|
||||||
* generation being essentially a complete rewrite.
|
* generation being essentially a complete rewrite.
|
||||||
*
|
*
|
||||||
* $Id: variable.c,v 1.11.2.5 1997/06/11 08:39:27 jkh Exp $
|
* $Id: variable.c,v 1.19 1997/06/11 08:41:10 jkh Exp $
|
||||||
*
|
*
|
||||||
* Copyright (c) 1995
|
* Copyright (c) 1995
|
||||||
* Jordan Hubbard. All rights reserved.
|
* Jordan Hubbard. All rights reserved.
|
||||||
@ -155,3 +155,29 @@ variable_get_value(char *var, char *prompt)
|
|||||||
cp = NULL;
|
cp = NULL;
|
||||||
return cp;
|
return cp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Check if value passed in data (in the form "variable=value") is equal to value of
|
||||||
|
variable stored in env */
|
||||||
|
int
|
||||||
|
variable_check(char *data)
|
||||||
|
{
|
||||||
|
char *w, *cp, *cp2, *cp3, tmp[256];
|
||||||
|
|
||||||
|
w = data;
|
||||||
|
if (!w)
|
||||||
|
return FALSE;
|
||||||
|
SAFE_STRCPY(tmp, w);
|
||||||
|
if ((cp = index(tmp, '=')) != NULL) {
|
||||||
|
*(cp++) = '\0';
|
||||||
|
if ((cp3 = index(cp, ',')) != NULL)
|
||||||
|
*cp3 = '\0';
|
||||||
|
cp2 = getenv(tmp);
|
||||||
|
|
||||||
|
if (cp2)
|
||||||
|
return !strcmp(cp, cp2);
|
||||||
|
else
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return (int)getenv(tmp);
|
||||||
|
}
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* This is probably the last program in the `sysinstall' line - the next
|
* This is probably the last program in the `sysinstall' line - the next
|
||||||
* generation being essentially a complete rewrite.
|
* generation being essentially a complete rewrite.
|
||||||
*
|
*
|
||||||
* $Id: config.c,v 1.51.2.52 1997/06/11 08:39:26 jkh Exp $
|
* $Id: config.c,v 1.99 1997/06/11 08:41:09 jkh Exp $
|
||||||
*
|
*
|
||||||
* Copyright (c) 1995
|
* Copyright (c) 1995
|
||||||
* Jordan Hubbard. All rights reserved.
|
* Jordan Hubbard. All rights reserved.
|
||||||
@ -482,12 +482,13 @@ configNTP(dialogMenuItem *self)
|
|||||||
{
|
{
|
||||||
int status;
|
int status;
|
||||||
|
|
||||||
status = variable_get_value(VAR_NTPDATE, "Enter the name of an NTP server") ? DITEM_SUCCESS : DITEM_FAILURE;
|
status = variable_get_value("ntpdate_flags", "Enter the name of an NTP server") ? DITEM_SUCCESS : DITEM_FAILURE;
|
||||||
if (status == DITEM_SUCCESS) {
|
if (status == DITEM_SUCCESS) {
|
||||||
static char tmp[255];
|
static char tmp[255];
|
||||||
|
|
||||||
snprintf(tmp, 255, "%s=%s", VAR_NTPDATE, variable_get(VAR_NTPDATE));
|
snprintf(tmp, 255, "ntpdate_enable=YES,ntpdate_flags=%s", variable_get("ntpdate_flags"));
|
||||||
self->aux = (int)tmp;
|
self->data = tmp;
|
||||||
|
dmenuSetVariables(self);
|
||||||
}
|
}
|
||||||
return status | DITEM_RESTORE;
|
return status | DITEM_RESTORE;
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* This is probably the last attempt in the `sysinstall' line, the next
|
* This is probably the last attempt in the `sysinstall' line, the next
|
||||||
* generation being slated for what's essentially a complete rewrite.
|
* generation being slated for what's essentially a complete rewrite.
|
||||||
*
|
*
|
||||||
* $Id$
|
* $Id: dmenu.c,v 1.32 1997/02/22 14:11:35 peter Exp $
|
||||||
*
|
*
|
||||||
* Copyright (c) 1995
|
* Copyright (c) 1995
|
||||||
* Jordan Hubbard. All rights reserved.
|
* Jordan Hubbard. All rights reserved.
|
||||||
@ -174,26 +174,42 @@ dmenuFlagCheck(dialogMenuItem *item)
|
|||||||
int
|
int
|
||||||
dmenuVarCheck(dialogMenuItem *item)
|
dmenuVarCheck(dialogMenuItem *item)
|
||||||
{
|
{
|
||||||
char *w, *cp, *cp2, *cp3, tmp[256];
|
char *w;
|
||||||
|
|
||||||
w = (char *)item->aux;
|
w = (char *)item->aux;
|
||||||
if (!w)
|
if (!w)
|
||||||
w = (char *)item->data;
|
w = (char *)item->data;
|
||||||
if (!w)
|
if (!w)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
SAFE_STRCPY(tmp, w);
|
return variable_check(w);
|
||||||
if ((cp = index(tmp, '=')) != NULL) {
|
}
|
||||||
*(cp++) = '\0';
|
|
||||||
if ((cp3 = index(cp, ',')) != NULL)
|
int
|
||||||
*cp3 = '\0';
|
dmenuVarsCheck(dialogMenuItem *item)
|
||||||
cp2 = getenv(tmp);
|
{
|
||||||
if (cp2)
|
int res, init;
|
||||||
return !strcmp(cp, cp2);
|
char *w, *cp1, *cp2;
|
||||||
else
|
char *copy;
|
||||||
return FALSE;
|
|
||||||
|
w = (char *)item->aux;
|
||||||
|
if (!w)
|
||||||
|
w = (char *)item->data;
|
||||||
|
if (!w)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
copy = strdup(w);
|
||||||
|
res = TRUE;
|
||||||
|
init = FALSE;
|
||||||
|
for (cp1 = copy; cp1 != NULL;) {
|
||||||
|
init = TRUE;
|
||||||
|
cp2 = index(cp1, ',');
|
||||||
|
if (cp2 != NULL)
|
||||||
|
*cp2++ = '\0';
|
||||||
|
res = res && variable_check(cp1);
|
||||||
|
cp1 = cp2;
|
||||||
}
|
}
|
||||||
else
|
free(copy);
|
||||||
return (int)getenv(tmp);
|
return res && init;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* This is probably the last program in the `sysinstall' line - the next
|
* This is probably the last program in the `sysinstall' line - the next
|
||||||
* generation being essentially a complete rewrite.
|
* generation being essentially a complete rewrite.
|
||||||
*
|
*
|
||||||
* $Id: menus.c,v 1.137 1997/06/09 01:19:44 jkh Exp $
|
* $Id: menus.c,v 1.138 1997/06/13 14:06:10 jkh Exp $
|
||||||
*
|
*
|
||||||
* Copyright (c) 1995
|
* Copyright (c) 1995
|
||||||
* Jordan Hubbard. All rights reserved.
|
* Jordan Hubbard. All rights reserved.
|
||||||
@ -1145,7 +1145,7 @@ DMenu MenuNetworking = {
|
|||||||
dmenuVarCheck, configNovell, NULL, "novell" },
|
dmenuVarCheck, configNovell, NULL, "novell" },
|
||||||
#endif
|
#endif
|
||||||
{ "Ntpdate", "Select a clock-syncronization server",
|
{ "Ntpdate", "Select a clock-syncronization server",
|
||||||
dmenuVarCheck, dmenuSubmenu, NULL, &MenuNTP, '[', 'X', ']', (int)VAR_NTPDATE },
|
dmenuVarCheck, dmenuSubmenu, NULL, &MenuNTP, '[', 'X', ']', "ntpdate_enable=YES" },
|
||||||
{ "router", "Select routing daemon (default: routed)",
|
{ "router", "Select routing daemon (default: routed)",
|
||||||
dmenuVarCheck, configRouter, NULL, "router" },
|
dmenuVarCheck, configRouter, NULL, "router" },
|
||||||
{ "Rwhod", "This machine wants to run the rwho daemon",
|
{ "Rwhod", "This machine wants to run the rwho daemon",
|
||||||
@ -1169,46 +1169,69 @@ DMenu MenuNTP = {
|
|||||||
"close to you to have your system time syncronized accordingly.",
|
"close to you to have your system time syncronized accordingly.",
|
||||||
"These are the primary open-access NTP servers",
|
"These are the primary open-access NTP servers",
|
||||||
NULL,
|
NULL,
|
||||||
{ { "Other", "Select a site not on this list",
|
{ { "None", "No ntp server",
|
||||||
dmenuVarCheck, configNTP, NULL, NULL },
|
dmenuVarCheck, dmenuSetVariables, NULL,
|
||||||
|
"ntpdate_enable=NO,ntpdate_flags=" },
|
||||||
|
{ "Other", "Select a site not on this list",
|
||||||
|
dmenuVarsCheck, configNTP, NULL,
|
||||||
|
NULL },
|
||||||
{ "Australia", "ntp.syd.dms.csiro.au (HP 5061 Cesium Beam)",
|
{ "Australia", "ntp.syd.dms.csiro.au (HP 5061 Cesium Beam)",
|
||||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_NTPDATE "=ntp.syd.dms.csiro.au" },
|
dmenuVarsCheck, dmenuSetVariables, NULL,
|
||||||
|
"ntpdate_enable=YES,ntpdate_flags=ntp.syd.dms.csiro.au" },
|
||||||
{ "Canada", "tick.usask.ca (GOES clock)",
|
{ "Canada", "tick.usask.ca (GOES clock)",
|
||||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_NTPDATE "=tick.usask.ca" },
|
dmenuVarsCheck, dmenuSetVariables, NULL,
|
||||||
|
"ntpdate_enable=YES,ntpdate_flags=tick.usask.ca" },
|
||||||
{ "France", "canon.inria.fr (TDF clock)",
|
{ "France", "canon.inria.fr (TDF clock)",
|
||||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_NTPDATE "=canon.inria.fr" },
|
dmenuVarsCheck, dmenuSetVariables, NULL,
|
||||||
|
"ntpdate_enable=YES,ntpdate_flags=canon.inria.fr" },
|
||||||
{ "Germany", "ntps1-{0,1,2}.uni-erlangen.de (GPS)",
|
{ "Germany", "ntps1-{0,1,2}.uni-erlangen.de (GPS)",
|
||||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_NTPDATE "=ntps1-0.uni-erlangen.de" },
|
dmenuVarsCheck, dmenuSetVariables, NULL,
|
||||||
|
"ntpdate_enable=YES,ntpdate_flags=ntps1-0.uni-erlangen.de" },
|
||||||
{ "Germany #2", "ntps1-0.cs.tu-berlin.de (GPS)",
|
{ "Germany #2", "ntps1-0.cs.tu-berlin.de (GPS)",
|
||||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_NTPDATE "=ntps1-0.cs.tu-berlin.de" },
|
dmenuVarsCheck, dmenuSetVariables, NULL,
|
||||||
|
"ntpdate_enable=YES,ntpdate_flags=ntps1-0.cs.tu-berlin.de" },
|
||||||
{ "Japan", "clock.nc.fukuoka-u.ac.jp (GPS clock)",
|
{ "Japan", "clock.nc.fukuoka-u.ac.jp (GPS clock)",
|
||||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_NTPDATE "=clock.nc.fukuoka-u.ac.jp" },
|
dmenuVarsCheck, dmenuSetVariables, NULL,
|
||||||
|
"ntpdate_enable=YES,ntpdate_flags=clock.nc.fukuoka-u.ac.jp" },
|
||||||
{ "Japan #2", "clock.tl.fukuoka-u.ac.jp (GPS clock)",
|
{ "Japan #2", "clock.tl.fukuoka-u.ac.jp (GPS clock)",
|
||||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_NTPDATE "=clock.tl.fukuoka-u.ac.jp" },
|
dmenuVarsCheck, dmenuSetVariables, NULL,
|
||||||
|
"ntpdate_enable=YES,ntpdate_flags=clock.tl.fukuoka-u.ac.jp" },
|
||||||
{ "Netherlands", "ntp0.nl.net (GPS clock)",
|
{ "Netherlands", "ntp0.nl.net (GPS clock)",
|
||||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_NTPDATE "=ntp0.nl.net" },
|
dmenuVarsCheck, dmenuSetVariables, NULL,
|
||||||
|
"ntpdate_enable=YES,ntpdate_flags=ntp0.nl.net" },
|
||||||
{ "Norway", "timer.unik.no (NTP clock)",
|
{ "Norway", "timer.unik.no (NTP clock)",
|
||||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_NTPDATE "=timer.unik.no" },
|
dmenuVarsCheck, dmenuSetVariables, NULL,
|
||||||
|
"ntpdate_enable=YES,ntpdate_flags=timer.unik.no" },
|
||||||
{ "Sweden", "Time1.Stupi.SE (Cesium/GPS)",
|
{ "Sweden", "Time1.Stupi.SE (Cesium/GPS)",
|
||||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_NTPDATE "=Time1.Stupi.SE" },
|
dmenuVarsCheck, dmenuSetVariables, NULL,
|
||||||
|
"ntpdate_enable=YES,ntpdate_flags=Time1.Stupi.SE" },
|
||||||
{ "Switzerland", "swisstime.ethz.ch (DCF77 clock)",
|
{ "Switzerland", "swisstime.ethz.ch (DCF77 clock)",
|
||||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_NTPDATE "=swisstime.ethz.ch" },
|
dmenuVarsCheck, dmenuSetVariables, NULL,
|
||||||
|
"ntpdate_enable=YES,ntpdate_flags=swisstime.ethz.ch" },
|
||||||
{ "U.S. East Coast", "bitsy.mit.edu (WWV clock)",
|
{ "U.S. East Coast", "bitsy.mit.edu (WWV clock)",
|
||||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_NTPDATE "=bitsy.mit.edu" },
|
dmenuVarsCheck, dmenuSetVariables, NULL,
|
||||||
|
"ntpdate_enable=YES,ntpdate_flags=bitsy.mit.edu" },
|
||||||
{ "U.S. East Coast #2", "otc1.psu.edu (WWV clock)",
|
{ "U.S. East Coast #2", "otc1.psu.edu (WWV clock)",
|
||||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_NTPDATE "=otc1.psu.edu" },
|
dmenuVarsCheck, dmenuSetVariables, NULL,
|
||||||
|
"ntpdate_enable=YES,ntpdate_flags=otc1.psu.edu" },
|
||||||
{ "U.S. West Coast", "apple.com (WWV clock)",
|
{ "U.S. West Coast", "apple.com (WWV clock)",
|
||||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_NTPDATE "=apple.com" },
|
dmenuVarsCheck, dmenuSetVariables, NULL,
|
||||||
|
"ntpdate_enable=YES,ntpdate_flags=apple.com" },
|
||||||
{ "U.S. West Coast #2", "clepsydra.dec.com (GOES clock)",
|
{ "U.S. West Coast #2", "clepsydra.dec.com (GOES clock)",
|
||||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_NTPDATE "=clepsydra.dec.com" },
|
dmenuVarsCheck, dmenuSetVariables, NULL,
|
||||||
|
"ntpdate_enable=YES,ntpdate_flags=clepsydra.dec.com" },
|
||||||
{ "U.S. West Coast #3", "clock.llnl.gov (WWVB clock)",
|
{ "U.S. West Coast #3", "clock.llnl.gov (WWVB clock)",
|
||||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_NTPDATE "=clock.llnl.gov" },
|
dmenuVarsCheck, dmenuSetVariables, NULL,
|
||||||
|
"ntpdate_enable=YES,ntpdate_flags=clock.llnl.gov" },
|
||||||
{ "U.S. Midwest", "ncar.ucar.edu (WWVB clock)",
|
{ "U.S. Midwest", "ncar.ucar.edu (WWVB clock)",
|
||||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_NTPDATE "=ncar.ucar.edu" },
|
dmenuVarsCheck, dmenuSetVariables, NULL,
|
||||||
|
"ntpdate_enable=YES,ntpdate_flags=ncar.ucar.edu" },
|
||||||
{ "U.S. Pacific", "chantry.hawaii.net (WWV/H clock)",
|
{ "U.S. Pacific", "chantry.hawaii.net (WWV/H clock)",
|
||||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_NTPDATE "=chantry.hawaii.net" },
|
dmenuVarsCheck, dmenuSetVariables, NULL,
|
||||||
|
"ntpdate_enable=YES,ntpdate_flags=chantry.hawaii.net" },
|
||||||
{ "U.S. Southwest", "shorty.chpc.utexas.edu (WWV clock)",
|
{ "U.S. Southwest", "shorty.chpc.utexas.edu (WWV clock)",
|
||||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_NTPDATE "=shorty.chpc.utexas.edu" },
|
dmenuVarsCheck, dmenuSetVariables, NULL,
|
||||||
|
"ntpdate_enable=YES,ntpdate_flags=shorty.chpc.utexas.edu" },
|
||||||
{ NULL } },
|
{ NULL } },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* This is probably the last attempt in the `sysinstall' line, the next
|
* This is probably the last attempt in the `sysinstall' line, the next
|
||||||
* generation being slated to essentially a complete rewrite.
|
* generation being slated to essentially a complete rewrite.
|
||||||
*
|
*
|
||||||
* $Id: sysinstall.h,v 1.131 1997/06/05 09:48:01 jkh Exp $
|
* $Id: sysinstall.h,v 1.132 1997/06/09 01:19:44 jkh Exp $
|
||||||
*
|
*
|
||||||
* Copyright (c) 1995
|
* Copyright (c) 1995
|
||||||
* Jordan Hubbard. All rights reserved.
|
* Jordan Hubbard. All rights reserved.
|
||||||
@ -137,7 +137,6 @@
|
|||||||
#define VAR_NO_CONFIRM "noConfirm"
|
#define VAR_NO_CONFIRM "noConfirm"
|
||||||
#define VAR_NONINTERACTIVE "nonInteractive"
|
#define VAR_NONINTERACTIVE "nonInteractive"
|
||||||
#define VAR_NOVELL "novell"
|
#define VAR_NOVELL "novell"
|
||||||
#define VAR_NTPDATE "ntpdate"
|
|
||||||
#define VAR_PARTITION "partition"
|
#define VAR_PARTITION "partition"
|
||||||
#define VAR_PCNFSD "pcnfsd"
|
#define VAR_PCNFSD "pcnfsd"
|
||||||
#define VAR_PCNFSD_PKG "pcnfsd_pkg"
|
#define VAR_PCNFSD_PKG "pcnfsd_pkg"
|
||||||
@ -493,6 +492,7 @@ extern int dmenuSetValue(dialogMenuItem *tmp);
|
|||||||
extern Boolean dmenuOpen(DMenu *menu, int *choice, int *scroll, int *curr, int *max, Boolean buttons);
|
extern Boolean dmenuOpen(DMenu *menu, int *choice, int *scroll, int *curr, int *max, Boolean buttons);
|
||||||
extern Boolean dmenuOpenSimple(DMenu *menu, Boolean buttons);
|
extern Boolean dmenuOpenSimple(DMenu *menu, Boolean buttons);
|
||||||
extern int dmenuVarCheck(dialogMenuItem *item);
|
extern int dmenuVarCheck(dialogMenuItem *item);
|
||||||
|
extern int dmenuVarsCheck(dialogMenuItem *item);
|
||||||
extern int dmenuFlagCheck(dialogMenuItem *item);
|
extern int dmenuFlagCheck(dialogMenuItem *item);
|
||||||
extern int dmenuRadioCheck(dialogMenuItem *item);
|
extern int dmenuRadioCheck(dialogMenuItem *item);
|
||||||
|
|
||||||
@ -702,6 +702,7 @@ extern void variable_set2(char *name, char *value);
|
|||||||
extern char *variable_get(char *var);
|
extern char *variable_get(char *var);
|
||||||
extern void variable_unset(char *var);
|
extern void variable_unset(char *var);
|
||||||
extern char *variable_get_value(char *var, char *prompt);
|
extern char *variable_get_value(char *var, char *prompt);
|
||||||
|
extern int variable_check(char *data);
|
||||||
|
|
||||||
/* variable_load.c */
|
/* variable_load.c */
|
||||||
extern int variableLoad(dialogMenuItem *self);
|
extern int variableLoad(dialogMenuItem *self);
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* This is probably the last program in the `sysinstall' line - the next
|
* This is probably the last program in the `sysinstall' line - the next
|
||||||
* generation being essentially a complete rewrite.
|
* generation being essentially a complete rewrite.
|
||||||
*
|
*
|
||||||
* $Id: variable.c,v 1.11.2.5 1997/06/11 08:39:27 jkh Exp $
|
* $Id: variable.c,v 1.19 1997/06/11 08:41:10 jkh Exp $
|
||||||
*
|
*
|
||||||
* Copyright (c) 1995
|
* Copyright (c) 1995
|
||||||
* Jordan Hubbard. All rights reserved.
|
* Jordan Hubbard. All rights reserved.
|
||||||
@ -155,3 +155,29 @@ variable_get_value(char *var, char *prompt)
|
|||||||
cp = NULL;
|
cp = NULL;
|
||||||
return cp;
|
return cp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Check if value passed in data (in the form "variable=value") is equal to value of
|
||||||
|
variable stored in env */
|
||||||
|
int
|
||||||
|
variable_check(char *data)
|
||||||
|
{
|
||||||
|
char *w, *cp, *cp2, *cp3, tmp[256];
|
||||||
|
|
||||||
|
w = data;
|
||||||
|
if (!w)
|
||||||
|
return FALSE;
|
||||||
|
SAFE_STRCPY(tmp, w);
|
||||||
|
if ((cp = index(tmp, '=')) != NULL) {
|
||||||
|
*(cp++) = '\0';
|
||||||
|
if ((cp3 = index(cp, ',')) != NULL)
|
||||||
|
*cp3 = '\0';
|
||||||
|
cp2 = getenv(tmp);
|
||||||
|
|
||||||
|
if (cp2)
|
||||||
|
return !strcmp(cp, cp2);
|
||||||
|
else
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return (int)getenv(tmp);
|
||||||
|
}
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* This is probably the last program in the `sysinstall' line - the next
|
* This is probably the last program in the `sysinstall' line - the next
|
||||||
* generation being essentially a complete rewrite.
|
* generation being essentially a complete rewrite.
|
||||||
*
|
*
|
||||||
* $Id: config.c,v 1.51.2.52 1997/06/11 08:39:26 jkh Exp $
|
* $Id: config.c,v 1.99 1997/06/11 08:41:09 jkh Exp $
|
||||||
*
|
*
|
||||||
* Copyright (c) 1995
|
* Copyright (c) 1995
|
||||||
* Jordan Hubbard. All rights reserved.
|
* Jordan Hubbard. All rights reserved.
|
||||||
@ -482,12 +482,13 @@ configNTP(dialogMenuItem *self)
|
|||||||
{
|
{
|
||||||
int status;
|
int status;
|
||||||
|
|
||||||
status = variable_get_value(VAR_NTPDATE, "Enter the name of an NTP server") ? DITEM_SUCCESS : DITEM_FAILURE;
|
status = variable_get_value("ntpdate_flags", "Enter the name of an NTP server") ? DITEM_SUCCESS : DITEM_FAILURE;
|
||||||
if (status == DITEM_SUCCESS) {
|
if (status == DITEM_SUCCESS) {
|
||||||
static char tmp[255];
|
static char tmp[255];
|
||||||
|
|
||||||
snprintf(tmp, 255, "%s=%s", VAR_NTPDATE, variable_get(VAR_NTPDATE));
|
snprintf(tmp, 255, "ntpdate_enable=YES,ntpdate_flags=%s", variable_get("ntpdate_flags"));
|
||||||
self->aux = (int)tmp;
|
self->data = tmp;
|
||||||
|
dmenuSetVariables(self);
|
||||||
}
|
}
|
||||||
return status | DITEM_RESTORE;
|
return status | DITEM_RESTORE;
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* This is probably the last attempt in the `sysinstall' line, the next
|
* This is probably the last attempt in the `sysinstall' line, the next
|
||||||
* generation being slated for what's essentially a complete rewrite.
|
* generation being slated for what's essentially a complete rewrite.
|
||||||
*
|
*
|
||||||
* $Id$
|
* $Id: dmenu.c,v 1.32 1997/02/22 14:11:35 peter Exp $
|
||||||
*
|
*
|
||||||
* Copyright (c) 1995
|
* Copyright (c) 1995
|
||||||
* Jordan Hubbard. All rights reserved.
|
* Jordan Hubbard. All rights reserved.
|
||||||
@ -174,26 +174,42 @@ dmenuFlagCheck(dialogMenuItem *item)
|
|||||||
int
|
int
|
||||||
dmenuVarCheck(dialogMenuItem *item)
|
dmenuVarCheck(dialogMenuItem *item)
|
||||||
{
|
{
|
||||||
char *w, *cp, *cp2, *cp3, tmp[256];
|
char *w;
|
||||||
|
|
||||||
w = (char *)item->aux;
|
w = (char *)item->aux;
|
||||||
if (!w)
|
if (!w)
|
||||||
w = (char *)item->data;
|
w = (char *)item->data;
|
||||||
if (!w)
|
if (!w)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
SAFE_STRCPY(tmp, w);
|
return variable_check(w);
|
||||||
if ((cp = index(tmp, '=')) != NULL) {
|
}
|
||||||
*(cp++) = '\0';
|
|
||||||
if ((cp3 = index(cp, ',')) != NULL)
|
int
|
||||||
*cp3 = '\0';
|
dmenuVarsCheck(dialogMenuItem *item)
|
||||||
cp2 = getenv(tmp);
|
{
|
||||||
if (cp2)
|
int res, init;
|
||||||
return !strcmp(cp, cp2);
|
char *w, *cp1, *cp2;
|
||||||
else
|
char *copy;
|
||||||
return FALSE;
|
|
||||||
|
w = (char *)item->aux;
|
||||||
|
if (!w)
|
||||||
|
w = (char *)item->data;
|
||||||
|
if (!w)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
copy = strdup(w);
|
||||||
|
res = TRUE;
|
||||||
|
init = FALSE;
|
||||||
|
for (cp1 = copy; cp1 != NULL;) {
|
||||||
|
init = TRUE;
|
||||||
|
cp2 = index(cp1, ',');
|
||||||
|
if (cp2 != NULL)
|
||||||
|
*cp2++ = '\0';
|
||||||
|
res = res && variable_check(cp1);
|
||||||
|
cp1 = cp2;
|
||||||
}
|
}
|
||||||
else
|
free(copy);
|
||||||
return (int)getenv(tmp);
|
return res && init;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* This is probably the last program in the `sysinstall' line - the next
|
* This is probably the last program in the `sysinstall' line - the next
|
||||||
* generation being essentially a complete rewrite.
|
* generation being essentially a complete rewrite.
|
||||||
*
|
*
|
||||||
* $Id: menus.c,v 1.137 1997/06/09 01:19:44 jkh Exp $
|
* $Id: menus.c,v 1.138 1997/06/13 14:06:10 jkh Exp $
|
||||||
*
|
*
|
||||||
* Copyright (c) 1995
|
* Copyright (c) 1995
|
||||||
* Jordan Hubbard. All rights reserved.
|
* Jordan Hubbard. All rights reserved.
|
||||||
@ -1145,7 +1145,7 @@ DMenu MenuNetworking = {
|
|||||||
dmenuVarCheck, configNovell, NULL, "novell" },
|
dmenuVarCheck, configNovell, NULL, "novell" },
|
||||||
#endif
|
#endif
|
||||||
{ "Ntpdate", "Select a clock-syncronization server",
|
{ "Ntpdate", "Select a clock-syncronization server",
|
||||||
dmenuVarCheck, dmenuSubmenu, NULL, &MenuNTP, '[', 'X', ']', (int)VAR_NTPDATE },
|
dmenuVarCheck, dmenuSubmenu, NULL, &MenuNTP, '[', 'X', ']', "ntpdate_enable=YES" },
|
||||||
{ "router", "Select routing daemon (default: routed)",
|
{ "router", "Select routing daemon (default: routed)",
|
||||||
dmenuVarCheck, configRouter, NULL, "router" },
|
dmenuVarCheck, configRouter, NULL, "router" },
|
||||||
{ "Rwhod", "This machine wants to run the rwho daemon",
|
{ "Rwhod", "This machine wants to run the rwho daemon",
|
||||||
@ -1169,46 +1169,69 @@ DMenu MenuNTP = {
|
|||||||
"close to you to have your system time syncronized accordingly.",
|
"close to you to have your system time syncronized accordingly.",
|
||||||
"These are the primary open-access NTP servers",
|
"These are the primary open-access NTP servers",
|
||||||
NULL,
|
NULL,
|
||||||
{ { "Other", "Select a site not on this list",
|
{ { "None", "No ntp server",
|
||||||
dmenuVarCheck, configNTP, NULL, NULL },
|
dmenuVarCheck, dmenuSetVariables, NULL,
|
||||||
|
"ntpdate_enable=NO,ntpdate_flags=" },
|
||||||
|
{ "Other", "Select a site not on this list",
|
||||||
|
dmenuVarsCheck, configNTP, NULL,
|
||||||
|
NULL },
|
||||||
{ "Australia", "ntp.syd.dms.csiro.au (HP 5061 Cesium Beam)",
|
{ "Australia", "ntp.syd.dms.csiro.au (HP 5061 Cesium Beam)",
|
||||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_NTPDATE "=ntp.syd.dms.csiro.au" },
|
dmenuVarsCheck, dmenuSetVariables, NULL,
|
||||||
|
"ntpdate_enable=YES,ntpdate_flags=ntp.syd.dms.csiro.au" },
|
||||||
{ "Canada", "tick.usask.ca (GOES clock)",
|
{ "Canada", "tick.usask.ca (GOES clock)",
|
||||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_NTPDATE "=tick.usask.ca" },
|
dmenuVarsCheck, dmenuSetVariables, NULL,
|
||||||
|
"ntpdate_enable=YES,ntpdate_flags=tick.usask.ca" },
|
||||||
{ "France", "canon.inria.fr (TDF clock)",
|
{ "France", "canon.inria.fr (TDF clock)",
|
||||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_NTPDATE "=canon.inria.fr" },
|
dmenuVarsCheck, dmenuSetVariables, NULL,
|
||||||
|
"ntpdate_enable=YES,ntpdate_flags=canon.inria.fr" },
|
||||||
{ "Germany", "ntps1-{0,1,2}.uni-erlangen.de (GPS)",
|
{ "Germany", "ntps1-{0,1,2}.uni-erlangen.de (GPS)",
|
||||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_NTPDATE "=ntps1-0.uni-erlangen.de" },
|
dmenuVarsCheck, dmenuSetVariables, NULL,
|
||||||
|
"ntpdate_enable=YES,ntpdate_flags=ntps1-0.uni-erlangen.de" },
|
||||||
{ "Germany #2", "ntps1-0.cs.tu-berlin.de (GPS)",
|
{ "Germany #2", "ntps1-0.cs.tu-berlin.de (GPS)",
|
||||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_NTPDATE "=ntps1-0.cs.tu-berlin.de" },
|
dmenuVarsCheck, dmenuSetVariables, NULL,
|
||||||
|
"ntpdate_enable=YES,ntpdate_flags=ntps1-0.cs.tu-berlin.de" },
|
||||||
{ "Japan", "clock.nc.fukuoka-u.ac.jp (GPS clock)",
|
{ "Japan", "clock.nc.fukuoka-u.ac.jp (GPS clock)",
|
||||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_NTPDATE "=clock.nc.fukuoka-u.ac.jp" },
|
dmenuVarsCheck, dmenuSetVariables, NULL,
|
||||||
|
"ntpdate_enable=YES,ntpdate_flags=clock.nc.fukuoka-u.ac.jp" },
|
||||||
{ "Japan #2", "clock.tl.fukuoka-u.ac.jp (GPS clock)",
|
{ "Japan #2", "clock.tl.fukuoka-u.ac.jp (GPS clock)",
|
||||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_NTPDATE "=clock.tl.fukuoka-u.ac.jp" },
|
dmenuVarsCheck, dmenuSetVariables, NULL,
|
||||||
|
"ntpdate_enable=YES,ntpdate_flags=clock.tl.fukuoka-u.ac.jp" },
|
||||||
{ "Netherlands", "ntp0.nl.net (GPS clock)",
|
{ "Netherlands", "ntp0.nl.net (GPS clock)",
|
||||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_NTPDATE "=ntp0.nl.net" },
|
dmenuVarsCheck, dmenuSetVariables, NULL,
|
||||||
|
"ntpdate_enable=YES,ntpdate_flags=ntp0.nl.net" },
|
||||||
{ "Norway", "timer.unik.no (NTP clock)",
|
{ "Norway", "timer.unik.no (NTP clock)",
|
||||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_NTPDATE "=timer.unik.no" },
|
dmenuVarsCheck, dmenuSetVariables, NULL,
|
||||||
|
"ntpdate_enable=YES,ntpdate_flags=timer.unik.no" },
|
||||||
{ "Sweden", "Time1.Stupi.SE (Cesium/GPS)",
|
{ "Sweden", "Time1.Stupi.SE (Cesium/GPS)",
|
||||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_NTPDATE "=Time1.Stupi.SE" },
|
dmenuVarsCheck, dmenuSetVariables, NULL,
|
||||||
|
"ntpdate_enable=YES,ntpdate_flags=Time1.Stupi.SE" },
|
||||||
{ "Switzerland", "swisstime.ethz.ch (DCF77 clock)",
|
{ "Switzerland", "swisstime.ethz.ch (DCF77 clock)",
|
||||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_NTPDATE "=swisstime.ethz.ch" },
|
dmenuVarsCheck, dmenuSetVariables, NULL,
|
||||||
|
"ntpdate_enable=YES,ntpdate_flags=swisstime.ethz.ch" },
|
||||||
{ "U.S. East Coast", "bitsy.mit.edu (WWV clock)",
|
{ "U.S. East Coast", "bitsy.mit.edu (WWV clock)",
|
||||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_NTPDATE "=bitsy.mit.edu" },
|
dmenuVarsCheck, dmenuSetVariables, NULL,
|
||||||
|
"ntpdate_enable=YES,ntpdate_flags=bitsy.mit.edu" },
|
||||||
{ "U.S. East Coast #2", "otc1.psu.edu (WWV clock)",
|
{ "U.S. East Coast #2", "otc1.psu.edu (WWV clock)",
|
||||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_NTPDATE "=otc1.psu.edu" },
|
dmenuVarsCheck, dmenuSetVariables, NULL,
|
||||||
|
"ntpdate_enable=YES,ntpdate_flags=otc1.psu.edu" },
|
||||||
{ "U.S. West Coast", "apple.com (WWV clock)",
|
{ "U.S. West Coast", "apple.com (WWV clock)",
|
||||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_NTPDATE "=apple.com" },
|
dmenuVarsCheck, dmenuSetVariables, NULL,
|
||||||
|
"ntpdate_enable=YES,ntpdate_flags=apple.com" },
|
||||||
{ "U.S. West Coast #2", "clepsydra.dec.com (GOES clock)",
|
{ "U.S. West Coast #2", "clepsydra.dec.com (GOES clock)",
|
||||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_NTPDATE "=clepsydra.dec.com" },
|
dmenuVarsCheck, dmenuSetVariables, NULL,
|
||||||
|
"ntpdate_enable=YES,ntpdate_flags=clepsydra.dec.com" },
|
||||||
{ "U.S. West Coast #3", "clock.llnl.gov (WWVB clock)",
|
{ "U.S. West Coast #3", "clock.llnl.gov (WWVB clock)",
|
||||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_NTPDATE "=clock.llnl.gov" },
|
dmenuVarsCheck, dmenuSetVariables, NULL,
|
||||||
|
"ntpdate_enable=YES,ntpdate_flags=clock.llnl.gov" },
|
||||||
{ "U.S. Midwest", "ncar.ucar.edu (WWVB clock)",
|
{ "U.S. Midwest", "ncar.ucar.edu (WWVB clock)",
|
||||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_NTPDATE "=ncar.ucar.edu" },
|
dmenuVarsCheck, dmenuSetVariables, NULL,
|
||||||
|
"ntpdate_enable=YES,ntpdate_flags=ncar.ucar.edu" },
|
||||||
{ "U.S. Pacific", "chantry.hawaii.net (WWV/H clock)",
|
{ "U.S. Pacific", "chantry.hawaii.net (WWV/H clock)",
|
||||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_NTPDATE "=chantry.hawaii.net" },
|
dmenuVarsCheck, dmenuSetVariables, NULL,
|
||||||
|
"ntpdate_enable=YES,ntpdate_flags=chantry.hawaii.net" },
|
||||||
{ "U.S. Southwest", "shorty.chpc.utexas.edu (WWV clock)",
|
{ "U.S. Southwest", "shorty.chpc.utexas.edu (WWV clock)",
|
||||||
dmenuVarCheck, dmenuSetVariable, NULL, VAR_NTPDATE "=shorty.chpc.utexas.edu" },
|
dmenuVarsCheck, dmenuSetVariables, NULL,
|
||||||
|
"ntpdate_enable=YES,ntpdate_flags=shorty.chpc.utexas.edu" },
|
||||||
{ NULL } },
|
{ NULL } },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* This is probably the last attempt in the `sysinstall' line, the next
|
* This is probably the last attempt in the `sysinstall' line, the next
|
||||||
* generation being slated to essentially a complete rewrite.
|
* generation being slated to essentially a complete rewrite.
|
||||||
*
|
*
|
||||||
* $Id: sysinstall.h,v 1.131 1997/06/05 09:48:01 jkh Exp $
|
* $Id: sysinstall.h,v 1.132 1997/06/09 01:19:44 jkh Exp $
|
||||||
*
|
*
|
||||||
* Copyright (c) 1995
|
* Copyright (c) 1995
|
||||||
* Jordan Hubbard. All rights reserved.
|
* Jordan Hubbard. All rights reserved.
|
||||||
@ -137,7 +137,6 @@
|
|||||||
#define VAR_NO_CONFIRM "noConfirm"
|
#define VAR_NO_CONFIRM "noConfirm"
|
||||||
#define VAR_NONINTERACTIVE "nonInteractive"
|
#define VAR_NONINTERACTIVE "nonInteractive"
|
||||||
#define VAR_NOVELL "novell"
|
#define VAR_NOVELL "novell"
|
||||||
#define VAR_NTPDATE "ntpdate"
|
|
||||||
#define VAR_PARTITION "partition"
|
#define VAR_PARTITION "partition"
|
||||||
#define VAR_PCNFSD "pcnfsd"
|
#define VAR_PCNFSD "pcnfsd"
|
||||||
#define VAR_PCNFSD_PKG "pcnfsd_pkg"
|
#define VAR_PCNFSD_PKG "pcnfsd_pkg"
|
||||||
@ -493,6 +492,7 @@ extern int dmenuSetValue(dialogMenuItem *tmp);
|
|||||||
extern Boolean dmenuOpen(DMenu *menu, int *choice, int *scroll, int *curr, int *max, Boolean buttons);
|
extern Boolean dmenuOpen(DMenu *menu, int *choice, int *scroll, int *curr, int *max, Boolean buttons);
|
||||||
extern Boolean dmenuOpenSimple(DMenu *menu, Boolean buttons);
|
extern Boolean dmenuOpenSimple(DMenu *menu, Boolean buttons);
|
||||||
extern int dmenuVarCheck(dialogMenuItem *item);
|
extern int dmenuVarCheck(dialogMenuItem *item);
|
||||||
|
extern int dmenuVarsCheck(dialogMenuItem *item);
|
||||||
extern int dmenuFlagCheck(dialogMenuItem *item);
|
extern int dmenuFlagCheck(dialogMenuItem *item);
|
||||||
extern int dmenuRadioCheck(dialogMenuItem *item);
|
extern int dmenuRadioCheck(dialogMenuItem *item);
|
||||||
|
|
||||||
@ -702,6 +702,7 @@ extern void variable_set2(char *name, char *value);
|
|||||||
extern char *variable_get(char *var);
|
extern char *variable_get(char *var);
|
||||||
extern void variable_unset(char *var);
|
extern void variable_unset(char *var);
|
||||||
extern char *variable_get_value(char *var, char *prompt);
|
extern char *variable_get_value(char *var, char *prompt);
|
||||||
|
extern int variable_check(char *data);
|
||||||
|
|
||||||
/* variable_load.c */
|
/* variable_load.c */
|
||||||
extern int variableLoad(dialogMenuItem *self);
|
extern int variableLoad(dialogMenuItem *self);
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* This is probably the last program in the `sysinstall' line - the next
|
* This is probably the last program in the `sysinstall' line - the next
|
||||||
* generation being essentially a complete rewrite.
|
* generation being essentially a complete rewrite.
|
||||||
*
|
*
|
||||||
* $Id: variable.c,v 1.11.2.5 1997/06/11 08:39:27 jkh Exp $
|
* $Id: variable.c,v 1.19 1997/06/11 08:41:10 jkh Exp $
|
||||||
*
|
*
|
||||||
* Copyright (c) 1995
|
* Copyright (c) 1995
|
||||||
* Jordan Hubbard. All rights reserved.
|
* Jordan Hubbard. All rights reserved.
|
||||||
@ -155,3 +155,29 @@ variable_get_value(char *var, char *prompt)
|
|||||||
cp = NULL;
|
cp = NULL;
|
||||||
return cp;
|
return cp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Check if value passed in data (in the form "variable=value") is equal to value of
|
||||||
|
variable stored in env */
|
||||||
|
int
|
||||||
|
variable_check(char *data)
|
||||||
|
{
|
||||||
|
char *w, *cp, *cp2, *cp3, tmp[256];
|
||||||
|
|
||||||
|
w = data;
|
||||||
|
if (!w)
|
||||||
|
return FALSE;
|
||||||
|
SAFE_STRCPY(tmp, w);
|
||||||
|
if ((cp = index(tmp, '=')) != NULL) {
|
||||||
|
*(cp++) = '\0';
|
||||||
|
if ((cp3 = index(cp, ',')) != NULL)
|
||||||
|
*cp3 = '\0';
|
||||||
|
cp2 = getenv(tmp);
|
||||||
|
|
||||||
|
if (cp2)
|
||||||
|
return !strcmp(cp, cp2);
|
||||||
|
else
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return (int)getenv(tmp);
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user