[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: cron.daily error



On Wed, Jul 25, 2012 at 06:13:31AM -0700, Jeff Grossman wrote:
> Since I have upgraded to Squeeze, I get and e-mail with the following
> line in it every morning.  Would somebody be able to point me in the
> right direction to figure out what file in cron.daily is giving me
> this error?
> 
> 
> -su: source: not found

I imagine that your system shell has been changed to dash (run "ls -l /bin/sh" to check). Dash is somewhat stricter in its implementation of POSIX than bash (it's main focus is to be lighter than bash so as to allow quicker booting). POSIX declares that the "source" command should check the path when given a filename without path components. Bash relaxes this somewhat by also checking the current directory. Dash DOESN'T do this.

That is, assuming somefile.sh is in the current directory, "source somefile.sh" will work in bash, but not dash. To fix this bashism, use "source ./somefile.sh".

Attachment: signature.asc
Description: Digital signature


Reply to: