[asterisk-bugs] [JIRA] (ASTERISK-30449) contrib: rc.archlinux.asterisk uses invalid redirect.
Sean Bright (JIRA)
noreply at issues.asterisk.org
Thu Mar 2 08:59:03 CST 2023
Sean Bright created ASTERISK-30449:
--------------------------------------
Summary: 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
{{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.
--
This message was sent by Atlassian JIRA
(v6.2#6252)
More information about the asterisk-bugs
mailing list