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

Bug#804018: dpkg: provide options to avoid service startup on package installation



On Thu, Nov 19, 2015 at 12:35:02PM +0000, Simon McVittie wrote:
> invoke-rc.d is run by the maintainer scripts of packages with a sysvinit
> script (regardless of whether they have a corresponding systemd unit or
> not), and by various other Debianisms like logrotate hooks. It runs
> policy-rc.d.

Will this also work if a package does not come with a sysvinit init
script, or the sysvinit init script is overridden by a native systemd
unit?

> deb-systemd-invoke is run by the maintainer scripts of packages with a
> systemd unit and no corresponding sysvinit script. It does not run
> invoke-rc.d - I assume there's a technical reason why it can't - but it
> does run policy-rc.d itself.
> 
> systemd also lets you "mask" a unit, which prevents it from being
> started at all, whether the start attempt is done manually, during boot
> or from a maintainer script.

Can a unit be masked before the corresponding package is installed? 

That being said, this bug is only about preventing a service from
being started when the package is installed or updated. keepalived etc
do need to be able to start the service manually, which is also
prevented by systemd's mask mechanism.

> Normal boot and shutdown do not use policy-rc.d, the same as in sysvinit.

I didn't think about that. One would need a mechanism to prevent this
as well since one probably doesn't want a keepalived-managed service
to be started on system boot.

Greetings
Marc

-- 
-----------------------------------------------------------------------------
Marc Haber         | "I don't trust Computers. They | Mailadresse im Header
Leimen, Germany    |  lose things."    Winona Ryder | Fon: *49 6224 1600402
Nordisch by Nature |  How to make an American Quilt | Fax: *49 6224 1600421


Reply to: