[TriLUG] Why is arp from cron different?
Jeremy Portzer
jeremyp at pobox.com
Fri Oct 4 13:26:39 EDT 2002
On Fri, 2002-10-04 at 13:19, Jerry wrote:
> Hello,
> I have found that arp produces no output if arp is in a script called
> by a file in cron.d in Red Hat Linux 7.2 using /bin/bash.
> 1) arp from the command line produces the expected output
> 2) in a script
> V1=`arp`; echo $V1 > out
> produces the expected output in the file named "out"
> 3) the same script called by cron by placing a file in /etc/cron.d
> produces no output in the file named "out"
Just a wild guess, but I noticed that "arp" on my system is in /sbin,
which might not be in the default path. Try substituting /sbin/arp and
see if that fixes it?
I always use full paths in cron, to avoid this issue, and as a
paranoid-ish security measure.
Regards,
Jeremy
More information about the TriLUG
mailing list