summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2013-07-18 16:55:02 +0400
committerIgor Pashev <pashev.igor@gmail.com>2013-07-18 16:55:02 +0400
commit33464750454b650d1bf53e8ddf66928df453a61b (patch)
tree2afe7be5b79e523710b8b62a62660a7123c114d6
parentb15252c922f1b8d9681ca5beea6b28bd93b64fcb (diff)
downloaddh-smf-33464750454b650d1bf53e8ddf66928df453a61b.tar.gz
There could be no manifests
-rwxr-xr-xdh_smf6
1 files changed, 5 insertions, 1 deletions
diff --git a/dh_smf b/dh_smf
index 8602faf..30bfa2a 100755
--- a/dh_smf
+++ b/dh_smf
@@ -118,7 +118,7 @@ foreach my $package ( @{ $dh{DOPACKAGES} } ) {
if ( $smf ne '' && !$dh{'ONLYSCRIPTS'} ) {
my $svcdir = "$tmp/lib/svc";
if ( !-d "$svcdir" ) {
- doit( "install", "-d", "$svcdir" );
+ doit( 'install', '-d', "$svcdir" );
}
my $cp_v = $dh{'VERSION'} ? '-v' : '';
complex_doit("cp -a $cp_v -f $smf/* $svcdir/");
@@ -136,6 +136,8 @@ foreach my $package ( @{ $dh{DOPACKAGES} } ) {
"$tmp/lib/svc/manifest"
);
+ next unless @manifests;
+
# TODO: validate XML?
# Read all services from all manifests:
@@ -189,6 +191,8 @@ foreach my $package ( @{ $dh{DOPACKAGES} } ) {
&& $_->{'exec_method'}->{'start'}->{'exec'} ne ':true'
} @services;
+ error("No SMF services found in @manifests") unless @services;
+
print Dumper(@services); # debug
if ( !$dh{NOSCRIPTS} ) {