blob: 8e0f8f4721d493687a42036c4f6336eb26370f20 [file] [log] [blame]
b.liud440f9f2025-04-18 10:44:31 +08001#!/bin/sh /etc/rc.common
2# Copyright (C) 2006-2011 OpenWrt.org
3
4START=15
5USE_PROCD=1
6
7#MBTK_ADB=`getprop persist.mbtk.adb 2> /dev/null`
8
9mbtk_start() {
10 echo "start : $1" > /dev/kmsg
11
12 procd_open_instance
13 procd_set_param command $@
14 procd_close_instance
15}
16
17mbtk_start_with_try() {
18 echo "start_with_try : $1" > /dev/kmsg
19
20 procd_open_instance
21 procd_set_param command $@
22 procd_set_param respawn 3600 3 0
23 procd_close_instance
24}
25
26start_service() {
27 echo "--mbtk normal boot start--" > /dev/kmsg
28# mbtk_start /bin/mbtk_test
29# mbtk_start /bin/mbtk_test "normal" 123
b.liu35419042025-06-24 15:25:00 +080030
31 # ÆôÓÃapp dump
32 DEBUG_ENABLE=`getprop persist.mbtk.appdump 2> /dev/null`
33 if [ "$DEBUG_ENABLE" == "1" ];then
34 ulimit -c unlimited
35 [ ! -d /oemdata/dump ] && mkdir -p /oemdata/dump
36 [ -f /proc/sys/kernel/core_pattern ] && echo "/oemdata/dump/coredump-%e-%s-%t" > /proc/sys/kernel/core_pattern
37 fi
b.liud440f9f2025-04-18 10:44:31 +080038
39 [ -e /bin/mbtk_adbd ] && mbtk_start /bin/mbtk_adbd
40 [ -e /bin/mbtk_servicesd ] && mbtk_start_with_try /bin/mbtk_servicesd
xy.he17a63d02025-05-27 20:19:24 +080041 [ -e /bin/mbtk_rtpd ] && mbtk_start /bin/mbtk_rtpd
b.liud440f9f2025-04-18 10:44:31 +080042
43 echo "--mbtk normal boot end--" > /dev/kmsg
44}
45