diff options
| author | Noriko Hosoi <nhosoi@redhat.com> | 2006-10-25 00:05:18 +0000 |
|---|---|---|
| committer | Noriko Hosoi <nhosoi@redhat.com> | 2006-10-25 00:05:18 +0000 |
| commit | 1f66bb691f8d0377334d109b7db19d7ec1971fb6 (patch) | |
| tree | 5907e77bbc81d094f823b3838cfadf08fcb87215 /ldap/admin/src/scripts | |
| parent | ce5079cf2029b380efd95f2f6e17b98df22927e5 (diff) | |
| download | ds-1f66bb691f8d0377334d109b7db19d7ec1971fb6.tar.gz ds-1f66bb691f8d0377334d109b7db19d7ec1971fb6.tar.xz ds-1f66bb691f8d0377334d109b7db19d7ec1971fb6.zip | |
Resolves: #210947
Summary: parameterizing the hardcoded paths (phase 3. installed binaries, change log, setup)
Comment #23
Diffstat (limited to 'ldap/admin/src/scripts')
| -rw-r--r-- | ldap/admin/src/scripts/template-bak2db.pl | 7 | ||||
| -rwxr-xr-x | ldap/admin/src/scripts/template-cl-dump.pl | 15 | ||||
| -rw-r--r-- | ldap/admin/src/scripts/template-db2bak.pl | 6 | ||||
| -rw-r--r-- | ldap/admin/src/scripts/template-db2index.pl | 13 | ||||
| -rw-r--r-- | ldap/admin/src/scripts/template-db2ldif.pl | 6 | ||||
| -rw-r--r-- | ldap/admin/src/scripts/template-ldif2db.pl | 7 | ||||
| -rw-r--r-- | ldap/admin/src/scripts/template-ns-accountstatus.pl | 11 | ||||
| -rw-r--r-- | ldap/admin/src/scripts/template-ns-activate.pl | 11 | ||||
| -rw-r--r-- | ldap/admin/src/scripts/template-ns-inactivate.pl | 11 | ||||
| -rwxr-xr-x | ldap/admin/src/scripts/template-ns-newpwpolicy.pl | 28 | ||||
| -rwxr-xr-x | ldap/admin/src/scripts/template-repl-monitor-cgi.pl | 5 | ||||
| -rwxr-xr-x | ldap/admin/src/scripts/template-repl-monitor.pl | 15 | ||||
| -rw-r--r-- | ldap/admin/src/scripts/template-verify-db.pl | 12 |
13 files changed, 67 insertions, 80 deletions
diff --git a/ldap/admin/src/scripts/template-bak2db.pl b/ldap/admin/src/scripts/template-bak2db.pl index 0153666d..b3243271 100644 --- a/ldap/admin/src/scripts/template-bak2db.pl +++ b/ldap/admin/src/scripts/template-bak2db.pl @@ -56,7 +56,6 @@ $archivedir = ""; $dbtype = "ldbm database"; $instance = ""; $prefix = "{{DS-ROOT}}"; -$mydsroot = "{{MY-DS-ROOT}}"; $verbose = 0; $rootdn = ""; $passwd = ""; @@ -127,7 +126,9 @@ $nsdbtype = "nsDatabaseType: $dbtype\n"; $entry = "${dn}${misc}${cn}${nsinstance}${nsarchivedir}${nsdbtype}"; $vstr = ""; if ($verbose != 0) { $vstr = "-v"; } -chdir("$prefix{{SEP}}shared{{SEP}}bin"); -open(FOO, "| $prefix{{SEP}}shared{{SEP}}bin{{SEP}}ldapmodify $vstr -h {{SERVER-NAME}} -p {{SERVER-PORT}} -D \"$rootdn\" -w \"$passwd\" -a" ); +$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'; +open(FOO, "| ldapmodify $vstr -h {{SERVER-NAME}} -p {{SERVER-PORT}} -D \"$rootdn\" -w \"$passwd\" -a" ); print(FOO "$entry"); close(FOO); diff --git a/ldap/admin/src/scripts/template-cl-dump.pl b/ldap/admin/src/scripts/template-cl-dump.pl index 747a306a..ae611a9e 100755 --- a/ldap/admin/src/scripts/template-cl-dump.pl +++ b/ldap/admin/src/scripts/template-cl-dump.pl @@ -99,19 +99,8 @@ # enable the use of our bundled perldap with our bundled ldapsdk libraries # all of this nonsense can be omitted if the mozldapsdk and perldap are # installed in the operating system locations (e.g. /usr/lib /usr/lib/perl5) -BEGIN { - my $sroot = "{{DS-ROOT}}"; - push @INC, "$sroot/lib/perl/arch", "$sroot/lib/perl"; - if ($ENV{LD_LIBRARY_PATH}) { - $ENV{LD_LIBRARY_PATH} .= ":"; - } - $ENV{LD_LIBRARY_PATH} .= "$sroot/shared/lib"; - # this is only needed for HP/ux PA-RISC, but it doesn't hurt other platforms - if ($ENV{SHLIB_PATH}) { - $ENV{SHLIB_PATH} .= ":"; - } - $ENV{SHLIB_PATH} .= "$sroot/shared/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'; $usage="Usage: $0 [-h host] [-p port] [-D bind-dn] [-w bind-password | -P bind-cert] [-r replica-roots] [-o output-file] [-c] [-v]\n\n $0 -i changelog-ldif-file-with-base64encoding [-o output-file] [-c]"; diff --git a/ldap/admin/src/scripts/template-db2bak.pl b/ldap/admin/src/scripts/template-db2bak.pl index 9d9eb851..8235291f 100644 --- a/ldap/admin/src/scripts/template-db2bak.pl +++ b/ldap/admin/src/scripts/template-db2bak.pl @@ -115,7 +115,9 @@ $nsdbtype = "nsDatabaseType: $dbtype\n"; $entry = "${dn}${misc}${cn}${nsarchivedir}${nsdbtype}"; $vstr = ""; if ($verbose != 0) { $vstr = "-v"; } -chdir("$prefix{{SEP}}shared{{SEP}}bin"); -open(FOO, "| $prefix{{SEP}}shared{{SEP}}bin{{SEP}}ldapmodify $vstr -h {{SERVER-NAME}} -p {{SERVER-PORT}} -D \"$rootdn\" -w \"$passwd\" -a" ); +$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'; +open(FOO, "| ldapmodify $vstr -h {{SERVER-NAME}} -p {{SERVER-PORT}} -D \"$rootdn\" -w \"$passwd\" -a" ); print(FOO "$entry"); close(FOO); 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); diff --git a/ldap/admin/src/scripts/template-db2ldif.pl b/ldap/admin/src/scripts/template-db2ldif.pl index 19eb0f46..5e50a2d8 100644 --- a/ldap/admin/src/scripts/template-db2ldif.pl +++ b/ldap/admin/src/scripts/template-db2ldif.pl @@ -242,7 +242,9 @@ $nsldiffile = "nsFilename: ${ldiffile}\n"; $entry = "${dn}${misc}${cn}${nsinstance}${nsincluded}${nsexcluded}${nsreplica}${nsnobase64}${nsnowrap}${nsnoversion}${nsnouniqueid}${nsuseid2entry}${nsonefile}${nsexportdecrypt}${nsprintkey}${nsldiffile}"; $vstr = ""; if ($verbose != 0) { $vstr = "-v"; } -chdir("$prefix{{SEP}}shared{{SEP}}bin"); -open(FOO, "| $prefix{{SEP}}shared{{SEP}}bin{{SEP}}ldapmodify $vstr -h {{SERVER-NAME}} -p {{SERVER-PORT}} -D \"$rootdn\" -w \"$passwd\" -a" ); +$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'; +open(FOO, "| ldapmodify $vstr -h {{SERVER-NAME}} -p {{SERVER-PORT}} -D \"$rootdn\" -w \"$passwd\" -a" ); print(FOO "$entry"); close(FOO); diff --git a/ldap/admin/src/scripts/template-ldif2db.pl b/ldap/admin/src/scripts/template-ldif2db.pl index 148c9d6e..c7fb4b1d 100644 --- a/ldap/admin/src/scripts/template-ldif2db.pl +++ b/ldap/admin/src/scripts/template-ldif2db.pl @@ -94,7 +94,6 @@ $genuniqid = "time"; $uniqidname = ""; $taskname = ""; $prefix = "{{DS-ROOT}}"; -$mydsroot = "{{MY-DS-ROOT}}"; $verbose = 0; $rootdn = ""; $passwd = ""; @@ -219,7 +218,9 @@ if ($uniqidname ne "") { $nsuniqidname = "nsUniqueIdGeneratorNamespace: ${uniqid $entry = "${dn}${misc}${cn}${nsinstance}${nsincluded}${nsexcluded}${nsldiffiles}${nsnoattrindexes}${nsimportencrypt}${nsmergechunksiz}${nsgenuniqid}${nsuniqidname}"; $vstr = ""; if ($verbose != 0) { $vstr = "-v"; } -chdir("$prefix{{SEP}}shared{{SEP}}bin"); -open(FOO, "| $prefix{{SEP}}shared{{SEP}}bin{{SEP}}ldapmodify $vstr -h {{SERVER-NAME}} -p {{SERVER-PORT}} -D \"$rootdn\" -w \"$passwd\" -a" ); +$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'; +open(FOO, "| ldapmodify $vstr -h {{SERVER-NAME}} -p {{SERVER-PORT}} -D \"$rootdn\" -w \"$passwd\" -a" ); print(FOO "$entry"); close(FOO); diff --git a/ldap/admin/src/scripts/template-ns-accountstatus.pl b/ldap/admin/src/scripts/template-ns-accountstatus.pl index 96c31ed8..7736dbec 100644 --- a/ldap/admin/src/scripts/template-ns-accountstatus.pl +++ b/ldap/admin/src/scripts/template-ns-accountstatus.pl @@ -392,9 +392,12 @@ else debug("Running ** $cmd ** $operation\n"); -$dsbinroot="$prefix{{SEP}}shared{{SEP}}bin"; -$ldapsearch="$dsbinroot{{SEP}}ldapsearch -1"; -$ldapmodify="$dsbinroot{{SEP}}ldapmodify"; +$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'; + +$ldapsearch="ldapsearch -1"; +$ldapmodify="ldapmodify"; # Default values $defrootdn= "{{ROOT-DN}}"; @@ -412,8 +415,6 @@ $entry= ""; $single=0; $role=0; -chdir("$dsbinroot"); - # Process the command line arguments while( $arg = shift) { diff --git a/ldap/admin/src/scripts/template-ns-activate.pl b/ldap/admin/src/scripts/template-ns-activate.pl index 96c31ed8..7736dbec 100644 --- a/ldap/admin/src/scripts/template-ns-activate.pl +++ b/ldap/admin/src/scripts/template-ns-activate.pl @@ -392,9 +392,12 @@ else debug("Running ** $cmd ** $operation\n"); -$dsbinroot="$prefix{{SEP}}shared{{SEP}}bin"; -$ldapsearch="$dsbinroot{{SEP}}ldapsearch -1"; -$ldapmodify="$dsbinroot{{SEP}}ldapmodify"; +$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'; + +$ldapsearch="ldapsearch -1"; +$ldapmodify="ldapmodify"; # Default values $defrootdn= "{{ROOT-DN}}"; @@ -412,8 +415,6 @@ $entry= ""; $single=0; $role=0; -chdir("$dsbinroot"); - # Process the command line arguments while( $arg = shift) { diff --git a/ldap/admin/src/scripts/template-ns-inactivate.pl b/ldap/admin/src/scripts/template-ns-inactivate.pl index 96c31ed8..7736dbec 100644 --- a/ldap/admin/src/scripts/template-ns-inactivate.pl +++ b/ldap/admin/src/scripts/template-ns-inactivate.pl @@ -392,9 +392,12 @@ else debug("Running ** $cmd ** $operation\n"); -$dsbinroot="$prefix{{SEP}}shared{{SEP}}bin"; -$ldapsearch="$dsbinroot{{SEP}}ldapsearch -1"; -$ldapmodify="$dsbinroot{{SEP}}ldapmodify"; +$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'; + +$ldapsearch="ldapsearch -1"; +$ldapmodify="ldapmodify"; # Default values $defrootdn= "{{ROOT-DN}}"; @@ -412,8 +415,6 @@ $entry= ""; $single=0; $role=0; -chdir("$dsbinroot"); - # Process the command line arguments while( $arg = shift) { diff --git a/ldap/admin/src/scripts/template-ns-newpwpolicy.pl b/ldap/admin/src/scripts/template-ns-newpwpolicy.pl index a15e595d..d0f93773 100755 --- a/ldap/admin/src/scripts/template-ns-newpwpolicy.pl +++ b/ldap/admin/src/scripts/template-ns-newpwpolicy.pl @@ -42,19 +42,9 @@ # enable the use of our bundled perldap with our bundled ldapsdk libraries # all of this nonsense can be omitted if the mozldapsdk and perldap are # installed in the operating system locations (e.g. /usr/lib /usr/lib/perl5) -BEGIN { - my $sroot = "{{DS-ROOT}}"; - push @INC, "$sroot/lib/perl/arch", "$sroot/lib/perl"; - if ($ENV{LD_LIBRARY_PATH}) { - $ENV{LD_LIBRARY_PATH} .= ":"; - } - $ENV{LD_LIBRARY_PATH} .= "$sroot/shared/lib"; - # this is only needed for HP/ux PA-RISC, but it doesn't hurt other platforms - if ($ENV{SHLIB_PATH}) { - $ENV{SHLIB_PATH} .= ":"; - } - $ENV{SHLIB_PATH} .= "$sroot/shared/lib"; -} +$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'; # Add new password policy specific entries ############################################################################# @@ -74,11 +64,15 @@ $opt_p = "{{SERVER-PORT}}"; $opt_h = "{{SERVER-NAME}}"; $opt_v = 0; -# Variables -$ldapsearch="{{DS-ROOT}}{{SEP}}shared{{SEP}}bin{{SEP}}ldapsearch"; -$ldapmodify="{{DS-ROOT}}{{SEP}}shared{{SEP}}bin{{SEP}}ldapmodify"; +$ENV{'PATH'} = '$prefix{{SEP}}usr{{SEP}}lib:{{SEP}}usr{{SEP}}lib{{SEP}}mozldap'; +$ENV{'LD_LIBRARY_PATH'} .= ":"; +$ENV{'LD_LIBRARY_PATH'} .= "$prefix{{SEP}}usr{{SEP}}lib:{{SEP}}usr{{SEP}}lib{{SEP}}mozldap"; +$ENV{'SHLIB_PATH'} .= ":"; +$ENV{'SHLIB_PATH'} .= "$prefix{{SEP}}usr{{SEP}}lib:{{SEP}}usr{{SEP}}lib{{SEP}}mozldap"; -chdir("{{DS-ROOT}}{{SEP}}shared{{SEP}}bin"); +# Variables +$ldapsearch="ldapsearch -1"; +$ldapmodify="ldapmodify"; ############################################################################# diff --git a/ldap/admin/src/scripts/template-repl-monitor-cgi.pl b/ldap/admin/src/scripts/template-repl-monitor-cgi.pl index c9cbd92f..b2342bf4 100755 --- a/ldap/admin/src/scripts/template-repl-monitor-cgi.pl +++ b/ldap/admin/src/scripts/template-repl-monitor-cgi.pl @@ -56,8 +56,9 @@ if ($cgiVars{'admurl'}) { $params .= " -u \"$admurl\""; } $siteroot = $cgiVars{'siteroot'}; -$ENV{'LD_LIBRARY_PATH'} = "$siteroot/shared/lib"; -$ENV{'SHLIB_PATH'} = "$siteroot/shared/lib"; +$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'; # Save user-specified parameters as cookies in monreplication.properties. # Sync up with the property file so that monreplication2 is interval, and diff --git a/ldap/admin/src/scripts/template-repl-monitor.pl b/ldap/admin/src/scripts/template-repl-monitor.pl index 60a7b7bd..d1ec4bb6 100755 --- a/ldap/admin/src/scripts/template-repl-monitor.pl +++ b/ldap/admin/src/scripts/template-repl-monitor.pl @@ -150,7 +150,7 @@ # e.g. PERL5LIB="serverroot/lib/perl/arch:serverroot/lib/perl" # # 4. Set LD_LIBRARY_PATH (or SHLIB_PATH) to point to the location of our -# bundled shared libraries e.g. LD_LIBRARY_PATH="serverroot/shared/lib" +# bundled shared libraries e.g. LD_LIBRARY_PATH="serverroot/lib" # # 5. Invoke the script as follows if <MYPERLDIR> (serverroot/lib/perl) contains # Mozilla/LDAP: @@ -163,19 +163,6 @@ # this script is always invoked by repl-monitor-cgi.pl, which sets all of these # If using this script standalone, be sure to set the shared lib path and # the path to the perldap modules. -# BEGIN { -# my $sroot = "{{DS-ROOT}}"; -# push @INC, "$sroot/lib/perl/arch", "$sroot/lib/perl"; -# if ($ENV{LD_LIBRARY_PATH}) { -# $ENV{LD_LIBRARY_PATH} .= ":"; -# } -# $ENV{LD_LIBRARY_PATH} .= "$sroot/shared/lib"; -# # this is only needed for HP/ux PA-RISC, but it doesn't hurt other platforms -# if ($ENV{SHLIB_PATH}) { -# $ENV{SHLIB_PATH} .= ":"; -# } -# $ENV{SHLIB_PATH} .= "$sroot/shared/lib"; -# } $usage = "\nusage: $0 -f configuration-file [-h host] [-p port] [-r] [-u refresh-url] [-t refresh-interval]\n\nor : $0 -v\n"; use Getopt::Std; # parse command line arguments diff --git a/ldap/admin/src/scripts/template-verify-db.pl b/ldap/admin/src/scripts/template-verify-db.pl index a95ff21e..91d37975 100644 --- a/ldap/admin/src/scripts/template-verify-db.pl +++ b/ldap/admin/src/scripts/template-verify-db.pl @@ -111,12 +111,16 @@ print("*****************************************************************\n"); # get dirs having DBVERSION my $dbdirs = getDbDir("."); +my $brand_ds = {{DS-BRAND}}; +$ENV{'PATH'} = '$prefix/usr/bin:$prefix/usr/lib:/usr/bin:/usr/lib'; +$ENV{'LD_LIBRARY_PATH'} = ':/usr/lib'; +$ENV{'SHLIB_PATH'} = ':/usr/lib'; for (my $i = 0; $i < @$dbdirs; $i++) { - # run ../bin/slapd/server/db_printlog -h <dbdir> for each <dbdir> + # run db_printlog -h <dbdir> for each <dbdir> print "Verify log files in $$dbdirs[$i] ... "; - open(PRINTLOG, "..{{SEP}}bin{{SEP}}slapd{{SEP}}server{{SEP}}db_printlog -h $$dbdirs[$i] 2>&1 1> $NULL |"); + open(PRINTLOG, "db_printlog -h $$dbdirs[$i] 2>&1 1> $NULL |"); sleep 1; my $haserr = 0; while ($l = <PRINTLOG>) @@ -154,7 +158,7 @@ for (my $i = 0; $i < @$dbdirs; $i++) { my $thisdb = $$dbdirs[$i] . "{{SEP}}" . $db; print "Verify $thisdb ... "; - open(DBVERIFY, "..{{SEP}}bin{{SEP}}slapd{{SEP}}server{{SEP}}db_verify $thisdb 2>&1 1> $NULL |"); + open(DBVERIFY, "db_verify $thisdb 2>&1 1> $NULL |"); sleep 1; my $haserr = 0; while ($l = <DBVERIFY>) @@ -195,7 +199,7 @@ for (my $i = 0; $i < @$dbdirs; $i++) { my $thisdb = $$instdirs[$j] . "{{SEP}}" . $db; print "Verify $thisdb ... "; - open(DBVERIFY, "..{{SEP}}bin{{SEP}}slapd{{SEP}}server{{SEP}}db_verify $thisdb 2>&1 1> $NULL |"); + open(DBVERIFY, "db_verify $thisdb 2>&1 1> $NULL |"); sleep 1; my $haserr = 0; while ($l = <DBVERIFY>) |
