Summary: | sys-apps/openrc-0.11.8 - Custom restart function won't be called | ||
---|---|---|---|
Product: | Gentoo Hosted Projects | Reporter: | Thomas Deutschmann (RETIRED) <whissi> |
Component: | OpenRC | Assignee: | OpenRC Team <openrc> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | polynomial-c |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 439098 |
Description
Thomas Deutschmann (RETIRED)
2013-08-13 10:40:04 UTC
I can confirm that. Same here. As far as I know custom restart function collides with other deps, so if you restarting a service it's deps have to stop it's deps. So current solution is to use another function 'reload' for example, see Will this solution work for you? We will try to review current state, and see how we can improve situation. OpenRc has never allowed you to override the restart function, because it stops and starts dependencies internally. However, it does allow you to change your service script's behaviour by testing against the RC_CMD variable. if [ "$RC_CMD" = "restart" ]; then # do what we need to do specially for a restart fi If you want something completely different from stop followed by start, such as sending a signal to a daemon, use a separate command function like reload. Commit b2f8ac9 clarifies the runscript man page. Thanks for the report. |