[Pkg-sysvinit-devel] Bug#772336: Bug#772336: initscripts: bashism in /bin/sh script

Steve Langasek vorlon at debian.org
Sat Dec 6 20:45:19 UTC 2014


Control: affects -1 devscripts

On Sat, Dec 06, 2014 at 01:56:15PM +0100, Raphael Geissert wrote:
> Package: initscripts
> Severity: important
> Version: 2.88dsf-58
> User: debian-release at lists.debian.org
> Usertags: goal-dash

> I've ran checkbashisms (from the 'devscripts' package) over the whole
> archive and I found that your package has a /bin/sh script that uses a
> "bashism".

> checkbashisms' output:
> > possible bashism in ./etc/init.d/mountnfs.sh line 67 (sleep only takes one
> > integer):
> >			  sleep 0.1

> Not using bash (or a Debian Policy compliant shell interpreter that doesn't
> provide such an extra feature) as /bin/sh is likely to lead to errors or
> unexpected behaviours. Please be aware that dash is the default /bin/sh.

> Please closely examine the above output and the script, and determine
> what the proper severity of the bug is, and adjust it accordingly. If
> it's important or greater please hurry to get this fixed for jessie.

The right way to solve this problem is to eliminate all sleeps from the boot
scripts in favor of event-based booting.  That's called systemd or upstart.
I don't think it's worth anybody's time to fix a bashism in
/etc/init.d/mountnfs.sh at this point.

It's also not something that actually breaks with dash.  /bin/sleep is not a
required builtin in POSIX shell, and it's not a builtin with *either* of
bash or dash.  

$ sh -c 'type sleep'
sleep is /bin/sleep
$ bash -c 'type sleep'
sleep is /bin/sleep
$

So I think this is a bug in checkbashisms, for complaining about something
that is in no way a bashism.

-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                    http://www.debian.org/
slangasek at ubuntu.com                                     vorlon at debian.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-sysvinit-devel/attachments/20141206/4e8863db/attachment.sig>


More information about the Pkg-sysvinit-devel mailing list