Files
operating-system/buildroot-external/rootfs-overlay/usr/lib/systemd/system/hassos-data.service
Stefan Agner 6672046b6f Make the datactl command more robust (#1059)
* Make the datactl command more robust

Validate target disk (partition) size to avoid a copy attempt which will
fail. If e2image operation fails, make sure the leftover copy is not
regonized as data partition.

* Fix hassos-data service device unit dependencies
2020-12-04 20:55:35 +01:00

19 lines
689 B
Desktop File

[Unit]
Description=Home Assistant OS data partition migration
DefaultDependencies=no
RefuseManualStart=true
RefuseManualStop=true
Requires=mnt-overlay.mount dev-disk-by\x2dlabel-hassos\x2ddata.device dev-disk-by\x2dpartlabel-hassos\x2ddata\x2dexternal.device
Wants=hassos-expand.service
After=mnt-overlay.mount dev-disk-by\x2dlabel-hassos\x2ddata.device systemd-fsck@dev-disk-by\x2dlabel-hassos\x2ddata.service dev-disk-by\x2dpartlabel-hassos\x2ddata\x2dexternal.device
Before=hassos-expand.service
ConditionPathExists=/mnt/overlay/move-data
[Service]
Type=oneshot
ExecStartPre=-/usr/bin/rm -f /mnt/overlay/move-data
ExecStart=/usr/libexec/hassos-data
[Install]
WantedBy=local-fs.target