Files
operating-system/buildroot-external/rootfs-overlay/usr/lib/systemd/system/haos-data-disk-detach.service
Stefan Agner 5200096c4e Deactivate any external data disk device on first boot (#2390) (#2410)
* Deactivate any external data disk device on first boot (#2390)

* Use lsblk to determine the underlying device file

Comparing major number is not reliable, e.g. virtio disks have the same
major number despite being different devices. Use lsblk to find the
underlying device, and compare the device name instead.
2023-03-15 14:16:11 +01:00

17 lines
417 B
Desktop File

[Unit]
Description=HAOS data disk detach
DefaultDependencies=no
Before=mnt-data.mount
RefuseManualStart=true
RefuseManualStop=true
Requires=dev-disk-by\x2dlabel-hassos\x2ddata.device
After=dev-disk-by\x2dlabel-hassos\x2ddata.device systemd-fsck@dev-disk-by\x2dlabel-hassos\x2ddata.service
ConditionFirstBoot=yes
[Service]
Type=oneshot
ExecStart=/usr/libexec/haos-data-disk-detach
[Install]
WantedBy=local-fs.target