Package: atheme-services
Version: 6.0.11-1
Severity: normal
Dear Maintainer,
The init script doesn't handle status properly. For example:
# /etc/init.d/atheme-services status
Status Atheme IRC Services: atheme-services .
pid file missing.
# cat /var/run/atheme/atheme.pid
4420
# ps -ef | grep atheme
irc 4420 1 0 17:15 ? 00:00:00 /usr/sbin/atheme-services
The problem is reasonably clear when looking at the init script:
if [ -f "$RUNDIR/atheme.pid" ]; then
( set +e
start-stop-daemon --status --quiet --pidfile
$RUNDIR/atheme.pid
ext=$?
echo "."
exit $ext
)
fi
echo "pid file missing."
exit 3
And then the sh -x output:
+ [ -f /var/run/atheme/atheme.pid ]
+ set +e
+ start-stop-daemon --status --quiet --pidfile /var/run/atheme/atheme.pid
+ ext=0
+ echo .
.
+ exit 0
+ echo pid file missing.
pid file missing.
+ exit 3
Because the block inside the if statement runs in a sub-shell, the exit in
there just exits from that sub-shell. The script then continues outside
of the if statement.
The fix would be to remove the brackets, although I'm not sure what the
original intention was.
Please note that although I'm submitting this on Ubuntu, the Debian
package is identical and the init script unchanged in the source
repository.
-- System Information:
Debian Release: wheezy/sid
APT prefers saucy-updates
APT policy: (500, 'saucy-updates'), (500, 'saucy-security'), (500, 'saucy'),
(100, 'saucy-backports')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 3.11.0-15-generic (SMP w/1 CPU core)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages atheme-services depends on:
ii libc6 2.17-93ubuntu4
ii libmowgli2 1.0.0-1
ii libssl1.0.0 1.0.1e-3ubuntu1.1
atheme-services recommends no packages.
atheme-services suggests no packages.
-- Configuration Files:
/etc/default/atheme-services changed [not included]
-- no debconf information
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]