[asterisk-bugs] [JIRA] (ASTERISK-20567) bashism in autosupport

Tzafrir Cohen (JIRA) noreply at issues.asterisk.org
Tue Oct 16 06:27:34 CDT 2012


Tzafrir Cohen created ASTERISK-20567:
----------------------------------------

             Summary: bashism in autosupport
                 Key: ASTERISK-20567
                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-20567
             Project: Asterisk
          Issue Type: Bug
      Security Level: None
          Components: General
    Affects Versions: 11.0.0-beta2, 10.9.0, 1.8.17.0
            Reporter: Tzafrir Cohen
            Severity: Minor


The script contrib/scripts/autosupport has bashism issues: it is a #!/bin/sh script but uses some bash-specific features. From what I see, it's only the usage of '==' for string comparison in a 'test'.

Anyway, that whole part better be written as a 'case' statement. Patch attached.

While we're at it, including /dev/zap and /dev/dahdi in line 207 is not a good idea. Currently it will just grab randome files called 1, 2, or whatever and 'ctl' and such in the current directory. But even if you fix that, you should not try to read the contents of those special device files.

Is this script still being used? Should it still be included in the Debian package?
( http://bugs.debian.org/690627 triggered this).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the asterisk-bugs mailing list