<%# Copyright 2008 Steven Barth Copyright 2008-2015 Jo-Philipp Wich Copyright 2017 Stan Grishin Licensed to the public under the Apache License 2.0. -%> <%+header%>

<%:Advanced Reboot%>


<%- local c = require("luci.model.uci").cursor():changes(); if c and next(c) then -%>

<%:Warning: There are unsaved changes that will get lost on reboot!%>

<%- end -%> <%- if errorMessage and errorMessage ~= "" then -%>

<%:ERROR: %><%=errorMessage%>

<%- end -%> <%- if device_name then -%>
<%=device_name%><%: Partitions%>
<%:Partition%> <%:Status%> <%:Firmware/OS (Kernel)%> <%:Action%>
<%=string.format("%X", boot_envvar1_partition_one)%> <%- if boot_envvar1_partition_one == current_partition then -%><%:Current%><%- else -%><%:Alternative%><%- end -%> <%=partition_one_os%> <%- if boot_envvar1_partition_one == current_partition then -%>
<%- else -%>
<%- end -%>
<%=string.format("%X", boot_envvar1_partition_two)%> <%- if boot_envvar1_partition_two == current_partition then -%><%:Current%><%- else -%><%:Alternative%><%- end -%> <%=partition_two_os%> <%- if boot_envvar1_partition_two == current_partition then -%>
<%- else -%>
<%- end -%>
<%- else -%>

<%:Warning: This system does not have two partitions!%>

<%- end -%>
<%- if nixio.fs.access("/sbin/poweroff") then -%>
<%- else -%>

<%:Warning: This system does not support powering off!%>

<%- end -%> <%+footer%>