aboutsummaryrefslogtreecommitdiff
path: root/package/base-files/files/etc/rc.common
Commit message (Collapse)AuthorAge
* base-files: protect stop and reload actions with procd_lockRoman Yeryomin2018-01-02
| | | | | Signed-off-by: Roman Yeryomin <roman@advem.lv> Signed-off-by: Andrejs Hanins <ahanins@gmail.com>
* base-files: rc.common: fix enable() return code and logicRoman Yeryomin2018-01-02
| | | | | | | | | | | | | | | In current state, if there is START but no STOP, enbale() will return 1 (failure), which is wrong. Moreover there is no need to check for START/STOP twice. Instead, add err variable to save success state and and return it's value. Also eliminate the need to disable() by using 'ln -sf', which will first delete the old symlink if one exists. Changes from v1: - fixed description Signed-off-by: Roman Yeryomin <roman@advem.lv>
* procd: service_data: Support data within the service itselfPierre Lebleu2017-11-10
| | | | | | Use the same approach than the service_triggers for the service_data. Signed-off-by: Pierre Lebleu <pme.lebleu@gmail.com>
* base-files: fix default procd reloadAlexandru Ardelean2017-05-20
| | | | | | | | | | | | | | | | | | Bug introduced with 6713694. I did not count on procd handling reload as mentioned in this doc: https://wiki.openwrt.org/inbox/procd-init-scripts ``` procd_set_param file /var/etc/your_service.conf # /etc/init.d/your_service reload will restart the daemon if these files have changed procd_set_param netdev dev # likewise, except if dev's ifindex changes. procd_set_param data name=value ... # likewise, except if this data changes. ``` The service would be restarted regardless of any of those params. Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
* base-files: use restart if no reload hook for serviceAlexandru Ardelean2017-04-12
| | | | | | | | | | | | | | | | | | | | | | | This was also working before, with a slightly different semantic. [ Original semantic ] If no reload hooks was implemented, the default one would kick in, it would return fail, and restart would happen. This would happen also in the case where a reload hook would be implemented, it would fail, and it would restart the service. [ New semantic ] The default reload hook calls restart. Services can implement their own reload. If reload fails, then the '/etc/init.d/<service> reload' would return a non-zero code, and the caller can choose a way to handle this. Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
* procd: Allow initscripts to start one daemon instance at a timePierre Lebleu2016-10-18
| | | | Signed-off-by: Pierre Lebleu <pierre.lebleu@technicolor.com>
* base-files: add a init.d option that will start the syscall tracerJohn Crispin2015-03-26
| | | | | | Signed-off-by: John Crispin <blogic@openwrt.org> SVN-Revision: 45009
* rc.common: when reloading a service using procd, fall back to calling start ↵Felix Fietkau2014-07-03
| | | | | | | | | | instead of restart This avoids unnecessary service restarts Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 41490
* base-files: add a post start hook to the procd init.d apiJohn Crispin2014-06-26
| | | | | | Signed-off-by: John Crispin <blogic@openwrt.org> SVN-Revision: 41344
* base-files: calling stop_service before procd_kill.John Crispin2014-06-02
| | | | | | | | | | | | Before this patch, doing `/e/c/network restart' will emit the folloing error by `ubus network.wireless down "{}"' because netifd already quit by that time. Command failed: not found Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com> SVN-Revision: 40906
* base-files: remove duplicate stop_service() function.Felix Fietkau2014-04-27
| | | | | | | | | It was introduced in commit 2f966e8, "base-files: add a post start hook for procd managed services". Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com> SVN-Revision: 40576
* base-files: add a post start hook for procd managed servicesJohn Crispin2013-09-17
| | | | | | Signed-off-by: John Crispin <blogic@openwrt.org> SVN-Revision: 38024
* procd: add a small script that handles config reloads until configd is readyJohn Crispin2013-07-11
| | | | | | Signed-off-by: John Crispin <blogic@openwrt.org> SVN-Revision: 37248
* base-files: run readlink on initscript name before opening servicesJohn Crispin2013-07-11
| | | | | | Signed-off-by: John Crispin <blogic@openwrt.org> SVN-Revision: 37241
* base-files: add basic procd integration, let procd start (and restart) ubus ↵Felix Fietkau2012-12-22
| | | | | | instead of having an ubus init script SVN-Revision: 34866
* base-files: enable shell tracing in initscripts when INIT_TRACE is setJo-Philipp Wich2012-06-13
| | | | SVN-Revision: 32340
* base-files: split service related functions off to /lib/functions/service.shFelix Fietkau2012-03-20
| | | | SVN-Revision: 31042
* package/base-files: move service* functions from /etc/rc.common to ↵Nicolas Thill2011-11-08
| | | | | | /lib/functions.sh SVN-Revision: 28864
* package/base-files: /etc/rc.common: add service wrapper around start-stop-daemonNicolas Thill2011-11-07
| | | | SVN-Revision: 28834
* base-files: warn when calling /etc/init.d/<script> enable and neither START ↵Felix Fietkau2011-07-27
| | | | | | nor STOP is defined SVN-Revision: 27797
* base-files: use shutdown instead of stop when the system goes down (patch by ↵Felix Fietkau2010-12-13
| | | | | | tripolar) SVN-Revision: 24540
* base-files: fix shell syntax (prevent error messages when activating ↵Nicolas Thill2010-03-29
| | | | | | initscripts in IB) SVN-Revision: 20571
* simplify action handling in rc.common (#5558)Florian Fainelli2009-07-26
| | | | SVN-Revision: 17012
* make links to statup scripts in /etc/rc.d relativeNicolas Thill2008-09-23
| | | | SVN-Revision: 12659
* missing optional parameters for restart and boot functionsFelix Fietkau2008-01-25
| | | | | | | | | | Add missing optional parameters in remaining rc functions. It fixes my previous implementation of parametrized rc functions [8106], ticket #3063, thanks argovela-at-yahoo-com for reporting. Signed-off-by: Lubos Stanek (lubek) <lubek@lubek.name> SVN-Revision: 10245
* add patch from #2111Felix Fietkau2007-07-22
| | | | SVN-Revision: 8106
* fix typoMike Baker2007-05-10
| | | | SVN-Revision: 7170
* START/STOP values must be specified in the init scriptMike Baker2007-05-10
| | | | SVN-Revision: 7164
* add K* scripts to be run at shutdownMike Baker2007-05-10
| | | | SVN-Revision: 7163
* add a workaround for self-killing init scripts on restart (#1023)Felix Fietkau2006-12-20
| | | | SVN-Revision: 5876
* add a check to see if an init script is enabledFelix Fietkau2006-12-08
| | | | SVN-Revision: 5727
* rename default/ to files/Felix Fietkau2006-11-22
SVN-Revision: 5622