mirror of
https://github.com/home-assistant/operating-system.git
synced 2026-04-29 05:04:27 +01:00
In some cases, the wipe service may be called due to a race condition for the second time during the boot, very likely failing because the filesystems are already mounted. This can not be reproduced on OVA but can be fairly easy triggered e.g. on RPi. As we want the service to be executed exactly only once, we can do what's suggested in [1] and set the RemainAfterExit=yes. That should ensure the unit is not ever started for the second time. [1] https://www.github.com/systemd/systemd/issues/29367
18 lines
358 B
Desktop File
18 lines
358 B
Desktop File
[Unit]
|
|
Description=Home Assistant OS Device Wipe Service
|
|
DefaultDependencies=no
|
|
RefuseManualStart=true
|
|
RefuseManualStop=true
|
|
Wants=mnt-boot.mount
|
|
After=mnt-boot.mount
|
|
Before=mnt-data.mount mnt-overlay.mount
|
|
ConditionKernelCommandLine=haos.wipe=1
|
|
|
|
[Service]
|
|
Type=oneshot
|
|
RemainAfterExit=yes
|
|
ExecStart=/usr/libexec/haos-wipe
|
|
|
|
[Install]
|
|
WantedBy=sysinit.target
|