From 51637cc2e6a2e158f3ede301c8f16eb915515ab5 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Tue, 8 Feb 2005 11:37:30 +0000 Subject: new kernel doesn't like usbdevfs any more, it wants usbfs --- perl-install/fs.pm | 9 ++++++++- perl-install/install2.pm | 2 +- perl-install/modules.pm | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) (limited to 'perl-install') diff --git a/perl-install/fs.pm b/perl-install/fs.pm index 8cdead039..3f4020946 100644 --- a/perl-install/fs.pm +++ b/perl-install/fs.pm @@ -487,7 +487,7 @@ sub mount { $o_wait_message->(N("Mounting partition %s", $dev)) if $o_wait_message; system('mount', '-t', $fs, $dev, $where, if_($o_options, '-o', $o_options)) == 0 or die N("mounting partition %s in directory %s failed", $dev, $where); } else { - my @types = ('ext2', 'proc', 'sysfs', 'usbdevfs', 'iso9660', 'devfs', 'devpts', @fs_modules); + my @types = ('ext2', 'proc', 'sysfs', 'usbfs', 'usbdevfs', 'iso9660', 'devfs', 'devpts', @fs_modules); member($fs, @types) or log::l("skipping mounting $dev partition ($fs)"), return; @@ -666,4 +666,11 @@ sub df { $part->{free}; } +sub mount_usbfs { + my ($prefix) = @_; + + my $fs = cat_('/proc/filesystems') =~ /usbfs/ ? 'usbfs' : 'usbdevfs'; + mount('none', "$prefix/proc/bus/usb", $fs); +} + 1; diff --git a/perl-install/install2.pm b/perl-install/install2.pm index 075e5fc66..5c916e5bd 100644 --- a/perl-install/install2.pm +++ b/perl-install/install2.pm @@ -186,8 +186,8 @@ sub formatPartitions { chmod 0666, "$o->{prefix}/dev/null"; eval { fs::mount('none', "$o->{prefix}/proc", 'proc') }; - eval { fs::mount('none', "$o->{prefix}/proc/bus/usb", 'usbdevfs') }; eval { fs::mount('none', "$o->{prefix}/sys", 'sysfs') }; + eval { fs::mount_usbfs($o->{prefix}) }; install_any::screenshot_dir__and_move(); install_any::move_clp_to_disk(); diff --git a/perl-install/modules.pm b/perl-install/modules.pm index c21405013..8622b11f7 100644 --- a/perl-install/modules.pm +++ b/perl-install/modules.pm @@ -249,7 +249,7 @@ sub when_load_category { } elsif ($category eq 'bus/usb') { $conf->add_probeall('usb-interface', $name); -f '/proc/bus/usb/devices' or eval { - require fs; fs::mount('none', '/proc/bus/usb', 'usbdevfs'); + require fs; fs::mount_usbfs(''); #- 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