What invokes cricket on FreeBSD

stan stanb at panix.com
Thu Sep 3 20:23:49 UTC 2009


On Thu, Sep 03, 2009 at 10:10:13PM +0200, Mel Flynn wrote:
> On Thursday 03 September 2009 21:02:41 stan wrote:
> 
> > pnoc# cat collect-subtrees
> > #!/bin/sh
> >
> > echo STARTED >> /tmp/stan
> > which perl >> /tmp/stan
> > /usr/local/cricket/cricket/collect-subtrees.pl normal >> /tmp/stan
> > echo Done >> /tmp/stan
> >
> > /tmp stan contains:
> >
> > pnoc# cat /tmp/stan
> > STARTED
> > /usr/bin/perl
> > Done
> > STARTED
> > /usr/bin/perl
> > Done
> >
> > So, cron is invoking the correct command, and perl can be found, but the
> > original collect_subtrees perl script silently dies.
> >
> > I am convinced it's an environemt probkl`lem, I am just uncertain how to
> > determine what.
> 
> I'm not anymore. I'm putting 1 cent on a broken /usr/bin/perl symlink (perl 
> upgrade gone bonkers, f.e. done with ro mounted /usr) and another cent on the 
> perl script using system() function, with pathless commands (that is 
> environment).
> file /usr/bin/perl should report if the symlink is broken.


pnoc# file /usr/bin/perl
/usr/bin/perl: symbolic link to `/usr/local/bin/perl5.8.9'

pnoc# ls /usr/local/bin/perl5.8.9
/usr/local/bin/perl5.8.9

You did see where I had the replacement shell script for collect_subtrees
do a perl --version into the logfile, right? To me, that's pretty
convincing evidence that perl works. Plus, remeber that I can execute the
collect_subtree perl script sucesfy`ully whenI su to the cricket user.

-- 
One of the main causes of the fall of the roman empire was that, lacking
zero, they had no way to indicate successful termination of their C
programs.


More information about the freebsd-questions mailing list