#34 remove-ds.pl does not remove everything
Closed: Fixed None Opened 8 years ago by mkosek.


remove-ds.pl leaves some instance specific files/directories around.  There
should be some way to tell remove-ds.pl to remove everything - perhaps a --all
could be added to remove everything, even those things that we usually want to
keep around like the databases, the log files, and the key/cert db.

should also remove any files used by service or systemd or tmpfiles.d

Fix description: Introduce an option "--all | -a", with which
all the generated files and directories are removed.

Fix description: Introduce an option "-a", with which all the
generated directory files and directories are removed.

Note: "-a" does not affect the admin-server files (yet).
Just after rpm install, /etc/dirsrv/admin-serv looks like this:
admserv.conf console.conf httpd.conf nss.conf

After setup-ds-admin.pl
adm.conf admserv.conf console.conf key3.db nss.conf
admpw cert8.db httpd.conf local.conf secmod.db

rpm --verify 389-admin

.....U.M. /etc/dirsrv/admin-serv
5S.T.U.M. c /etc/dirsrv/admin-serv/console.conf
......GM. /usr/lib64/dirsrv

After remove-ds-admin.pl -y -f -a
admserv.conf cert8.db console.conf httpd.conf key3.db nss.conf secmod.db

rpm --verify 389-admin

.....U.M. /etc/dirsrv/admin-serv
5S.T.U.M. c /etc/dirsrv/admin-serv/console.conf
......GM. /usr/lib64/dirsrv

With "-a", we can remove admin-serv/*db files, but it'd a little difficult to resume console.conf and nss.conf (if modified).

Opened a new ticket #293 for remove-ds-admin.pl:
remove-ds-admin.pl does not remove everything

Reviewed by Rich (Thank you!!!)

Pushed to master.

$ git merge trac34
Updating 9e65c7a..c013442
ldap/admin/src/scripts/DSCreate.pm.in | 11 ++++++++---
ldap/admin/src/scripts/remove-ds.pl.in | 6 ++++--
2 files changed, 12 insertions(+), 5 deletions(-)

$ git push
Counting objects: 15, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (7/7), done.
Writing objects: 100% (8/8), 850 bytes, done.
Total 8 (delta 6), reused 0 (delta 0)
To ssh://git.fedorahosted.org/git/389/ds.git
9e65c7a..c013442 master -> master

originally targeted for 1.2.11.rc1, but actually in the 1.2.11.a1 release

Added initial screened field value.

Metadata Update from @nhosoi:
- Issue assigned to nhosoi
- Issue set to the milestone: 1.2.11.a1

3 years ago

Login to comment on this ticket.