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

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