projects
/
librecmc
/
librecmc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
base-files: add a post start hook to the procd init.d api
[librecmc/librecmc.git]
/
package
/
base-files
/
files
/
etc
/
rc.common
diff --git
a/package/base-files/files/etc/rc.common
b/package/base-files/files/etc/rc.common
index aeec90c37ca5e22e64d579263a6beb9677808823..83ece4930f13c81c1ad93e613989593a3b19e3de 100755
(executable)
--- a/
package/base-files/files/etc/rc.common
+++ b/
package/base-files/files/etc/rc.common
@@
-84,11
+84,21
@@
stop_service() {
return 0
}
return 0
}
+service_triggers() {
+ return 0
+}
+
+service_running() {
+ return 0
+}
+
${INIT_TRACE:+set -x}
. "$initscript"
[ -n "$USE_PROCD" ] && {
${INIT_TRACE:+set -x}
. "$initscript"
[ -n "$USE_PROCD" ] && {
+ EXTRA_COMMANDS="${EXTRA_COMMANDS} running"
+
. $IPKG_INSTROOT/lib/functions/procd.sh
basescript=$(readlink "$initscript")
rc_procd() {
. $IPKG_INSTROOT/lib/functions/procd.sh
basescript=$(readlink "$initscript")
rc_procd() {
@@
-99,14
+109,26
@@
${INIT_TRACE:+set -x}
start() {
rc_procd start_service "$@"
start() {
rc_procd start_service "$@"
+ if eval "type service_started" 2>/dev/null >/dev/null; then
+ service_started
+ fi
}
stop() {
}
stop() {
+ stop_service "$@"
procd_kill "$(basename ${basescript:-$initscript})" "$1"
}
reload() {
procd_kill "$(basename ${basescript:-$initscript})" "$1"
}
reload() {
- start
+ if eval "type reload_service" 2>/dev/null >/dev/null; then
+ reload_service "$@"
+ else
+ restart
+ fi
+ }
+
+ running() {
+ service_running "$@"
}
}
}
}