[debhelper-devel] Bug#709384: dh_installinit: Please add an option to no enable the service at installation
biebl at debian.org
Fri Aug 4 20:05:14 UTC 2017
On Fri, 30 Dec 2016 22:33:52 +0100 Evgeni Golov <evgeni at debian.org> wrote:
> [ only 3 years later… ]
> On Mon, Jan 27, 2014 at 01:32:35AM +0100, Laurent Bigonville wrote:
> > Le Sat, 25 Jan 2014 15:40:18 -0400,
> > Joey Hess <joeyh at debian.org> a écrit :
> > > Laurent Bigonville wrote:
> > > > Now that the usage of /etc/default/* file to prevent a service to
> > > > start is discouraged, it might be interesting to add an option that
> > > > allow the maintainer to not automatically enable the service at
> > > > installation.
> > >
> > > Isn't that what dh_installinit --no-start does?
> > >
> > dh_installinit --no-start prevents the service to be started at the
> > installation of the package. But the service is still enabled, this
> > means that the service will be started at the next reboot of the
> > machine.
> --no-start will also prevent the service to be restarted during upgrade,
> which one still want to do, even if the service is not enabled-by-default.
> > What I was proposing here is to prevent the call to update-rc.d.
> Actually, you'd need a call to update-rc.d, but not with "defaults" as
> parameter, but with "disabled-if-new" (or similar, this is not-existant
> today) as you want:
> * not to enable the service if it was disabled
> * update the service if it was enabled
The canonical way to disable a SysV init script is to turn the SXX
symlinks into KXX symlinks.
You can use update-rc.d foo disable|enable nowadays for that.
See man update-rc.d.
A dh_installinit --no-enable could thus be implemented by generating
code to run
update-rc.d foo defaults
update-rc.d foo disable
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 801 bytes
Desc: OpenPGP digital signature
More information about the debhelper-devel