Attention! Beginning from firmware version 0.2.18 all customizations of embedded portal is necessary to make using source codes of portal. After all customizations complete it is necessary to make compiling and minimization of source code of portal. After compiling and minization all files of portal could be placed in home directory for further image making. Source code of portal (portal-dev-*.tgz is in directory with current release http://soft.infomir.com.ua)
/home/web/
directory/test.sh
#language - language index (int)
, ti is necessary to add in empty row below: source /environment.check.sh
checkEnvVars(); uncomment this function to start environment variables check mechanism
Example of test.sh file (there is only part of file):
#!/bin/sh #ipaddr_conf - ...................... IP #netmask - .............. .......... #gatewayip - GateWay (........) #dnsip - DNS #ntpurl - NTP url #mcip_conf - bootstrap IP #mcport_conf - bootstrap Port #mcip_img_conf - image IP #mcip_port_conf - image Port #portal1 - url .............. 1 #portal2 - url .............. 2 #volume - .................. (int) #language - ............ .......... (int) source /environment.check.sh # . /etc/stb_params PORTAL_1=`fw_printenv portal1 2>/dev/null` PORTAL_1=${PORTAL_1#portal1=} PORTAL_2=`fw_printenv portal2 2>/dev/null` PORTAL_2=${PORTAL_2#portal2=} PORTAL_TMP=`cat /ram/dhcp_ready | grep "portal_dhcp="` PORTAL_TMP=${PORTAL_TMP%%#*} PORTAL_TMP=${PORTAL_TMP#portal_dhcp=}
Example of services.js file (there is only part of file):
/** * Main page load handler */ window.onload = function () { echo('******** STB STARTED ********'); checkEnvVars(); // uncomment this function to start environment variables check mechanism try { environment = loadEnvironmentVars(null); //stbWindowMgr.setVirtualKeyboardImplUrl(PATH_SYSTEM + 'keyboard/index.html'); gSTB.ShowVirtualKeyboard(true); // load localization
In directory with source portal version /system/variables/
there is file readme.md
with description of work and settings configuration of environment variables checking. Archive with source portal version portal-dev-*.tgz
is located in directory with release version http://soft.infomir.com.ua/<MODEL>/release/
To enable checking of environment variable:
/system/variables/on/
to /system/variables/
;/system/variables/vars.ini
;; env data file ; Please read instructions in the readme.md file language=en timezone_conf=Europe/Kiev update_url=http://10.1.1.1/stb/imageupdate autoupdateURL=http://10.1.1.1/stb/update_list.txt autoupdate_cond=0 portal1=http://10.1.1.1/stalker_portal/c/ portal2=
rootfs
directory there is test.sh
. In this file it is necessary remove comment from string # . /home/web/system/variables/check.sh
.