Subject: Re: postfix script question
To: Christopher W. Richardson <cwr@nexthop.com>
From: Dave Huang <khym@azeotrope.org>
List: netbsd-users
Date: 08/31/2004 18:04:02
On Tue, Aug 31, 2004 at 05:06:17PM -0400, Christopher W. Richardson wrote:
> I'm seeing some odd behavior with the postfix script:
> 
> $NetBSD: postfix,v 1.6 2002/02/12 02:19:27 lukem Exp $
> 
> If I run it from anywhere outside of /etc/rc.d, it seems to work
> fine:

> However, if I run it from inside /etc/rc.d, it's unhappy:

> eval: Cannot fork

It sounds like you have the current directory (".") at the beginning
of your $PATH. When you run "/etc/rc.d/postfix reload", the script
runs "postfix reload", intending to run /usr/sbin/postfix. However,
when your current directory is /etc/rc.d, it's finding
/etc/rc.d/postfix in the $PATH before /usr/sbin/postfix, so it ends up
calling itself again and again until the process table is full.

It's dangerous to put "." at the front of your $PATH (it's dangerous
to have it anywhere in your $PATH, but if you _really_ want to have it
in there, make sure it's at the end).
-- 
Name: Dave Huang         |  Mammal, mammal / their names are called /
INet: khym@azeotrope.org |  they raise a paw / the bat, the cat /
FurryMUCK: Dahan         |  dolphin and dog / koala bear and hog -- TMBG
Dahan: Hani G Y+C 28 Y++ L+++ W- C++ T++ A+ E+ S++ V++ F- Q+++ P+ B+ PA+ PL++