diff options
author | Steve Langasek <steve.langasek@ubuntu.com> | 2013-05-17 20:37:39 -0500 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2013-05-18 10:33:36 -0400 |
commit | ec63074b7adca35861ea874f900aba1f5bcab143 (patch) | |
tree | 02d826be54bd3ce8b8f9fa791d3dae33340be5da | |
parent | ccd80f2949425ab56cac27637f225bf8338aff54 (diff) |
Packages with upstart jobs should carry a versioned dependency on sysv-rc
Depend on the version of invoke-rc.d that supports upstart jobs directly,
without which invoke-rc.d will incorrectly use the sysvinit script instead
of the upstart job when starting the service.
-rwxr-xr-x | dh_installinit | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/dh_installinit b/dh_installinit index e227006a..3260866f 100755 --- a/dh_installinit +++ b/dh_installinit @@ -224,6 +224,13 @@ foreach my $package (@{$dh{DOPACKAGES}}) { my $init=pkgfile($package,$script) || pkgfile($package,"init") || pkgfile($package,"init.d"); + + if ($job ne '' || ($dh{ONLYSCRIPTS} && -e "$tmp/etc/init/$jobfile.conf")) { + # minimal version of invoke-rc.d that supports upstart jobs + # directly + addsubstvar($package, "misc:Depends", "sysv-rc (>= 2.88dsf-24)"); + } + if ($init ne '' && ! $dh{ONLYSCRIPTS}) { if (! -d "$tmp/etc/init.d") { doit("install","-d","$tmp/etc/init.d"); |