[prev in list] [next in list] [prev in thread] [next in thread] 

List:       fedora-directory-commits
Subject:    [389-commits] Branch '389-ds-base-1.2.11' - ldap/admin
From:       Nathan Kinder <nkinder () fedoraproject ! org>
Date:       2013-01-16 22:53:53
Message-ID: 20130116225354.08DD32331 () fedorahosted ! org
[Download RAW message or body]

 ldap/admin/src/scripts/DSCreate.pm.in |   16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

New commits:
commit e63ad6840e4a9a62f3ffae27eaba1091653a1c50
Author: Nathan Kinder <nkinder@redhat.com>
Date:   Wed Jan 16 14:20:14 2013 -0800

    Ticket 556 - Don't overwrite certmap.conf during upgrade
    
    The certmap.conf config files were being overwritten with the
    default template during upgrade.  We need to skip writing the
    certmap.conf files if they already exist so config changes are
    not lost.

diff --git a/ldap/admin/src/scripts/DSCreate.pm.in b/ldap/admin/src/scripts/DSCreate.pm.in
index 1d5e71a..0acd74f 100644
--- a/ldap/admin/src/scripts/DSCreate.pm.in
+++ b/ldap/admin/src/scripts/DSCreate.pm.in
@@ -482,12 +482,16 @@ sub makeOtherConfigFiles {
     my $src = "$inf->{General}->{prefix}@configdir@/certmap.conf";
     my $dest = "$inf->{slapd}->{config_dir}/certmap.conf";
     $! = 0; # clear errno
-    copy($src, $dest);
-    if ($!) {
-        return ('error_copying_file', $src, $dest, $!);
-    }
-    if (@errs = changeOwnerMode($inf, 4, $dest)) {
-        return @errs;
+
+    #in skip mode, skip files that already exist
+    unless ($skip and -f $dest) {
+        copy($src, $dest);
+        if ($!) {
+            return ('error_copying_file', $src, $dest, $!);
+        }
+        if (@errs = changeOwnerMode($inf, 4, $dest)) {
+            return @errs;
+        }
     }
 
     $src = "$inf->{General}->{prefix}@configdir@/slapd-collations.conf";


--
389 commits mailing list
389-commits@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/389-commits
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic