Bug#530047: asterisk: bashism in /bin/sh script
Ron
ron at debian.org
Mon May 25 11:05:18 UTC 2009
On Sun, May 24, 2009 at 03:16:43PM -0500, Raphael Geissert wrote:
> On Saturday 23 May 2009 10:33:58 Tzafrir Cohen wrote:
> > Something new I get in 1.6.1 (and also in upstream trunk)
> >
> > possible bashism in - line 92 (ulimit):
> > ulimit -n $MAXFILES
> > possible bashism in - line 103 (ulimit):
> > ulimit -c unlimited
> >
> > I can't think of a simple workaround. OTOH, dash seems to be fine with
> > that
>
> Exactly the reason why I didn't include it in the report. As a matter of fact,
> the omitted lines were:
> possible bashism in ./usr/sbin/safe_asterisk line 80 (ulimit):
> ulimit -n $MAXFILES
> possible bashism in ./usr/sbin/safe_asterisk line 87 (ulimit):
> ulimit -c unlimited
> possible bashism in ./etc/init.d/asterisk line 124 (ulimit):
> ulimit -n $MAXFILES
>
> > (posh isn't , busybox ash in Lenny also seems to be fine with it).
> > Worth fixing? How?
>
> When I proposed the release goal for squeeze I also proposed another goal to
> achieve "full" policy compliance regarding shell scripts by avoiding features
> supported even by dash. Others asked why not try to get those other features
> (e.g. ulimit) required by policy. The discussion is, by now, dead but I will
> forward it to debian-policy.
>
> So, you have two options: leave it the way it is, or catch the error produced
> when ulimit is not implemented.
Uhm, _three_ options: declare the script(s) explicitly require /bin/bash
The 'safe_asterisk' script is already a horrible kludge to work around a
buggy app. Applying further layers of horrible kludges to that, just to
avoid using the language that it apparently needs to do some of its heavy
kludging, doesn't really seem like a Good Idea, does it?
If more of the people out bash hunting would separate the idea of fixing
_accidental_ bashisms from "wiping bash off the face of the planet at
any cost whatsoever", I think a lot of these cases would be much more
obviously trivial to fix instead of some sort of dastardly hard problem.
There is Nothing Wrong With Bash. If you need it, use it. Just never
say you are using /bin/sh if you really need bash. That is all.
More information about the Pkg-voip-maintainers
mailing list