zrhoffman / rpms / 389-ds-base

Forked from rpms/389-ds-base 3 years ago
Clone

Blame SOURCES/0027-Issue-49221-During-an-upgrade-the-provided-localhost.patch

b69e47
From 4e66114109263fff6b13192e07be9bbd9e493fee Mon Sep 17 00:00:00 2001
b69e47
From: Mark Reynolds <mreynolds@redhat.com>
b69e47
Date: Mon, 17 Apr 2017 17:06:19 -0400
b69e47
Subject: [PATCH 1/2] Issue 49221 - During an upgrade the provided localhost
b69e47
 name is ignored
b69e47
b69e47
Description:  If the FullMachine name, or localhost, is provided in an INF
b69e47
              it is ignored during the upgrade the value of nsslapd-localhost
b69e47
              from the current server is used instead.  We should only override
b69e47
              the localhost value if it is missing.
b69e47
b69e47
https://pagure.io/389-ds-base/issue/49221
b69e47
b69e47
Reviewed by: nhosoi(Thanks!)
b69e47
---
b69e47
 ldap/admin/src/scripts/DSUpdate.pm.in | 4 +++-
b69e47
 1 file changed, 3 insertions(+), 1 deletion(-)
b69e47
b69e47
diff --git a/ldap/admin/src/scripts/DSUpdate.pm.in b/ldap/admin/src/scripts/DSUpdate.pm.in
b69e47
index e84a9a9..8b24b47 100644
b69e47
--- a/ldap/admin/src/scripts/DSUpdate.pm.in
b69e47
+++ b/ldap/admin/src/scripts/DSUpdate.pm.in
b69e47
@@ -435,7 +435,9 @@ sub initInfFromInst {
b69e47
     my $servid = $inst;
b69e47
     $servid =~ s/slapd-//;
b69e47
 
b69e47
-    $inf->{General}->{FullMachineName} = $entry->getValue("nsslapd-localhost");
b69e47
+    if (!$inf->{General}->{FullMachineName}) {
b69e47
+        $inf->{General}->{FullMachineName} = $entry->getValue("nsslapd-localhost");
b69e47
+    }
b69e47
     $inf->{General}->{SuiteSpotUserID} = $entry->getValue("nsslapd-localuser");
b69e47
     $inf->{slapd}->{ServerPort} = $entry->getValue("nsslapd-port");
b69e47
     $inf->{slapd}->{ldapifilepath} = $entry->getValue("nsslapd-ldapifilepath");
b69e47
-- 
b69e47
2.9.3
b69e47