summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-03-03 14:44:11 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-03-03 14:44:11 +0000
commit931c0095861d417b02c4e7a4f2c6f6e9ba342bac (patch)
treef2bd31151f46f40c33684a3d22548e601230647b /perl-install
parent9a2bd5ae48d13b720cf1a3085fe4f60ad6786c2c (diff)
downloaddrakx-931c0095861d417b02c4e7a4f2c6f6e9ba342bac.tar
drakx-931c0095861d417b02c4e7a4f2c6f6e9ba342bac.tar.gz
drakx-931c0095861d417b02c4e7a4f2c6f6e9ba342bac.tar.bz2
drakx-931c0095861d417b02c4e7a4f2c6f6e9ba342bac.tar.xz
drakx-931c0095861d417b02c4e7a4f2c6f6e9ba342bac.zip
one now need cryptoloop and aes when using encryption (kernel 2.6)
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/devices.pm2
-rw-r--r--perl-install/fs.pm5
2 files changed, 3 insertions, 4 deletions
diff --git a/perl-install/devices.pm b/perl-install/devices.pm
index 6c408a163..90358555c 100644
--- a/perl-install/devices.pm
+++ b/perl-install/devices.pm
@@ -51,9 +51,11 @@ sub find_free_loop() { find_free_loop_raw() }
sub find_free_chloop() { find_free_loop_raw('chloop') }
sub set_loop {
my ($file, $o_encrypt_key, $o_encryption) = @_;
+ eval { modules::load('loop') };
my $dev = find_free_loop();
if ($o_encrypt_key && $o_encryption) {
+ eval { modules::load('cryptoloop', 'aes') };
my $cmd = "losetup -p 0 -e $o_encryption $dev $file";
log::l("calling $cmd");
open(my $F, "|$cmd");
diff --git a/perl-install/fs.pm b/perl-install/fs.pm
index 98ef8827b..f21e68dae 100644
--- a/perl-install/fs.pm
+++ b/perl-install/fs.pm
@@ -663,10 +663,7 @@ sub format_part {
################################################################################
sub set_loop {
my ($part) = @_;
- if (!$part->{real_device}) {
- eval { modules::load('loop') };
- $part->{real_device} = devices::set_loop(devices::make($part->{device}), $part->{encrypt_key}, $part->{options} =~ /encryption=(\w+)/);
- }
+ $part->{real_device} ||= devices::set_loop(devices::make($part->{device}), $part->{encrypt_key}, $part->{options} =~ /encryption=(\w+)/);
}
sub formatMount_part {