Your message dated Fri, 30 Mar 2018 11:43:57 +0300
with message-id <[email protected]>
and subject line stunnel4: init script missing lsb-required status target
has caused the Debian Bug report #750943,
regarding stunnel4: init script missing lsb-required status target
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
750943: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=750943
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: stunnel4
Version: 3:4.53-1.1
Severity: serious
Tags: upstream patch
Justification: Policy 9.3
The stunnel4 init script is missing 'status' support. This makes it impossible
to
programatically tell whether stunnel4 is properly running. This makes stunnel4
unusable in high-availability environments running heartbeat/corosync, which
rely
on init script status output to determine whether a service is running.
The 'status' target is also required by LSB, and Debian uses LSB init scripts.
There is an open issue to modify the Policy Manual to require 'status' target
support. See:
https://wiki.debian.org/LSBInitScripts
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=291148
https://wiki.debian.org/LSBInitScripts/StatusSupport
The following patch adds status target support to the init script. It returns 0
if
all tunnels defined in /etc/stunnel/*.conf are running, and 3 if any of them
are not:
--- ../../stunnel4-4.35/tools/stunnel.init.in 2011-10-26 02:47:44.000000000
+0000
+++ stunnel.init.in 2011-10-26 15:56:01.068060682 +0000
@@ -91,6 +91,26 @@
killdaemons
echo "$NAME."
;;
+ status)
+ FILECOUNT=0
+ RUNCOUNT=0
+ for file in $FILES; do
+ FILECOUNT=$((FILECOUNT+1))
+ PID=`get_pids $file`
+ if [ -n "$PID" ]; then
+ ps aux | awk '{print $2}' | grep -q $PID &&
RUNCOUNT=$((RUNCOUNT+1)) && echo " + $file: running"
+ else
+ echo " + $file: not running"
+ fi
+ done
+ if [ "$FILECOUNT" -gt 0 ] && [ "$RUNCOUNT" -eq "$FILECOUNT" ]; then
+ echo "stunnel4 is running"
+ exit 0
+ else
+ echo "stunnel4 is not running"
+ exit 3
+ fi
+ ;;
reopen-logs)
echo -n "Reopening log files $DESC: "
killdaemons USR1
@@ -110,7 +130,7 @@
;;
*)
N=/etc/init.d/$NAME
- echo "Usage: $N {start|stop|reload|reopen-logs|restart}" >&2
+ echo "Usage: $N {start|stop|status|reload|reopen-logs|restart}" >&2
exit 1
;;
esac
-- System Information:
Debian Release: 7.1
APT prefers stable
APT policy: (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 3.2.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
--- End Message ---
--- Begin Message ---
Hi,
This bug seems to have been fixed in the stunnel4 packages in
all the relevant Debian versions: unstable, testing, stable, and
even oldstable.
Thanks for reporting it, and thanks for your help in testing the fix!
Best regards,
Peter
--
Peter Pentchev [email protected] [email protected] [email protected]
PGP key: http://people.FreeBSD.org/~roam/roam.key.asc
Key fingerprint 2EE7 A7A5 17FC 124C F115 C354 651E EFB0 2527 DF13
signature.asc
Description: PGP signature
--- End Message ---