#include <execinfo.h>
#endif
+#ifdef ENABLE_NLS
+#ifdef HAVE_XLOCALE_H
+#include <xlocale.h>
+#endif
+#include <libintl.h>
+#include <locale.h>
+#define _(string) gettext(string)
+#else
+#define _(string) (string)
+#endif
+
#define MAXSETUP 11 /* How many setup questions to ask */
#define PROTO_NAME "tcp"
#define NSSCONF "/etc/nsswitch.conf"
+
+typedef enum _SetupStep {
+ eSysAdminName = 1,
+ eSysAdminPW = 2,
+ eUID = 3,
+ eIP_ADDR = 4,
+ eCTDL_Port = 5,
+ eAuthType = 6,
+ eLDAP_Host = 7,
+ eLDAP_Port = 8,
+ eLDAP_Base_DN = 9,
+ eLDAP_Bind_DN =10,
+ eLDAP_Bind_PW =11
+} eSteupStep;
+
+
int setup_type;
char setup_directory[PATH_MAX];
int using_web_installer = 0;
switch (curr) {
- case 1:
+ case eSysAdminName:
if (setup_type == UI_SILENT)
{
if (getenv("SYSADMIN_NAME")) {
}
break;
- case 2:
+ case eSysAdminPW:
if (setup_type == UI_SILENT)
{
if (getenv("SYSADMIN_PW")) {
}
break;
- case 3:
+ case eUID:
if (setup_type == UI_SILENT)
{
if (getenv("CITADEL_UID")) {
}
break;
- case 4:
+ case eIP_ADDR:
if (setup_type == UI_SILENT)
{
if (getenv("IP_ADDR")) {
}
break;
- case 5:
+ case eCTDL_Port:
if (setup_type == UI_SILENT)
{
if (getenv("CITADEL_PORT")) {
}
break;
- case 6:
+ case eAuthType:
if (setup_type == UI_SILENT)
{
const char *auth;
}
break;
- case 7:
+ case eLDAP_Host:
if (setup_type == UI_SILENT)
{
if (getenv("LDAP_HOST")) {
}
break;
- case 8:
+ case eLDAP_Port:
if (setup_type == UI_SILENT)
{
if (getenv("LDAP_PORT")) {
}
break;
- case 9:
+ case eLDAP_Base_DN:
if (setup_type == UI_SILENT)
{
if (getenv("LDAP_BASE_DN")) {
}
break;
- case 10:
+ case eLDAP_Bind_DN:
if (setup_type == UI_SILENT)
{
if (getenv("LDAP_BIND_DN")) {
}
break;
- case 11:
+ case eLDAP_Bind_PW:
if (setup_type == UI_SILENT)
{
if (getenv("LDAP_BIND_PW")) {