<p>Sean Bright has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/19936">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">contrib: rc.archlinux.asterisk uses invalid redirect.<br><br>`rc.archlinux.asterisk`, which explicitly requests bash in its<br>shebang, uses the following command syntax:<br><br> ${DAEMON} -rx "core stop now" > /dev/null 2&>1<br><br>The intent of which is to execute:<br><br> ${DAEMON} -rx "core stop now"<br><br>While sending both stdout and stderr to `/dev/null`. Unfortunately,<br>because the `&` is in the wrong place, bash is interpreting the `2` as<br>just an additional argument to the `$DAEMON` command and not as a file<br>descriptor and proceeds to use the bashism `&>` to send stderr and<br>stdout to a file named `1`.<br><br>So we clean it up and just use bash's shortcut syntax.<br><br>Issue raised and a fix suggested (but not used) by peutch on GitHub¹.<br><br>ASTERISK-30449 #close<br><br>1. https://github.com/asterisk/asterisk/pull/31<br><br>Change-Id: Ie279bf4efb4d95cbf507313483d316e977303d19<br>---<br>M contrib/init.d/rc.archlinux.asterisk<br>1 file changed, 33 insertions(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/36/19936/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/contrib/init.d/rc.archlinux.asterisk b/contrib/init.d/rc.archlinux.asterisk</span><br><span>index 9c84085..47685ad 100755</span><br><span>--- a/contrib/init.d/rc.archlinux.asterisk</span><br><span>+++ b/contrib/init.d/rc.archlinux.asterisk</span><br><span>@@ -45,7 +45,7 @@</span><br><span> stop)</span><br><span> if [ -r ${ASTVARRUNDIR}/asterisk.pid ]; then</span><br><span> stat_busy "Stopping Asterisk..."</span><br><span style="color: hsl(0, 100%, 40%);">- ${DAEMON} -rx "core stop now" > /dev/null 2&>1</span><br><span style="color: hsl(120, 100%, 40%);">+ ${DAEMON} -rx "core stop now" &>/dev/null</span><br><span> if [ $? -gt 0 ]; then</span><br><span> stat_fail</span><br><span> else</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/19936">change 19936</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/c/asterisk/+/19936"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 18 </div>
<div style="display:none"> Gerrit-Change-Id: Ie279bf4efb4d95cbf507313483d316e977303d19 </div>
<div style="display:none"> Gerrit-Change-Number: 19936 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Sean Bright <sean@seanbright.com> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>