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

Re: Prevent aptitude from starting services



On 2008-09-23 16:37 +0200, Urs Thuermann wrote:

> Is it possible to prevent aptitude from automatically running services
> after install?  That is, when I install some daemon or some other
> package with a start script in /etc/init.d, e.g. bind or ferm, I don't
> want that init script to be executed.  This is annoying when services
> are started before I have configured them, and also if I build a
> system with debootstrap, then chroot into the new system to install
> some further packages and then services are run or netfilter rules are
> changed on the build system.

Yes, that's possible.  Create a script /usr/sbin/policy-rc.d with a
single line containing "exit 101" and no services will be started at
package installation time¹.  See
/usr/share/doc/sysv-rc/README.{policy,invoke}-rc.d.gz.

> Looking through the man page of aptitude I haven't found an option to
> do this.

Because that isn't really related to aptitude, it doesn't matter how you
install your package. 

Sven


¹ Well, at least if the package maintainer follows the rules and uses
  invoke-rc.d instead of executing the init script directly.  Doing the
  latter is a serious bug, though.


Reply to: