diff --git a/buildroot-external/rootfs-overlay/usr/lib/systemd/system/raucdb-first-boot.service b/buildroot-external/rootfs-overlay/usr/lib/systemd/system/raucdb-first-boot.service new file mode 100644 index 00000000000..efc7242613b --- /dev/null +++ b/buildroot-external/rootfs-overlay/usr/lib/systemd/system/raucdb-first-boot.service @@ -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