diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2005-09-19 09:48:15 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2005-09-19 09:48:15 +0000 |
commit | a94dd3f38209eaf519ef49709e12cd7db2f74444 (patch) | |
tree | 7787108b2b8cf524c94dde6a689b4eea8db7a16d | |
parent | 68bca411fa4ae14a563ed135d136244cb0b4346d (diff) | |
download | drakx-a94dd3f38209eaf519ef49709e12cd7db2f74444.tar drakx-a94dd3f38209eaf519ef49709e12cd7db2f74444.tar.gz drakx-a94dd3f38209eaf519ef49709e12cd7db2f74444.tar.bz2 drakx-a94dd3f38209eaf519ef49709e12cd7db2f74444.tar.xz drakx-a94dd3f38209eaf519ef49709e12cd7db2f74444.zip |
ugly hack: wait for usb-storage devices to appear (bugzilla #13395)
-rw-r--r-- | perl-install/modules.pm | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/perl-install/modules.pm b/perl-install/modules.pm index aa1358498..e34f16fd1 100644 --- a/perl-install/modules.pm +++ b/perl-install/modules.pm @@ -65,7 +65,19 @@ sub load_raw { or !run_program::run('/sbin/modprobe', '-n', $_) #- ignore missing modules or die "insmod'ing module $_ failed" foreach @$l; } - sleep 2 if any { /^(usb-storage|mousedev|printer)$/ } @$l; + if (any { /^(mousedev|printer)$/ } @$l) { + sleep 2; + } 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 + my $retry = 10; + sleep 1; #- TOREMOVE for compatibility with previous behaviour: wait at least 2 seconds + do { + sleep 1; + last if all('/sys/bus/scsi/devices'); + log::l("waiting for usb-storage devices to appear (retry = $retry)"); + } until !$retry--; + } } sub load_with_options { my ($l, $h_options) = @_; |