File tree Expand file tree Collapse file tree 2 files changed +37
-1
lines changed
meta-rdk-mtk-bpir4/recipes-ccsp/util Expand file tree Collapse file tree 2 files changed +37
-1
lines changed Original file line number Diff line number Diff line change 11include recipes -ccsp /ccsp /ccsp_common_bananapi . inc
22
3+ FILESEXTRAPATHS_prepend := "${THISDIR} /${PN} :"
4+ SRC_URI += "file://SpeedReference.sh"
5+
36do_install_append () {
4- install -m 0755 ${S} / scripts / speedtest . sh ${D} /usr /ccsp /tad
7+ install -m 755 ${WORKDIR} / SpeedReference . sh ${D} /usr /ccsp /tad / speedtest . sh
58}
Original file line number Diff line number Diff line change 1+ # This script is used to enable / start the speedtest tool
2+ LOG_FILE=/rdklogs/logs/speedtest-init.log
3+
4+ log_message () {
5+ echo " $( date +" [%Y-%m-%d %H:%M:%S]" ) $1 " >> $LOG_FILE
6+ }
7+
8+ execute_speedtest () {
9+ log_message " $1 "
10+ $2
11+ }
12+
13+ log_message " Enabling / Starting speedtest..."
14+ . /etc/device.properties
15+
16+ # If Device.IP.Diagnostics.X_RDKCENTRAL-COM_SpeedTest.ClientType exists, then:
17+ # Device.IP.Diagnostics.X_RDKCENTRAL-COM_SpeedTest.ClientType = 1 implies the C client should run.
18+ ST_CLIENT_TYPE=` dmcli eRT retv Device.IP.Diagnostics.X_RDKCENTRAL-COM_SpeedTest.ClientType`
19+ server_ip=` dmcli eRT retv Device.IP.Diagnostics.X_RDKCENTRAL-COM_SpeedTest.Argument`
20+
21+ if [ " x$ST_CLIENT_TYPE " = ' x1' ]; then
22+ if [ -f /usr/bin/RefSpeedtestClient ]; then
23+ if [ ! -z " $server_ip " ]; then
24+ execute_speedtest " Executing speedtest-client-c for $Box_Type " " nice -n 19 /usr/bin/RefSpeedtestClient $server_ip "
25+ else
26+ execute_speedtest " Executing speedtest-client-c for $BOX_TYPE " " nice -n 19 /usr/bin/RefSpeedtestClient"
27+ fi
28+ else
29+ log_message " Unsupported device model"
30+ fi
31+ else
32+ log_message " Unsupported client"
33+ fi
You can’t perform that action at this time.
0 commit comments