From 5c2f5a41677dbf39da2bc49c4d80db957cf4acf5 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Tue, 25 Feb 2003 13:53:19 +0000 Subject: - factorize code into harddrake::data::set_removable_configurator() - really do not offer to configure module for removable devices - do not put zip drives in unknown devices class - reuse Yes|No translations in harddrake::ui --- perl-install/harddrake/data.pm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'perl-install/harddrake') diff --git a/perl-install/harddrake/data.pm b/perl-install/harddrake/data.pm index defa91c98..b3ff53efc 100644 --- a/perl-install/harddrake/data.pm +++ b/perl-install/harddrake/data.pm @@ -12,7 +12,7 @@ my @devices = detect_devices::probeall(1); # Update me each time you handle one more devices class (aka configurator) sub unknown { - grep { $_->{media_type} !~ /BRIDGE|class\|Mouse|DISPLAY|Hub|MEMORY_RAM|MULTIMEDIA_(VIDEO|AUDIO|OTHER)|NETWORK|Printer|SERIAL_(USB|SMBUS)|STORAGE_(IDE|OTHER|SCSI)|tape/ && $_->{driver} !~ /^(scanner|usbvision)$|Mouse:USB|class\|Mouse|www.linmodems.org|nvnet/ && $_->{type} ne 'network' } @devices; + grep { $_->{media_type} !~ /BRIDGE|class\|Mouse|DISPLAY|Hub|MEMORY_RAM|MULTIMEDIA_(VIDEO|AUDIO|OTHER)|NETWORK|Printer|SERIAL_(USB|SMBUS)|STORAGE_(IDE|OTHER|SCSI)|tape/ && $_->{driver} !~ /^(scanner|usbvision)$|Mouse:USB|class\|Mouse|Removable:zip|www.linmodems.org|nvnet/ && $_->{type} ne 'network' } @devices; } @@ -22,6 +22,13 @@ sub unknown { # FIXME: add translated items +sub set_removable_configurator { + my ($class, $device, $configurator) = @_; + if ($class =~ /FLOPPY|ZIP|DVDROM|CDROM|BURNER/) { + $$configurator = "/usr/sbin/diskdrake --removable=$device->{device}"; + } +} + our @tree = ( [ "FLOPPY", , N("Floppy"), "floppy.png", "", \&detect_devices::floppies, 0 ], -- cgit v1.2.1