summaryrefslogtreecommitdiffhomepage
path: root/themes/luci-theme-material/luasrc/view
diff options
context:
space:
mode:
authorPaul Spooren <mail@aparcar.org>2021-03-04 16:41:20 -1000
committerPaul Spooren <mail@aparcar.org>2021-10-05 15:33:15 -1000
commitc8d9819c9a54eb4854157bd1eb0f9c540621b2b4 (patch)
treed5a54657535adf4dd483aa83b3ac937f0d7268ad /themes/luci-theme-material/luasrc/view
parent2c27f5c9417ff5414a2730a9c310b68fdd5f585c (diff)
themes: warn if booted from initramfs
Some devices offer a full LuCI interface from their recovery interface. As it's read-only it should only be used for installing sysupgrades and therefore warn users that no settings are saved. Signed-off-by: Paul Spooren <mail@aparcar.org>
Diffstat (limited to 'themes/luci-theme-material/luasrc/view')
-rw-r--r--themes/luci-theme-material/luasrc/view/themes/material/header.htm10
1 files changed, 10 insertions, 0 deletions
diff --git a/themes/luci-theme-material/luasrc/view/themes/material/header.htm b/themes/luci-theme-material/luasrc/view/themes/material/header.htm
index 2b890da034..a81991d0a0 100644
--- a/themes/luci-theme-material/luasrc/view/themes/material/header.htm
+++ b/themes/luci-theme-material/luasrc/view/themes/material/header.htm
@@ -81,6 +81,16 @@
<%- 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>