eudev: improve S10udev script for startup

This commit adjusts the S10udev script by:

 * Using the --action=add option to udevadm trigger. By default, only
   the "change" events are handled by 'udevadm trigger', which means
   it doesn't handle all the "device add" events that occured during
   the boot time, before eudev was started.

 * Adds a call to 'udevadm settle' to make sure we wait for udev to
   handle all the events that occured before eudev was started.

Both of these change match what the Ubuntu and Debian udev startup
scripts are doing.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tested-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
This commit is contained in:
Paul Cercueil 2014-10-12 09:22:07 +02:00 committed by Peter Korsgaard
parent b55f718cbc
commit df8ae412a4
1 changed files with 2 additions and 1 deletions

View File

@ -30,7 +30,8 @@ case "$1" in
printf "Populating ${udev_root:-/dev} using udev: "
printf '\000\000\000\000' > /proc/sys/kernel/hotplug
$UDEV_BIN -d || (echo "FAIL" && exit 1)
udevadm trigger
udevadm trigger --action=add
udevadm settle
echo "done"
;;
stop)