Re: [Vserver] Qmail inside vserver 2.0

From: GarconDuMonde <>
Date: Thu 30 Mar 2006 - 23:00:37 BST
Message-ID: <>

Hash: SHA1


Timothy Arnold wrote:
> Just wondered if anyone has had any issues starting Qmail inside a vserver
> (2.0). I have a straight thing where Qmail will not start on "boot". The
> init script does run, but the daemons appear to crash. Once the vserver
> has started, I can login and run /etc/init.d/qmail start and it works.
> Some people have suggested that I change init, as I am using the standard
> Qmail start/stop script but I think that this might be more fundamental ?

i had trouble getting djbdns to work until a friend helped out. these are some
notes he wrote up - the problem was not with the djbdns but with the daemontools
supervisory processes, which i suspect may be similar for qmail (i have never
used qmail, so don't know exactly how it works):

<quote who="dkg">
getting daemontools to launch

Installing the daemontools packages adds the following line to /etc/inittab:


and then instructs the init process to rescan its file, which kicks off
svscanboot. svscanboot is the grandaddy process for all the daemons handled by
daemontools. it is responsible for kicking off svscan, which watches the
contents of /service, and launches a supervise process for each well-formed
configuration directory linked there.

on a vserver, there is no true init process running. the only init process is
the one which runs on the host. so modifying /etc/inittab in the vserver and
attempting to instruct init to rescan it did nothing.

however, when a vserver starts up, it does kick off the appropriate sysvinit
scripts for its desired runlevel. So i (dkg) wrote a simple
/etc/init.d/daemontools script to start and stop svscanboot. i based the script
off of /etc/init.d/skeleton.

that script looks something like:

#! /bin/sh
# daemontools for launching /etc/svscanboot from sysvinit instead of /sbin/init.
# author: dkg

set -e



# Gracefully exit if the package has been removed.
test -x $DAEMON || exit 0

# Function that starts the daemon/service.
d_start() {
        start-stop-daemon --start --background --make-pidfile --quiet --pidfile
                --exec $DAEMON

# Function that stops the daemon/service.
d_stop() {
        start-stop-daemon --stop --quiet --pidfile $PIDFILE \
                --name $NAME
        echo "not cleaning up svscan and readproctitle subprocesses
appropriately. dkg is lazy."

# Function that sends a SIGHUP to the daemon/service.
d_reload() {
        start-stop-daemon --stop --quiet --pidfile $PIDFILE \
                --name $NAME --signal 1

case "$1" in
        echo -n "Starting $DESC: $NAME"
        echo "."
        echo -n "Stopping $DESC: $NAME"
        echo "."
        # If the "reload" option is implemented, move the "force-reload"
        # option to the "reload" entry above. If not, "force-reload" is
        # just the same as "restart".
        echo -n "Restarting $DESC: $NAME"
        sleep 1
        echo "."
        # echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
        echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
        exit 1

exit 0

This might well be the wrong way to go about it, but i'm not sure. has some (unclear to me)
instructions about how to deal with the non-standard init situation under a
vserver. However, since the standard initscripts from the sysvinit runlevels
seemed to be working, and svscanboot (
should never really need to restart, the simplest thing for me to do was to add
the initscript.


- --

love and solidarity,


gpg id: 0x594B97C2

Version: GnuPG v1.4.2.1 (Darwin)

Vserver mailing list
Received on Thu Mar 30 23:01:04 2006

[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Thu 30 Mar 2006 - 23:01:12 BST by hypermail 2.1.8