Re: prevent dpkg from (re-)starting services



On Thu, May 08, 2008 at 09:21:35PM +0200, Olaf Leidinger wrote:
On a file server I installed several debian(-based) distributions into
an exported directory using debootstrap. These are used as root
filesystems for diskless clients. To install new packages/updates I
chroot into the directories of the corresponding distributions and run
aptitude. The problem is, that every time I install the update of a
service (e.g. cups) or a new one, the service is started in the chrooted
environment, but I don't want to run any service in there.

Is there a way to prevent dpkg from (re-)starting these services?
Deleting them from the /etc/rc* directories is not an option, as they
are needed by the clients.

Yes, it is possible to conditionally prevent services from
being (re-)started, with the init script policy mechanism.
It's explained in the invoke-rc.d manpage and in the file
/usr/share/doc/sysv-rc/README.policy-rc.d.gz

For a local chroot which is not shared, I use a simple
/usr/sbin/policy-rc.d script just containing "exit 101",
but the mechanism should also be flexible enough for your needs.

Best regards,
Mirko


--
To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx
with a subject of "unsubscribe". Trouble? Contact listmaster@xxxxxxxxxxxxxxxx



Relevant Pages

  • Re: moving /var
    ... whatever the command is) in a chroot, when chrooting cuts you off from ... the /dev and /proc filesystems so that none of these commands will run. ... from another unix system and included there is how to install kernels ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
    (Debian-User)
  • Re: OS File Permission issue (chown -R root.root ../)
    ... Personally I would install a chroot on my system, ... that information I would fix the parent system. ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
    (Debian-User)
  • Re: installing a kernel on other than the current partition
    ... how to install a kernel on a partition that is not booted? ... I've done it with chroot a few times. ... boot it with qemu and install the package ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
    (Debian-User)
  • prevent dpkg from (re-)starting services
    ... On a file server I installed several debian distributions into ... filesystems for diskless clients. ... To install new packages/updates I ... chroot into the directories of the corresponding distributions and run ...
    (Debian-User)
  • prevent dpkg from (re-)starting services
    ... On a file server I installed several debiandistributions into ... filesystems for diskless clients. ... To install new packages/updates I ... chroot into the directories of the corresponding distributions and run ...
    (Debian-User)