[EMAIL PROTECTED] wrote:

>We took down one of our servers and replaced the hard drive with
>something much larger.  Another guy was working on it, so I don't
>exactly know right now what procedure was used to do this.  But...
>When he brought the server back up, we noticed (understatement) that
>a supervise directory was created under almost every directory (but
>not *all* of them).  What could have caused this?

Looks like a bug in the LWQ "qmail" script--or whatever startup script 
you're using. The LWQ script does:

    cd /var/qmail/supervise
    env - PATH="$PATH" svscan &
    echo $! > /var/run/svscan.pid
    echo "."

If /var/qmail/supervise doesn't exist, the cd fails, and svscan will
run from /, and it assumes that each subdirectory is a service, and
runs supervise on it.

The script should check to make sure the cd succeeded, e.g.:

    if cd /var/qmail/supervise; then
      env - PATH="$PATH" svscan &
      echo $! > /var/run/svscan.pid
    fi
    echo "."

Sorry about that: that's a basic shell programming error.

-Dave

Reply via email to