Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 146695 Details for
Bug 224606
Instance specific dirs should be in instance directory
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
diffs to create additional instance dirs
cvsdiffs (text/plain), 14.13 KB, created by
Rich Megginson
on 2007-01-26 17:45:14 UTC
(
hide
)
Description:
diffs to create additional instance dirs
Filename:
MIME Type:
Creator:
Rich Megginson
Created:
2007-01-26 17:45:14 UTC
Size:
14.13 KB
patch
obsolete
>Index: ldapserver/ldap/admin/lib/dsalib_updown.c >=================================================================== >RCS file: /cvs/dirsec/ldapserver/ldap/admin/lib/dsalib_updown.c,v >retrieving revision 1.8 >diff -u -8 -r1.8 dsalib_updown.c >--- ldapserver/ldap/admin/lib/dsalib_updown.c 10 Nov 2006 23:44:32 -0000 1.8 >+++ ldapserver/ldap/admin/lib/dsalib_updown.c 26 Jan 2007 17:40:14 -0000 >@@ -90,17 +90,17 @@ > FILE *pidfile; > int ipid = -1; > int status = 0; > > if ( (rundir = ds_get_run_dir()) == NULL ) { > fprintf(stderr, "ds_get_updown_status: could not get install root\n"); > return(DS_SERVER_UNKNOWN); > } >- PR_snprintf(pid_file_name, BIG_LINE, "%s/pid", rundir); >+ PR_snprintf(pid_file_name, BIG_LINE, "%s/%s.pid", ds_get_server_name(), rundir); > pidfile = fopen(pid_file_name, "r"); > if ( pidfile == NULL ) { > /* > fprintf(stderr, > "ds_get_updown_status: could not open pid file=%s errno=%d\n", > pid_file_name, errno); > */ > return(DS_SERVER_DOWN); >Index: ldapserver/ldap/admin/src/create_instance.c >=================================================================== >RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/create_instance.c,v >retrieving revision 1.40 >diff -u -8 -r1.40 create_instance.c >--- ldapserver/ldap/admin/src/create_instance.c 25 Jan 2007 16:47:45 -0000 1.40 >+++ ldapserver/ldap/admin/src/create_instance.c 26 Jan 2007 17:40:18 -0000 >@@ -749,96 +749,28 @@ > table[10][0] = "BAK-DIR"; > table[10][1] = cf->bak_dir; > table[11][0] = "SERVER-DIR"; > table[11][1] = cf->sroot; > table[12][0] = "CONFIG-DIR"; > table[12][1] = cf->config_dir; > table[13][0] = "RUN-DIR"; > table[13][1] = cf->run_dir; >- table[14][0] = table[14][1] = NULL; >+ table[14][0] = "PRODUCT-NAME"; >+ table[14][1] = PRODUCT_NAME; >+ table[15][0] = table[15][1] = NULL; > > if (generate_script(ofn, fn, NEWSCRIPT_MODE, table) != 0) { > return make_error("Could not write %s to %s (%s).", ofn, fn, > ds_system_errmsg()); > } > > return NULL; > } > >-char *gen_perl_script_auto_for_migration(char *s_root, char *cs_path, char *name, >- server_config_s *cf) >-{ >- char myperl[PATH_SIZE]; >- char fn[PATH_SIZE], ofn[PATH_SIZE]; >- const char *table[16][2]; >- char *fnp = NULL; >- int fnlen = 0; >- >- PR_snprintf(ofn, sizeof(ofn), "%s%c%s%cscript-templates%ctemplate-%s", >- cf->datadir, FILE_PATHSEP, cf->brand_ds, >- FILE_PATHSEP, FILE_PATHSEP, name); >- PR_snprintf(fn, sizeof(fn), "%s%c%s%cbin", >- cf->sysconfdir, FILE_PATHSEP, cf->brand_ds, FILE_PATHSEP); >- create_instance_mkdir(fn, NEWDIR_MODE); >- fnlen = strlen(fn); >- fnp = fn + fnlen; >- PR_snprintf(fnp, sizeof(fn) - fnlen, "%c%s", FILE_PATHSEP, name); >- >-#ifdef USE_NSPERL >- PR_snprintf(myperl, sizeof(myperl), "!%s%cbin%cslapd%cadmin%cbin%cperl", >- cf->prefix, FILE_PATHSEP, FILE_PATHSEP, FILE_PATHSEP, >- FILE_PATHSEP, FILE_PATHSEP); >-#else >- strcpy(myperl, "!/usr/bin/env perl"); >-#endif >- >- table[0][0] = "DS-ROOT"; >- table[0][1] = cf->prefix; >- table[1][0] = "DS-BRAND"; >- table[1][1] = cf->brand_ds; >- table[2][0] = "SEP"; >- table[2][1] = FILE_PATHSEPP; >- table[3][0] = "SERVER-NAME"; >- table[3][1] = cf->servname; >- table[4][0] = "SERVER-PORT"; >- table[4][1] = cf->servport; >- table[5][0] = "PERL-EXEC"; >- table[6][0] = "DEV-NULL"; >-#if !defined( XP_WIN32 ) >- table[5][1] = myperl; >- table[6][1] = " /dev/null "; >-#else >- table[5][1] = " perl script"; >- table[6][1] = " NUL "; >-#endif >- table[7][0] = "ROOT-DN"; >- table[7][1] = cf->rootdn; >- table[8][0] = "LDIF-DIR"; >- table[8][1] = cf->ldif_dir; >- table[9][0] = "SERV-ID"; >- table[9][1] = cf->servid; >- >- table[10][0] = "BAK-DIR"; >- table[10][1] = cf->bak_dir; >- table[11][0] = "SERVER-DIR"; >- table[11][1] = cf->sroot; >- table[12][0] = "CONFIG-DIR"; >- table[12][1] = cf->config_dir; >- table[13][0] = "RUN-DIR"; >- table[13][1] = cf->run_dir; >- table[14][0] = table[14][1] = NULL; >- >- if (generate_script(ofn, fn, NEWSCRIPT_MODE, table) != 0) { >- return make_error("Could not write %s to %s (%s).", ofn, fn, >- ds_system_errmsg()); >- } >- >- return NULL; >-} > > /* ------------------ NT utilities for server creation ------------------ */ > > #ifdef XP_WIN32 > > char * > service_exists(char *servid) > { >@@ -1804,26 +1736,26 @@ > /* tentatively moved to mycs_path */ > #define CREATE_REPL_MONITOR_CGI() \ > gen_script_auto(mysroot, mycs_path, "repl-monitor-cgi.pl", cf) > > #define CREATE_ACCOUNT_INACT(_commandName) \ > gen_script_auto(mysroot, cs_path, _commandName, cf) > > #define CREATE_MIGRATE5TO7() \ >- gen_perl_script_auto_for_migration(mysroot, mycs_path, "migrate5to7", cf) >+ gen_script_auto(mysroot, mycs_path, "migrate5to7", cf) > > #define CREATE_MIGRATE6TO7() \ >- gen_perl_script_auto_for_migration(mysroot, mycs_path, "migrate6to7", cf) >+ gen_script_auto(mysroot, mycs_path, "migrate6to7", cf) > > #define CREATE_MIGRATEINSTANCE7() \ >- gen_perl_script_auto_for_migration(mysroot, mycs_path, "migrateInstance7", cf) >+ gen_script_auto(mysroot, mycs_path, "migrateInstance7", cf) > > #define CREATE_MIGRATETO7() \ >- gen_perl_script_auto_for_migration(mysroot, mycs_path, "migrateTo7", cf) >+ gen_script_auto(mysroot, mycs_path, "migrateTo7", cf) > > #define CREATE_NEWPWPOLICY() \ > gen_script_auto(mysroot, mycs_path, "ns-newpwpolicy.pl", cf) > > #define CREATE_BAK2DB_SH() \ > gen_script_auto(mysroot, mycs_path, "bak2db", cf) > > #define CREATE_DB2BAK_SH() \ >@@ -4295,24 +4227,24 @@ > * cf->prefix: %{_prefix} > * cf->sroot: %{_libdir}/BRAND_DS > * cf->localstatedir: %{_localstatedir} > * cf->sysconfdir: %{_sysconfdir} > * cf->bindir: %{_bindir} > * cf->datadir: %{_datadir} > * cf->docdir: %{_docdir} > * cf->inst_dir: <sroot>/slapd-<servid> >- * cf->config_dir: <localstatedir>/lib/slapd-<servid> >- * cf->schema_dir: <localstatedir>/lib/slapd-<servid>/schema >- * cf->lock_dir: <localstatedir>/lock/slapd-<servid> >- * cf->log_dir: <localstatedir>/log/slapd-<servid> >- * cf->run_dir: <localstatedir>/run/slapd-<servid> >- * cf->db_dir: <localstatedir>/lib/slapd-<servid>/db >- * cf->bak_dir: <localstatedir>/lib/slapd-<servid>/bak >- * cf->tmp_dir: <localstatedir>/tmp/slapd-<servid> >+ * cf->config_dir: <localstatedir>/lib/BRAND_DS/slapd-<servid> >+ * cf->schema_dir: <localstatedir>/lib/BRAND_DS/slapd-<servid>/schema >+ * cf->lock_dir: <localstatedir>/lock/BRAND_DS/slapd-<servid> >+ * cf->log_dir: <localstatedir>/log/BRAND_DS/slapd-<servid> >+ * cf->run_dir: <localstatedir>/run/BRAND_DS (slapd-instance.pid slapd-instance.startpid files) >+ * cf->db_dir: <localstatedir>/lib/BRAND_DS/slapd-<servid>/db >+ * cf->bak_dir: <localstatedir>/lib/BRAND_DS/slapd-<servid>/bak >+ * cf->tmp_dir: <localstatedir>/tmp/BRAND_DS/slapd-<servid> > * cf->ldif_dir: <datadir>/<brand-ds>/ldif > * cf->cert_dir: <sysconfdir>/BRAND_DS/slapd-<servid> > * cf->sasl_path: <sroot>/sasl2 > * cf->plugin_dir: <sroot>/plugins > * > * NOTES: > * If prefix is given, all the other paths start from prefix. > * NETSITE_ROOT is treated as a secondary prefix. (If prefix is also set, >@@ -4537,106 +4469,111 @@ > cf->inst_dir = PR_smprintf("%s%c%s-%s", > cf->sroot, FILE_PATHSEP, PRODUCT_NAME, cf->servid); > } else { > cf->inst_dir = PL_strdup(temp); > } > > temp = ds_a_get_cgi_var("config_dir", NULL, NULL); > if (NULL == temp) { >- cf->config_dir = PR_smprintf("%s%clib%c%s-%s", >+ cf->config_dir = PR_smprintf("%s%clib%c%s%c%s-%s", > cf->localstatedir, FILE_PATHSEP, FILE_PATHSEP, >+ cf->brand_ds, FILE_PATHSEP, > PRODUCT_NAME, cf->servid); > } else { > cf->config_dir = PL_strdup(temp); > } > /* set config dir to the environment variable DS_CONFIG_DIR */ > ds_set_config_dir(cf->config_dir); > > cf->schema_dir = ds_a_get_cgi_var("schema_dir", NULL, NULL); > temp = ds_a_get_cgi_var("schema_dir", NULL, NULL); > if (NULL == temp) { >- cf->schema_dir = PR_smprintf("%s%clib%c%s-%s%cschema", >+ cf->schema_dir = PR_smprintf("%s%clib%c%s%c%s-%s%cschema", > cf->localstatedir, FILE_PATHSEP, FILE_PATHSEP, >+ cf->brand_ds, FILE_PATHSEP, > PRODUCT_NAME, cf->servid, FILE_PATHSEP); > } else { > cf->schema_dir = PL_strdup(temp); > } > > temp = ds_a_get_cgi_var("lock_dir", NULL, NULL); > if (NULL == temp) { >- cf->lock_dir = PR_smprintf("%s%clock%c%s-%s", >+ cf->lock_dir = PR_smprintf("%s%clock%c%s%c%s-%s", > cf->localstatedir, FILE_PATHSEP, FILE_PATHSEP, >+ cf->brand_ds, FILE_PATHSEP, > PRODUCT_NAME, cf->servid); > } else { > cf->lock_dir = PL_strdup(temp); > } > > temp = ds_a_get_cgi_var("log_dir", NULL, NULL); > if (NULL == temp) { >- cf->log_dir = PR_smprintf("%s%clog%c%s-%s", >+ cf->log_dir = PR_smprintf("%s%clog%c%s%c%s-%s", > cf->localstatedir, FILE_PATHSEP, FILE_PATHSEP, >+ cf->brand_ds, FILE_PATHSEP, > PRODUCT_NAME, cf->servid); > } else { > cf->log_dir = PL_strdup(temp); > } > > temp = ds_a_get_cgi_var("run_dir", NULL, NULL); > if (NULL == temp) { >- cf->run_dir = PR_smprintf("%s%crun%c%s-%s", >+ cf->run_dir = PR_smprintf("%s%crun%c%s", > cf->localstatedir, FILE_PATHSEP, FILE_PATHSEP, >- PRODUCT_NAME, cf->servid); >+ cf->brand_ds); > } else { > cf->run_dir = PL_strdup(temp); > } > /* set run dir to the environment variable DS_RUN_DIR */ > ds_set_run_dir(cf->run_dir); > > temp = ds_a_get_cgi_var("db_dir", NULL, NULL); > if (NULL == temp) { >- cf->db_dir = PR_smprintf("%s%clib%c%s-%s%cdb", >+ cf->db_dir = PR_smprintf("%s%clib%c%s%c%s-%s%cdb", > cf->localstatedir, FILE_PATHSEP, FILE_PATHSEP, >+ cf->brand_ds, FILE_PATHSEP, > PRODUCT_NAME, cf->servid, FILE_PATHSEP); > } else { > cf->db_dir = PL_strdup(temp); > } > > temp = ds_a_get_cgi_var("bak_dir", NULL, NULL); > if (NULL == temp) { >- cf->bak_dir = PR_smprintf("%s%clib%c%s-%s%cbak", >+ cf->bak_dir = PR_smprintf("%s%clib%c%s%c%s-%s%cbak", > cf->localstatedir, FILE_PATHSEP, FILE_PATHSEP, >+ cf->brand_ds, FILE_PATHSEP, > PRODUCT_NAME, cf->servid, FILE_PATHSEP); > } else { > cf->bak_dir = PL_strdup(temp); > } > /* set bak dir to the environment variable DS_BAK_DIR */ > ds_set_bak_dir(cf->bak_dir); > > temp = ds_a_get_cgi_var("ldif_dir", NULL, NULL); > if (NULL == temp) { > cf->ldif_dir = PR_smprintf("%s%c%s%cldif", >- cf->datadir, FILE_PATHSEP, BRAND_DS, FILE_PATHSEP); >+ cf->datadir, FILE_PATHSEP, cf->brand_ds, FILE_PATHSEP); > } else { > cf->ldif_dir = PL_strdup(temp); > } > > temp = ds_a_get_cgi_var("tmp_dir", NULL, NULL); > if (NULL == temp) { >- cf->tmp_dir = PR_smprintf("%s%ctmp%c%s-%s", >+ cf->tmp_dir = PR_smprintf("%s%ctmp%c%s%c%s-%s", > cf->localstatedir, FILE_PATHSEP, FILE_PATHSEP, >+ cf->brand_ds, FILE_PATHSEP, > PRODUCT_NAME, cf->servid); > } else { > cf->tmp_dir = PL_strdup(temp); > } > /* set tmp dir to the environment variable DS_TMP_DIR */ > ds_set_tmp_dir(cf->tmp_dir); > > temp = ds_a_get_cgi_var("cert_dir", NULL, NULL); > if (NULL == temp) { >- cf->cert_dir = PR_smprintf("%s%c%s%c%s-%s", >- cf->sysconfdir, FILE_PATHSEP, cf->brand_ds, >- FILE_PATHSEP, PRODUCT_NAME, cf->servid); >+ cf->cert_dir = PL_strdup(cf->config_dir); > } else { > cf->cert_dir = PL_strdup(temp); > } > > return 0; > } >Index: ldapserver/ldap/admin/src/scripts/template-start-slapd.in >=================================================================== >RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/template-start-slapd.in,v >retrieving revision 1.3 >diff -u -8 -r1.3 template-start-slapd.in >--- ldapserver/ldap/admin/src/scripts/template-start-slapd.in 28 Nov 2006 17:13:48 -0000 1.3 >+++ ldapserver/ldap/admin/src/scripts/template-start-slapd.in 26 Jan 2007 17:40:18 -0000 >@@ -11,18 +11,18 @@ > # 0: Server started successfully > # 1: Server could not be started > # 2: Server already running > > NETSITE_ROOT={{SERVER-DIR}} > export NETSITE_ROOT > DS_CONFIG_DIR={{CONFIG-DIR}} > export DS_CONFIG_DIR >-PIDFILE={{RUN-DIR}}/pid >-STARTPIDFILE={{RUN-DIR}}/startpid >+PIDFILE={{RUN-DIR}}/{{PRODUCT-NAME}}-{{SERV-ID}}.pid >+STARTPIDFILE={{RUN-DIR}}/{{PRODUCT-NAME}}-{{SERV-ID}}.startpid > if test -f $STARTPIDFILE ; then > PID=`cat $STARTPIDFILE` > if kill -0 $PID > /dev/null 2>&1 ; then > echo There is an ns-slapd process already running: $PID > exit 2; > else > rm -f $STARTPIDFILE > fi >Index: ldapserver/ldap/admin/src/scripts/template-stop-slapd.in >=================================================================== >RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/template-stop-slapd.in,v >retrieving revision 1.3 >diff -u -8 -r1.3 template-stop-slapd.in >--- ldapserver/ldap/admin/src/scripts/template-stop-slapd.in 28 Nov 2006 17:13:48 -0000 1.3 >+++ ldapserver/ldap/admin/src/scripts/template-stop-slapd.in 26 Jan 2007 17:40:18 -0000 >@@ -7,17 +7,17 @@ > export SHLIB_PATH > > # Script that stops the ns-slapd server. > # Exit status can be: > # 0: Server stopped successfully > # 1: Server could not be stopped > # 2: Server was not running > >-PIDFILE={{RUN-DIR}}/pid >+PIDFILE={{RUN-DIR}}/{{PRODUCT-NAME}}-{{SERV-ID}}.pid > if test ! -f $PIDFILE ; then > echo No ns-slapd PID file found. Server is probably not running > exit 2 > fi > PID=`cat $PIDFILE` > # see if the server is already stopped > kill -0 $PID > /dev/null 2>&1 || { > echo Server not running
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 224606
: 146695