summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2013-07-19 04:08:17 +0400
committerIgor Pashev <pashev.igor@gmail.com>2013-07-19 04:08:17 +0400
commita7c6c568fcb66f3fb85c9196311d24f56ba181a1 (patch)
tree0c3e9f8e05a7625412b79ff775ee5e38ea03141c
parent75b2de1aabe97fa8b20813e4f9151ad68a3f3d28 (diff)
downloaddh-smf-a7c6c568fcb66f3fb85c9196311d24f56ba181a1.tar.gz
Delete the manifests hash entry on package removal
-rw-r--r--autoscripts/postrm-smf-delete3
-rw-r--r--debian/changelog6
-rwxr-xr-xdh_smf4
3 files changed, 11 insertions, 2 deletions
diff --git a/autoscripts/postrm-smf-delete b/autoscripts/postrm-smf-delete
index 4d33798..d423321 100644
--- a/autoscripts/postrm-smf-delete
+++ b/autoscripts/postrm-smf-delete
@@ -1,5 +1,8 @@
if [ "$1" = remove ]; then
if [ -x /usr/bin/smf_present ] && /usr/bin/smf_present; then
/usr/sbin/svccfg delete -f #SERVICES# || true;
+ for f in #MANIFESTS#; do
+ /usr/sbin/svccfg delhash -d "$f" || true;
+ done
fi
fi
diff --git a/debian/changelog b/debian/changelog
index 5abd4e3..aa627e4 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+dh-smf (2) unstable; urgency=low
+
+ * Delete the manifests hash entry on package removal
+
+ -- Igor Pashev <pashev.igor@gmail.com> Fri, 19 Jul 2013 03:44:33 +0400
+
dh-smf (1) unstable; urgency=low
* Initial release.
diff --git a/dh_smf b/dh_smf
index 9108328..336c11f 100755
--- a/dh_smf
+++ b/dh_smf
@@ -227,10 +227,10 @@ foreach my $package ( @{ $dh{DOPACKAGES} } ) {
"s|#SERVICES#|@svcs|" );
}
- # Remove all services.
+ # Remove all services and file hashes:
@svcs = map { $_->{'name'} } @services;
autoscript( $package, 'postrm', 'postrm-smf-delete',
- "s|#SERVICES#|@svcs|" );
+ "s|#SERVICES#|@svcs|;s|#MANIFESTS#|@manifests|" );
}
}