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

Re: Prevent apt/dpkg from automatically enabling services during the upgrade process.



	Hi.

On Mon, Oct 02, 2017 at 07:55:11PM +0000, Victor wrote:
> Dear Debian friends,
> 
> I use Debian Sid as my home distribution, and I have an annoying
> problem. If I disable some services with "systemctl disable service", it
> happens that whenever an upgrade of any service's package appears,
> apt/dpkg will automatically enable the service during the upgrade
> process. Is it there a way to avoid that behaviour? I don't want to
> disable the services every time that there is an upgrade of my disabled
> services. 

It's a hack, but it should work. Create an executable file called
/usr/sbin/policy-rc.d with the following contents:

#!/bin/sh
/bin/systemctl --quiet is-enabled $1 && exit 0
echo All rc operations are disabled by policy: $1 $2
exit 101

Reco


Reply to: