Commit 111160fd authored by intrigeri's avatar intrigeri
Browse files

sync(1) the persistent volume after copying APT data to it (refs: #17278)

I've observed cases when that service started, copied part of the data,
but after the next boot:

 - Not all the data can be found on the persistent volume.
 - The flag file that indicates that this service has finished its job
   is not present.

At this point I don't know whether this service was killed before
it could finish its job, or this service did copy the data but
it was not sync'ed to disk. Let's eliminate the second possibility
and make it easier to reason on this problem.
parent 7347b736
......@@ -14,7 +14,8 @@ ExecStop=/bin/sh -c ' \
/media/tails-persistence-setup/TailsData/apt/cache && \
cp -a /var/lib/apt/lists \
/media/tails-persistence-setup/TailsData/apt/ && \
touch /media/tails-persistence-setup/TailsData/apt_sync_completed; \
touch /media/tails-persistence-setup/TailsData/apt_sync_completed && \
sync --file-system /media/tails-persistence-setup/TailsData/apt; \
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