Write /sys/kernel/wait_for_device_probe before import.

The new sysfs attribute makes kernel to wait for all device probe to
complete before return.  Without it wait_for_udev call does not give
any guaranties.

Ticket:	NAS-108200

Signed-off-by: Alexander Motin <mav@FreeBSD.org>
This commit is contained in:
Alexander Motin 2021-08-17 15:36:37 -04:00 committed by Ameer Hamza
parent ab9a80865d
commit af2a8ddb0e
1 changed files with 1 additions and 0 deletions

View File

@ -283,6 +283,7 @@ load_module_initrd()
while true; do while true; do
# Wait for all of the /dev/{hd,sd}[a-z] device nodes to appear. # Wait for all of the /dev/{hd,sd}[a-z] device nodes to appear.
echo "1" > /sys/kernel/wait_for_device_probe
if command -v wait_for_udev > /dev/null 2>&1 ; then if command -v wait_for_udev > /dev/null 2>&1 ; then
wait_for_udev 10 wait_for_udev 10
elif command -v wait_for_dev > /dev/null 2>&1 ; then elif command -v wait_for_dev > /dev/null 2>&1 ; then