diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2004-09-30 07:10:42 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2004-09-30 07:10:42 +0000 |
commit | b9e95a3303535429105cb5e14e3a5df7dd738e77 (patch) | |
tree | a8837ad832b694af0341f5d87fc500f74fa6327b /perl-install/lvm.pm | |
parent | 7bafa9736ad97c9911da511ff17efd8214232c5b (diff) | |
download | drakx-b9e95a3303535429105cb5e14e3a5df7dd738e77.tar drakx-b9e95a3303535429105cb5e14e3a5df7dd738e77.tar.gz drakx-b9e95a3303535429105cb5e14e3a5df7dd738e77.tar.bz2 drakx-b9e95a3303535429105cb5e14e3a5df7dd738e77.tar.xz drakx-b9e95a3303535429105cb5e14e3a5df7dd738e77.zip |
don't die when device-mapper is missing (occurs on 2.4 kernel) (bugzilla #11834)
Diffstat (limited to 'perl-install/lvm.pm')
-rw-r--r-- | perl-install/lvm.pm | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/perl-install/lvm.pm b/perl-install/lvm.pm index fae0a8c6b..8207b80f9 100644 --- a/perl-install/lvm.pm +++ b/perl-install/lvm.pm @@ -28,20 +28,21 @@ sub cylinder_size { $hd->{extent_size}; } -init(); +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 die "device-mapper error"; - my ($minor) = cat_('/proc/misc') =~ /(\d+) device-mapper$/m or die "device-mapper error"; + 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: $!"; } run_program::run('lvm2', 'vgscan') if !-e '/etc/lvmtab'; run_program::run('lvm2', 'vgchange', '-a', 'y'); + 1; } sub lvm_cmd { |