Hi Tom.

I understand it.

But according to the solution you suggest:

1. Would we modify through code the crontab to add the -x option?
2. Would we evaluate, at ex function at cron.c if the command exists and is
executable, and in case it does not, not to execute it?

Thanks and regards.

Sergio.




On 8/21/07, Tom Haynes <Thomas.Haynes at sun.com> wrote:
>
> Sergio Gutierrez wrote:
> > Hi Tom
> >
> > Thank you very much for your answer.
> >
> >     I'd advise against commenting out the line. What happens if someone
> >     installs the
> >     executable at a later date?
> >
> >     A common solution is to test to see if the command exists and only
> run
> >     it if it does.
> >
> >     [th199096 at warlock ~]> sudo crontab -l | grep "\-x"
> >     30 3 * * * [ -x /usr/lib/gss/gsscred_clean ] &&
> >     /usr/lib/gss/gsscred_clean
> >     1 2 * * * [ -x /usr/sbin/rtc ] && /usr/sbin/rtc -c > /dev/null 2>&1
> >
> >
> > So,  we could put in code the same thing as the suggested workaround.
> > But, could we consider it valid for any executable programmed in the
> > crontab?
> >
>
> In theory, yes, we could do it for any executable programmed into the
> crontab. In general,
> an entry should only be put in the crontab if and only if the executable
> is installed.
>
> Another approach here is to make the addition of the crontab entry be
> part of the
> package which contains nfsfind. Right now that is occuring as part of
> some other process.
>
> This solution is cleaner in that it puts the fix where it needs to go.
>
> The "-x" is more robust, in case the script gets deleted.
>
>
> > In case it be valid, do we need to implement a kind of notification
> > for this situation?
> >
> No, I don't think we need to do so.
>
> >
> >     Thanks,
> >     Tom
> >
> >
> >     PS: I'll be willing to sponsor you once you have a fix ready....
> >
> >
> >
> > Thanks a lot!. I will be working on it, and I will be posting you.
> >
> > Regards.
> >
> > Sergio.
> >
> >
>
>

Reply via email to