[AsteriskBrasil] script não funciona apó atualização do bash

Thiago Bruni Tawil stomaz.fei em gmail.com
Quarta Agosto 10 12:15:32 BRT 2011


Gente... meus scripts funcionavam normalmente no CentOS 5.5
Agora atualizei para o 6 e meus scripts estão dando erro... por exemplo:

#!/bin/bash


make_callfile()
{

canal=$1

CALLFILE=$(cat <<-EOF1
Channel: SIP/D${canal}
MaxRetries: 0
RetryTime: 5
Context: discador
Extension: s
Priority: 1
)

FILE_NAME=/var/spool/asterisk/tmp/$(date +%YNaVM%S)-$EMPRESA$RAMAL.call
echo "$CALLFILE" >> $FILE_NAME
chown root /$FILE_NAME
chmod 777 /$FILE_NAME
mv /$FILE_NAME /var/spool/asterisk/outgoing
}

#VARIAVEIS DIRETORIOS
ASTERISK_CFG="/etc/asterisk"
TEMP_SPOOL="/var/spool/asterisk/tmp"

make_callfile "$1" "$2" "$3"

exit


olha o erro ao rodar:

# ./gatinhodisca.sh
./gatinhodisca.sh: line 9: unexpected EOF while looking for matching `)'
./gatinhodisca.sh: line 33: syntax error: unexpected end of file


versão do BASH anterior: 3.2.25
Atual: 4.1.2


Obrigado
Abraços...
-------------- Próxima Parte ----------
Um anexo em HTML foi limpo...
URL: http://listas.asteriskbrasil.org/pipermail/asteriskbrasil/attachments/20110810/5362f4db/attachment.htm 


Mais detalhes sobre a lista de discussão AsteriskBrasil