summaryrefslogtreecommitdiffstats
path: root/perl-install/devices.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2005-01-03 13:03:36 +0000
committerPascal Rigaux <pixel@mandriva.com>2005-01-03 13:03:36 +0000
commit701f4ba3cbaecf0b0a4877c3f283739bd0d232fb (patch)
tree865bdd55aa8355eb48f1ffa99409751b5a809d79 /perl-install/devices.pm
parent3d2e8fe289da08dca406ce89af34e4f87f292032 (diff)
downloaddrakx-701f4ba3cbaecf0b0a4877c3f283739bd0d232fb.tar
drakx-701f4ba3cbaecf0b0a4877c3f283739bd0d232fb.tar.gz
drakx-701f4ba3cbaecf0b0a4877c3f283739bd0d232fb.tar.bz2
drakx-701f4ba3cbaecf0b0a4877c3f283739bd0d232fb.tar.xz
drakx-701f4ba3cbaecf0b0a4877c3f283739bd0d232fb.zip
move mdkinst.clp on hard drive ASAP
=> allows multi-cd installs even if the mdkinst.clp was not preloaded => allows to better memory handling during pkgs install (hopefully at least)
Diffstat (limited to 'perl-install/devices.pm')
-rw-r--r--perl-install/devices.pm11
1 files changed, 11 insertions, 0 deletions
diff --git a/perl-install/devices.pm b/perl-install/devices.pm
index 5771468c8..50dd3bef6 100644
--- a/perl-install/devices.pm
+++ b/perl-install/devices.pm
@@ -64,6 +64,17 @@ sub set_loop {
$dev;
}
+sub find_clp_loop {
+ my ($name) = @_;
+ foreach (0..255) {
+ my $dev = make("loop$_");
+ my ($file) = `losetup $dev 2>/dev/null` =~ m!\((.*?)\)! or return;
+ $file =~ s!^/sysroot/!/!;
+ basename($file) eq $name and return $dev, $file;
+ }
+ undef;
+}
+
sub init_device_mapper() {
eval { modules::load('dm-mod') };
make('urandom');