Add button to clear fsck error

This commit is contained in:
Taylor Helsper 2020-05-01 12:47:41 -05:00
parent 5da39f36ed
commit f4471de695
3 changed files with 9 additions and 0 deletions

View File

@ -391,6 +391,8 @@ def is_drive_being_repaired():
return os.path.isfile("/tmp/repairing_drive")
def has_fsck_error():
return os.path.isfile("/tmp/fsck_error")
def clear_fsck_error():
os.system("rm -f /tmp/fsck_error")
def get_fsck_results():
try:
with open("/tmp/fsck_results", "r") as f:

View File

@ -634,6 +634,12 @@ def page_toggle_dojo():
enable_dojo()
return redirect("/")
@app.route("/clear-fsck-error")
def page_clear_fsck_error():
check_logged_in()
clear_fsck_error()
return redirect("/")
@app.route("/login", methods=["GET","POST"])
def page_login():
templateData = {

View File

@ -3,6 +3,7 @@
<center>
<p>There may be an error with the filesystem on your drive.</p>
<p>{{ fsck_results }}</p>
<a href="/clear-fsck-error" class="ui-button ui-widget ui-corner-all settings_button_small">OK</a>
</center>
</div>
{% endif %}