diff --git a/debian/changelog b/debian/changelog index e7a934a..9c51328 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +wlanpi-fpms (1.4.4-1) UNRELEASED; urgency=medium + + * Improves reboot/shutdown detection by making signal handlers even more specific + + -- Adrian Granados Sun, 06 Oct 2024 09:15:51 -0500 + wlanpi-fpms (1.4.4) unstable; urgency=medium * Fixes "Reboot in progress" message shown when not rebooting diff --git a/fpms/fpms.py b/fpms/fpms.py index fc0ebf7..3c4bba2 100755 --- a/fpms/fpms.py +++ b/fpms/fpms.py @@ -135,9 +135,9 @@ def handle_prepare_for_shutdown(arg): handle_reboot_or_shutdown() -# Handler for UnitNew signal -def handle_unitnew(*args): - log_to_syslog("UnitNew signal received") +# Handler for JobNew signal +def handle_jobnew(*args): + log_to_syslog("JobNew signal received") for arg in args: if isinstance(arg, str): if ("reboot.target" in arg): @@ -169,12 +169,12 @@ def run_dbus_loop(): path="/org/freedesktop/login1" ) - # Add a signal receiver for UnitNew signal from systemd1.Manager + # Add a signal receiver for JobNew signal from systemd1.Manager # Handles (legacy) reboot bus.add_signal_receiver( - handle_unitnew, + handle_jobnew, dbus_interface="org.freedesktop.systemd1.Manager", - signal_name="UnitNew" + signal_name="JobNew" ) log_to_syslog(f"event handlers added")