From e57f9b8c709471fdd103514b3e5f11b0d0a901bb Mon Sep 17 00:00:00 2001 From: Guillaume Cottenceau Date: Mon, 3 Nov 2003 15:54:40 +0000 Subject: for move: ensure "post load" stuff (here, mounting /proc/bus/usb) is done also when using /sbin/modprobe --- perl-install/modules.pm | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (limited to 'perl-install') 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(); + } } } -- cgit v1.2.1