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

Re: apt-get install without starting?

Florian Kulzer wrote:
On Fri, Jul 11, 2008 at 21:28:39 -0700, Daniel Burrows wrote:
On Fri, Jul 11, 2008 at 09:21:46PM -0700, David Barrett was heard to say:


Essentially, I'm writing a script to generate ready-to-deploy bootable qemu images, One of the inputs of the script is a list of packages to install. This works fantastic, with the key exception that some of those packages (ssh and lighttpd, specifically) start up running processes. These processes need to be stopped before I can dismount the raw image and zip it up for instant future deployment.
  I've never used it myself, but I believe that invoke-rc.d was supposed
to solve this sort of problem.  (I don't know much more than that, but
it looks like the manpage might have pointers)

Also, see /usr/share/doc/sysv-rc/README.policy-rc.d.gz.

Executive summary: If you want to prohibit all invoke-rc.d-mediated
start actions, create /usr/sbin/policy-rc.d as an executable shell
script that exits with a status of 101. If you find a package whose
initscripts do not honor this, file a bug.

(I learned this on this list, but I cannot find the relevant message now
 and therefore I cannot give credit to whoever posted it originally.

This worked perfectly, thanks! Basically, before calling "apt-get install" I created the following /usr/sbin/policy-rc.d script:

# !/bin/sh
exit 101

Then after I've got the qemu set up right, I just delete that file. Future boots light up as expected. This is exactly what I needed. Thanks again!


Reply to: