Skip navigation


Starting from STB software version 0.2.18 all customizations of the Embedded portal are necessary to make using the source code of the portal. After all customizations complete, it is necessary to make compiling and minimization of the source code of the portal. After compiling and minimization, all files of the portal could be placed in the home directory for further image-making. Source code of the portal (portal-dev-*.tgz is in a directory with current release http://soft.infomir.com)

For version 2.20 and higher

In the directory with the original version of the portal in /system/variables/ there is a file readme.md with a description of the work and settings of the variable checking feature. An archive with the original version of portal portal-dev-*.tgz is located in the directory with the release at http://soft.infomir.com/<model>/release/ where <model> - base model of STB (mag254, mag256, mag322, etc.)

To enable 'variable checking' feature, you need:

  • Copy all files from the folder /system/variables/on/ в /system/variables/ ;

  • Put the necessary variables in the /system/variables/vars.ini file;

  Example of vars.ini file:
; 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=

To ensure the correct operation of the 'checking variables' feature, previous portal compiling is required!

For version 0.2.18-r4 and higher

In the directory with the original version of the portal in /system/variables/ there is a file readme.md with a description of the work and settings of the variable checking function. Archive with the original version of portal portal-dev-*.tgz is in the catalog with the release at http://soft.infomir.com/<model>/release/ where <model> - base model of STB (mag254, mag256, mag322, etc.)

To enable the variable checking function, you need:

  • Copy all files from the folder /system/variables/on/ в /system/variables/ ;

  • Put the necessary variables in the /system/variables/vars.ini file;

  Example of vars.ini file:
; 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=
  • In the root file system rootfs , in the root directory, in the file test.sh remove comment from line # . /home/web/system/variables/check.sh .

For version 0.2.18-r3

If the variables differ then it is necessary to set the correct variables. 

environment.check (zip)

  • environment.ini - put in the catalog

/home/web/

  • environment.check.sh - put in the root directory of rootfs next to the file

/test.sh

  • test.sh - after the line

#language - индекс языка (int)

, in the empty line below add: source /environment.check.sh

  • /home/web/public/portal/services.js - remove the comment with the following line:

checkEnvVars(); uncomment this function to start environment variables check mechanism

  Example of the file test.sh (in the example, the part of the file is specified):
#!/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 the services.js file (the example shows the part of the 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
Need Help

Dave is an expert on the MAG STB and the author of this article.

Was this article helpful?

Yes No

Sorry to hear that.
How can we improve this article?

We use cookies in order to optimise our website, provide you with the best possible user experience and help us promote our products. Please read our Cookie Policy to find out how we use cookies and how you can control cookies.
By using this website or closing this message, you acknowledge our Privacy Policy and agree to our use of cookies as described in our Cookie Policy.