themes: warn if booted from initramfs
[project/luci.git] / themes / luci-theme-openwrt / luasrc / view / themes / openwrt.org / header.htm
index a17f3502634082e41b1a4b9233a0fc36c92af6ea..1d95bae886b9a8db4d96e9f6e439ef29dc4590a4 100644 (file)
                        <% end %>
                </div>
                <%- end -%>
+
+               <%- if boardinfo.rootfs_type == "initramfs" then -%>
+               <div class="alert-message warning">
+                       <h4><%:System running in recovery (initramfs) mode.%></h4>
+                       <p><%:No changes to settings will be stored and are lost after rebooting. This mode should only be used to install a firmware upgrade%></p>
+                       <% if disp.lookup("admin/system/flash") then %>
+                         <div class="right"><a class="btn" href="<%=url("admin/system/flash")%>"><%:Go to firmware upgrade...%></a></div>
+                       <% end %>
+               </div>
+               <%- end -%>