ldap/admin/src/scripts/DSCreate.pm.in | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-)
New commits: commit 57f4381395e2181e5610acc715e8c71592616ffd 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@lists.fedoraproject.org