Autoupdate module
Autoupdate module description
Autoupdate module is for organization of firmware version automatic and handle updating via HTTP from URL.
By default autoupdate module works from manufacturer URL if the variable autoupdateURL is not specified!!!
autoupdateURL=http://example.com/update_list.txt
autoupdateURL - URL which should contain
Stages of the update process
- Verification environment variable autoupdate_cond, status «0» - autoupdate option, «1» - update with confirmation, «2» - autoupdate is disabled. If the variable is «0» or «1» than the necessity of update initialized.
- File reading which contain the list of all available updates which are sorted by date from old to new (the last/new record in the end).
- Date comparing from the new/last record with image making date which is specified by stb.RDir(«ImageDate») function and returns environment variable Image_Date. In case if image-making date is newest - autoupdate isn't initialized.
- If the date in file update list is newest than the date of image-making date in STB than - additive date checking initialized according to the image-making date according to the URL which is pointed in the update text file.
- If the additive update shows that update date is newest than current - checking of image type initialized. Autoupdate to alpha version isn't initialized. Autoupdate to beta version initialized in case if the option in “Settings” is enabled. This option set the environment variable «betaupdate_cond». Status «1» - «update», «0» - «don't update». By default the satus is set to «don't update».
- If the version «release» or «beta» and set option «update on beta versions» & the date is newest then image making date of current, then autoupdate is initialized.
Syntax of
[ {"name":"0.2.14-r3", "url":"http://example.com/250/imageupdate214r3", "type":"release", "date":"26 Nov 2012 23:22:19 GMT+0200", "descr":"Release"}, {"name":"0.2.14-r7", "url":"http://example.com/250/imageupdate214r7", "type":"release", "date":"30 Nov 2012 14:43:29 GMT+0200", "descr":"Release"} ]
where:
- name - name;
- url - url of firmware version;
- type - type of release;
- date - time and date of image, timezone in GMT;
- descr - description;
Disabling of Autoupdate module and control elements in user interface
services.html
/home/web/services.html
<tr> <td class="t20w pad10r tabs_center_title" id="autoUpdateHolder" align="right"></td> <td class="t18w" id="autoUpdateInputHolder"></td> </tr> <tr> <td class="t20w pad10r tabs_center_title" id="alphaUpdateHolder" align="right"></td> <td class="t18w" id="alphaUpdateInputHolder"></td> </tr>
Should be:
<tr style="display:none;"> <td class="t20w pad10r tabs_center_title" id="autoUpdateHolder" align="right"></td> <td class="t18w" id="autoUpdateInputHolder"></td> </tr> <tr style="display:none;"> <td class="t20w pad10r tabs_center_title" id="alphaUpdateHolder" align="right"></td> <td class="t18w" id="alphaUpdateInputHolder"></td> </tr>
vars.js
/home/web/vars.js
settings_objArr = new RegExp("MAG200").test(gSTB.GetDeviceModelExt())? [ [ ["languageAudiotrack"],["languageSubtitle"],["frontPanelSel"],["screenClockSel"], ["ssdelay_select"],["videoClockSel"],["autoupdateSel"],["alphaupdateSel"], ["update_button","update_button_s"] ] ]: [ [ ["languageAudiotrack"],["languageSubtitle"],["frontPanelSel"],["screenClockSel"], ["ssdelay_select"],["videoClockSel"],["autoupdateSel"],["alphaupdateSel"], ["timeShiftSettings"],["update_button","update_button_s"] ], [ ["tsOn"],["tsIco"],["tsPath"],["tsTime"],["tsEndType"],["tsExitType"],["tsLag"],["tsBack"] ] ],
Should be: remove -
settings_objArr = new RegExp("MAG200").test(gSTB.GetDeviceModelExt())? [ [ ["languageAudiotrack"],["languageSubtitle"],["frontPanelSel"],["screenClockSel"], ["ssdelay_select"],["videoClockSel"],["update_button_s"] ] ]: [ [ ["languageAudiotrack"],["languageSubtitle"],["frontPanelSel"],["screenClockSel"], ["ssdelay_select"],["videoClockSel"],["timeShiftSettings"],["update_button_s"] ], [ ["tsOn"],["tsIco"],["tsPath"],["tsTime"],["tsEndType"],["tsExitType"],["tsLag"],["tsBack"] ] ],
Set the variables
Making the image in
autoupdate_cond=2 betaupdate_cond=0