浏览代码

Resolves: #260341
Summary: Migration script references a non-existing directory
Description: added an if clause for the with_fhs_opt case

Noriko Hosoi 18 年之前
父节点
当前提交
a37d2807f5
共有 1 个文件被更改,包括 8 次插入2 次删除
  1. 8 2
      ldap/admin/src/scripts/DSMigration.pm.in

+ 8 - 2
ldap/admin/src/scripts/DSMigration.pm.in

@@ -262,8 +262,14 @@ sub migrateDatabases {
         my %objclasses = map { lc($_) => $_ } $ent->getValues('objectclass');
         if ($cn eq 'config') { # global config
             my $newent = $dest->search($ent->getDN(), "base", "(objectclass=*)");
-            my $newdbdir = $newent->getValues('nsslapd-directory') ||
-                "@localstatedir@/lib/$mig->{pkgname}/$inst/db";
+            my $newdbdir = "";
+            if ("@with_fhs_opt@") {
+                $newdbdir = $newent->getValues('nsslapd-directory') ||
+                    "@localstatedir@/$mig->{pkgname}/$inst/db";
+            } else {
+                $newdbdir = $newent->getValues('nsslapd-directory') ||
+                    "@localstatedir@/lib/$mig->{pkgname}/$inst/db";
+            }
             debug(1, "Found ldbm database plugin config entry ", $ent->getDN(), "\n");
             my $dir = $ent->getValues('nsslapd-directory');
             my $homedir = $ent->getValues('nsslapd-db-home-directory');