Package: courier-authdaemon
Version: 0.66.4-5
Severity: grave

After a recent upgrade to courier-authdaemon the init scripts have
ceased controlling the daemon processes.

Producing the error :
 Unknown option '-'


NP: this is after the workaround to bug #818744 has been added to let
the init script actually run.


A full trace is included below. The lines producing this output are in
/lib/init/init-d-script:

+ start-stop-daemon --start --quiet --pidfile /run/courier/pid --startas
/usr/sbin/authdaemond --name authdaemond --exec /usr/sbin/authdaemond --test
+ start-stop-daemon --start --quiet --pidfile /run/courier/pid --startas
/usr/sbin/authdaemond --name authdaemond --exec /usr/sbin/authdaemond --
Unknown option '-'
+ return 2


The /usr/sbin/authdaemond script (aka $DAEMON) is expecting to receive
"start" or "stop", etc as its $1 parameter.

For some reason the /etc/init.d/courier-authdaemon script is ignoring
the error result from init-d-script and returning "exit 0" (success) anyway.


Running these commands manually with the extra daemon parameter works fine:

start-stop-daemon --start --quiet --pidfile /run/courier/pid --startas
/usr/sbin/authdaemond --name authdaemond --exec /usr/sbin/authdaemond --
start

start-stop-daemon --start --quiet --pidfile /run/courier/pid --startas
/usr/sbin/authdaemond --name authdaemond --exec /usr/sbin/authdaemond --
stop




The full output of "/etc/init.d/courier-authdaemon start" when -x is
added to its shell call is listed below:


