Ticket #48171 - remove-ds-admin.pl removes files in the rpm
Description: remove-ds-admin.pl expects /etc/dirsrv/admin-serv/bakup
contains the original config files from rpm to replace with. If
setup-ds-admin.pl fails for some reason, it quits without backing up
the files. In the case, remove-ds-admin.pl just removes the config
files since there is no way to restore them.
This patch moves the backup code before the operation that has a
possibility to fail. This allows setup-ds-admin.pl to create the
backups even if the setup fails.
Also, read_conf and update_conf in cgi-src40/config.c uses given path
and file name instead of the generated full path which is set up an
empty string if the file is not accessible or not a plain file.
https://fedorahosted.org/389/ticket/48171
Reviewed by rmeggins@redhat.com (Thank you, Rich!!)