summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2000-05-03 16:03:18 +0000
committerFrancois Pons <fpons@mandriva.com>2000-05-03 16:03:18 +0000
commitb5b5d539112817788a0321f9ce444547a9c77f75 (patch)
treeb65e91448a9b13751d7d37ea0f281043ff4ef9ea /perl-install
parentf9df61e55cd55571923eaa5be8a04ab5ae87fd22 (diff)
downloaddrakx-b5b5d539112817788a0321f9ce444547a9c77f75.tar
drakx-b5b5d539112817788a0321f9ce444547a9c77f75.tar.gz
drakx-b5b5d539112817788a0321f9ce444547a9c77f75.tar.bz2
drakx-b5b5d539112817788a0321f9ce444547a9c77f75.tar.xz
drakx-b5b5d539112817788a0321f9ce444547a9c77f75.zip
*** empty log message ***
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/install2.pm1
-rw-r--r--perl-install/modules.pm26
2 files changed, 10 insertions, 17 deletions
diff --git a/perl-install/install2.pm b/perl-install/install2.pm
index 526c6c684..e2b45e7b0 100644
--- a/perl-install/install2.pm
+++ b/perl-install/install2.pm
@@ -390,6 +390,7 @@ sub miscellaneous {
setVarsInSh($f, {
MOUSE => bool2yesno($o->{mouse}{device} eq "usbmouse"),
KBD => bool2yesno(int grep { /^keybdev\.c: Adding keyboard/ } detect_devices::syslog()),
+ ZIP => bool2yesno(-d "/proc/scsi/usb"),
getVarsFromSh($f),
});
diff --git a/perl-install/modules.pm b/perl-install/modules.pm
index 4c85007c1..3cd097bc4 100644
--- a/perl-install/modules.pm
+++ b/perl-install/modules.pm
@@ -408,7 +408,7 @@ sub unload($;$) {
my ($m, $remove_alias) = @_;
if ($::testing) {
log::l("rmmod $m");
- } else {
+ } else {
run_program::run("rmmod", $m) && delete $conf{$m}{loaded};
}
remove_alias($m) if $remove_alias;
@@ -536,11 +536,18 @@ sub load_thiskind($;&$) {
}
if ($type eq 'scsi') {
+ #- hey, we're allowed to pci probe :) let's do a lot of probing!
+
+ #- probe for USB SCSI.
+ if (my ($c) = grep { /usb-/ } map { $_->[1] } pci_probing::main::probe('')) {
+ eval { load($c, "SERIAL_USB"); load("usb-storage", $type); sleep(1); };
+ -d "/proc/scsi/usb" ? push(@devs, [ "usb-storage", "usb-storage" ]) : unload("usb-storage");
+ }
+ #- probe for parport SCSI.
foreach ("imm", "ppa") {
eval { load($_, $type); push @devs, [ $_, $_ ] };
last if !$@;
}
- #- hey, we're allowed to pci probe :) let's do a lot of probing!
if (my ($c) = pci_probing::main::probe('AUDIO')) {
add_alias("sound", $c->[1]) if pci_probing::main::check($c->[1]);
}
@@ -593,18 +600,3 @@ sub load_ide {
load_multi(qw(ide-probe ide-disk ide-cd));
}
}
-
-sub load_usbscsi { #- TODO
- require pci_probing::main;
- eval {
- if (my ($c) = grep { /usb-/ } map { $_->[1] } pci_probing::main::probe('')) {
- load($c, "SERIAL_USB"); load("usb-storage");
- sleep(1);
- if (!$@ && -e "/proc/scsi/usb/0") {
- return 1;
- }
- unload("usb-storage");
- }
- };
- 0;
-}