diff options
author | Pascal Rigaux <pixel@mandriva.com> | 1999-11-07 11:52:51 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 1999-11-07 11:52:51 +0000 |
commit | e9d5cd96b2054cad8cca21bc1e7c10e4f4e135ed (patch) | |
tree | 6d1b334d8a1cd664289f674aa537be6d4344158f /perl-install/modules.pm | |
parent | 96510efce15225384a474e81ef2ea91d1ae3a4ee (diff) | |
download | drakx-e9d5cd96b2054cad8cca21bc1e7c10e4f4e135ed.tar drakx-e9d5cd96b2054cad8cca21bc1e7c10e4f4e135ed.tar.gz drakx-e9d5cd96b2054cad8cca21bc1e7c10e4f4e135ed.tar.bz2 drakx-e9d5cd96b2054cad8cca21bc1e7c10e4f4e135ed.tar.xz drakx-e9d5cd96b2054cad8cca21bc1e7c10e4f4e135ed.zip |
no_comment
Diffstat (limited to 'perl-install/modules.pm')
-rw-r--r-- | perl-install/modules.pm | 26 |
1 files changed, 9 insertions, 17 deletions
diff --git a/perl-install/modules.pm b/perl-install/modules.pm index 828b92af7..3c3d00ff6 100644 --- a/perl-install/modules.pm +++ b/perl-install/modules.pm @@ -157,6 +157,7 @@ sub text2driver($) { die "$text is not a valid module description"; } +sub add_alias($$) { $conf{$_[0]}{alias} = $_[1]; } sub load { my ($name, $type, @options) = @_; @@ -174,17 +175,19 @@ sub load { } push @{$loaded{$type}}, $name; - $conf{'scsi_hostadapter' . ($scsi++ || '')}{alias} = $name - if $type && $type eq 'scsi'; - + if ($type) { + $conf{$type}{alias} = $name if $type eq 'usbmouse'; + $conf{'scsi_hostadapter' . ($scsi++ || '')}{alias} = $name if $type eq 'scsi'; + } $conf{$name}{options} = join " ", @options if @options; } sub unload($) { + my ($m) = @_; if ($::testing) { - log::l("rmmod $_[0]"); - } else { - run_program::run("rmmod", $_[0]); + log::l("rmmod $m"); + } else { + run_program::run("rmmod", $m) && delete $conf{$m}{loaded}; } } @@ -331,14 +334,3 @@ sub get_pcmcia_devices($$) { } @devs; } - -#-#- This assumes only one of each driver type is loaded -#-sub removeDeviceDriver { -#- my ($type) = @_; -#- -#- my @m = grep { $loaded{$_}{type} eq $type } keys %loaded; -#- @m or return 0; -#- @m > 1 and log::l("removeDeviceDriver assume only one of each driver type is loaded, which is not the case (" . join(' ', @m) . ")"); -#- removeModule($m[0]); -#- 1; -#-} |