diff options
Diffstat (limited to 'perl-install/harddrake/data.pm')
-rw-r--r-- | perl-install/harddrake/data.pm | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/perl-install/harddrake/data.pm b/perl-install/harddrake/data.pm index e1cea8be9..00f6c1d33 100644 --- a/perl-install/harddrake/data.pm +++ b/perl-install/harddrake/data.pm @@ -38,12 +38,17 @@ sub is_removable { $_[0] =~ /FLOPPY|ZIP|DVDROM|CDROM|BURNER/ } sub set_removable_configurator { my ($class, $device) = @_; - return "/usr/sbin/diskdrake --auto --removable=$device->{device}" if is_removable($class); + return "/usr/sbin/diskdrake --removable=$device->{device}" if is_removable($class); + } + +sub set_removable_auto_configurator { + my ($class, $device) = @_; + return "/usr/sbin/drakupdate_fstab --auto --no-flag --add $device->{device}" if is_removable($class); } sub set_removable_remover { my ($class, $device) = @_; - return "/usr/sbin/drakupdate_fstab --no-flag --del $device->{device}" if is_removable($class); + return "/usr/sbin/drakupdate_fstab --auto --no-flag --del $device->{device}" if is_removable($class); } @@ -75,7 +80,7 @@ our @tree = string => N("Disk"), icon => "harddisk.png", configurator => "$sbindir/diskdrake", - detector => \&detect_devices::hds, + detector => sub { f(detect_devices::hds()) }, checked_on_boot => 1, }, @@ -197,7 +202,7 @@ our @tree = #- protocol report are not accurate) so I'll need to verify against #- known drivers :-( require list_modules; - my @usbnet = (list_modules::category2modules('network/usb'), "nvnet"); # rought hack for nforce2's nvet + my @usbnet = (list_modules::category2modules('network/usb'), qw(forcedeth nvnet)); # rought hack for nforce2's nvnet f(grep { $_->{media_type} && $_->{media_type} =~ /^NETWORK/ @@ -367,7 +372,15 @@ our @tree = sub pciusb_id { my ($dev) = @_; - join(':', map { $dev->{$_} } qw(bus pci_bus pci_device vendor id subvendor subid description)); + my %alt = ( + bus => 'usb_bus', + description => 'usb_description', + id => 'usb_id', + pci_bus => 'usb_pci_bus', + pci_device => 'usb_pci_device', + vendor => 'usb_vendor', + ); + join(':', map { $dev->{$alt{$_}} || $dev->{$_} } qw(bus pci_bus pci_device vendor id subvendor subid description)); } |