diff options
| author | Rich Megginson <rmeggins@redhat.com> | 2007-02-07 23:57:40 +0000 |
|---|---|---|
| committer | Rich Megginson <rmeggins@redhat.com> | 2007-02-07 23:57:40 +0000 |
| commit | 44ed8bab7f2de4b295a88230a35f66af72a12d18 (patch) | |
| tree | bb57e6674feead6fe0598ddf092141af53591ebe /ldap/admin/src | |
| parent | 67be3511d41496ed3c26f082cbf1eb06d96003cb (diff) | |
| download | ds-44ed8bab7f2de4b295a88230a35f66af72a12d18.tar.gz ds-44ed8bab7f2de4b295a88230a35f66af72a12d18.tar.xz ds-44ed8bab7f2de4b295a88230a35f66af72a12d18.zip | |
esolves: bug 227618
Bug Description: FHS: move exes to _bindir; move ns-slapd to _sbindir
Reviewed by: many people (Thanks!)
Fix Description: In order to be more FHS compliant, we need to make the following changes:
1) move files executable by end users to _bindir (e.g. /usr/bin) - this means logconv.pl, ds_newinst, dbscan, etc.
2) move the server executable ns-slapd to _sbindir (e.g. /usr/sbin)
And, to be more packaging friendly, the additional changes:
3) move libback-ldbm to the plugins dir - it is a plugin
4) use the libtool -avoid-version flag with plugins - we don't need the .so.0.0.0 for plugins
I had to add support for sbindir and SBINDIR to create_instance and ds_newinst. We were using serverdir for 3 things - command line programs, server specific shared libs, and the server executable itself. These are now in 3 different places. The biggest change was to the scripts. I kept serverdir and SERVER-DIR to be the location of the server shared libs to avoid changing even more stuff. I had to add SERVERBIN-DIR to the scripts - this is the location of ns-slapd and is set by sbindir in create_instance (which defaults to SBINDIR from Makefile.am which defaults to $prefix/sbin in configure - whew).
I've tested instance creation with these diffs - everything seems to work fine.
5) reorder files in alphabetical order - suggested by nkinder
6) add $LDFLAGS to test in db.m4
7) touch all template/wrapper .in files to make them newer than their corresponding files
Platforms tested: RHEL4, FC6
Flag Day: no
Doc impact: Yes, but the docs will have to change quite a bit for all of the FHS related changes.
Diffstat (limited to 'ldap/admin/src')
27 files changed, 89 insertions, 82 deletions
diff --git a/ldap/admin/src/create_instance.c b/ldap/admin/src/create_instance.c index cdcc3e27..bea8c2ac 100644 --- a/ldap/admin/src/create_instance.c +++ b/ldap/admin/src/create_instance.c @@ -312,6 +312,7 @@ void set_defaults(char *sroot, char *hn, server_config_s *conf) conf->bak_dir = NULL; conf->config_dir = NULL; + conf->sbindir = NULL; conf->datadir = NULL; conf->db_dir = NULL; conf->docdir = NULL; @@ -700,7 +701,7 @@ char *gen_script_auto(char *s_root, char *cs_path, { char myperl[PATH_SIZE]; char fn[PATH_SIZE], ofn[PATH_SIZE]; - const char *table[16][2]; + const char *table[17][2]; if (PR_FAILURE == PR_Access(cs_path, PR_ACCESS_EXISTS)) { printf("Notice: %s does not exist, skipping %s . . .\n", cs_path, name); @@ -756,7 +757,9 @@ char *gen_script_auto(char *s_root, char *cs_path, table[13][1] = cf->run_dir; table[14][0] = "PRODUCT-NAME"; table[14][1] = PRODUCT_NAME; - table[15][0] = table[15][1] = NULL; + table[15][0] = "SERVERBIN-DIR"; + table[15][1] = cf->sbindir; + table[16][0] = table[16][1] = NULL; if (generate_script(ofn, fn, NEWSCRIPT_MODE, table) != 0) { return make_error("Could not write %s to %s (%s).", ofn, fn, @@ -3219,7 +3222,7 @@ char *ds_gen_confs(char *sroot, server_config_s *cf, char *cs_path) fprintf(f, "objectclass: nsSlapdPlugin\n"); fprintf(f, "objectclass: extensibleObject\n"); fprintf(f, "cn: ldbm database\n"); - fprintf(f, "nsslapd-pluginpath: %s/libback-ldbm%s\n", cf->sroot, shared_lib); + fprintf(f, "nsslapd-pluginpath: %s/libback-ldbm%s\n", cf->plugin_dir, shared_lib); fprintf(f, "nsslapd-plugininitfunc: ldbm_back_init\n"); fprintf(f, "nsslapd-plugintype: database\n"); fprintf(f, "nsslapd-pluginenabled: on\n"); @@ -4229,6 +4232,7 @@ set_path_attribute(char *attr, char *defaultval, char *prefix) * cf->localstatedir: %{_localstatedir} * cf->sysconfdir: %{_sysconfdir} * cf->bindir: %{_bindir} + * cf->sbindir: %{_sbindir} * cf->datadir: %{_datadir} * cf->docdir: %{_docdir} * cf->inst_dir: <sroot>/slapd-<servid> @@ -4461,6 +4465,7 @@ int parse_form(server_config_s *cf) cf->localstatedir = set_path_attribute("localstatedir", LOCALSTATEDIR, prefix); cf->sysconfdir = set_path_attribute("sysconfdir", SYSCONFDIR, prefix); cf->bindir = set_path_attribute("bindir", BINDIR, prefix); + cf->sbindir = set_path_attribute("sbindir", SBINDIR, prefix); cf->datadir = set_path_attribute("datadir", DATADIR, prefix); cf->docdir = set_path_attribute("docdir", DOCDIR, prefix); diff --git a/ldap/admin/src/create_instance.h b/ldap/admin/src/create_instance.h index f3eac0ea..7629f8c6 100644 --- a/ldap/admin/src/create_instance.h +++ b/ldap/admin/src/create_instance.h @@ -74,6 +74,9 @@ extern "C" { /* Assume C declarations for C++ */ #ifndef BINDIR #define BINDIR "/usr/bin" #endif +#ifndef SBINDIR +#define SBINDIR "/usr/sbin" +#endif #ifndef DATADIR #define DATADIR "/usr/share" #endif @@ -87,6 +90,9 @@ extern "C" { /* Assume C declarations for C++ */ #ifndef BINDIR #define BINDIR "/bin" #endif +#ifndef SBINDIR +#define SBINDIR "/sbin" +#endif #ifndef DATADIR #define DATADIR "/share" #endif @@ -101,6 +107,7 @@ extern "C" { /* Assume C declarations for C++ */ #define SYSCONFDIR "\\etc" #define LIBDIR "\\usr\\lib" #define BINDIR "\\usr\\bin" +#define SBINDIR "\\usr\\sbin" #define DATADIR "\\usr\\share" #define DOCDIR "\\usr\\doc" #endif @@ -110,6 +117,7 @@ typedef struct { char *localstatedir; char *sysconfdir; char *bindir; + char *sbindir; char *datadir; char *docdir; diff --git a/ldap/admin/src/ds_newinst.pl b/ldap/admin/src/ds_newinst.pl index 3c78eab8..a5deb204 100644 --- a/ldap/admin/src/ds_newinst.pl +++ b/ldap/admin/src/ds_newinst.pl @@ -190,6 +190,7 @@ $cgiargs{"cert_dir"} = $table{"slapd"}->{"cert_dir"}; $cgiargs{"localstatedir"} = $table{"slapd"}->{"localstatedir"}; $cgiargs{"sysconfdir"} = $table{"slapd"}->{"sysconfdir"}; $cgiargs{"bindir"} = $table{"slapd"}->{"bindir"}; +$cgiargs{"sbindir"} = $table{"slapd"}->{"sbindir"}; $cgiargs{"datadir"} = $table{"slapd"}->{"datadir"}; $cgiargs{"docdir"} = $table{"slapd"}->{"docdir"}; $cgiargs{"inst_dir"} = $table{"slapd"}->{"inst_dir"}; @@ -253,9 +254,13 @@ $cgiargs{start_server} = 1; my $sroot = $cgiargs{sroot}; +my $prog = "/usr/bin/ds_newinst"; +if (! -x $prog) { + $prog = "/usr/lib/$brand_ds/ds_newinst"; +} + my $rc = &cgiFake($sroot, $verbose, - $prefix . "/usr/lib/$brand_ds/ds_newinst", - \%cgiargs); + $prog, \%cgiargs); if (!$rc) { print "Success! Your new directory server instance was created\n"; diff --git a/ldap/admin/src/ds_newinst.pl.in b/ldap/admin/src/ds_newinst.pl.in index 30840d83..97bfe972 100644 --- a/ldap/admin/src/ds_newinst.pl.in +++ b/ldap/admin/src/ds_newinst.pl.in @@ -190,6 +190,7 @@ $cgiargs{"cert_dir"} = $table{"slapd"}->{"cert_dir"}; $cgiargs{"localstatedir"} = $table{"slapd"}->{"localstatedir"}; $cgiargs{"sysconfdir"} = $table{"slapd"}->{"sysconfdir"}; $cgiargs{"bindir"} = $table{"slapd"}->{"bindir"}; +$cgiargs{"sbindir"} = $table{"slapd"}->{"sbindir"}; $cgiargs{"datadir"} = $table{"slapd"}->{"datadir"}; $cgiargs{"docdir"} = $table{"slapd"}->{"docdir"}; $cgiargs{"inst_dir"} = $table{"slapd"}->{"inst_dir"}; @@ -253,9 +254,13 @@ $cgiargs{start_server} = 1; my $sroot = $cgiargs{sroot}; +my $prog = "@bindir@/ds_newinst"; +if (! -x $prog) { + $prog = "@libdir@/$brand_ds/ds_newinst"; +} + my $rc = &cgiFake($sroot, $verbose, - "@libdir@/$brand_ds/ds_newinst", - \%cgiargs); + $prog, \%cgiargs); if (!$rc) { print "Success! Your new directory server instance was created\n"; diff --git a/ldap/admin/src/scripts/template-bak2db b/ldap/admin/src/scripts/template-bak2db index e8c0f4c5..00ddbad5 100644 --- a/ldap/admin/src/scripts/template-bak2db +++ b/ldap/admin/src/scripts/template-bak2db @@ -1,9 +1,9 @@ #!/bin/sh prefix="{{DS-ROOT}}" -LD_LIBRARY_PATH=$prefix/usr/lib/dirsec:$prefix/usr/lib:/usr/lib/dirsec +LD_LIBRARY_PATH=$prefix/{{SERVER-DIR}}:$prefix/usr/lib/dirsec:$prefix/usr/lib:/usr/lib/dirsec export LD_LIBRARY_PATH -SHLIB_PATH=$prefix/usr/lib/dirsec:$prefix/usr/lib:/usr/lib/dirsec +SHLIB_PATH=$prefix/{{SERVER-DIR}}:$prefix/usr/lib/dirsec:$prefix/usr/lib:/usr/lib/dirsec export SHLIB_PATH if [ $# -lt 1 ] || [ $# -gt 3 ] @@ -30,7 +30,7 @@ else archivedir=`pwd`/$archivedir fi -cd {{SERVER-DIR}} +cd {{SERVERBIN-DIR}} if [ "$#" -eq 2 ] then ./ns-slapd archive2db -D {{CONFIG-DIR}} -a $archivedir -n $bename diff --git a/ldap/admin/src/scripts/template-bak2db.in b/ldap/admin/src/scripts/template-bak2db.in index 04d408fe..90ef464e 100755 --- a/ldap/admin/src/scripts/template-bak2db.in +++ b/ldap/admin/src/scripts/template-bak2db.in @@ -4,7 +4,7 @@ prefix="{{DS-ROOT}}" if [ "$prefix" = "/" ] ; then prefix="" fi -LD_LIBRARY_PATH=$prefix@nss_libdir@:$prefix@libdir@ +LD_LIBRARY_PATH=$prefix/{{SERVER-DIR}}:$prefix@nss_libdir@:$prefix@libdir@ if [ -n "$prefix" ] ; then LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:@nss_libdir@" fi @@ -36,7 +36,7 @@ else archivedir=`pwd`/$archivedir fi -cd {{SERVER-DIR}} +cd {{SERVERBIN-DIR}} if [ "$#" -eq 2 ] then ./ns-slapd archive2db -D {{CONFIG-DIR}} -a $archivedir -n $bename diff --git a/ldap/admin/src/scripts/template-db2bak b/ldap/admin/src/scripts/template-db2bak index 1f7b08e4..bb34ae23 100644 --- a/ldap/admin/src/scripts/template-db2bak +++ b/ldap/admin/src/scripts/template-db2bak @@ -1,12 +1,12 @@ #!/bin/sh prefix="{{DS-ROOT}}" -LD_LIBRARY_PATH=$prefix/usr/lib/dirsec:$prefix/usr/lib:/usr/lib/dirsec +LD_LIBRARY_PATH=$prefix/{{SERVER-DIR}}:$prefix/usr/lib/dirsec:$prefix/usr/lib:/usr/lib/dirsec export LD_LIBRARY_PATH -SHLIB_PATH=$prefix/usr/lib/dirsec:$prefix/usr/lib:/usr/lib/dirsec +SHLIB_PATH=$prefix/{{SERVER-DIR}}:$prefix/usr/lib/dirsec:$prefix/usr/lib:/usr/lib/dirsec export SHLIB_PATH -cd {{SERVER-DIR}} +cd {{SERVERBIN-DIR}} if [ "$#" -eq 1 ] then bak_dir=$1 diff --git a/ldap/admin/src/scripts/template-db2bak.in b/ldap/admin/src/scripts/template-db2bak.in index a5a42203..32e5c7a1 100755 --- a/ldap/admin/src/scripts/template-db2bak.in +++ b/ldap/admin/src/scripts/template-db2bak.in @@ -4,7 +4,7 @@ prefix="{{DS-ROOT}}" if [ "$prefix" = "/" ] ; then prefix="" fi -LD_LIBRARY_PATH=$prefix@nss_libdir@:$prefix@libdir@ +LD_LIBRARY_PATH=$prefix/{{SERVER-DIR}}:$prefix@nss_libdir@:$prefix@libdir@ if [ -n "$prefix" ] ; then LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:@nss_libdir@" fi @@ -12,7 +12,7 @@ export LD_LIBRARY_PATH SHLIB_PATH=$LD_LIBRARY_PATH export SHLIB_PATH -cd {{SERVER-DIR}} +cd {{SERVERBIN-DIR}} if [ "$#" -eq 1 ] then bak_dir=$1 diff --git a/ldap/admin/src/scripts/template-db2index b/ldap/admin/src/scripts/template-db2index index 471416a3..7350e2cc 100644 --- a/ldap/admin/src/scripts/template-db2index +++ b/ldap/admin/src/scripts/template-db2index @@ -1,12 +1,12 @@ #!/bin/sh prefix="{{DS-ROOT}}" -LD_LIBRARY_PATH=$prefix/usr/lib/dirsec:$prefix/usr/lib:/usr/lib/dirsec +LD_LIBRARY_PATH=$prefix/{{SERVER-DIR}}:$prefix/usr/lib/dirsec:$prefix/usr/lib:/usr/lib/dirsec export LD_LIBRARY_PATH -SHLIB_PATH=$prefix/usr/lib/dirsec:$prefix/usr/lib:/usr/lib/dirsec +SHLIB_PATH=$prefix/{{SERVER-DIR}}:$prefix/usr/lib/dirsec:$prefix/usr/lib:/usr/lib/dirsec export SHLIB_PATH -cd {{SERVER-DIR}} +cd {{SERVERBIN-DIR}} if [ $# -eq 0 ] then bak_dir={{BAK-DIR}}/reindex_`date +%Y_%m_%d_%H_%M_%S` diff --git a/ldap/admin/src/scripts/template-db2index.in b/ldap/admin/src/scripts/template-db2index.in index af7b6ebb..8f9b0c6c 100755 --- a/ldap/admin/src/scripts/template-db2index.in +++ b/ldap/admin/src/scripts/template-db2index.in @@ -4,7 +4,7 @@ prefix="{{DS-ROOT}}" if [ "$prefix" = "/" ] ; then prefix="" fi -LD_LIBRARY_PATH=$prefix@nss_libdir@:$prefix@libdir@ +LD_LIBRARY_PATH=$prefix/{{SERVER-DIR}}:$prefix@nss_libdir@:$prefix@libdir@ if [ -n "$prefix" ] ; then LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:@nss_libdir@" fi @@ -12,7 +12,7 @@ export LD_LIBRARY_PATH SHLIB_PATH=$LD_LIBRARY_PATH export SHLIB_PATH -cd {{SERVER-DIR}} +cd {{SERVERBIN-DIR}} if [ $# -eq 0 ] then bak_dir={{BAK-DIR}}/reindex_`date +%Y_%m_%d_%H_%M_%S` diff --git a/ldap/admin/src/scripts/template-db2ldif b/ldap/admin/src/scripts/template-db2ldif index 8c02443a..505aa949 100644 --- a/ldap/admin/src/scripts/template-db2ldif +++ b/ldap/admin/src/scripts/template-db2ldif @@ -1,12 +1,12 @@ #!/bin/sh prefix="{{DS-ROOT}}" -LD_LIBRARY_PATH=$prefix/usr/lib/dirsec:$prefix/usr/lib:/usr/lib/dirsec +LD_LIBRARY_PATH=$prefix/{{SERVER-DIR}}:$prefix/usr/lib/dirsec:$prefix/usr/lib:/usr/lib/dirsec export LD_LIBRARY_PATH -SHLIB_PATH=$prefix/usr/lib/dirsec:$prefix/usr/lib:/usr/lib/dirsec +SHLIB_PATH=$prefix/{{SERVER-DIR}}:$prefix/usr/lib/dirsec:$prefix/usr/lib:/usr/lib/dirsec export SHLIB_PATH -cd {{SERVER-DIR}} +cd {{SERVERBIN-DIR}} if [ "$#" -lt 2 ]; then echo "Usage: db2ldif {-n backend_instance}* | {-s includesuffix}*" diff --git a/ldap/admin/src/scripts/template-db2ldif.in b/ldap/admin/src/scripts/template-db2ldif.in index 86aea93b..79d35c89 100755 --- a/ldap/admin/src/scripts/template-db2ldif.in +++ b/ldap/admin/src/scripts/template-db2ldif.in @@ -4,7 +4,7 @@ prefix="{{DS-ROOT}}" if [ "$prefix" = "/" ] ; then prefix="" fi -LD_LIBRARY_PATH=$prefix@nss_libdir@:$prefix@libdir@ +LD_LIBRARY_PATH=$prefix/{{SERVER-DIR}}:$prefix@nss_libdir@:$prefix@libdir@ if [ -n "$prefix" ] ; then LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:@nss_libdir@" fi @@ -12,7 +12,7 @@ export LD_LIBRARY_PATH SHLIB_PATH=$LD_LIBRARY_PATH export SHLIB_PATH -cd {{SERVER-DIR}} +cd {{SERVERBIN-DIR}} if [ "$#" -lt 2 ]; then echo "Usage: db2ldif {-n backend_instance}* | {-s includesuffix}*" @@ -37,7 +37,7 @@ do done if [ $ldif_file = "mydummy" ] then - ldif_file={{LDIF-DIR}}/laputa-`date +%Y_%m_%d_%H%M%S`.ldif + ldif_file={{LDIF-DIR}}/`date +%Y_%m_%d_%H%M%S`.ldif fi if [ $set_ldif -eq 2 ] then diff --git a/ldap/admin/src/scripts/template-ldif2db b/ldap/admin/src/scripts/template-ldif2db index a5c59c4e..7bd3a5e8 100644 --- a/ldap/admin/src/scripts/template-ldif2db +++ b/ldap/admin/src/scripts/template-ldif2db @@ -1,12 +1,12 @@ #!/bin/sh prefix="{{DS-ROOT}}" -LD_LIBRARY_PATH=$prefix/usr/lib/dirsec:$prefix/usr/lib:/usr/lib/dirsec +LD_LIBRARY_PATH=$prefix/{{SERVER-DIR}}:$prefix/usr/lib/dirsec:$prefix/usr/lib:/usr/lib/dirsec export LD_LIBRARY_PATH -SHLIB_PATH=$prefix/usr/lib/dirsec:$prefix/usr/lib:/usr/lib/dirsec +SHLIB_PATH=$prefix/{{SERVER-DIR}}:$prefix/usr/lib/dirsec:$prefix/usr/lib:/usr/lib/dirsec export SHLIB_PATH -cd {{SERVER-DIR}} +cd {{SERVERBIN-DIR}} if [ $# -lt 4 ] then echo "Usage: ldif2db -n backend_instance | {-s includesuffix}* [{-x excludesuffix}*]" diff --git a/ldap/admin/src/scripts/template-ldif2db.in b/ldap/admin/src/scripts/template-ldif2db.in index 0a610399..83c579ec 100755 --- a/ldap/admin/src/scripts/template-ldif2db.in +++ b/ldap/admin/src/scripts/template-ldif2db.in @@ -4,7 +4,7 @@ prefix="{{DS-ROOT}}" if [ "$prefix" = "/" ] ; then prefix="" fi -LD_LIBRARY_PATH=$prefix@nss_libdir@:$prefix@libdir@ +LD_LIBRARY_PATH=$prefix/{{SERVER-DIR}}:$prefix@nss_libdir@:$prefix@libdir@ if [ -n "$prefix" ] ; then LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:@nss_libdir@" fi @@ -12,7 +12,7 @@ export LD_LIBRARY_PATH SHLIB_PATH=$LD_LIBRARY_PATH export SHLIB_PATH -cd {{SERVER-DIR}} +cd {{SERVERBIN-DIR}} if [ $# -lt 4 ] then echo "Usage: ldif2db -n backend_instance | {-s includesuffix}* [{-x excludesuffix}*]" diff --git a/ldap/admin/src/scripts/template-restoreconfig b/ldap/admin/src/scripts/template-restoreconfig index bfc0f3aa..0a8de6a4 100644 --- a/ldap/admin/src/scripts/template-restoreconfig +++ b/ldap/admin/src/scripts/template-restoreconfig @@ -1,12 +1,12 @@ #!/bin/sh prefix="{{DS-ROOT}}" -LD_LIBRARY_PATH=$prefix/usr/lib/dirsec:$prefix/usr/lib:/usr/lib/dirsec +LD_LIBRARY_PATH=$prefix/{{SERVER-DIR}}:$prefix/usr/lib/dirsec:$prefix/usr/lib:/usr/lib/dirsec export LD_LIBRARY_PATH -SHLIB_PATH=$prefix/usr/lib/dirsec:$prefix/usr/lib:/usr/lib/dirsec +SHLIB_PATH=$prefix/{{SERVER-DIR}}:$prefix/usr/lib/dirsec:$prefix/usr/lib:/usr/lib/dirsec export SHLIB_PATH -cd {{SERVER-DIR}} +cd {{SERVERBIN-DIR}} conf_ldif=`ls -1t {{BAK-DIR}}/{{SERV-ID}}-*.ldif | head -1` if [ -z "$conf_ldif" ] then diff --git a/ldap/admin/src/scripts/template-restoreconfig.in b/ldap/admin/src/scripts/template-restoreconfig.in index 90ac5960..dc210cba 100755 --- a/ldap/admin/src/scripts/template-restoreconfig.in +++ b/ldap/admin/src/scripts/template-restoreconfig.in @@ -1,12 +1,12 @@ #!/bin/sh prefix="{{DS-ROOT}}" -LD_LIBRARY_PATH=$prefix@nss_libdir@:$prefix@libdir@:@nss_libdir@ +LD_LIBRARY_PATH=$prefix/{{SERVER-DIR}}:$prefix@nss_libdir@:$prefix@libdir@:@nss_libdir@ export LD_LIBRARY_PATH -SHLIB_PATH=$prefix@nss_libdir@:$prefix@libdir@:@nss_libdir@ +SHLIB_PATH=$prefix/{{SERVER-DIR}}:$prefix@nss_libdir@:$prefix@libdir@:@nss_libdir@ export SHLIB_PATH -cd {{SERVER-DIR}} +cd {{SERVERBIN-DIR}} conf_ldif=`ls -1t {{BAK-DIR}}/{{SERV-ID}}-*.ldif | head -1` if [ -z "$conf_ldif" ] then diff --git a/ldap/admin/src/scripts/template-saveconfig b/ldap/admin/src/scripts/template-saveconfig index 3f62a33e..9ccf8aba 100644 --- a/ldap/admin/src/scripts/template-saveconfig +++ b/ldap/admin/src/scripts/template-saveconfig @@ -1,12 +1,12 @@ #!/bin/sh prefix="{{DS-ROOT}}" -LD_LIBRARY_PATH=$prefix/usr/lib/dirsec:$prefix/usr/lib:/usr/lib/dirsec +LD_LIBRARY_PATH=$prefix/{{SERVER-DIR}}:$prefix/usr/lib/dirsec:$prefix/usr/lib:/usr/lib/dirsec export LD_LIBRARY_PATH -SHLIB_PATH=$prefix/usr/lib/dirsec:$prefix/usr/lib:/usr/lib/dirsec +SHLIB_PATH=$prefix/{{SERVER-DIR}}:$prefix/usr/lib/dirsec:$prefix/usr/lib:/usr/lib/dirsec export SHLIB_PATH -cd {{SERVER-DIR}} +cd {{SERVERBIN-DIR}} echo saving configuration ... conf_ldif={{BAK-DIR}}/{{SERV-ID}}-`date +%Y_%m_%d_%H%M%S`.ldif ./ns-slapd db2ldif -N -D {{CONFIG-DIR}} -s "o=NetscapeRoot" -a $conf_ldif -n NetscapeRoot 2>&1 diff --git a/ldap/admin/src/scripts/template-saveconfig.in b/ldap/admin/src/scripts/template-saveconfig.in index 501d077a..1ce5d075 100755 --- a/ldap/admin/src/scripts/template-saveconfig.in +++ b/ldap/admin/src/scripts/template-saveconfig.in @@ -1,12 +1,12 @@ #!/bin/sh prefix="{{DS-ROOT}}" -LD_LIBRARY_PATH=$prefix@nss_libdir@:$prefix@libdir@:@nss_libdir@ +LD_LIBRARY_PATH=$prefix/{{SERVER-DIR}}:$prefix@nss_libdir@:$prefix@libdir@:@nss_libdir@ export LD_LIBRARY_PATH -SHLIB_PATH=$prefix@nss_libdir@:$prefix@libdir@:@nss_libdir@ +SHLIB_PATH=$prefix/{{SERVER-DIR}}:$prefix@nss_libdir@:$prefix@libdir@:@nss_libdir@ export SHLIB_PATH -cd {{SERVER-DIR}} +cd {{SERVERBIN-DIR}} echo saving configuration ... conf_ldif={{BAK-DIR}}/{{SERV-ID}}-`date +%Y_%m_%d_%H%M%S`.ldif ./ns-slapd db2ldif -N -D {{CONFIG-DIR}} -s "o=NetscapeRoot" -a $conf_ldif -n NetscapeRoot 2>&1 diff --git a/ldap/admin/src/scripts/template-start-slapd b/ldap/admin/src/scripts/template-start-slapd index 29fccba2..d640cf48 100644 --- a/ldap/admin/src/scripts/template-start-slapd +++ b/ldap/admin/src/scripts/template-start-slapd @@ -1,9 +1,9 @@ #!/bin/sh prefix="{{DS-ROOT}}" -LD_LIBRARY_PATH=$prefix/usr/lib/dirsec:$prefix/usr/lib:/usr/lib/dirsec +LD_LIBRARY_PATH=$prefix{{SERVER-DIR}}:$prefix/usr/lib/dirsec:$prefix/usr/lib:/usr/lib/dirsec export LD_LIBRARY_PATH -SHLIB_PATH=$prefix/usr/lib/dirsec:$prefix/usr/lib:/usr/lib/dirsec +SHLIB_PATH=$prefix{{SERVER-DIR}}:$prefix/usr/lib/dirsec:$prefix/usr/lib:/usr/lib/dirsec export SHLIB_PATH # Script that starts the ns-slapd server. @@ -12,8 +12,6 @@ export SHLIB_PATH # 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}}/{{PRODUCT-NAME}}-{{SERV-ID}}.pid @@ -36,7 +34,7 @@ if test -f $PIDFILE ; then rm -f $PIDFILE fi fi -cd {{SERVER-DIR}}; ./ns-slapd -D {{CONFIG-DIR}} -i $PIDFILE -w $STARTPIDFILE "$@" +cd {{SERVERBIN-DIR}}; ./ns-slapd -D {{CONFIG-DIR}} -i $PIDFILE -w $STARTPIDFILE "$@" if [ $? -ne 0 ]; then exit 1 fi diff --git a/ldap/admin/src/scripts/template-start-slapd.in b/ldap/admin/src/scripts/template-start-slapd.in index 4e65c8c7..59d32345 100755 --- a/ldap/admin/src/scripts/template-start-slapd.in +++ b/ldap/admin/src/scripts/template-start-slapd.in @@ -1,9 +1,9 @@ #!/bin/sh prefix="{{DS-ROOT}}" -LD_LIBRARY_PATH=$prefix@nss_libdir@:$prefix@libdir@:@nss_libdir@ +LD_LIBRARY_PATH=$prefix{{SERVER-DIR}}:$prefix@nss_libdir@:$prefix@libdir@:@nss_libdir@ export LD_LIBRARY_PATH -SHLIB_PATH=$prefix@nss_libdir@:$prefix@libdir@:@nss_libdir@ +SHLIB_PATH=$prefix{{SERVER-DIR}}:$prefix@nss_libdir@:$prefix@libdir@:@nss_libdir@ export SHLIB_PATH # Script that starts the ns-slapd server. @@ -12,8 +12,6 @@ export SHLIB_PATH # 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}}/{{PRODUCT-NAME}}-{{SERV-ID}}.pid @@ -36,7 +34,7 @@ if test -f $PIDFILE ; then rm -f $PIDFILE fi fi -cd {{SERVER-DIR}}; ./ns-slapd -D {{CONFIG-DIR}} -i $PIDFILE -w $STARTPIDFILE "$@" +cd {{SERVERBIN-DIR}}; ./ns-slapd -D {{CONFIG-DIR}} -i $PIDFILE -w $STARTPIDFILE "$@" if [ $? -ne 0 ]; then exit 1 fi diff --git a/ldap/admin/src/scripts/template-stop-slapd b/ldap/admin/src/scripts/template-stop-slapd index 9d64151e..cc9f9681 100644 --- a/ldap/admin/src/scripts/template-stop-slapd +++ b/ldap/admin/src/scripts/template-stop-slapd @@ -1,11 +1,5 @@ #!/bin/sh -prefix="{{DS-ROOT}}" -LD_LIBRARY_PATH=$prefix/usr/lib/dirsec:$prefix/usr/lib:/usr/lib/dirsec -export LD_LIBRARY_PATH -SHLIB_PATH=$prefix/usr/lib/dirsec:$prefix/usr/lib:/usr/lib/dirsec -export SHLIB_PATH - # Script that stops the ns-slapd server. # Exit status can be: # 0: Server stopped successfully diff --git a/ldap/admin/src/scripts/template-stop-slapd.in b/ldap/admin/src/scripts/template-stop-slapd.in index 0d02c9da..cc9f9681 100755 --- a/ldap/admin/src/scripts/template-stop-slapd.in +++ b/ldap/admin/src/scripts/template-stop-slapd.in @@ -1,11 +1,5 @@ #!/bin/sh -prefix="{{DS-ROOT}}" -LD_LIBRARY_PATH=$prefix@nss_libdir@:$prefix@libdir@:@nss_libdir@ -export LD_LIBRARY_PATH -SHLIB_PATH=$prefix@nss_libdir@:$prefix@libdir@:@nss_libdir@ -export SHLIB_PATH - # Script that stops the ns-slapd server. # Exit status can be: # 0: Server stopped successfully diff --git a/ldap/admin/src/scripts/template-suffix2instance b/ldap/admin/src/scripts/template-suffix2instance index f3642468..24b3385d 100644 --- a/ldap/admin/src/scripts/template-suffix2instance +++ b/ldap/admin/src/scripts/template-suffix2instance @@ -1,12 +1,12 @@ #!/bin/sh prefix="{{DS-ROOT}}" -LD_LIBRARY_PATH=$prefix/usr/lib/dirsec:$prefix/usr/lib:/usr/lib/dirsec +LD_LIBRARY_PATH=$prefix/{{SERVER-DIR}}:$prefix/usr/lib/dirsec:$prefix/usr/lib:/usr/lib/dirsec export LD_LIBRARY_PATH -SHLIB_PATH=$prefix/usr/lib/dirsec:$prefix/usr/lib:/usr/lib/dirsec +SHLIB_PATH=$prefix/{{SERVER-DIR}}:$prefix/usr/lib/dirsec:$prefix/usr/lib:/usr/lib/dirsec export SHLIB_PATH -cd {{SERVER-DIR}} +cd {{SERVERBIN-DIR}} if [ $# -lt 2 ] then echo Usage: suffix2instance {-s includesuffix}* diff --git a/ldap/admin/src/scripts/template-suffix2instance.in b/ldap/admin/src/scripts/template-suffix2instance.in index a03a82d7..dadb5f91 100755 --- a/ldap/admin/src/scripts/template-suffix2instance.in +++ b/ldap/admin/src/scripts/template-suffix2instance.in @@ -1,12 +1,12 @@ #!/bin/sh prefix="{{DS-ROOT}}" -LD_LIBRARY_PATH=$prefix@nss_libdir@:$prefix@libdir@:@nss_libdir@ +LD_LIBRARY_PATH=$prefix/{{SERVER-DIR}}:$prefix@nss_libdir@:$prefix@libdir@:@nss_libdir@ export LD_LIBRARY_PATH -SHLIB_PATH=$prefix@nss_libdir@:$prefix@libdir@:@nss_libdir@ +SHLIB_PATH=$prefix/{{SERVER-DIR}}:$prefix@nss_libdir@:$prefix@libdir@:@nss_libdir@ export SHLIB_PATH -cd {{SERVER-DIR}} +cd {{SERVERBIN-DIR}} if [ $# -lt 2 ] then echo Usage: suffix2instance {-s includesuffix}* diff --git a/ldap/admin/src/scripts/template-upgradedb.in b/ldap/admin/src/scripts/template-upgradedb.in index 30a2f53c..ef3fdf2e 100755 --- a/ldap/admin/src/scripts/template-upgradedb.in +++ b/ldap/admin/src/scripts/template-upgradedb.in @@ -1,12 +1,12 @@ #!/bin/sh prefix="{{DS-ROOT}}" -LD_LIBRARY_PATH=$prefix@nss_libdir@:$prefix@libdir@:@nss_libdir@ +LD_LIBRARY_PATH=$prefix/{{SERVER-DIR}}:$prefix@nss_libdir@:$prefix@libdir@:@nss_libdir@ export LD_LIBRARY_PATH -SHLIB_PATH=$prefix@nss_libdir@:$prefix@libdir@:@nss_libdir@ +SHLIB_PATH=$prefix/{{SERVER-DIR}}:$prefix@nss_libdir@:$prefix@libdir@:@nss_libdir@ export SHLIB_PATH -cd {{SERVER-DIR}} +cd {{SERVERBIN-DIR}} if [ "$#" -eq 1 ] then bak_dir=$1 diff --git a/ldap/admin/src/scripts/template-vlvindex b/ldap/admin/src/scripts/template-vlvindex index 6d507fb4..ccd8797b 100644 --- a/ldap/admin/src/scripts/template-vlvindex +++ b/ldap/admin/src/scripts/template-vlvindex @@ -1,12 +1,12 @@ #!/bin/sh prefix="{{DS-ROOT}}" -LD_LIBRARY_PATH=$prefix/usr/lib/dirsec:$prefix/usr/lib:/usr/lib/dirsec +LD_LIBRARY_PATH=$prefix/{{SERVER-DIR}}:$prefix/usr/lib/dirsec:$prefix/usr/lib:/usr/lib/dirsec export LD_LIBRARY_PATH -SHLIB_PATH=$prefix/usr/lib/dirsec:$prefix/usr/lib:/usr/lib/dirsec +SHLIB_PATH=$prefix/{{SERVER-DIR}}:$prefix/usr/lib/dirsec:$prefix/usr/lib:/usr/lib/dirsec export SHLIB_PATH -cd {{SERVER-DIR}} +cd {{SERVERBIN-DIR}} if [ $# -lt 4 ] then echo "Usage: vlvindex -n backend_instance | {-s includesuffix}* -T attribute" diff --git a/ldap/admin/src/scripts/template-vlvindex.in b/ldap/admin/src/scripts/template-vlvindex.in index ae9a5024..4c61e0d7 100755 --- a/ldap/admin/src/scripts/template-vlvindex.in +++ b/ldap/admin/src/scripts/template-vlvindex.in @@ -1,12 +1,12 @@ #!/bin/sh prefix="{{DS-ROOT}}" -LD_LIBRARY_PATH=$prefix@nss_libdir@:$prefix@libdir@:@nss_libdir@ +LD_LIBRARY_PATH=$prefix/{{SERVER-DIR}}:$prefix@nss_libdir@:$prefix@libdir@:@nss_libdir@ export LD_LIBRARY_PATH -SHLIB_PATH=$prefix@nss_libdir@:$prefix@libdir@:@nss_libdir@ +SHLIB_PATH=$prefix/{{SERVER-DIR}}:$prefix@nss_libdir@:$prefix@libdir@:@nss_libdir@ export SHLIB_PATH -cd {{SERVER-DIR}} +cd {{SERVERBIN-DIR}} if [ $# -lt 4 ] then echo "Usage: vlvindex -n backend_instance | {-s includesuffix}* -T attribute" |
