On Sunday, 13 Nov 2016 at 11:38 UTC
Tollef Fog Heen wrote:

> Hi,
> 
> sorry for the long delay in replying here, I've completely forgotten
> about this bug.

Don't worry.

> ]] Manolo Díaz 
> 
> > >   
> > > > The /etc/cron.daily/mlocate shell script is intended to be run in a
> > > > non interactive way and seems to be posix compliant. Please,
> > > > consider using sh.  
> > > 
> > > Why?
> > >   
> > Because dash, which is commonly used as default shell in Debian, is
> > supposed to have a smaller footprint than bash and it's enough to run
> > the script. Have I missed any downside?  
> 
> Yes, we're using «which», which isn't POSIX sh.  It might be in dash,
> but that's not sufficient for /bin/sh.  bash is essential, and the
> overhead of bash vs dash is tiny compared to the work mlocate is doing,
> so I'm going to close this bug now.
> 
> Cheers,

As far as I know «which» isn't provided by Bash or Dash, but by
the debianutils package (which is required) and in fact it's a POSIX
shell.

From the Bash shell:
    $ type which
    which is hashed (/usr/bin/which)

From the Dash shell:
   $ type which
   which is /usr/bin/which

Agree, the overhead could be negligible.

Kind Regards,
-- 
Manolo Díaz

Reply via email to