X-Wrt
March 14, 2010, 01:17:45 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Welcome to the X-Wrt Forums
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: [PATCH] bug in status-asterisk.sh  (Read 990 times)
mro2
Newbie
*
Offline Offline

Posts: 10


View Profile
« on: February 25, 2007, 06:57:18 PM »

Line 20 in status-asterisk.sh
Code:
if [ -e $ast_conf_file ]; then
is faulty.
Therefore, when using Status/Asterisk in the application it just hangs indefinitely at the following grep.
Code:
root@OpenWrt:/etc/asterisk$ ash -x status-asterisk.sh
+ [ -e /var/run/asterisk.pid ]
+ cat /var/run/asterisk.pid
+ ast_pid=4745
+ cat /proc/4745/cmdline
+ sed s/\0/ /g
+ ast_proc_info=/usr/sbin/asterisk
+ echo /usr/sbin/asterisk
+ awk {print $1}
+ asterisk_exec=/usr/sbin/asterisk
+ [ -z /usr/sbin/asterisk ]
+ echo /usr/sbin/asterisk
+ awk {for (i=2; i<=NF; i++) if ($i == "-C") print $(i+1)}
+ ast_conf_file=
+ [ -e ]
+ cat
+ grep ^astetcdir =>

Just replace it with the quoted variable
Code:
if [ -e "$ast_conf_file" ]; then
and all is good again.
(X-Wrt r2676)

Regards,
Marc
Logged
lubek
X-Wrt Developer
Hero Member
*****
Offline Offline

Posts: 972


View Profile
« Reply #1 on: February 26, 2007, 04:34:05 AM »

Thanks for your effort.
The fix was uploaded in r2702/r2703.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 0.085 seconds with 19 queries.