aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2013-09-17 21:45:34 +0000
committerJohn Crispin <blogic@openwrt.org>2013-09-17 21:45:34 +0000
commitdb85247aba412b1fd5d48faa50e5735d2eed79a8 (patch)
tree0a0ea715daa453fbfe9b0cf9000f18cc72575e9a /package/base-files
parentd330d9fac452b6b37ded7541c381ca58ef7a4bc8 (diff)
downloadupstream-db85247aba412b1fd5d48faa50e5735d2eed79a8.tar.gz
upstream-db85247aba412b1fd5d48faa50e5735d2eed79a8.tar.bz2
upstream-db85247aba412b1fd5d48faa50e5735d2eed79a8.zip
base-files: add a post start hook for procd managed services
Signed-off-by: John Crispin <blogic@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@38024 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/base-files')
-rwxr-xr-xpackage/base-files/files/etc/rc.common21
1 files changed, 20 insertions, 1 deletions
diff --git a/package/base-files/files/etc/rc.common b/package/base-files/files/etc/rc.common
index 22111895db..1984db9c98 100755
--- a/package/base-files/files/etc/rc.common
+++ b/package/base-files/files/etc/rc.common
@@ -80,10 +80,18 @@ start_service() {
return 0
}
+stop_service() {
+ return 0
+}
+
service_triggers() {
return 0
}
+service_running() {
+ return 0
+}
+
stop_service() {
return 0
}
@@ -93,6 +101,8 @@ ${INIT_TRACE:+set -x}
. "$initscript"
[ -n "$USE_PROCD" ] && {
+ EXTRA_COMMANDS="${EXTRA_COMMANDS} running"
+
. $IPKG_INSTROOT/lib/functions/procd.sh
basescript=$(readlink "$initscript")
rc_procd() {
@@ -107,10 +117,19 @@ ${INIT_TRACE:+set -x}
stop() {
procd_kill "$(basename ${basescript:-$initscript})" "$1"
+ stop_service "$@"
}
reload() {
- start
+ if eval "type reload_service" 2>/dev/null >/dev/null; then
+ reload_service "$@"
+ else
+ restart
+ fi
+ }
+
+ running() {
+ service_running "$@"
}
}