mirror of
https://github.com/troglobit/finit.git
synced 2026-11-13 17:00:16 +00:00
service: preserve explicit stop for remain tasks
A completed remain task unconditionally cleared its user stop block after running its post script. Since it was still valid in the current runlevel, it immediately started again, making initctl stop ineffective. Keep explicit stops blocked, distinguish automatic and requested restarts, and route initctl restart through teardown before rerunning the task. Cover stop, start, restart, reload, and runlevel transitions with a regression test. Signed-off-by: zhangxiaohui <xiaohui.zhang@wbstar.com>
This commit is contained in:
1 parent
530d6703f1
commit
3a18ca4a30
3 files changed
+97
-6
No files matched your search
@@ -60,6 +60,7 @@ EXTRA_DIST += pre-fail.sh
|
||||
EXTRA_DIST += process-depends.sh
|
||||
EXTRA_DIST += rclocal.sh
|
||||
EXTRA_DIST += ready-serv.sh
|
||||
EXTRA_DIST += remain-task-control.sh
|
||||
EXTRA_DIST += restart-self.sh
|
||||
EXTRA_DIST += runlevel.sh
|
||||
EXTRA_DIST += run-restart-forever.sh
|
||||
@@ -129,6 +130,7 @@ TESTS += pre-fail.sh
|
||||
TESTS += process-depends.sh
|
||||
TESTS += rclocal.sh
|
||||
TESTS += ready-serv.sh
|
||||
TESTS += remain-task-control.sh
|
||||
TESTS += restart-self.sh
|
||||
TESTS += runlevel.sh
|
||||
TESTS += sysvparts.sh
|
||||
|
||||
Reference in new issue
Block a user