summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-01-13 11:56:13 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-01-13 11:56:13 +0000
commit8afcf58402d2640d86353bd34ee2734530c2ab5b (patch)
tree32323132387d871c2f05dfef371e210b6d8bd184
parent3bd1b10d335923ff4216dd58e35d1d957a5400d3 (diff)
downloaddrakx-8afcf58402d2640d86353bd34ee2734530c2ab5b.tar
drakx-8afcf58402d2640d86353bd34ee2734530c2ab5b.tar.gz
drakx-8afcf58402d2640d86353bd34ee2734530c2ab5b.tar.bz2
drakx-8afcf58402d2640d86353bd34ee2734530c2ab5b.tar.xz
drakx-8afcf58402d2640d86353bd34ee2734530c2ab5b.zip
- install lvm2 rpm instead of lvm (and using ->ensure_is_installed)
- "vgdisplay" error status is not good, using "vgs" instead
-rw-r--r--perl-install/lvm.pm6
1 files changed, 2 insertions, 4 deletions
diff --git a/perl-install/lvm.pm b/perl-install/lvm.pm
index 716880517..68e8f6e2f 100644
--- a/perl-install/lvm.pm
+++ b/perl-install/lvm.pm
@@ -55,9 +55,7 @@ sub lvm_cmd_or_die {
sub check {
my ($in) = @_;
- my $f = '/sbin/pvcreate';
- -e $f or $in->do_pkgs->install('lvm');
- -e $f or $in->ask_warn('', "Mandatory package lvm is missing"), return;
+ $in->do_pkgs->ensure_is_installed('lvm2', '/sbin/lvm2') or return;
init();
1;
}
@@ -99,7 +97,7 @@ sub vg_add {
my ($part) = @_;
my $dev = expand_symlinks(devices::make($part->{device}));
lvm_cmd_or_die('pvcreate', '-y', '-ff', $dev);
- my $prog = lvm_cmd('vgdisplay', $part->{lvm}) ? 'vgextend' : 'vgcreate';
+ my $prog = lvm_cmd('vgs', $part->{lvm}) ? 'vgextend' : 'vgcreate';
lvm_cmd_or_die($prog, $part->{lvm}, $dev);
}