From bc652fca0120181720fbe92fcfbb44076eadbb6b Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Fri, 20 Jan 2012 19:12:48 +0000 Subject: (load_raw) faster & safer waiting for end of USB modules (thanks to now having udev) --- perl-install/modules.pm | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'perl-install/modules.pm') diff --git a/perl-install/modules.pm b/perl-install/modules.pm index 53f70b055..6b3e90616 100644 --- a/perl-install/modules.pm +++ b/perl-install/modules.pm @@ -99,16 +99,7 @@ sub load_raw { } elsif (member('usb_storage', @$l)) { #- usb_storage is only modprobed when we know there is some scsi devices #- so trying hard to wait for devices to be detected - - #- first sleep the minimum time usb-stor-scan takes - sleep 5; #- 5 == /sys/module/usb_storage/parameters/delay_use - # then wait for usb-stor-scan to complete - my $retry = 0; - while ($retry++ < 10) { - fuzzy_pidofs('usb-stor-scan') or last; - sleep 1; - log::l("waiting for usb_storage devices to appear (retry = $retry)"); - } + run_program::run('udevadm', 'settle'); } } sub load_with_options { -- cgit v1.2.1