Browse Source

[167679] modify upgradeServer to upgrade db2index.pl
To fix the bug "[160003] db2index.pl cannot find libldap50.so if only certain
parameters are used", template-db2index.pl has been modified.
When upgrading existing servers, the perl scripts are not touched unless forced
to. This upgradeServer provides the framework.

Noriko Hosoi 20 years ago
parent
commit
ec0cb70206
1 changed files with 2 additions and 2 deletions
  1. 2 2
      ldap/admin/src/upgradeServer

+ 2 - 2
ldap/admin/src/upgradeServer

@@ -419,7 +419,7 @@ sub getChangelogVersion {
 sub instantiate_new_scripts {
 
   @newtemplates = (
-    "$sroot/bin/slapd/admin/scripts/template-ns-newpwpolicy.pl"
+    "$sroot/bin/slapd/admin/scripts/template-db2index.pl"
   );
 
   $host = localhost;
@@ -435,7 +435,6 @@ sub instantiate_new_scripts {
 
   foreach $src ( @newtemplates ) {
     $dest = "$sroot/$prefix/$1" if $src =~ /.*template-(.*)$/;
-    next if -f $dest;
     unless ( open ( template, $src )) {
       print "Can't open $src: $!\n";
       next;
@@ -451,6 +450,7 @@ sub instantiate_new_scripts {
       s#{{ROOT-DN}}#$rootdn#g;
       s#{{SERVER-PORT}}#$port#g;
       s#{{SERVER-NAME}}#$host#g;
+      s#{{MY-DS-ROOT}}#$sroot/$prefix#g;
       printf target;
     }
     close template;