[Home]

Summary:ASTERISK-10377: [patch] safe_asterisk includes bashisms
Reporter:Faidon Liambotis (paravoid)Labels:
Date Opened:2007-09-24 01:39:00Date Closed:2009-05-26 08:08:52
Priority:TrivialRegression?No
Status:Closed/CompleteComponents:Utilities/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) safe_asterisk_bashism.diff
Description:contrib/scripts/safe_asterisk includes so-called bashims, i.e. shell features that can only be found on bash and not on the POSIX definition of shell.

However, the intepreter of that file is /bin/sh which is not guaranteed to be bash.

Either the bashisms should get removed or the interpreter should be changed to /bin/bash.
On Debian, we've done the latter, for obvious reasons.
Comments:By: Tzafrir Cohen (tzafrir) 2007-09-24 03:20:43

Already fixed in branches/1.4 SVN. interpreter changed to /bin/bash .

By: Tzafrir Cohen (tzafrir) 2009-05-23 10:42:36

Apparently the issue was not fixed - the interpreter is still /bin/sh . However most bashism issues seem simple to resolve. A patch is attached.

The script checkbashism (on Debian / Ubuntu: part of devscripts) still complains about the usage of ulimit, but I'm not sure about the usage of ulimit, which is not guaranteed by the standard, from what I understand. However it seems to be supported by dash and busybox ash, and I can't think of a simple workaround right not.

By: Digium Subversion (svnbot) 2009-05-26 08:06:10

Repository: asterisk
Revision: 196657

U   branches/1.4/contrib/scripts/safe_asterisk

------------------------------------------------------------------------
r196657 | file | 2009-05-26 08:06:09 -0500 (Tue, 26 May 2009) | 7 lines

Remove some bash specific stuff from safe_asterisk.

(closes issue ASTERISK-10377)
Reported by: paravoid
Patches:
     safe_asterisk_bashism.diff uploaded by tzafrir (license 46)

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=196657

By: Digium Subversion (svnbot) 2009-05-26 08:06:50

Repository: asterisk
Revision: 196658

_U  trunk/
U   trunk/contrib/scripts/safe_asterisk

------------------------------------------------------------------------
r196658 | file | 2009-05-26 08:06:50 -0500 (Tue, 26 May 2009) | 14 lines

Merged revisions 196657 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
 r196657 | file | 2009-05-26 10:06:09 -0300 (Tue, 26 May 2009) | 7 lines
 
 Remove some bash specific stuff from safe_asterisk.
 
 (closes issue ASTERISK-10377)
 Reported by: paravoid
 Patches:
       safe_asterisk_bashism.diff uploaded by tzafrir (license 46)
........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=196658

By: Digium Subversion (svnbot) 2009-05-26 08:07:30

Repository: asterisk
Revision: 196659

_U  branches/1.6.0/
U   branches/1.6.0/contrib/scripts/safe_asterisk

------------------------------------------------------------------------
r196659 | file | 2009-05-26 08:07:30 -0500 (Tue, 26 May 2009) | 21 lines

Merged revisions 196658 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
 r196658 | file | 2009-05-26 10:06:50 -0300 (Tue, 26 May 2009) | 14 lines
 
 Merged revisions 196657 via svnmerge from
 https://origsvn.digium.com/svn/asterisk/branches/1.4
 
 ........
   r196657 | file | 2009-05-26 10:06:09 -0300 (Tue, 26 May 2009) | 7 lines
   
   Remove some bash specific stuff from safe_asterisk.
   
   (closes issue ASTERISK-10377)
   Reported by: paravoid
   Patches:
         safe_asterisk_bashism.diff uploaded by tzafrir (license 46)
 ........
................

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=196659

By: Digium Subversion (svnbot) 2009-05-26 08:08:13

Repository: asterisk
Revision: 196660

_U  branches/1.6.1/
U   branches/1.6.1/contrib/scripts/safe_asterisk

------------------------------------------------------------------------
r196660 | file | 2009-05-26 08:08:13 -0500 (Tue, 26 May 2009) | 21 lines

Merged revisions 196658 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
 r196658 | file | 2009-05-26 10:06:50 -0300 (Tue, 26 May 2009) | 14 lines
 
 Merged revisions 196657 via svnmerge from
 https://origsvn.digium.com/svn/asterisk/branches/1.4
 
 ........
   r196657 | file | 2009-05-26 10:06:09 -0300 (Tue, 26 May 2009) | 7 lines
   
   Remove some bash specific stuff from safe_asterisk.
   
   (closes issue ASTERISK-10377)
   Reported by: paravoid
   Patches:
         safe_asterisk_bashism.diff uploaded by tzafrir (license 46)
 ........
................

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=196660

By: Digium Subversion (svnbot) 2009-05-26 08:08:51

Repository: asterisk
Revision: 196661

_U  branches/1.6.2/
U   branches/1.6.2/contrib/scripts/safe_asterisk

------------------------------------------------------------------------
r196661 | file | 2009-05-26 08:08:51 -0500 (Tue, 26 May 2009) | 21 lines

Merged revisions 196658 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
 r196658 | file | 2009-05-26 10:06:50 -0300 (Tue, 26 May 2009) | 14 lines
 
 Merged revisions 196657 via svnmerge from
 https://origsvn.digium.com/svn/asterisk/branches/1.4
 
 ........
   r196657 | file | 2009-05-26 10:06:09 -0300 (Tue, 26 May 2009) | 7 lines
   
   Remove some bash specific stuff from safe_asterisk.
   
   (closes issue ASTERISK-10377)
   Reported by: paravoid
   Patches:
         safe_asterisk_bashism.diff uploaded by tzafrir (license 46)
 ........
................

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=196661