[Replicant] Enable key-migration.sh to run more than once
Denis 'GNUtoo' Carikli
GNUtoo at cyberdimension.org
Sun Oct 11 18:07:45 UTC 2020
While this is not strictly needed for the release, it's still good to
have them as it enables to do more than one key migration.
The caveat is that if a newly generated script is identical to a
script that already run, it will not run.
This is done by computing a checksum of the script and creating
a file with this checksum the first time that this script runs.
This way the subsequent times it runs it just exit if that file
is found, which avoid any unnecessary writes on the data filesystem.
I don't know if there is a better way to do it that is still somehow
automatic:
- Running a script like that at each boot is not great: for instance
if the battery runs out at that moment it could corrupt data.
- Having to manually handle revisions would be a pain to manage as
well.
Note that this script is not only run at each boot but it is also
expected to be run manually in a recovery.
Does someone has a better idea? Maybe it's better to run it each
time? What do you think?
Here how to get the patches in a web or git interface:
+------------------+
| vendor_replicant |
+------------------+
In addition to the patch that will follow in a response to
this mail, here's an URL to the see the patch in a web interface:
https://git.replicant.us/contrib/GNUtoo/vendor_replicant/commit/?id=818b18d7c0bede15fd6018d389b480f3609d0d93
And here's how to get it in a git repository:
git clone https://git.replicant.us/GNUtoo/vendor_replicant
cd vendor_replicant
git show 818b18d7c0bede15fd6018d389b480f3609d0d93
Denis.
+--------------------------+
| vendor_replicant-scripts |
+--------------------------+
In addition to the patch that will follow in a response to
this mail, here's an URL to the see the patch in a web interface:
https://git.replicant.us/contrib/GNUtoo/vendor_replicant-scripts/commit/?id=fb5cfeaa0eed535c1b7655225a23d9c5fe397aa8
And here's how to get it in a git repository:
git clone https://git.replicant.us/GNUtoo/vendor_replicant-scripts
cd vendor_replicant-scripts
git show fb5cfeaa0eed535c1b7655225a23d9c5fe397aa8
Denis.
More information about the Replicant
mailing list