Re: prevent dpkg from (re-)starting services



Olaf Leidinger wrote:
Hello List!

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), 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.

Thanks in advance!


policy-rc.d to your rescue.

Read the man page of invoke-rc.d : "INIT SCRIPT POLICY"

A simple /usr/sbin/policy-rc.d could look like this:

# cat /usr/sbin/policy-rc.d
#!/bin/sh
echo "************************************" >&2
echo "All rc.d operations denied by policy" >&2
echo "************************************" >&2
exit 101

--
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?

Attachment: signature.asc
Description: OpenPGP digital signature



Relevant Pages

  • Re: Seriously, now that I got Linux LiveCD running, what can I do with it? Newbie questions
    ... create a 'documents' folder automatically if you install it to your ... as opposed to in Windows. ... will, upon creating a new user account, automatically create a user ... In most distributions, yes. ...
    (comp.os.linux.setup)
  • Re: Sysinstall is horrid
    ... > steps to take to install and configure the OS. ... just happens by accident, accidentally y'know, now and then, anyway. ... > have a Distributions section AND a Packages section? ...
    (comp.unix.bsd.freebsd.misc)
  • Re: Linux - for Scotty
    ... But it will let you get a feel for linux, to help you decide if it is ... As to distributions, I've not played with a great variety. ... If you choose to install a distro to a hard drive, performance is, ...
    (alt.support.mult-sclerosis)
  • 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)