[Dirvish] Re: curious problem - dirvish does nothing when run

hanj mailing at astarna.com
Fri Jan 12 08:38:18 PST 2007


On Fri, 12 Jan 2007 08:29:45 -0800
Michael Nelson <michaelnel at comcast.net> wrote:

> OK, I moved all the dirvish* binaries from /usr/local/sbin to /usr/sbin.  I
> checked the path in /etc/crontab, and it is:
> PATH=/usr/bin:/usr/sbin:/sbin:/bin
> 
> I edited dirvish and dirvish-runall to make it run with the perl warnings
> switch (-w) and it ran and finally produced some error output:
> 
> ----- Forwarded message from CronDaemon <root at seahunt.dyndns.org> -----
> 
> Date: Fri, 12 Jan 2007 08:18:01 -0800
> From: CronDaemon <root at seahunt.dyndns.org>
> Subject: Cron <root at seahunt> /usr/sbin/dirvish-runall; echo "return was: $?."
> To: root at seahunt.dyndns.org
> X-Sorted: Admin
> 
> Use of uninitialized value in split at /usr/sbin/dirvish-runall line 221.
> Use of uninitialized value in array dereference at /usr/sbin/dirvish-runall line 233.
> Use of uninitialized value in concatenation (.) or string at /usr/sbin/dirvish-runall line 233.
> 08:18:01 dirvish --vault root
> Can't exec "dirvish": No such file or directory at /usr/sbin/dirvish-runall line 114.
> 08:18:01 dirvish --vault home
> Can't exec "dirvish": No such file or directory at /usr/sbin/dirvish-runall line 114.
> 08:18:01 done
> return was: 2.
> 
> ----- End forwarded message -----
> 
> However, the dirvish perl script is in /usr/sbin:
> 
> # ls -l /usr/sbin/dirvish*
> -rwxr-xr-x 1 root root 28468 Jan 12 08:15 /usr/sbin/dirvish
> -rwxr-xr-x 1 root root 10736 Dec 24 07:58 /usr/sbin/dirvish-expire
> -rwxr-xr-x 1 root root 10493 Dec 24 07:58 /usr/sbin/dirvish-locate
> -rwxr-xr-x 1 root root  8167 Jan 12 08:15 /usr/sbin/dirvish-runall
> 
> ...and as you can see from above, /usr/sbin/is in the cron's PATH.
> 
> I guess next I will write a script and set the PATH in there.
> 
> Michael


Hello

I ran into this exact problem a few weeks ago. One box was doing
'nothing' from cron but cmd worked. What I ended up doing to solve it
was update my env when cron was executed. Not sure why that fixed
it.. but it did the trick.

Try adding this to your cron...

source /etc/profile; env-update; /usr/sbin/dirvish-runall;

Might be worth a try.

HTH
hanji


More information about the Dirvish mailing list