[asterisk-users] my dahdi dont'n start

Tzafrir Cohen tzafrir.cohen at xorcom.com
Tue May 3 02:43:07 CDT 2016


On Fri, Apr 29, 2016 at 09:38:10AM +0200, Mamadou NGOM wrote:
>    Hello,
> 
>    I have not resolved my problem.I renamed my  dahdi file  "mv dahdi.bash
>    dahdi " in the directory /etc/init.d, but it doesn'nt work yet.
> 
>    the same error after the command  /etc/init.d/dahdi start
>    -bash: /etc/init.d/dahdi: /bin/sh^M: bad interpreter: No such file or
>    directory

This is a DOS-formatted text file. A '#!' at the beginning of the line
is handed over to the Linux kernel, which takes the rest of first line
(up to the first newline character) as the interpreter of the script.

This first line here is '/bin/sh\r', because this file is a
DOS-formatted text file, with lines that end in '\r\n' instead of '\n'
as in UNIX text files.

sed -i -e 's/\r$//' /etc/init.d/dahdi

And then again, do you really need a DAHDI init script? See my previous
message:

http://lists.digium.com/pipermail/asterisk-users/2016-April/288968.html

-- 
               Tzafrir Cohen
icq#16849755              jabber:tzafrir.cohen at xorcom.com
+972-50-7952406           mailto:tzafrir.cohen at xorcom.com
http://www.xorcom.com



More information about the asterisk-users mailing list