b.liu | d440f9f | 2025-04-18 10:44:31 +0800 | [diff] [blame] | 1 | #!/bin/sh /etc/rc.common |
| 2 | # Copyright (C) 2006-2011 OpenWrt.org |
| 3 | |
| 4 | START=15 |
| 5 | USE_PROCD=1 |
| 6 | |
| 7 | #MBTK_ADB=`getprop persist.mbtk.adb 2> /dev/null` |
| 8 | |
| 9 | mbtk_start() { |
| 10 | echo "start : $1" > /dev/kmsg |
| 11 | |
| 12 | procd_open_instance |
| 13 | procd_set_param command $@ |
| 14 | procd_close_instance |
| 15 | } |
| 16 | |
| 17 | mbtk_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 | |
| 26 | start_service() { |
| 27 | echo "--mbtk normal boot start--" > /dev/kmsg |
| 28 | # mbtk_start /bin/mbtk_test |
| 29 | # mbtk_start /bin/mbtk_test "normal" 123 |
b.liu | 3541904 | 2025-06-24 15:25:00 +0800 | [diff] [blame] | 30 | |
| 31 | # ÆôÓÃapp dump |
| 32 | DEBUG_ENABLE=`getprop persist.mbtk.appdump 2> /dev/null` |
| 33 | if [ "$DEBUG_ENABLE" == "1" ];then |
| 34 | ulimit -c unlimited |
b.liu | f349f8c | 2025-06-24 17:31:18 +0800 | [diff] [blame^] | 35 | [ ! -d /media/var/log/modem_dump ] && mkdir -p /media/var/log/modem_dump |
| 36 | [ -f /proc/sys/kernel/core_pattern ] && echo "/media/var/log/modem_dump/coredump-%e-%s-%t" > /proc/sys/kernel/core_pattern |
b.liu | 3541904 | 2025-06-24 15:25:00 +0800 | [diff] [blame] | 37 | fi |
b.liu | d440f9f | 2025-04-18 10:44:31 +0800 | [diff] [blame] | 38 | |
| 39 | [ -e /bin/mbtk_adbd ] && mbtk_start /bin/mbtk_adbd |
| 40 | [ -e /bin/mbtk_servicesd ] && mbtk_start_with_try /bin/mbtk_servicesd |
xy.he | 17a63d0 | 2025-05-27 20:19:24 +0800 | [diff] [blame] | 41 | [ -e /bin/mbtk_rtpd ] && mbtk_start /bin/mbtk_rtpd |
b.liu | d440f9f | 2025-04-18 10:44:31 +0800 | [diff] [blame] | 42 | |
| 43 | echo "--mbtk normal boot end--" > /dev/kmsg |
| 44 | } |
| 45 | |