[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: init script, installed but not activated



On Tue, Oct 06, 2015 at 10:35:38PM +0200, Michael Biebl wrote:
> Am 06.10.2015 um 22:16 schrieb Antonio Terceiro:
> > On Tue, Oct 06, 2015 at 10:47:28PM +0300, Hleb Valoshka wrote:
> >> Hi all.
> >>
> >> I'm packaging web server for ruby called unicorn. The package installs
> >> sysv init script, I want to make it installed but not activated
> >> because unicorn itself is useless, user should configure it and
> >> activate it with "update-rc.d unicorn enable". Or it may installed as
> >> dependency for rainbows, so it's clear that it should not run.
> >>
> >> So I need something like "dh_systemd_enable --no-enable", existing
> >> options for dh_installinit like "--no-start" or
> >> "--update-rcd-params=..." does not work such way, so we need to
> >> introduce workarounds in postinstall script.
> >>
> >> Any suggestions?
> 
> See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=709384
> Unfortunately not a lot has happened since the bug was filed.
> 
> 
> > for sysvinit you need to code that manually in the initscript. several
> > packages have their initscripts source /etc/default/$package, and check
> > for some variable that says whether the service should start on boot or
> > not.
> > 
> > look at varnish for an example.
> 
> Please don't use such ENABLE flags in /etc/default/, this is an
> anti-feature.
> 
> If your package does not work unconfigured, a better alternative is to
> check for the existence of a config file.

Yes, sure. I absolutely agree that doing this is way better then ENABLE
flags in /etc/default/$foo. My main point was that however you do, for
sysvinit that has to be coded manually in the initscript.

-- 
Antonio Terceiro <terceiro@debian.org>

Attachment: signature.asc
Description: PGP signature


Reply to: