vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| As part of a spam detection setup, I have included the following in /etc/cron.hourly: #!/bin/tcsh # Updates accept-list su -l doug -c "~doug/.PROCMAIL/scripts/procmail-list-update.cron" >& /dev/null If I cd to /etc/cron.hourly, I can 4run it directly, and it calls the script it is supposed to. But if I let it run in the usual way, I get the following mail from cron: MANPATH: Undefined variable. run-parts: /etc/cron.hourly/accept_list.cron exited with return code 1 I can't see where MANPATH is defined. I assumed that it was the path to man pages, but it is :/usr/lib/jdk-1.4.2_01/man:/usr/lib/jdk-1.4.2_01/man This isn't used anywhere in the cron entry or the script it calls. What is going on? Doug. -- ICQ Number 178748389. Registered Linux User No. 277548. Any fool can criticize, condemn, and complain - and most fools do. - Dale Carnegie. |
| |||
| On Sat, 17 Jul 2004 03:31:09 +1000, Doug Laidlaw wrote: > As part of a spam detection setup, I have included the following in > /etc/cron.hourly: > > #!/bin/tcsh > # Updates accept-list > su -l doug -c "~doug/.PROCMAIL/scripts/procmail-list-update.cron" >& > /dev/null why not change ~ to /home/ and I assume procmail-list-update.cron has the PATH set correctly. |
| ||||
| Sat, 17 Jul 2004 03:31:09 +1000 tarihinde, Doug Laidlaw dedi ki: > As part of a spam detection setup, I have included the following in > /etc/cron.hourly: > > #!/bin/tcsh > # Updates accept-list > su -l doug -c "~doug/.PROCMAIL/scripts/procmail-list-update.cron" >& > /dev/null > > If I cd to /etc/cron.hourly, I can 4run it directly, and it calls the script > it is supposed to. But if I let it run in the usual way, I get the > following mail from cron: > > MANPATH: Undefined variable. > run-parts: /etc/cron.hourly/accept_list.cron exited with return code 1 > > I can't see where MANPATH is defined. I assumed that it was the path to man > pages, but it is :/usr/lib/jdk-1.4.2_01/man:/usr/lib/jdk-1.4.2_01/man > > This isn't used anywhere in the cron entry or the script it calls. > > What is going on? > > Doug. Cron environment differs from user environment. So it is possible that some env vars missing or different. I would suggest, speaking in bash, a "echo -e $MANPATH \n $PATH" or "env" both in cron.hourly and in procmail-list-update.cron script, and compare them to your login variables. You may need to set MANPATH (possibly also PATH) explicitly in cron.hourly. As for why it should be needed in the first place, I don't know but I guess it must be referred to indirectly from within procmail-list-update.cron. -- Abdullah | aramazan@ | Ramazanoglu | myrealbox | ________________| D-O-T_cöm | |