summaryrefslogtreecommitdiffstats
path: root/ldap/admin/src/scripts/template-db2index.pl
diff options
context:
space:
mode:
Diffstat (limited to 'ldap/admin/src/scripts/template-db2index.pl')
-rw-r--r--ldap/admin/src/scripts/template-db2index.pl13
1 files changed, 8 insertions, 5 deletions
diff --git a/ldap/admin/src/scripts/template-db2index.pl b/ldap/admin/src/scripts/template-db2index.pl
index 80e5a613..146008c0 100644
--- a/ldap/admin/src/scripts/template-db2index.pl
+++ b/ldap/admin/src/scripts/template-db2index.pl
@@ -67,6 +67,10 @@ $verbose = 0;
$prefix = "{{DS-ROOT}}";
+$ENV{'PATH'} = '$prefix/usr/lib/mozldap6:$prefix/usr/lib:/usr/lib/mozldap6:/usr/lib';
+$ENV{'LD_LIBRARY_PATH'} = '$prefix/usr/lib/dirsec:$prefix/usr/lib:/usr/lib/dirsec:/usr/lib';
+$ENV{'SHLIB_PATH'} = '$prefix/usr/lib/dirsec:$prefix/usr/lib:/usr/lib/dirsec:/usr/lib';
+
$i = 0;
while ($i <= $#ARGV)
{
@@ -162,13 +166,12 @@ $attribute="";
$indexes_list="";
$vlvattribute="";
$vlvindexes_list="";
-chdir("$prefix{{SEP}}shared{{SEP}}bin");
+chdir("$prefix{{SEP}}usr{{SEP}}bin");
if ( $attribute_arg eq "" && $vlvattribute_arg eq "" )
{
# Get the list of indexes from the entry
- $indexes_list="$prefix{{SEP}}shared{{SEP}}bin{{SEP}}ldapsearch $vstr -h {{SERVER-NAME}} -p {{SERVER-PORT}} -D \"$rootdn\" -w \"$passwd\" -s one " .
+ $indexes_list="ldapsearch $vstr -h {{SERVER-NAME}} -p {{SERVER-PORT}} -D \"$rootdn\" -w \"$passwd\" -s one " .
"-b \"cn=index,cn=\"$instance\", cn=ldbm database,cn=plugins,cn=config\" \"(&(objectclass=*)(nsSystemIndex=false))\" cn";
-
# build the values of the attribute nsIndexAttribute
open(LDAP1, "$indexes_list |");
while (<LDAP1>) {
@@ -186,7 +189,7 @@ if ( $attribute_arg eq "" && $vlvattribute_arg eq "" )
}
# Get the list of indexes from the entry
- $vlvindexes_list="$prefix{{SEP}}shared{{SEP}}bin{{SEP}}ldapsearch $vstr -h {{SERVER-NAME}} -p {{SERVER-PORT}} -D \"$rootdn\" -w \"$passwd\" -s sub -b \"cn=\"$instance\", cn=ldbm database,cn=plugins,cn=config\" \"objectclass=vlvIndex\" cn";
+ $vlvindexes_list="ldapsearch $vstr -h {{SERVER-NAME}} -p {{SERVER-PORT}} -D \"$rootdn\" -w \"$passwd\" -s sub -b \"cn=\"$instance\", cn=ldbm database,cn=plugins,cn=config\" \"objectclass=vlvIndex\" cn";
# build the values of the attribute nsIndexVlvAttribute
open(LDAP1, "$vlvindexes_list |");
@@ -219,6 +222,6 @@ $cn = "cn: $taskname\n";
$nsinstance = "nsInstance: ${instance}\n";
$entry = "${dn}${misc}${cn}${nsinstance}${attribute}${vlvattribute}";
-open(FOO, "| $prefix{{SEP}}shared{{SEP}}bin{{SEP}}ldapmodify $vstr -h {{SERVER-NAME}} -p {{SERVER-PORT}} -D \"$rootdn\" -w \"$passwd\" -a" );
+open(FOO, "| ldapmodify $vstr -h {{SERVER-NAME}} -p {{SERVER-PORT}} -D \"$rootdn\" -w \"$passwd\" -a" );
print(FOO "$entry");
close(FOO);