summaryrefslogtreecommitdiffstats
path: root/perl-install/harddrake/data.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2003-03-12 07:24:27 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2003-03-12 07:24:27 +0000
commit7ad37ff6c59a19f53c65b5d906c899ec97809898 (patch)
treecdb82abbfac0aaa15a770fce1584f9513236993a /perl-install/harddrake/data.pm
parent6279d17c19cb7ce69c9a76978a261f7fb4cb8f26 (diff)
downloaddrakx-backup-do-not-use-7ad37ff6c59a19f53c65b5d906c899ec97809898.tar
drakx-backup-do-not-use-7ad37ff6c59a19f53c65b5d906c899ec97809898.tar.gz
drakx-backup-do-not-use-7ad37ff6c59a19f53c65b5d906c899ec97809898.tar.bz2
drakx-backup-do-not-use-7ad37ff6c59a19f53c65b5d906c899ec97809898.tar.xz
drakx-backup-do-not-use-7ad37ff6c59a19f53c65b5d906c899ec97809898.zip
handle multiple removable devices: their managment is different from other hw
classes since we need to run a config tool per device and not one per hw class
Diffstat (limited to 'perl-install/harddrake/data.pm')
-rw-r--r--perl-install/harddrake/data.pm13
1 files changed, 9 insertions, 4 deletions
diff --git a/perl-install/harddrake/data.pm b/perl-install/harddrake/data.pm
index cbddabfca..e355cf19e 100644
--- a/perl-install/harddrake/data.pm
+++ b/perl-install/harddrake/data.pm
@@ -26,11 +26,16 @@ sub unknown {
# FIXME: add translated items
+sub is_removable { $_[0] =~ /FLOPPY|ZIP|DVDROM|CDROM|BURNER/ }
+
sub set_removable_configurator {
- my ($class, $device, $configurator) = @_;
- if ($class =~ /FLOPPY|ZIP|DVDROM|CDROM|BURNER/) {
- $$configurator = "/usr/sbin/diskdrake --removable=$device->{device}";
- }
+ my ($class, $device) = @_;
+ return "/usr/sbin/diskdrake --removable=$device->{device}" if is_removable($class);
+}
+
+sub set_removable_remover {
+ my ($class, $device) = @_;
+ return "/usr/sbin/drakupdate_fstab --auto] --no-flag --del $device->{device}" if is_removable($class);
}
our @tree =