This commit is contained in:
2025-03-10 16:48:59 +08:00
commit 396980136a
47 changed files with 3375 additions and 0 deletions

16
cgi-bin/fw-restore.cgi Executable file
View File

@ -0,0 +1,16 @@
#!/usr/bin/haserl
<%in p/common.cgi %>
<%
[ -z "$GET_f" ] && set_error_flag "Nothing to restore."
file=$GET_f
[ ! -f "/rom/${file}" ] && set_error_flag "File /rom/${file} not found!"
[ -n "$error" ] && redirect_back
cp "/rom/${file}" "${file}"
if [ $? -eq 0 ]; then
redirect_back "success" "File ${file} restored to firmware defaults."
else
redirect_back "danger" "Cannot restore ${file}!"
fi
%>