composer/projects/gk7205v200_lite_meldana/general/overlay/www/cgi-bin/firmware-update.cgi

18 lines
725 B
Perl
Executable File
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

#!/usr/bin/haserl
<%in p/common.cgi %>
<%
page_title="Обновление прошивки"
c="/usr/sbin/sysupgrade"
reboot="true"
[ "true" = "$POST_fw_kernel" ] && c="${c} -k"
[ "true" = "$POST_fw_rootfs" ] && c="${c} -r"
[ "true" = "$POST_fw_reset" ] && c="${c} -n"
[ "true" = "$POST_fw_noreboot" ] && c="${c} -x" && reboot="false"
[ "true" = "$POST_fw_enforce" ] && c="${c} --force_ver"
%>
<%in p/header.cgi %>
<h3 class="alert alert-warning">НЕ ЗАКРЫВАЙТЕ, НЕ ОБНОВЛЯЙТЕ ИЛИ НЕ УХОДИТЕ С ЭТОЙ СТРАНИЦЫ, ПОКА ПРОЦЕСС НЕ ЗАВЕРШЕН!</h3>
<h5># <%= $c %></h5>
<pre id="output" data-cmd="<%= $c %>" data-reboot="<%= $reboot %>"></pre>
<%in p/footer.cgi %>