14

I have seen the of using udevadm settle command. What is the use of such a command in init scripts?

snr
  • 409
  • 2
  • 5
  • 9

1 Answers1

22

After the kernel boots, udevd is used to create device nodes for all detected devices. That is a relatively time consuming task that has to be completed for the boot process to continue, otherwise there is a risk of services failing due to missing device nodes.

udevadm settle waits for udevd to process the device creation events for all hardware devices, thus ensuring that any device nodes have been created successfully before proceeding.

thkala
  • 76,870
  • 21
  • 145
  • 185
  • 1
    Exactly what I was looking for… For the longest time, I’ve been trying to figure out how to cause `udevadm trigger` to block so that the script doesn’t get ahead and try to proceed before the devices are ready. – Kevin Li Mar 03 '18 at 16:36