diff options
authorintrigeri <>2019-04-26 13:20:12 +0000
committerintrigeri <>2019-04-26 13:20:12 +0000
commitb111137caf01c84e15db39f82799e68a044b76f1 (patch)
parenta3a442e77deb60c798542b3654b57a24de278a29 (diff)
Make writing persistence.conf.bak more robustbugfix/16568-more-robust-backup
In exactly the same way as what we did recently for persistence.conf in the "save" method, let's do our best to ensure the persistence.conf.bak backup file is actually written to disk, regardless of what may happen later (e.g. unclear shutdown).
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Tails/Persistence/Configuration/ b/lib/Tails/Persistence/Configuration/
index aebff9e..6fc63eb 100644
--- a/lib/Tails/Persistence/Configuration/
+++ b/lib/Tails/Persistence/Configuration/
@@ -96,6 +96,11 @@ Copy the on-disk configuration file to a backup file.
method backup () {
+ # 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