summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2013-07-15 15:05:06 +0400
committerIgor Pashev <pashev.igor@gmail.com>2013-07-15 15:05:31 +0400
commit0fa1fb0b608ef472574040f05e193a521e5e8b67 (patch)
tree7d39657c676b1105bd135e071f385f56028964ef
parentdc1f1469ad19e6b0a7c79458c7498ea43ab08368 (diff)
downloaddh-smf-0fa1fb0b608ef472574040f05e193a521e5e8b67.tar.gz
Fixed semantics
-rwxr-xr-xdh_smf13
1 files changed, 8 insertions, 5 deletions
diff --git a/dh_smf b/dh_smf
index 546897b..4c9be42 100755
--- a/dh_smf
+++ b/dh_smf
@@ -192,20 +192,23 @@ foreach my $package ( @{ $dh{DOPACKAGES} } ) {
my @daemons_restart = grep { $_->{'upgrade'} eq 'restart' } @daemons;
my @daemons_refresh = grep { $_->{'upgrade'} eq 'refresh' } @daemons;
if (@daemons_stop) {
+ my @svcs = map { $_->{'name'} } @daemons_stop;
autoscript( $package, 'prerm', 'prerm-smf-stop',
- "s|#DAEMONS#|@daemons_stop|" );
+ "s|#SERVICES#|@svcs|" );
autoscript( $package, 'postinst', 'postinst-smf-start',
- "s|#DAEMONS#|@daemons_stop|" );
+ "s|#SERVICES#|@svcs|" );
}
if (@daemons_restart) {
+ my @svcs = map { $_->{'name'} } @daemons_restart;
autoscript( $package, 'postinst', 'postinst-smf-refresh',
- "s|#DAEMONS#|@daemons_restart|" );
+ "s|#SERVICES#|@svcs|" );
autoscript( $package, 'postinst', 'postinst-smf-restart',
- "s|#DAEMONS#|@daemons_restart|" );
+ "s|#SERVICES#|@svcs|" );
}
if (@daemons_refresh) {
+ my @svcs = map { $_->{'name'} } @daemons_refresh;
autoscript( $package, 'postinst', 'postinst-smf-refresh',
- "s|#DAEMONS#|@daemons_refresh|" );
+ "s|#SERVICES#|@svcs|" );
}
}
}