summaryrefslogtreecommitdiffstats
path: root/perl-install/detect_devices.pm
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2001-06-05 16:54:44 +0000
committerFrancois Pons <fpons@mandriva.com>2001-06-05 16:54:44 +0000
commitf4ad582b9636b4ade9a332380a7a15d75a92b429 (patch)
tree010742a79ce7bc1b238ef4182b9aedfb4bda8f75 /perl-install/detect_devices.pm
parent1f62beedf81f47538f0610a8f5cd7e4f52f2dca1 (diff)
downloaddrakx-backup-do-not-use-f4ad582b9636b4ade9a332380a7a15d75a92b429.tar
drakx-backup-do-not-use-f4ad582b9636b4ade9a332380a7a15d75a92b429.tar.gz
drakx-backup-do-not-use-f4ad582b9636b4ade9a332380a7a15d75a92b429.tar.bz2
drakx-backup-do-not-use-f4ad582b9636b4ade9a332380a7a15d75a92b429.tar.xz
drakx-backup-do-not-use-f4ad582b9636b4ade9a332380a7a15d75a92b429.zip
added DVD support, only first try to detect a DVD drive and rpmsrate is not
updated.
Diffstat (limited to 'perl-install/detect_devices.pm')
-rw-r--r--perl-install/detect_devices.pm2
1 files changed, 2 insertions, 0 deletions
diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm
index 7d1133c71..c2be7e1e8 100644
--- a/perl-install/detect_devices.pm
+++ b/perl-install/detect_devices.pm
@@ -51,6 +51,7 @@ sub cdroms() {
}
sub burners { grep { $_->{type} eq 'cdrom' && isBurner($_->{device}) } get() }
sub IDEburners { grep { $_->{type} eq 'cdrom' && isBurner($_->{device}) } getIDE() }
+sub dvdroms { grep { $_->{type} eq 'cdrom' && isDvdDrive($_) } get() }
sub get_mac_model() {
my $mac_model = cat_("/proc/device-tree/model") || die "Can't open /proc/device-tree/model";
@@ -78,6 +79,7 @@ sub isBurner {
$f && c::isBurner(fileno($f));
}
}
+sub isDvdDrive { $_[0]->{info} =~ /DVD/ }
sub isZipDrive { $_[0]->{info} =~ /ZIP\s+\d+/ } #- accept ZIP 100, untested for bigger ZIP drive.
#-sub isJazzDrive { $_[0]->{info} =~ /JAZZ?\s+/ } #- untested.
sub isLS120Drive { $_[0]->{info} =~ /LS-?120|144MB/ }