Skip to content

Commit

Permalink
Remove existing rauc.db from a data disk on the first boot
Browse files Browse the repository at this point in the history
If data disk is adopted on Yellow using the mechanism added in #3686, it
contains RAUC version information that is very likely invalid. In such case,
remove the file on first boot and have it recreated by the raucdb-update
service.
  • Loading branch information
sairon committed Dec 12, 2024
1 parent 7031870 commit 7bb063e
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[Unit]
Description=Remove adopted rauc.db on first boot
After=rauc.service
Before=raucdb-update.service
RequiresMountsFor=/mnt/data
ConditionFirstBoot=yes
ConditionFileNotEmpty=/mnt/data/rauc.db

[Service]
Type=oneshot
ExecStart=/bin/rm -f /mnt/data/rauc.db

[Install]
WantedBy=multi-user.target

0 comments on commit 7bb063e

Please sign in to comment.