Unfortunately, I the resume-option for `reportbug` didn't prompt me to
include the patch, so here goes.
--- /etc/init.d/.saned.orig	2025-11-06 18:36:59.894374039 +0100
+++ /etc/init.d/saned	2025-11-06 18:48:23.347389626 +0100
@@ -63,24 +63,7 @@
 	$0 start
 	;;
   status)
-	if [ -s /var/run/$NAME.pid ]; then
-            RUNNING=$(cat /var/run/$NAME.pid)
-            if [ -d /proc/$RUNNING ]; then
-                if [ $(readlink /proc/$RUNNING/exe) = $DAEMON ]; then
-                    log_success_msg "$NAME is running"
-                    exit 0
-                fi
-            fi
-
-            # No such PID, or executables don't match
-            log_failure_msg "$NAME is not running, but pidfile existed"
-            rm /var/run/$NAME.pid
-            exit 1
-        else
-            rm -f /var/run/$NAME.pid
-            log_failure_msg "$NAME not running"
-            exit 1
-        fi
+	status_of_proc -p "$PIDFILE" "$DAEMON" "$NAME" && exit 0 || exit $?
 	;;
   *)
 	N=/etc/init.d/$NAME

Reply via email to