[asterisk-bugs] [JIRA] (ASTERISK-30449) contrib: rc.archlinux.asterisk uses invalid redirect.

Friendly Automation (JIRA) noreply at issues.asterisk.org
Mon Mar 6 12:14:03 CST 2023


     [ https://issues.asterisk.org/jira/browse/ASTERISK-30449?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Friendly Automation closed ASTERISK-30449.
------------------------------------------

    Resolution: Fixed

> contrib: rc.archlinux.asterisk uses invalid redirect.
> -----------------------------------------------------
>
>                 Key: ASTERISK-30449
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-30449
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Contrib/General
>    Affects Versions: GIT
>            Reporter: Sean Bright
>            Assignee: Sean Bright
>
> {{rc.archlinux.asterisk}}, which explicitly requests bash in its shebang, uses the following command syntax:
> {noformat}
> ${DAEMON} -rx "core stop now" > /dev/null 2&>1
> {noformat}
> The intent of which is to execute:
> {noformat}
> ${DAEMON} -rx "core stop now"
> {noformat}
> While sending both stdout and stderr to {{/dev/null}}. Unfortunately, because the {{&}} is in the wrong place, {{bash}} is interpreting the {{2}} as just an additional argument to the {{$DAEMON}} command and not as a file descriptor and then uses the bashism {{&>}} to send stderr and stdout to a file named {{1}}.
> So we clean it up and just use bash's shortcut syntax.
> Issue raised and a fix suggested (but not used) by [peutch on GitHub|https://github.com/asterisk/asterisk/pull/31].



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list