aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2014-06-02 12:43:10 +0000
committerJohn Crispin <blogic@openwrt.org>2014-06-02 12:43:10 +0000
commit837c7dfb3611bbb823f5fc085882fe4eb85ebcdd (patch)
tree4cc128833bcc334dbafdc84bd963d4518c1498d5 /package/base-files
parent8a723aceb1afa7ed96504cfc370888ce780f0cb4 (diff)
downloadupstream-837c7dfb3611bbb823f5fc085882fe4eb85ebcdd.tar.gz
upstream-837c7dfb3611bbb823f5fc085882fe4eb85ebcdd.tar.bz2
upstream-837c7dfb3611bbb823f5fc085882fe4eb85ebcdd.zip
base-files: remove function service_kill
Function service_kill is deprecated and has no user, so remove it. Signed-off-by: Zhao, Gang <gamerh2o@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@40912 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/base-files')
-rw-r--r--package/base-files/files/lib/functions/service.sh23
1 files changed, 0 insertions, 23 deletions
diff --git a/package/base-files/files/lib/functions/service.sh b/package/base-files/files/lib/functions/service.sh
index d352a441cc..3d08e1434d 100644
--- a/package/base-files/files/lib/functions/service.sh
+++ b/package/base-files/files/lib/functions/service.sh
@@ -101,26 +101,3 @@ service_stop() {
service_reload() {
SERVICE_SIG="${SERVICE_SIG:-$SERVICE_SIG_RELOAD}" service -K "$@"
}
-
-service_kill() {
- cat 1>&2 << __END_OF_WARNING__
-#
-# WARNING: the 'service_kill' function is now deprecated and might be
-# removed soon. Consider using the other new service_* wrappers instead.
-#
-__END_OF_WARNING__
- local name="${1}"
- local pid="${2:-$(pidof "$name")}"
- local grace="${3:-5}"
-
- [ -f "$pid" ] && pid="$(head -n1 "$pid" 2>/dev/null)"
-
- for pid in $pid; do
- [ -d "/proc/$pid" ] || continue
- local try=0
- kill -TERM $pid 2>/dev/null && \
- while grep -qs "$name" "/proc/$pid/cmdline" && [ $((try++)) -lt $grace ]; do sleep 1; done
- kill -KILL $pid 2>/dev/null && \
- while grep -qs "$name" "/proc/$pid/cmdline"; do sleep 1; done
- done
-}