themes: warn if booted from initramfs
[project/luci.git] / themes / luci-theme-material / luasrc / view / themes / material / header.htm
index 2b890da034662781a9e97ddb393939b5f617c8d6..a81991d0a04e4927c9523f30c49ea343cc1d0f13 100644 (file)
                                <%- if luci.sys.process.info("uid") == 0 and luci.sys.user.getuser("root") and not luci.sys.user.getpasswd("root") and path ~= "admin-system-admin-password" then -%>
                                <%- end -%>
 
+                               <%- if boardinfo.rootfs_type == "initramfs" then -%>
+                                       <div class="alert-message warning">
+                                               <h4><%:Sytem 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 -%>
+
                                <noscript>
                                        <div class="alert-message warning">
                                                <h4><%:JavaScript required!%></h4>