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 |
| 30 | |
| 31 | [ -e /bin/mbtk_adbd ] && mbtk_start /bin/mbtk_adbd |
| 32 | [ -e /bin/mbtk_servicesd ] && mbtk_start_with_try /bin/mbtk_servicesd |
| 33 | |
| 34 | echo "--mbtk normal boot end--" > /dev/kmsg |
| 35 | } |
| 36 | |