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

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