summaryrefslogtreecommitdiffstats
path: root/perl-install/modules.pm
diff options
context:
space:
mode:
authorGuillaume Cottenceau <gc@mandriva.com>2003-11-03 15:54:40 +0000
committerGuillaume Cottenceau <gc@mandriva.com>2003-11-03 15:54:40 +0000
commite57f9b8c709471fdd103514b3e5f11b0d0a901bb (patch)
treef74e9e997a4d85f880ad169fb3ab0e9793bb9de8 /perl-install/modules.pm
parent29fcda95f4375fb69488ba713a5391dafc40b1ef (diff)
downloaddrakx-backup-do-not-use-e57f9b8c709471fdd103514b3e5f11b0d0a901bb.tar
drakx-backup-do-not-use-e57f9b8c709471fdd103514b3e5f11b0d0a901bb.tar.gz
drakx-backup-do-not-use-e57f9b8c709471fdd103514b3e5f11b0d0a901bb.tar.bz2
drakx-backup-do-not-use-e57f9b8c709471fdd103514b3e5f11b0d0a901bb.tar.xz
drakx-backup-do-not-use-e57f9b8c709471fdd103514b3e5f11b0d0a901bb.zip
for move: ensure "post load" stuff (here, mounting /proc/bus/usb)
is done also when using /sbin/modprobe
Diffstat (limited to 'perl-install/modules.pm')
-rw-r--r--perl-install/modules.pm22
1 files changed, 13 insertions, 9 deletions
diff --git a/perl-install/modules.pm b/perl-install/modules.pm
index 27f63316c..712da0164 100644
--- a/perl-install/modules.pm
+++ b/perl-install/modules.pm
@@ -62,6 +62,7 @@ sub load {
} else {
load_raw(map { [ $_ => $options{$_} ] } @l);
}
+ post_load(@l);
sleep 2 if any { /^(usb-storage|mousedev|printer)$/ } @l;
if ($network_module) {
@@ -407,15 +408,18 @@ sub load_raw {
die "insmod'ing module " . join(", ", map { $_->[0] } @failed) . " failed" if @failed;
- foreach (@l) {
- if ($_->[0] =~ /usb-[uo]hci/) {
- eval {
- require fs; fs::mount('/proc/bus/usb', '/proc/bus/usb', 'usbdevfs');
- #- ensure keyboard is working, the kernel must do the job the BIOS was doing
- sleep 4;
- load("usbkbd", "keybdev") if detect_devices::usbKeyboards();
- }
- }
+}
+
+sub post_load {
+ my @modules = @_;
+
+ if (any { /usb-[uo]hci/ } @modules) {
+ eval {
+ require fs; fs::mount('/proc/bus/usb', '/proc/bus/usb', 'usbdevfs');
+ #- ensure keyboard is working, the kernel must do the job the BIOS was doing
+ sleep 4;
+ load("usbkbd", "keybdev") if detect_devices::usbKeyboards();
+ }
}
}