<div dir="ltr">Update to the latest code. This issue was fixed late last week.</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Mar 7, 2017 at 11:25 AM, Marc Priebee <span dir="ltr"><<a href="mailto:Marc.Priebee@spark.co.nz" target="_blank">Marc.Priebee@spark.co.nz</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div lang="EN-NZ" link="#0563C1" vlink="#954F72">
<div class="m_7566777309715401222WordSection1">
<p class="MsoNormal">Hi,<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">I’m trying to set up a provision script to run only on bootstrap. This works fine, if there is no entry for the in the genie DB.<u></u><u></u></p>
<p class="MsoNormal">How-ever, the second time we receive a bootstrap for the same device, the provision script runs, but genie does not set any device parameters. I presume this is because the values in the DB are the same as the values I want to set.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">So I tried adding a clear("InternetGatewayDevice", Date.now()); statement as per the documentation. The next time we receive
<u></u><u></u></p>
<p class="MsoNormal">a bootstrap, I get an error..<u></u><u></u></p>
<p class="MsoNormal">Channel has faulted; channel="default" retries=0 faultCode="script.<wbr>ReferenceError" faultMessage="maxRevision is not defined"<u></u><u></u></p>
<p class="MsoNormal">And subsequent bootstraps the provision does not run at all<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">My provision script looks like this;<u></u><u></u></p>
<p class="MsoNormal">let serial = declare("<wbr>InternetGatewayDevice.<wbr>DeviceInfo.SerialNumber", {value: 1});<u></u><u></u></p>
<p class="MsoNormal">log("provision with "+serial.value[0]);<u></u><u></u></p>
<p class="MsoNormal">let resp = ext("testext", "getSIP", serial.value[0]);<u></u><u></u></p>
<p class="MsoNormal">log("provision back from extension with "+resp.username);<u></u><u></u></p>
<p class="MsoNormal">clear("InternetGatewayDevice", Date.now());<u></u><u></u></p>
<p class="MsoNormal">declare("<wbr>InternetGatewayDevice.<wbr>ManagementServer.Username", null,<u></u><u></u></p>
<p class="MsoNormal">  {value: resp.username});<u></u><u></u></p>
<p class="MsoNormal">declare("<wbr>InternetGatewayDevice.<wbr>ManagementServer.Password", null,<u></u><u></u></p>
<p class="MsoNormal">  {value: resp.password});<u></u><u></u></p>
<p class="MsoNormal">declare("<wbr>InternetGatewayDevice.<wbr>ManagementServer.<wbr>PeriodicInformEnable", null,<u></u><u></u></p>
<p class="MsoNormal">  {value: true});<u></u><u></u></p>
<p class="MsoNormal">declare("<wbr>InternetGatewayDevice.<wbr>ManagementServer.<wbr>PeriodicInformInterval", null,<u></u><u></u></p>
<p class="MsoNormal">  {value: 300});<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Marc<u></u><u></u></p>
</div>
<br>
<p style="font-size:8pt;line-height:10pt;font-family:'Arial',serif;color:#696969">
This communication, including any attachments, is confidential. If you are not the intended recipient, you should not read it - please contact me immediately, destroy it, and do not copy or use any part of this communication or disclose anything about it. Thank
 you. Please note that this communication does not designate an information system for the purposes of the Electronic Transactions Act 2002.</p>
<br>
</div>

<br>______________________________<wbr>_________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.genieacs.com">Users@lists.genieacs.com</a><br>
<a href="http://lists.genieacs.com/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.genieacs.com/<wbr>mailman/listinfo/users</a><br>
<br></blockquote></div><br></div>