Bug#524910: [Pkg-acpi-devel] Bug#524910: Bug#524910: acpid: init.d script returns 1 even in case of success
On Tue, Apr 21, 2009 at 02:19:33PM +0200, Jan Kriho wrote: I believe it is caused by function log_end_msg in script /lib/lsb/init- functions, which is called last in /etc/init.d/acpid script (See bug #524823) Not really, log_end_msg just returns its parameter. Given that it is called with $? this means that the command right in front of it returns 1. The command in question is start-stop-daemon. Yes, it's quite likely that start-stop-daemon is throwing 1 but why? What's going wrong? According to the manpage start-stop-daemon only returns 1 if --oknodo was not given. But --oknodo is given. You might get more information by removing --quiet and adding --verbose to the start-stop-daemon calls in /etc/init.d/acpid. Michael -- Michael Meskes Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org) Michael at BorussiaFan dot De, Meskes at (Debian|Postgresql) dot Org ICQ: 179140304, AIM/Yahoo: michaelmeskes, Jabber: mes...@jabber.org Go VfL Borussia! Go SF 49ers! Use Debian GNU/Linux! Use PostgreSQL! -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#524910: [Pkg-acpi-devel] Bug#524910: Bug#524910: acpid: init.d script returns 1 even in case of success
On Tuesday 21 April 2009 15:05:06 Michael Meskes wrote: Not really, log_end_msg just returns its parameter. Given that it is called with $? this means that the command right in front of it returns 1. The command in question is start-stop-daemon. Yes, it's quite likely that start-stop-daemon is throwing 1 but why? What's going wrong? My experiments has proven otherwise: # . /lib/lsb/init-functions; log_end_msg 0; echo $?; ...done. 1 Including log_end_msg function: log_end_msg () { # If no arguments were passed, return if [ -z ${1:-} ]; then return 1 fi retval=$1 log_end_msg_pre $@ # Only do the fancy stuff if we have an appropriate terminal # and if /usr is already mounted if log_use_fancy_output; then RED=`$TPUT setaf 1` YELLOW=`$TPUT setaf 3` NORMAL=`$TPUT op` else RED='' YELLOW='' NORMAL='' fi if [ $1 -eq 0 ]; then echo . elif [ $1 -eq 255 ]; then /bin/echo -e ${YELLOW}(warning).${NORMAL} else /bin/echo -e ${RED}failed!${NORMAL} fi log_end_msg_post $@ return $retval } -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org