06-01-06 12:12 AM
On Wed, 31 May 2006, in the Usenet newsgroup comp.os.linux.redhat, in articl
e
<447d9f34$0$7850$5a62ac22@per-qv1-newsreader-01.iinet.net.au>, McHenry wrote
:
>I would like to run the fetchmail deamon at startup and have added a simple
>line in rc.local to do so. When the machine boots, not mail is delivered an
d
>if I check the processes running using "ps -ef" fetchmail is not listed.
>However after bootup if I manually run /etc/rc.d/./rc.local the mail is
>delivered and "ps -ef" lists the fetchmail daemon command.
Neither here, or in comp.mail.sendmail did you include the file so that one
can see your error, but the usual cause of this exact problem is not puttin
g
the entire PATH to the command in scripts. The boot scripts are normally
executed with a limited environment (including a PATH that only has four
directories in it), which is quite different from your PATH as a user.
For an education, add the line
set > /tmp/boot.environment
to the bottom of rc.local, and after the next boot look at the contents of
that file while comparing the result of you typing the command set as root
and as the user you should be running as.
Standard advice when writing scripts is to either explicitly set the PATH
to that desired, or put the full path to each command.
Old guy
[ Post a follow-up to this message ]
|