Skip to content

Commit

Permalink
iiod: systemd: Add dependency on systemd-udev-settle.service
Browse files Browse the repository at this point in the history
IIOD does not handle the hardware changing (in /dev or /sys) after it
has been started. Therefore, we must ensure that all modules have been
loaded before IIOD starts.

Note that this is explicitely marked as a bad practice in systemd docs,
which recommends the service to handle udev events instead. Since IIOD
and libiio don't support hardware hotplug we don't really have a choice
right now, but this workaround should be dropped as soon as hotplug
support has been added.

Signed-off-by: Paul Cercueil <[email protected]>
  • Loading branch information
pcercuei committed Jan 4, 2022
1 parent 9f89447 commit d21b386
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion iiod/init/iiod.service.cmakein
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@

[Unit]
Description=IIO Daemon
After=network.target
Requires=systemd-udev-settle.service
After=network.target systemd-udev-settle.service
ConditionPathExists=/sys/bus/iio

[Service]
Expand Down

0 comments on commit d21b386

Please sign in to comment.