Commit 86b971e1 authored by Franco Fichtner's avatar Franco Fichtner

backup: fix infinite reboot loop; fixes #255

/var/run was cleared out before, but we'd rather not keep it
this way...  It is for pid files, nothing else.  Move the
terrible firmware dirty markers to /tmp instead.  Eventually,
we need a better way to keep track of subsystem state.  Cluttering
multiple files all over the disk is not a good solution.
parent 6393fe3d
...@@ -66,7 +66,7 @@ function is_subsystem_dirty($subsystem = '') ...@@ -66,7 +66,7 @@ function is_subsystem_dirty($subsystem = '')
return false; return false;
} }
if (file_exists("/var/run/{$subsystem}.dirty")) { if (file_exists("/tmp/{$subsystem}.dirty")) {
return true; return true;
} }
...@@ -75,14 +75,12 @@ function is_subsystem_dirty($subsystem = '') ...@@ -75,14 +75,12 @@ function is_subsystem_dirty($subsystem = '')
function mark_subsystem_dirty($subsystem = '') function mark_subsystem_dirty($subsystem = '')
{ {
if (!file_put_contents("/var/run/{$subsystem}.dirty", 'DIRTY')) { touch("/tmp/{$subsystem}.dirty");
log_error(sprintf(gettext("WARNING: Could not mark subsystem: %s dirty"), $subsystem));
}
} }
function clear_subsystem_dirty($subsystem = '') function clear_subsystem_dirty($subsystem = '')
{ {
@unlink("/var/run/{$subsystem}.dirty"); @unlink("/tmp/{$subsystem}.dirty");
} }
/* lock configuration file */ /* lock configuration file */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment