diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2013-07-14 02:09:16 +0400 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2013-07-14 02:11:31 +0400 |
commit | 6f600f78a8e72582a1cdfe0c84f2716228fbdb05 (patch) | |
tree | 77839a247a92ee44a89b7b21a5fd5009ce4c3815 | |
parent | 390c4aac8fe117ef4f884f932e8891f6b25c9470 (diff) | |
download | dh-smf-6f600f78a8e72582a1cdfe0c84f2716228fbdb05.tar.gz |
Postinst: import manifests
-rw-r--r-- | autoscripts/postinst-smf | 9 | ||||
-rw-r--r-- | debian/install | 1 | ||||
-rwxr-xr-x | dh_smf | 5 |
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 @@ -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 |