From d7531c68d34d83c17c0d1996fec6d6a0ebfc0e4b Mon Sep 17 00:00:00 2001 From: Rich Megginson Date: Thu, 2 Aug 2007 14:39:01 +0000 Subject: Resolves: bug 250535 Bug Description: improve perldap script execution ability on bundled platforms Reviewed by: nkinder (Thanks!) Fix Description: Most platforms will just use perl from PATH. However, on Solaris and HP-UX, we have to use special 64 bit versions to execute perldap, since perldap is 64 bit on those platforms. Also, if bundling all of the dependent components into the single package, we need to make sure the perl library path is set correctly to find perldap. The last step will be to build our version of perldap on the bundled platforms to use rpath to point to the correct runtime library location. Platforms tested: RHEL4, HP-UX 11.23 IPF 64 bit Flag Day: no Doc impact: no --- ldap/admin/src/scripts/DSCreate.pm.in | 3 ++- ldap/admin/src/scripts/migrate-ds.pl.in | 4 ++-- ldap/admin/src/scripts/setup-ds.pl.in | 4 ++-- ldap/admin/src/scripts/template-ns-newpwpolicy.pl.in | 2 ++ 4 files changed, 8 insertions(+), 5 deletions(-) (limited to 'ldap/admin/src/scripts') diff --git a/ldap/admin/src/scripts/DSCreate.pm.in b/ldap/admin/src/scripts/DSCreate.pm.in index cee2c93a..a122d536 100644 --- a/ldap/admin/src/scripts/DSCreate.pm.in +++ b/ldap/admin/src/scripts/DSCreate.pm.in @@ -201,7 +201,8 @@ sub makeDSDirs { sub createInstanceScripts { my $inf = shift; - my $myperl = "!/usr/bin/env perl"; + my $perlexec = "@perlexec@" || "/usr/bin/env perl"; + my $myperl = "!$perlexec"; my $mydevnull = (-f "/dev/null" ? " /dev/null " : " NUL "); my %maptable = ( "DS-ROOT" => $inf->{General}->{prefix}, diff --git a/ldap/admin/src/scripts/migrate-ds.pl.in b/ldap/admin/src/scripts/migrate-ds.pl.in index bd718d58..df14ea07 100644 --- a/ldap/admin/src/scripts/migrate-ds.pl.in +++ b/ldap/admin/src/scripts/migrate-ds.pl.in @@ -1,4 +1,4 @@ -#!/usr/bin/env perl +#!@perlexec@ # BEGIN COPYRIGHT BLOCK # This Program is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free Software @@ -47,7 +47,7 @@ # ########################## -use lib '@perldir@'; +use lib qw(@perlpath@); use strict; diff --git a/ldap/admin/src/scripts/setup-ds.pl.in b/ldap/admin/src/scripts/setup-ds.pl.in index 32cb0c34..7fdc9772 100644 --- a/ldap/admin/src/scripts/setup-ds.pl.in +++ b/ldap/admin/src/scripts/setup-ds.pl.in @@ -1,4 +1,4 @@ -#!/usr/bin/env perl +#!@perlexec@ # BEGIN COPYRIGHT BLOCK # This Program is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free Software @@ -37,7 +37,7 @@ # END COPYRIGHT BLOCK # -use lib '@perldir@'; +use lib qw(@perlpath@); use strict; diff --git a/ldap/admin/src/scripts/template-ns-newpwpolicy.pl.in b/ldap/admin/src/scripts/template-ns-newpwpolicy.pl.in index c52dae82..caf06dbd 100755 --- a/ldap/admin/src/scripts/template-ns-newpwpolicy.pl.in +++ b/ldap/admin/src/scripts/template-ns-newpwpolicy.pl.in @@ -39,6 +39,8 @@ # END COPYRIGHT BLOCK # +use lib qw(@perlpath@); + # 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) -- cgit