summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/Tails/Persistence/Configuration/ConfigFile.pm5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Tails/Persistence/Configuration/ConfigFile.pm b/lib/Tails/Persistence/Configuration/ConfigFile.pm
index aebff9e..6fc63eb 100644
--- a/lib/Tails/Persistence/Configuration/ConfigFile.pm
+++ b/lib/Tails/Persistence/Configuration/ConfigFile.pm
@@ -96,6 +96,11 @@ Copy the on-disk configuration file to a backup file.
method backup () {
$self->config_file_path->copy($self->backup_config_file_path);
$self->backup_config_file_path->chmod(0600);
+ # Ensure our changes land on the disk
+ systemx('sync', $self->backup_config_file_path->stringify);
+ # Ensure changes made elsewhere are written synchronously on the disk
+ # (in case something else ever needs to modify this file)
+ systemx('chattr', '+S', $self->backup_config_file_path->stringify);
}
=head2 save