<p>This adds a patch which gets applied to applyreboot.htm, the file that actually does the javascript redirect after a sysupgrade process. The patch does two things: one, it modifies the redirect path to be 'thisnode' in cases where settings aren't saved during a reflash, whereas with the default version it is '192.168.1.1.' Two, it increases the interval at which the page checks to see if the node is back up to 15 seconds instead of 5. The first interval was too short, as with SSL and the other stuff we're running, uhttpd hasn't even shut down within 5 seconds, so it redirects immediately and then breaks. 10 seconds seems just enough (uhttpd shut down in tests in about 8 seconds), but I increased it to 15 to allow time for slower or more overloaded devices.</p>

<p>This should fix the issue seen in <a href="https://github.com/opentechinstitute/commotion-router/issues/112" class="issue-link" title='Updating from 1.0 to 1.1 with "Keep settings" throws non-fatal dispatcher error'>opentechinstitute/commotion-router#112</a></p>

<p>To test:<br>
1. Run a sysupgrade through the LuCI interface on a configured node. Either keep or don't keep settings.<br>
2. You should see the redirect page until after the flashing process is complete and the node has rebooted. Some short time after the node has finished booting up, you should automatically be redirected to its front page.</p>

<hr>

<h4>You can merge this Pull Request by running</h4>
<pre>  git pull https://github.com/opentechinstitute/luci-commotion applyreboot</pre>
<p>Or view, comment on, or merge it at:</p>
<p>  <a href='https://github.com/opentechinstitute/luci-commotion/pull/196'>https://github.com/opentechinstitute/luci-commotion/pull/196</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>Added patch for modifying applyreboot.htm in order to make post-sysupgrade redirect function properly.</li>
  <li>Improve the applyreboot.htm patch to only use the thisnode alias in the event that settings aren't saved during flashing.</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/opentechinstitute/luci-commotion/pull/196/files#diff-0">files/etc/uci-defaults/luci-mod-commotion</a>
    (3)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/opentechinstitute/luci-commotion/pull/196/files#diff-1">files/usr/share/commotion/patches/applyreboot.htm.patch</a>
    (17)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/opentechinstitute/luci-commotion/pull/196.patch'>https://github.com/opentechinstitute/luci-commotion/pull/196.patch</a></li>
  <li><a href='https://github.com/opentechinstitute/luci-commotion/pull/196.diff'>https://github.com/opentechinstitute/luci-commotion/pull/196.diff</a></li>
</ul>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br>Reply to this email directly or <a href='https://github.com/opentechinstitute/luci-commotion/pull/196'>view it on GitHub</a>.<img src='https://github.com/notifications/beacon/3074564__eyJzY29wZSI6Ik5ld3NpZXM6QmVhY29uIiwiZXhwaXJlcyI6MTcwOTgzODgzNCwiZGF0YSI6eyJpZCI6MjcyMTM2MTd9fQ==--7073a09172a896bd797c7bf1e41fb1219bda15e4.gif' height='1' width='1'></p>