Files
Bastien Curutchet 7b8892e900 package/rasdaemon: new package
Rasdaemon is a tool that aims at replacing edac-tool and provide a way
to collect all hardware error events reported by the Linux kernel in a
common framework.

This commit adds a new package to support rasdaemon in the 'Hardware
handling' section. It depends on libtraceevent to detect the ftrace
events generated by the kernel. There is currently a build issue when
sqlite isn't availaible while it's supposed to be an optional
dependency. This build issue is fixed by patch 0001 (which has been
also submitted to the rasdaemon project itself).

Support for the PCIe AER events is optionnal and implies a dependency on
pciutils so also add a dedicated 'sub-option' to enable it.

Add a SYSV init script to start / stop the daemon

Add myself to the DEVELOPERS file.

Reviewed-by: Fiona Klute <fiona.klute@gmx.de>
Signed-off-by: Bastien Curutchet <bastien.curutchet@bootlin.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2025-12-30 20:56:44 +01:00

64 lines
1.0 KiB
Bash

#!/bin/sh
#
# S95rasdaemon Starts Rasdaemon.
#
# shellcheck disable=SC2317 # functions are called via variable
DAEMON="rasdaemon"
PIDFILE="/var/run/$DAEMON.pid"
start() {
printf "Starting %s: " "$DAEMON"
if ! grep -q debugfs /proc/mounts ; then
echo "FAIL : debugfs is missing"
return 1
fi
start-stop-daemon --start --pidfile "$PIDFILE" --make-pidfile \
--background --exec "/usr/sbin/$DAEMON" -- -f
status=$?
if [ "$status" -eq 0 ]; then
echo "OK"
else
echo "FAIL"
fi
return "$status"
}
stop() {
printf "Stopping %s: " "$DAEMON"
start-stop-daemon --stop --pidfile "$PIDFILE" --exec "/usr/sbin/$DAEMON"
status=$?
if [ "$status" -eq 0 ]; then
echo "OK"
else
echo "FAIL"
return "$status"
fi
while start-stop-daemon --stop --test --quiet --pidfile "$PIDFILE" \
--exec "/sbin/$DAEMON"; do
sleep 0.1
done
rm -f "$PIDFILE"
return "$status"
}
restart() {
stop
start
}
reload() {
restart
}
case "$1" in
start|stop|reload|restart)
"$1"
;;
*)
echo "Usage: $0 {start|stop|reload|restart}"
exit 1
esac