blob: fe3afc8943b786619756d7ded46b645c85e058b0 [file] [log] [blame]
#!/bin/sh /etc/rc.common
START=42
USE_PROCD=1
PATH_BIN=/bin/
PATH_UBIN=/usr/bin/
PATH_CURR=
start_instance() {
local respawn="$1"
local name="$2"
local path="$3$2"
local param="$4"
procd_open_instance "$name"
if [ -n "$param" ]; then
procd_set_param command "$path" "$param"
else
procd_set_param command "$path"
fi
if [ $respawn == 1 ]; then
procd_set_param respawn
fi
procd_close_instance
}
start_service() {
echo "Start Marvell Service Applications"
HAWK=`uci get cmdline.HAWK 2> /dev/null`
PIPE=`uci get cmdline.PIPE 2> /dev/null`
if [ "$PIPE" == "1" ]; then
local lan_auto=`uci get network.lan.auto 2> /dev/null`
if [ "$lan_auto" == "0" ]; then
uci set network.lan.auto=1
uci commit network
/etc/init.d/network reload
fi
fi
# start_instance 0 "chl" "${PATH_UBIN}"
start_instance 0 "stk" "${PATH_UBIN}"
start_instance 0 "traf_m" "${PATH_UBIN}"
start_instance 0 "traf_s" "${PATH_UBIN}"
start_instance 0 "router" "${PATH_UBIN}"
start_instance 0 "aoc" "${PATH_UBIN}"
start_instance 0 "ota" "${PATH_UBIN}" "ota"
start_instance 0 "tr069" "${PATH_UBIN}"
start_instance 0 "ctcc_dm_http" "${PATH_UBIN}"
start_instance 0 "ctcc_dm_sms" "${PATH_UBIN}"
if [ "$HAWK" == "1" ]; then
start_instance 0 "hawk" "${PATH_BIN}" -p
fi
#edit for mbtk
if [ -f /etc/init.d/mbtk_platform_version ]
then
echo "--mbtk platform version--" > /dev/kmsg
else
[ -e /sys/devices/platform/asr-gps* ] && {
start_instance 0 "gnss_demo" "${PATH_BIN}"
}
fi
}