OpenWrt/LEDE Project

  • Status New
  • Percent Complete
    0%
  • Task Type Bug Report
  • Category Base system
  • Assigned To No-one
  • Operating System All
  • Severity Very Low
  • Priority Very Low
  • Reported Version Trunk
  • Due in Version Undecided
  • Due Date Undecided
  • Private
Attached to Project: OpenWrt/LEDE Project
Opened by Stijn Tintel - 09.03.2017
Last edited by Stijn Tintel - 04.11.2021

FS#609 - procd: implement runlevel 1

Sysupgrade currently kills processes with SIGKILL if they don’t shut down within 3 seconds after the SIGTERM signal. Some processes (e.g. domoticz) can take longer than 3 seconds to properly shut down. As this can potentially corrupt the sqlite database, it should be avoided.

While talking about this on IRC, it was suggested we should implement an “init 1” equivalent in procd. Adding this ticket as a reminder.

Project Manager
Stijn Tintel commented on 24.11.2021 16:54

https://git.openwrt.org/87b583635475c56ae5b8ec89233f6f292ba09765 implements this for the sysupgrade case. I will investigate if it makes sense to add it to the shutdown/reboot case:

diff --git a/state.c b/state.c
index fb81248..bf7557f 100644
--- a/state.c
+++ b/state.c
@@ -224,6 +224,7 @@ void procd_shutdown(int event)
        if (state >= STATE_SHUTDOWN)
                return;
        DEBUG(2, "Shutting down system with event %x\n", event);
+       service_stop_all();
        reboot_event = event;
        state = STATE_SHUTDOWN;
        state_enter();

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing