From ec593e18cf024fe09356a5ea41d4ac3e4be078a7 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Wed, 29 Dec 2004 18:34:27 +0000 Subject: move device mapper initialisation out of lvm.pm into devices.pm (since it will be useful for other things) --- perl-install/lvm.pm | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'perl-install/lvm.pm') diff --git a/perl-install/lvm.pm b/perl-install/lvm.pm index 4d3950ec6..ef3ab3090 100644 --- a/perl-install/lvm.pm +++ b/perl-install/lvm.pm @@ -31,15 +31,7 @@ sub cylinder_size { init() or log::l("lvm::init failed"); sub init() { - eval { modules::load('dm-mod') }; - devices::make('urandom'); - my $control = '/dev/mapper/control'; - if (! -e $control) { - my ($major) = cat_('/proc/devices') =~ /(\d+) misc$/m or return; - my ($minor) = cat_('/proc/misc') =~ /(\d+) device-mapper$/m or return; - mkdir_p(dirname($control)); - syscall_('mknod', $control, c::S_IFCHR() | 0600, makedev($major, $minor)) or die "mknod $control failed: $!"; - } + devices::init_device_mapper(); if ($::isInstall) { run_program::run('lvm2', 'vgscan'); run_program::run('lvm2', 'vgchange', '-a', 'y'); -- cgit v1.2.1