I have seen the of using udevadm settle command. What is the use of such a command in init scripts?
udevadm settle [options] Watches the udev event queue, and exits if all current events are handled. -t, --timeout=SECONDS Maximum number of seconds to wait for the event queue to become empty. The default value is 120 seconds. A value of 0 will check if the queue is empty and always return immediately.
udev (userspace /dev) is a device manager for the Linux kernel. As the successor of devfsd and hotplug, udev primarily manages device nodes in the /dev directory.
Udev rules determine how to identify devices and how to assign a name that is persistent through reboots or disk changes. When Udev receives a device event, it matches the configured rules against the device attributes in sysfs to identify the device.
Description. systemd-udevd listens to kernel uevents. For every event, systemd-udevd executes matching instructions specified in udev rules. See udev(7). The behavior of the daemon can be configured using udev.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With