summaryrefslogtreecommitdiffstats
path: root/ldap
diff options
context:
space:
mode:
authorNathan Kinder <nkinder@redhat.com>2009-10-29 15:10:01 -0700
committerNathan Kinder <nkinder@redhat.com>2009-10-29 15:31:14 -0700
commitb6263499b32d6a403dbe9da9297cd61f32706010 (patch)
tree2dbe7dba66cecd8ea4a305b0113584dee6c6c73b /ldap
parent835c647d2892223ce3a1b4c7a2907cdf2e941abc (diff)
downloadds-b6263499b32d6a403dbe9da9297cd61f32706010.tar.gz
ds-b6263499b32d6a403dbe9da9297cd61f32706010.tar.xz
ds-b6263499b32d6a403dbe9da9297cd61f32706010.zip
Make removeds.pl remove instance initconfig script389-ds-base-1.2.4
When removing an instance, we need to be sure to remove the instance specific initconfig script.
Diffstat (limited to 'ldap')
-rw-r--r--ldap/admin/src/scripts/DSCreate.pm.in10
1 files changed, 10 insertions, 0 deletions
diff --git a/ldap/admin/src/scripts/DSCreate.pm.in b/ldap/admin/src/scripts/DSCreate.pm.in
index 43fd1d9d..71559082 100644
--- a/ldap/admin/src/scripts/DSCreate.pm.in
+++ b/ldap/admin/src/scripts/DSCreate.pm.in
@@ -1109,6 +1109,16 @@ sub removeDSInstance {
# Finally, config dir
push @errs, remove_tree($entry, "nsslapd-schemadir", $instname, 1, "\.db\$");
+ # Remove the instance specific initconfig script
+ if ( -f "@initconfigdir@/@package_name@-$inst" ) {
+ my $rc = unlink("@initconfigdir@/@package_name@-$inst");
+ if ( 0 == $rc )
+ {
+ push @errs, [ 'error_removing_path', "@initconfigdir@/@package_name@-$inst", $! ];
+ debug(1, "Warning: @initconfigdir@/@package_name@-$inst was not removed. Error: $!\n");
+ }
+ }
+
# remove the selinux label from the ports if needed
if ("@with_selinux@") {
foreach my $port (@{$entry->{"nsslapd-port"}})