[asterisk-bugs] [JIRA] (ASTERISK-20567) bashism in autosupport
Walter Doekes (JIRA)
noreply at issues.asterisk.org
Mon Sep 29 16:15:29 CDT 2014
[ https://issues.asterisk.org/jira/browse/ASTERISK-20567?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=222822#comment-222822 ]
Walter Doekes commented on ASTERISK-20567:
------------------------------------------
Tzafrir forgot to merge to trunk, looks like:
{noformat}
$ svn log asterisk-1.8.x-WRITE/contrib/scripts/autosupport
------------------------------------------------------------------------
r375059 | tzafrir | 2012-10-16 21:13:08 +0200 (di, 16 okt 2012) | 7 lines
autosupport: fix bashism
'==' is bashism (bashspecific, fails when dash is /bin/sh). Anyway, a
'case' works better there.
(closes issue ASTERISK-20567)
Reported by: Tzafrir Cohen
------------------------------------------------------------------------
r349504 | kmoore | 2012-01-04 21:00:33 +0100 (wo, 04 jan 2012) | 10 lines
Update autosupport script and man page
Added information collection from the output of the utilities: top, free, uptime, ifconfig
Added information collection from the output of the Asterisk command 'dahdi show status'
Added option / flag '-n, --non-interactive'
Updated man page to reflect new option / flag '-n, --non-interactive'
Patch-by: John Bigelow (itzanger)
(closes issue AST-749)
{noformat}
vs.
{noformat}
$ svn log asterisk-11.x-WRITE/contrib/scripts/autosupport
------------------------------------------------------------------------
r371121 | mjordan | 2012-08-10 22:08:14 +0200 (vr, 10 aug 2012) | 8 lines
_ _ _ _ _ _
/ \ ___| |_ ___ _ __(_)___| | __ / | / |
/ _ \ / __| __/ _ \ '__| / __| |/ / | | | |
/ ___ \__ \| | __/ | | \__ \ < | | | |
/_/ \_\___/\__\___|_| |_|___/_|\_\ |_| |_|
Because it's one greater than 10.
------------------------------------------------------------------------
r349506 | kmoore | 2012-01-04 21:02:34 +0100 (wo, 04 jan 2012) | 16 lines
Update autosupport script and man page
Added information collection from the output of the utilities: top, free, uptime, ifconfig
Added information collection from the output of the Asterisk command 'dahdi show status'
Added option / flag '-n, --non-interactive'
Updated man page to reflect new option / flag '-n, --non-interactive'
Patch-by: John Bigelow (itzanger)
(closes issue AST-749)
........
Merged revisions 349504 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 349505 from http://svn.asterisk.org/svn/asterisk/branches/10
{noformat}
> 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: 1.8.17.0, 10.9.0, 11.0.0-beta2
> Reporter: Tzafrir Cohen
> Severity: Minor
> Target Release: 1.8.19.0, 10.11.0, 10.11.0-digiumphones, 11.1.0
>
> Attachments: 0001-fix-bashism-in-autosupport.patch
>
>
> 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 was sent by Atlassian JIRA
(v6.2#6252)
More information about the asterisk-bugs
mailing list