From 2a5c319084e5dcfa51a8eca078d18398a2486956 Mon Sep 17 00:00:00 2001 From: Jack Newman Date: Fri, 6 Jan 2023 10:27:14 +1000 Subject: [PATCH] Fix shutdown hooks not running sig.c was calling plugin_run_hooks for the shutdown hooks, but the shutdown hooks do not have registered callbacks in hook-scripts.c Instead directly call plugin_script_run() --- src/sig.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sig.c b/src/sig.c index 383d3142..beb3d057 100644 --- a/src/sig.c +++ b/src/sig.c @@ -330,7 +330,7 @@ void do_shutdown(shutop_t op) ; /* All services and (non-critical) processes have stopped. */ - plugin_run_hooks(HOOK_SVC_DN); + plugin_script_run(HOOK_SVC_DN); if (in_cont) { if (osheading) @@ -380,7 +380,7 @@ void do_shutdown(shutop_t op) /* Last chance to run scripts (all .so plugins have exited already) */ print(0, "Calling hook/svc/down scripts ..."); - plugin_run_hooks(HOOK_SYS_DN); + plugin_script_run(HOOK_SYS_DN); /* Reboot via watchdog or kernel, or shutdown? */ if (op == SHUT_REBOOT) {