summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2005-02-08 11:37:30 +0000
committerPascal Rigaux <pixel@mandriva.com>2005-02-08 11:37:30 +0000
commit51637cc2e6a2e158f3ede301c8f16eb915515ab5 (patch)
treedbfcf3cf7215e001776e63a4f74af44c1e629c39 /perl-install
parent62aeac2fdc4433c91c68c342c72ea8659591c07d (diff)
downloaddrakx-backup-do-not-use-51637cc2e6a2e158f3ede301c8f16eb915515ab5.tar
drakx-backup-do-not-use-51637cc2e6a2e158f3ede301c8f16eb915515ab5.tar.gz
drakx-backup-do-not-use-51637cc2e6a2e158f3ede301c8f16eb915515ab5.tar.bz2
drakx-backup-do-not-use-51637cc2e6a2e158f3ede301c8f16eb915515ab5.tar.xz
drakx-backup-do-not-use-51637cc2e6a2e158f3ede301c8f16eb915515ab5.zip
new kernel doesn't like usbdevfs any more, it wants usbfs
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/fs.pm9
-rw-r--r--perl-install/install2.pm2
-rw-r--r--perl-install/modules.pm2
3 files changed, 10 insertions, 3 deletions
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();