Bug#669378: asterisk: init logger-reload not working

Tristan Hill tristan.hill at credativ.co.uk
Thu Apr 19 13:31:21 UTC 2012


Package: asterisk
Version: 1:1.8.8.2~dfsg-1

Hi,

I find that /etc/init.d/asterisk logger-reload isn't working.

gabor:~# bash -x /etc/init.d/asterisk logger-reload
+ PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+ NAME=asterisk
+ USER=asterisk
+ GROUP=asterisk
+ DAEMON=/usr/sbin/asterisk
+ CANARY=/usr/sbin/astcanary
+ DESC='Asterisk PBX'
+ PIDFILE=/var/run/asterisk/asterisk.pid
+ ASTSAFE_PIDFILE=/var/run/asterisk/asterisk_safe.pid
+ UMASK=007
+ . /lib/lsb/init-functions
++ FANCYTTY=
++ '[' -e /etc/lsb-base-logging.sh ']'
++ true
+ PARAMS=
+ CHDIR_PARM=
+ AST_REALTIME=yes
+ RUNASTERISK=yes
+ AST_DUMPCORE=no
+ AST_DUMPCORE_DIR=/var/spool/asterisk
+ '[' -r /etc/default/asterisk ']'
+ . /etc/default/asterisk
++ RUNASTERISK=yes
++ PARAMS='-F -g -vvv'
+ '[' yes '!=' yes ']'
+ '[' yes '!=' no ']'
+ PARAMS='-F -g -vvv -p'
+ '[' no '!=' no ']'
+ '[' xasterisk = x ']'
++ id -u asterisk
+ '[' 102 = 0 ']'
+ PARAMS='-F -g -vvv -p -U asterisk'
+ '[' x = x ']'
+ AST_DEBUG_PARAMS=-cvvvvvddddd
+ '[' '' = yes ']'
+ REALDAEMON=/usr/sbin/asterisk
+ test -x /usr/sbin/asterisk
+ for dir in /var/run/asterisk /var/log/asterisk 
/var/log/asterisk/cdr-csv /var/log/asterisk/cdr-custom
+ '[' -d /var/run/asterisk ']'
+ for dir in /var/run/asterisk /var/log/asterisk 
/var/log/asterisk/cdr-csv /var/log/asterisk/cdr-custom
+ '[' -d /var/log/asterisk ']'
+ for dir in /var/run/asterisk /var/log/asterisk 
/var/log/asterisk/cdr-csv /var/log/asterisk/cdr-custom
+ '[' -d /var/log/asterisk/cdr-csv ']'
+ for dir in /var/run/asterisk /var/log/asterisk 
/var/log/asterisk/cdr-csv /var/log/asterisk/cdr-custom
+ '[' -d /var/log/asterisk/cdr-custom ']'
+ set -e
+ '[' 007 '!=' '' ']'
+ umask 007
+ '[' '' '!=' '' ']'
+ case "$1" in
+ asterisk_rx 'logger reload'
+ status
+ status_of_proc /usr/sbin/asterisk 'Asterisk PBX'
+ local pidfile daemon name status
+ pidfile=
+ OPTIND=1
+ getopts p: opt
+ shift 0
+ '[' -n '' ']'
+ daemon=/usr/sbin/asterisk
+ name='Asterisk PBX'
+ status=0
+ pidofproc /usr/sbin/asterisk
+ local pidfile base status specified pid
+ pidfile=
+ specified=
+ OPTIND=1
+ getopts p: opt
+ shift 0
+ base=asterisk
+ '[' '!' '' ']'
+ pidfile=/var/run/asterisk.pid
+ '[' -n /var/run/asterisk.pid ']'
+ '[' -e /var/run/asterisk.pid ']'
+ return 3
+ status=3
+ '[' 3 = 0 ']'
+ '[' 3 = 4 ']'
+ log_failure_msg 'Asterisk PBX is not running'
+ '[' -n 'Asterisk PBX is not running' ']'
+ log_begin_msg Asterisk PBX is not running ...
+ '[' -z Asterisk ']'
+ /bin/echo -n Asterisk PBX is not running ...
+ log_end_msg 1
+ '[' -z 1 ']'
+ local retval
+ retval=1
+ log_end_msg_pre 1
+ :
+ log_use_fancy_output
+ TPUT=/usr/bin/tput
+ EXPR=/usr/bin/expr
+ '[' -t 1 ']'
+ FANCYTTY=0
+ case "$FANCYTTY" in
+ false
+ RED=
+ YELLOW=
+ NORMAL=
+ '[' 1 -eq 0 ']'
+ '[' 1 -eq 255 ']'
+ /bin/echo -e ' failed!'
+ log_end_msg_post 1
+ :
+ return 1
+ true
+ return 3
+ return 3
+ return 0
+ exit 0


I've changed it to use
status_of_proc -p "$PIDFILE" "$DAEMON" "$DESC"
which seems to work


Tristan




-- 
credativ ltd                     Tel: 01788 298150
36 Regent Street                 Fax: 01788 298159
Rugby CV21 2PS - UK              http://www.credativ.co.uk

credativ Ltd is registered in England & Wales, company no. 5261743
Registered office: 36 Regent Street, Rugby, Warwickshire, CV21 2PS

Certified by AccredIT UK with the ICT Supply standard of quality for
Software Product Design and Development





More information about the Pkg-voip-maintainers mailing list