summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2013-07-14 02:09:16 +0400
committerIgor Pashev <pashev.igor@gmail.com>2013-07-14 02:11:31 +0400
commit6f600f78a8e72582a1cdfe0c84f2716228fbdb05 (patch)
tree77839a247a92ee44a89b7b21a5fd5009ce4c3815
parent390c4aac8fe117ef4f884f932e8891f6b25c9470 (diff)
downloaddh-smf-6f600f78a8e72582a1cdfe0c84f2716228fbdb05.tar.gz
Postinst: import manifests
-rw-r--r--autoscripts/postinst-smf9
-rw-r--r--debian/install1
-rwxr-xr-xdh_smf5
3 files changed, 15 insertions, 0 deletions
diff --git a/autoscripts/postinst-smf b/autoscripts/postinst-smf
new file mode 100644
index 0000000..828d5e8
--- /dev/null
+++ b/autoscripts/postinst-smf
@@ -0,0 +1,9 @@
+for m in #MANIFESTS#; do
+ # Setting SVCCFG_REPOSITORY causes svccfg only update
+ # repository without starting services
+ env \
+ SVCCFG_REPOSITORY=/etc/svc/repository.db \
+ SVCCFG_CHECKHASH=1 \
+ svccfg import "$m" || true
+done
+
diff --git a/debian/install b/debian/install
index cb7d740..6d1f3e8 100644
--- a/debian/install
+++ b/debian/install
@@ -1 +1,2 @@
dh_smf usr/bin
+autoscripts/* usr/share/debhelper/autoscripts
diff --git a/dh_smf b/dh_smf
index db6d183..c59dc95 100755
--- a/dh_smf
+++ b/dh_smf
@@ -170,6 +170,11 @@ foreach my $package ( @{ $dh{DOPACKAGES} } ) {
[qw/instance dependency exec_method propval property_group/] );
}
+ if ( !$dh{NOSCRIPTS} ) {
+ my @pkg_manifests = map { s!\Q$tmp\E/*!/!; $_ } @manifests;
+ autoscript( $package, 'postinst', 'postinst-smf',
+ "s|#MANIFESTS#|@pkg_manifests|" );
+ }
}
=head1 SEE ALSO