Commit Graph

30 Commits (34bbbbf9c3b39e7b2d81df590aad5cdbd00280d6)

Author SHA1 Message Date
Pierre Lebleu 832b6b8305 procd: service_data: Support data within the service itself
Use the same approach than the service_triggers for the service_data.

Signed-off-by: Pierre Lebleu <pme.lebleu@gmail.com>
7 years ago
Alexandru Ardelean c7ee30d53a base-files: fix default procd reload
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>
7 years ago
Alexandru Ardelean 6713694fe4 base-files: use restart if no reload hook for service
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>
7 years ago
Pierre Lebleu 6bb11d52f3 procd: Allow initscripts to start one daemon instance at a time
Signed-off-by: Pierre Lebleu <pierre.lebleu@technicolor.com>
8 years ago
John Crispin 4cf7929869 base-files: add a init.d option that will start the syscall tracer
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 45009
9 years ago
Felix Fietkau d288a7903d rc.common: when reloading a service using procd, fall back to calling start instead of restart
This avoids unnecessary service restarts

Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 41490
10 years ago
John Crispin 3a9bfa5938 base-files: add a post start hook to the procd init.d api
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 41344
10 years ago
John Crispin 44e2de03a4 base-files: calling stop_service before procd_kill.
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
10 years ago
Felix Fietkau c622a37101 base-files: remove duplicate stop_service() function.
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
10 years ago
John Crispin 950428fb1b base-files: add a post start hook for procd managed services
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 38024
11 years ago
John Crispin 8eb56a88a4 procd: add a small script that handles config reloads until configd is ready
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 37248
11 years ago
John Crispin 06ae364c3d base-files: run readlink on initscript name before opening services
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 37241
11 years ago
Felix Fietkau bbc6694d98 base-files: add basic procd integration, let procd start (and restart) ubus instead of having an ubus init script
SVN-Revision: 34866
12 years ago
Jo-Philipp Wich bfe966574f base-files: enable shell tracing in initscripts when INIT_TRACE is set
SVN-Revision: 32340
12 years ago
Felix Fietkau 6f46704743 base-files: split service related functions off to /lib/functions/service.sh
SVN-Revision: 31042
12 years ago
Nicolas Thill d0659ce37e package/base-files: move service* functions from /etc/rc.common to /lib/functions.sh
SVN-Revision: 28864
13 years ago
Nicolas Thill 10a03275bf package/base-files: /etc/rc.common: add service wrapper around start-stop-daemon
SVN-Revision: 28834
13 years ago
Felix Fietkau 8ff7756e82 base-files: warn when calling /etc/init.d/<script> enable and neither START nor STOP is defined
SVN-Revision: 27797
13 years ago
Felix Fietkau 5a351509aa base-files: use shutdown instead of stop when the system goes down (patch by tripolar)
SVN-Revision: 24540
14 years ago
Nicolas Thill b34bba25d2 base-files: fix shell syntax (prevent error messages when activating initscripts in IB)
SVN-Revision: 20571
14 years ago
Florian Fainelli de3a491240 simplify action handling in rc.common (#5558)
SVN-Revision: 17012
15 years ago
Nicolas Thill 7218e6326f make links to statup scripts in /etc/rc.d relative
SVN-Revision: 12659
16 years ago
Felix Fietkau e84e3a5b03 missing optional parameters for restart and boot functions
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
17 years ago
Felix Fietkau 6330c58b58 add patch from #2111
SVN-Revision: 8106
17 years ago
Mike Baker 5eb30e636d fix typo
SVN-Revision: 7170
17 years ago
Mike Baker bef40307bb START/STOP values must be specified in the init script
SVN-Revision: 7164
17 years ago
Mike Baker 291420a8f3 add K* scripts to be run at shutdown
SVN-Revision: 7163
17 years ago
Felix Fietkau 4bef6e13c2 add a workaround for self-killing init scripts on restart (#1023)
SVN-Revision: 5876
18 years ago
Felix Fietkau 9a5798e5f5 add a check to see if an init script is enabled
SVN-Revision: 5727
18 years ago
Felix Fietkau 59a06c71cb rename default/ to files/
SVN-Revision: 5622
18 years ago