[Fedora-directory-commits] ldapserver/ldap/admin/src/scripts template-cl-dump.pl, 1.6, 1.7 template-migrate50to51, 1.5, 1.6 template-migrate5to6, 1.4, 1.5 template-migrate5to7, 1.4, 1.5 template-migrate6to7, 1.6, 1.7 template-migrateInstance5, 1.4, 1.5 template-migrateInstance6, 1.4, 1.5 template-migrateInstance7, 1.5, 1.6 template-migrateTo5, 1.5, 1.6 template-migrateTo6, 1.4, 1.5 template-migrateTo7, 1.5, 1.6 template-ns-newpwpolicy.pl, 1.4, 1.5 template-repl-monitor-cgi.pl, 1.4, 1.5 template-repl-monitor.pl, 1.6, 1.7 template-verify-db.pl, 1.4, 1.5
Richard Allen Megginson (rmeggins)
fedora-directory-commits at redhat.com
Fri Oct 21 19:21:14 UTC 2005
- Previous message (by thread): [Fedora-directory-commits] ldapserver/ldap/admin/src Makefile, 1.13, 1.14 configure_instance.cpp, 1.7, 1.8 create_instance.c, 1.22, 1.23 ds_newinst.pl, 1.4, 1.5 ds_viewlog.pl, 1.4, 1.5 getConfigInfo, 1.4, 1.5 import2info, 1.4, 1.5 makemccvlvindexes, 1.4, 1.5 makevlvindex, 1.4, 1.5 makevlvsearch, 1.4, 1.5 migrateInstance, 1.4, 1.5 migrateLocalDB, 1.4, 1.5 migratePwdFile, 1.4, 1.5 migrateTo4, 1.5, 1.6 migratedsgw, 1.4, 1.5 ns-newpwpolicy.pl, 1.4, 1.5 updatedsgw, 1.6, 1.7 upgradeServer, 1.6, 1.7 AddPerlHeader.pl, 1.4, NONE Base.def, 1.5, NONE Base.pm, 1.4, NONE CreateInstall.pl, 1.4, NONE DSAdmin.def, 1.4, NONE DSAdmin.mk, 1.7, NONE DSAdmin.pm, 1.5, NONE DSAdmin.xs, 1.4, NONE Inf.pm, 1.4, NONE
- Next message (by thread): [Fedora-directory-commits] ldapserver/ldap/clients/orgchart myorg.pl, 1.6, 1.7 org.pl, 1.6, 1.7
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: rmeggins
Update of /cvs/dirsec/ldapserver/ldap/admin/src/scripts
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv27230/ldapserver/ldap/admin/src/scripts
Modified Files:
template-cl-dump.pl template-migrate50to51
template-migrate5to6 template-migrate5to7 template-migrate6to7
template-migrateInstance5 template-migrateInstance6
template-migrateInstance7 template-migrateTo5
template-migrateTo6 template-migrateTo7
template-ns-newpwpolicy.pl template-repl-monitor-cgi.pl
template-repl-monitor.pl template-verify-db.pl
Log Message:
Bug(s) fixed: 171066
Bug Description: Get rid of nsperl; use perldap with system perl
Reviewed by: Noriko, Rob, Nathan (Thanks!)
Branch: HEAD
Fix Description: All perl scripts are made executable by using the
#!/usr/bin/env perl *nix trick. This means that the correct version of
perl must be in the user's PATH e.g. 5.6.1 or later. This version is
either shipped with the OS or available on all platforms. On HP/ux, it
is available as a depot which is installed in /opt/perl. For CGI perl
scripts, the PATH can be set in the admserv.conf, so we may have to do
that for HP/ux. To make perldap work, some ugly hacks are involved.
Each perl script that uses perldap has a BEGIN section that figures out
where it is in the server root, sets a server root variable, and sets
LD_LIBRARY_PATH and SHLIB_PATH to point to serverroot/shared/lib.
Perldap will be installed under serverroot/lib/perl. This directory
will have 3 subdirectories: arch - containing the binary files; auto -
containing autoloaded perl modules; and Mozilla - containing the base
perldap .pm files. The BEGIN section also sets the perl INC path to
find those modules. The directory gets rid of nsperl plus a lot of old
crufty perl building code that we do not use anymore. Those are the
removed files. The admin server code also gets rid of the perl.c wrapper.
Noriko pointed out that this does not take care of upgrade install, so I
added several more files and diffs to take care of that case.
Basically, go through the tasks in o=netscaperoot and replace
perl?scriptname with just scriptname. Also, go through all of the
template generated scripts and replace the shebang line with
#!/usr/bin/env perl, and make sure they are chmod +x. I also found a
few more places that referenced nsperl and removed them.
Platforms tested: RHEL4
Flag Day: no
Doc impact: no
QA impact: should be covered by regular nightly and manual testing
New Tests integrated into TET: none
Index: template-cl-dump.pl
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/template-cl-dump.pl,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- template-cl-dump.pl 19 Apr 2005 22:13:37 -0000 1.6
+++ template-cl-dump.pl 21 Oct 2005 19:21:11 -0000 1.7
@@ -96,6 +96,23 @@
# DSHOME/bin/slapd/admin/scripts
#
################################################################################
+# 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";
+}
+
$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]";
use Getopt::Std; # Parse command line arguments
Index: template-migrate50to51
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/template-migrate50to51,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- template-migrate50to51 19 Apr 2005 22:07:00 -0000 1.5
+++ template-migrate50to51 21 Oct 2005 19:21:11 -0000 1.6
@@ -39,6 +39,22 @@
# END COPYRIGHT BLOCK
#
+# 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";
+}
# Migrate a 5.0 directory server to a 5.1 directory server
#######################################################################################################
Index: template-migrate5to6
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/template-migrate5to6,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- template-migrate5to6 19 Apr 2005 22:07:00 -0000 1.4
+++ template-migrate5to6 21 Oct 2005 19:21:11 -0000 1.5
@@ -39,6 +39,22 @@
# END COPYRIGHT BLOCK
#
+# 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";
+}
# Migrate a 5.x directory server to a 6.2 directory server
#######################################################################################################
Index: template-migrate5to7
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/template-migrate5to7,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- template-migrate5to7 19 Apr 2005 22:07:00 -0000 1.4
+++ template-migrate5to7 21 Oct 2005 19:21:11 -0000 1.5
@@ -39,6 +39,22 @@
# END COPYRIGHT BLOCK
#
+# 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";
+}
# Migrate a 5.x directory server to a 7.0 directory server
#######################################################################################################
Index: template-migrate6to7
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/template-migrate6to7,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- template-migrate6to7 19 Apr 2005 22:07:00 -0000 1.6
+++ template-migrate6to7 21 Oct 2005 19:21:11 -0000 1.7
@@ -39,6 +39,22 @@
# END COPYRIGHT BLOCK
#
+# 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";
+}
# Migrate a 6.x directory server to a 7.0 directory server
#######################################################################################################
Index: template-migrateInstance5
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/template-migrateInstance5,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- template-migrateInstance5 19 Apr 2005 22:07:00 -0000 1.4
+++ template-migrateInstance5 21 Oct 2005 19:21:11 -0000 1.5
@@ -140,16 +140,6 @@
exit(1);
}
$ENV{"$LIB_PATH"} = "$root${PATHSEP}lib${SEP}".$ENV{"$LIB_PATH"} ;
-if ($isSolaris9) {
- $ENV{"$LIB_PATH"} = "$root${PATHSEP}lib${PATHSEP}nsPerl5.005_03${PATHSEP}lib${PATHSEP}sun4-solaris${PATHSEP}CORE${SEP}".$ENV{"$LIB_PATH"} ;
-}
-
-if ($isNT) {
- $ENV{"PERL5LIB"} = "$root${PATHSEP}lib${PATHSEP}nsPerl5.005_03${PATHSEP}site${PATHSEP}lib${SEP}".$ENV{"PERL5LIB"} ;
-}
-else {
- $ENV{"PERL5LIB"} = "$root${PATHSEP}lib${PATHSEP}nsPerl5.005_03${PATHSEP}lib${PATHSEP}site${SEP}".$ENV{"PERL5LIB"} ;
-}
# get the version of the DS to migrate
($oldVersion, $oldMinor) = &getVersion($oldDir);
Index: template-migrateInstance6
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/template-migrateInstance6,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- template-migrateInstance6 19 Apr 2005 22:07:00 -0000 1.4
+++ template-migrateInstance6 21 Oct 2005 19:21:11 -0000 1.5
@@ -144,16 +144,6 @@
exit(1);
}
$ENV{"$LIB_PATH"} = "$root${PATHSEP}lib${SEP}".$ENV{"$LIB_PATH"} ;
-if ($isSolaris9) {
- $ENV{"$LIB_PATH"} = "$root${PATHSEP}lib${PATHSEP}nsPerl5.6.1${PATHSEP}lib${PATHSEP}sun4-solaris${PATHSEP}CORE${SEP}".$ENV{"$LIB_PATH"} ;
-}
-
-if ($isNT) {
- $ENV{"PERL5LIB"} = "$root${PATHSEP}lib${PATHSEP}nsPerl5.6.1${PATHSEP}site${PATHSEP}lib${SEP}".$ENV{"PERL5LIB"} ;
-}
-else {
- $ENV{"PERL5LIB"} = "$root${PATHSEP}lib${PATHSEP}nsPerl5.6.1${PATHSEP}lib${PATHSEP}site${SEP}".$ENV{"PERL5LIB"} ;
-}
# get the version of the DS to migrate
($oldVersion, $oldMinor) = &getVersion($oldDir, $oldversionstr);
Index: template-migrateInstance7
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/template-migrateInstance7,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- template-migrateInstance7 19 Apr 2005 22:07:00 -0000 1.5
+++ template-migrateInstance7 21 Oct 2005 19:21:11 -0000 1.6
@@ -144,16 +144,6 @@
exit(1);
}
$ENV{"$LIB_PATH"} = "$root${PATHSEP}lib${SEP}".$ENV{"$LIB_PATH"} ;
-if ($isSolaris9) {
- $ENV{"$LIB_PATH"} = "$root${PATHSEP}lib${PATHSEP}nsPerl5.6.1${PATHSEP}lib${PATHSEP}sun4-solaris${PATHSEP}CORE${SEP}".$ENV{"$LIB_PATH"} ;
-}
-
-if ($isNT) {
- $ENV{"PERL5LIB"} = "$root${PATHSEP}lib${PATHSEP}nsPerl5.6.1${PATHSEP}site${PATHSEP}lib${SEP}".$ENV{"PERL5LIB"} ;
-}
-else {
- $ENV{"PERL5LIB"} = "$root${PATHSEP}lib${PATHSEP}nsPerl5.6.1${PATHSEP}lib${PATHSEP}site${SEP}".$ENV{"PERL5LIB"} ;
-}
# get the version of the DS to migrate
($oldVersion, $oldMinor) = &getVersion($oldDir, $oldversionstr);
Index: template-migrateTo5
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/template-migrateTo5,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- template-migrateTo5 19 Apr 2005 22:07:00 -0000 1.5
+++ template-migrateTo5 21 Oct 2005 19:21:11 -0000 1.6
@@ -39,6 +39,22 @@
# END COPYRIGHT BLOCK
#
+# 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";
+}
# Migrate a 4.0 directory server to a 5.x directory server
########################################################################################################
Index: template-migrateTo6
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/template-migrateTo6,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- template-migrateTo6 19 Apr 2005 22:07:00 -0000 1.4
+++ template-migrateTo6 21 Oct 2005 19:21:11 -0000 1.5
@@ -39,6 +39,22 @@
# END COPYRIGHT BLOCK
#
+# 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";
+}
# Migrate a old directory server to a 6.2 directory server
########################################################################################################
Index: template-migrateTo7
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/template-migrateTo7,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- template-migrateTo7 19 Apr 2005 22:07:00 -0000 1.5
+++ template-migrateTo7 21 Oct 2005 19:21:11 -0000 1.6
@@ -39,6 +39,22 @@
# END COPYRIGHT BLOCK
#
+# 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";
+}
# Migrate a old directory server to a 7.0 directory server
########################################################################################################
Index: template-ns-newpwpolicy.pl
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/template-ns-newpwpolicy.pl,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- template-ns-newpwpolicy.pl 19 Apr 2005 22:07:00 -0000 1.4
+++ template-ns-newpwpolicy.pl 21 Oct 2005 19:21:11 -0000 1.5
@@ -39,6 +39,22 @@
# END COPYRIGHT BLOCK
#
+# 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";
+}
# Add new password policy specific entries
#############################################################################
Index: template-repl-monitor-cgi.pl
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/template-repl-monitor-cgi.pl,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- template-repl-monitor-cgi.pl 19 Apr 2005 22:07:00 -0000 1.4
+++ template-repl-monitor-cgi.pl 21 Oct 2005 19:21:11 -0000 1.5
@@ -56,8 +56,8 @@
$params .= " -u \"$admurl\"";
}
$siteroot = $cgiVars{'siteroot'};
-$perl = "$siteroot/bin/slapd/admin/bin/perl";
-$ENV{'LD_LIBRARY_PATH'} = "$siteroot/lib:$siteroot/lib/nsPerl5.005_03/lib";
+$ENV{'LD_LIBRARY_PATH'} = "$siteroot/shared/lib";
+$ENV{'SHLIB_PATH'} = "$siteroot/shared/lib";
# Save user-specified parameters as cookies in monreplication.properties.
# Sync up with the property file so that monreplication2 is interval, and
@@ -65,8 +65,8 @@
$propertyfile = "$siteroot/bin/admin/admin/bin/property/monreplication.properties";
$edit1 = "s#monreplication2=.*#monreplication2=$cgiVars{'refreshinterval'}#;";
$edit2 = "s#^monreplication3=.*#monreplication3=$cgiVars{'configfile'}#;";
-system("$perl -p -i.bak -e \"$edit1\" -e \"$edit2\" $propertyfile");
+system("perl -p -i.bak -e \"$edit1\" -e \"$edit2\" $propertyfile");
# Now the real work
$replmon = "$siteroot/bin/slapd/admin/scripts/template-repl-monitor.pl";
-system("$perl $replmon $params");
+system("perl -I$siteroot/lib/perl/arch -I$siteroot/lib/perl $replmon $params");
Index: template-repl-monitor.pl
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/template-repl-monitor.pl,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- template-repl-monitor.pl 19 Apr 2005 22:13:37 -0000 1.6
+++ template-repl-monitor.pl 21 Oct 2005 19:21:11 -0000 1.7
@@ -146,16 +146,36 @@
# <DSHOME>/bin/slapd/admin/bin/perl repl-monitor.pl
#
# 3. Set environment variable PERL5LIB to your Perl lib dirs where
-# Mozilla::LDAP module can be located.
+# Mozilla::LDAP module can be located. This should be under serverroot/lib/perl
+# e.g. PERL5LIB="serverroot/lib/perl/arch:serverroot/lib/perl"
#
-# 4. Invoke the script as follows if <MYPERLDIR>/lib/site contains
-# Mozilla/LDAP:
-# <MYPERLDIR>/bin/perl -I <MYPERLDIR>/lib/site repl-monitor.pl
+# 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"
#
-# If you get error "Can't load ...", try to set environment variable
-# for library path to <DSHOME>/lib:<DSHOME>/lib/nsPerl5.005_03/lib
+# 5. Invoke the script as follows if <MYPERLDIR> (serverroot/lib/perl) contains
+# Mozilla/LDAP:
+# <MYPERLDIR>/bin/perl -I <MYPERLDIR>/arch -I <MYPERLDIR> repl-monitor.pl
#
#############################################################################
+# 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)
+# 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
Index: template-verify-db.pl
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/template-verify-db.pl,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- template-verify-db.pl 19 Apr 2005 22:07:00 -0000 1.4
+++ template-verify-db.pl 21 Oct 2005 19:21:11 -0000 1.5
@@ -95,6 +95,13 @@
return \$logfile;
}
+$isWin = -d '\\';
+if ($isWin) {
+ $NULL = "nul";
+} else {
+ $NULL = "/dev/null";
+}
+
print("*****************************************************************\n");
print("verify-db: This tool should only be run if recovery start fails\n" .
"and the server is down. If you run this tool while the server is\n" .
@@ -109,7 +116,7 @@
{
# run ../bin/slapd/server/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> nul |");
+ open(PRINTLOG, "..{{SEP}}bin{{SEP}}slapd{{SEP}}server{{SEP}}db_printlog -h $$dbdirs[$i] 2>&1 1> $NULL |");
sleep 1;
my $haserr = 0;
while ($l = <PRINTLOG>)
@@ -147,7 +154,7 @@
{
my $thisdb = $$dbdirs[$i] . "{{SEP}}" . $db;
print "Verify $thisdb ... ";
- open(DBVERIFY, "..{{SEP}}bin{{SEP}}slapd{{SEP}}server{{SEP}}db_verify $thisdb 2>&1 1> nul |");
+ open(DBVERIFY, "..{{SEP}}bin{{SEP}}slapd{{SEP}}server{{SEP}}db_verify $thisdb 2>&1 1> $NULL |");
sleep 1;
my $haserr = 0;
while ($l = <DBVERIFY>)
@@ -188,7 +195,7 @@
{
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, "..{{SEP}}bin{{SEP}}slapd{{SEP}}server{{SEP}}db_verify $thisdb 2>&1 1> $NULL |");
sleep 1;
my $haserr = 0;
while ($l = <DBVERIFY>)
- Previous message (by thread): [Fedora-directory-commits] ldapserver/ldap/admin/src Makefile, 1.13, 1.14 configure_instance.cpp, 1.7, 1.8 create_instance.c, 1.22, 1.23 ds_newinst.pl, 1.4, 1.5 ds_viewlog.pl, 1.4, 1.5 getConfigInfo, 1.4, 1.5 import2info, 1.4, 1.5 makemccvlvindexes, 1.4, 1.5 makevlvindex, 1.4, 1.5 makevlvsearch, 1.4, 1.5 migrateInstance, 1.4, 1.5 migrateLocalDB, 1.4, 1.5 migratePwdFile, 1.4, 1.5 migrateTo4, 1.5, 1.6 migratedsgw, 1.4, 1.5 ns-newpwpolicy.pl, 1.4, 1.5 updatedsgw, 1.6, 1.7 upgradeServer, 1.6, 1.7 AddPerlHeader.pl, 1.4, NONE Base.def, 1.5, NONE Base.pm, 1.4, NONE CreateInstall.pl, 1.4, NONE DSAdmin.def, 1.4, NONE DSAdmin.mk, 1.7, NONE DSAdmin.pm, 1.5, NONE DSAdmin.xs, 1.4, NONE Inf.pm, 1.4, NONE
- Next message (by thread): [Fedora-directory-commits] ldapserver/ldap/clients/orgchart myorg.pl, 1.6, 1.7 org.pl, 1.6, 1.7
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Fedora-directory-commits
mailing list