# /etc/init.d/courier-authdaemon start
+ [ true !=  ]
+ set /etc/init.d/courier-authdaemon start
+ INIT_D_SCRIPT_SOURCED=true . /lib/init/init-d-script
+ . /lib/lsb/init-functions
+ run-parts --lsbsysinit --list /lib/lsb/init-functions.d
+ [ -r /lib/lsb/init-functions.d/01-upstart-lsb ]
+ . /lib/lsb/init-functions.d/01-upstart-lsb
+ unset UPSTART_SESSION
+ _RC_SCRIPT=/etc/init.d/courier-authdaemon
+ [ -r /etc/init//etc/init.d/courier-authdaemon.conf ]
+ _UPSTART_JOB=courier-authdaemon
+ [ -r /etc/init/courier-authdaemon.conf ]
+ [ -r /lib/lsb/init-functions.d/20-left-info-blocks ]
+ . /lib/lsb/init-functions.d/20-left-info-blocks
+ FANCYTTY=
+ [ -e /etc/lsb-base-logging.sh ]
+ true
+ PATH=/sbin:/usr/sbin:/bin:/usr/bin
+ export PATH
+ [  = true ]
+ SCRIPTNAME=/etc/init.d/courier-authdaemon
+ basename /etc/init.d/courier-authdaemon
+ scriptbasename=courier-authdaemon
+ [ courier-authdaemon != init-d-script ]
+ script=/etc/init.d/courier-authdaemon
+ shift
+ . /etc/init.d/courier-authdaemon
+ [ true != true ]
+ DAEMON=/usr/sbin/authdaemond
+ DESC=Courier authentication services
+ PIDFILE=/run/courier/pid
+ basename /usr/sbin/authdaemond
+ NAME=authdaemond
+ DESC=Courier authentication services
+ [ none = /run/courier/pid ]
+ [ -z /run/courier/pid ]
+ [ none != /usr/sbin/authdaemond ]
+ [ ! -x /usr/sbin/authdaemond ]
+ [ -r /etc/default/authdaemond ]
+ . /lib/init/vars.sh
+ TMPTIME=0
+ SULOGIN=no
+ DELAYLOGIN=no
+ UTC=yes
+ VERBOSE=no
+ FSCKFIX=no
+ [ -f /etc/default/rcS ]
+ . /etc/default/rcS
+ TMPTIME=0
+ SULOGIN=no
+ DELAYLOGIN=yes
+ VERBOSE=yes
+ FSCKFIX=no
+ unset EDITMOTD
+ unset RAMRUN
+ unset RAMLOCK
+ [ -r /proc/cmdline ]
+ cat /proc/cmdline
+ [  ]
+ [  ]
+ [ -t 0 ]
+ VERBOSE=yes
+ call do_start
+ cmd=do_start
+ shift
+ is_call_implemented do_start_override
+ command -V do_start_override
+ do_start
+ is_call_implemented do_start_prepare
+ command -V do_start_prepare
+ call do_start_prepare
+ cmd=do_start_prepare
+ shift
+ is_call_implemented do_start_prepare_override
+ command -V do_start_prepare_override
+ do_start_prepare
+ do_tmpfiles courier-authdaemon
+ local type path mode user group
+ TMPFILES=/usr/lib/tmpfiles.d/courier-authdaemon.conf
+ [ -r /usr/lib/tmpfiles.d/courier-authdaemon.conf ]
+ echo file: /usr/lib/tmpfiles.d/courier-authdaemon.conf
file: /usr/lib/tmpfiles.d/courier-authdaemon.conf
+ + readcat type path mode user group age arg
 /usr/lib/tmpfiles.d/courier-authdaemon.conf
+ [ #Type = d ]
+ read type path mode user group age arg
+ [ d = d ]
+ mkdir -p /run/courier
+ chmod 0775 /run/courier
+ chown root:courier /run/courier
+ [ -x /sbin/restorecon ]
+ read type path mode user group age arg
+ [ d = d ]
+ mkdir -p /run/courier/authdaemon
+ chmod 0755 /run/courier/authdaemon
+ chown courier:courier /run/courier/authdaemon
+ [ -x /sbin/restorecon ]
+ read type path mode user group age arg
+ [ yes != no ]
+ log_daemon_msg Starting Courier authentication services authdaemond
+ [ -z Starting Courier authentication services ]
+ log_daemon_msg_pre Starting Courier authentication services authdaemond
+ log_use_fancy_output
+ TPUT=/usr/bin/tput
+ EXPR=/usr/bin/expr
+ [ -t 1 ]
+ [ xxterm != x ]
+ [ xxterm != xdumb ]
+ [ -x /usr/bin/tput ]
+ [ -x /usr/bin/expr ]
+ /usr/bin/tput hpa 60
+ /usr/bin/tput setaf 1
+ [ -z ]
+ FANCYTTY=1
+ true
+ echo -n [....]
[....] + [ -z authdaemond ]
+ echo -n Starting Courier authentication services: authdaemond
Starting Courier authentication services: authdaemond+
log_daemon_msg_post Starting Courier authentication services authdaemond
+ :
+ call do_start_cmd
+ cmd=do_start_cmd
+ shift
+ is_call_implemented do_start_cmd_override
+ command -V do_start_cmd_override
+ do_start_cmd
+ start-stop-daemon --start --quiet --pidfile /run/courier/pid --startas
/usr/sbin/authdaemond --name authdaemond --exec /usr/sbin/authdaemond --test
+ start-stop-daemon --start --quiet --pidfile /run/courier/pid --startas
/usr/sbin/authdaemond --name authdaemond --exec /usr/sbin/authdaemond --
Unknown option '-'
+ return 2
+ [ yes != no ]
+ 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 ]
+ [ xxterm != x ]
+ [ xxterm != xdumb ]
+ [ -x /usr/bin/tput ]
+ [ -x /usr/bin/expr ]
+ /usr/bin/tput hpa 60
+ /usr/bin/tput setaf 1
+ [ -z 1 ]
+ true
+ true
+ /usr/bin/tput setaf 1
+ RED=
+ /usr/bin/tput setaf 2
+ GREEN=
+ /usr/bin/tput setaf 3
+ YELLOW=
+ /usr/bin/tput op
+ NORMAL=
+ /usr/bin/tput civis
+ /usr/bin/tput sc
+ /usr/bin/tput hpa 0
+ [ 1 -eq 0 ]
+ [ 1 -eq 255 ]
+ /bin/echo -ne [FAIL
[FAIL+ /usr/bin/tput rc
+ /usr/bin/tput cnorm
+ log_use_fancy_output
+ TPUT=/usr/bin/tput
+ EXPR=/usr/bin/expr
+ [ -t 1 ]
+ [ xxterm != x ]
+ [ xxterm != xdumb ]
+ [ -x /usr/bin/tput ]
+ [ -x /usr/bin/expr ]
+ /usr/bin/tput hpa 60
+ /usr/bin/tput setaf 1
+ [ -z 1 ]
+ true
+ true
+ /usr/bin/tput setaf 1
+ RED=
+ /usr/bin/tput setaf 3
+ YELLOW=
+ /usr/bin/tput op
+ NORMAL=
+ [ 1 -eq 0 ]
+ [ 1 -eq 255 ]
+ /bin/echo -e  failed!
 failed!
+ log_end_msg_post 1
+ :
+ return 1
+ is_call_implemented do_start_cleanup
+ command -V do_start_cleanup
+ exit 0

Reply via email to