Commit d2c4efe0 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 b3240ac6
......@@ -66,7 +66,7 @@ function is_subsystem_dirty($subsystem = '')
return false;
}
if (file_exists("/var/run/{$subsystem}.dirty")) {
if (file_exists("/tmp/{$subsystem}.dirty")) {
return true;
}
......@@ -75,14 +75,12 @@ function is_subsystem_dirty($subsystem = '')
function mark_subsystem_dirty($subsystem = '')
{
if (!file_put_contents("/var/run/{$subsystem}.dirty", 'DIRTY')) {
log_error(sprintf(gettext("WARNING: Could not mark subsystem: %s dirty"), $subsystem));
}
touch("/tmp/{$subsystem}.dirty");
}
function clear_subsystem_dirty($subsystem = '')
{
@unlink("/var/run/{$subsystem}.dirty");
@unlink("/tmp/{$subsystem}.dirty");
}
/* 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