Questions about provisions

Oliver Kraitschy oliver at okraits.de
Fri Mar 31 08:26:01 EDT 2017


Hello Zaid,

thank you for your answer. That got me started.

Nevertheless, I'd like to select a file based on the version, not on the
filename. Is that possible? I tried to trigger a download by version 
with:

declare("Downloads.[FileType:1 Firmware Upgrade Image]",
         {path: 1}, {path: 1});
declare("Downloads.[FileType:1 Firmware Upgrade Image].Version",
         {value: 1}, {value: "1.3"});
declare("Downloads.[FileType:1 Firmware Upgrade Image].Download",
         {value: 1}, {value: Date.now()});

But that didn't work. And looking at default-provisions.js I thought 
that
it could be that it's not implemented yet.

Greetings,
Oliver

Am 29.03.2017 22:37, schrieb Zaid Abdulla:
> On Tue, 2017-03-28 at 16:33 +0200, Oliver Kraitschy wrote:
>> 1. How do I trigger a (firmware) download task in a provisioning
>> script? It's not explained in the wiki. Additionally, I'd like to
>> trigger a download task only if a device hasn't got the newest
>> firmware version yet.
>> 
>> 2. Can I trigger a download task first and then set device
>> parameters 
>> afterwards, after the device is up again, all in one provisioning 
>> script?
> 
> https://www.mail-archive.com/users@lists.genieacs.com/msg01079.html
> 
> Under Downloads.* there's a read-only parameter "LastDownload" (among
> others). You can use that parameter to know the last successful
> download and based on that you can decide whether to set the parameters
> or skip that until a later session.
> 
>> 3. What is the best practice to set device-specific parameters in
>> v1.1 (for example DSL credentials, which are unique for each device)?
>> Is the best practice still to get the data from an external system?
>> If yes, then I guess by querying the external system from an
>> extension which is called from a provisioning script, I guess?
> 
> Yes. See the example extension in the config directory and in the wiki.



More information about the Users mailing list