aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Whitaker <mageia@martin-whitaker.me.uk>2020-05-04 10:56:25 +0100
committerMartin Whitaker <mageia@martin-whitaker.me.uk>2020-05-04 10:56:25 +0100
commit987987df5f22469c01ce92bd172688f7b190a5eb (patch)
tree97187c9ce8ac69aceaf9dae9d8557d54ddfee28a
parent5c9eb541e1e8ea1c943fa0d762251265eabc4041 (diff)
downloadperl-Hal-Cdroms-987987df5f22469c01ce92bd172688f7b190a5eb.tar
perl-Hal-Cdroms-987987df5f22469c01ce92bd172688f7b190a5eb.tar.gz
perl-Hal-Cdroms-987987df5f22469c01ce92bd172688f7b190a5eb.tar.bz2
perl-Hal-Cdroms-987987df5f22469c01ce92bd172688f7b190a5eb.tar.xz
perl-Hal-Cdroms-987987df5f22469c01ce92bd172688f7b190a5eb.zip
Recognise any media that has a CD filesystem (iso9660 or udf).
This allows urpmi to automatically mount installer ISOs on USB sticks.
-rw-r--r--lib/Hal/Cdroms.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Hal/Cdroms.pm b/lib/Hal/Cdroms.pm
index dfb2585..0d4b235 100644
--- a/lib/Hal/Cdroms.pm
+++ b/lib/Hal/Cdroms.pm
@@ -88,7 +88,8 @@ sub _is_cdrom {
my ($o, $udisks_path) = @_;
my $device = _get_device($o, $udisks_path);
my $drive = _get_drive($o, $device);
- return unless $drive && _get_property($drive, 'Drive', 'Optical');
+ return unless $drive && _get_property($drive, 'Drive', 'Removable');
+ return unless member(_get_property($device, 'Block', 'IdType'), 'iso9660', 'udf');
eval { _get_property($device, 'Filesystem', 'MountPoints') };
}