summaryrefslogtreecommitdiffstats
path: root/perl-install/lvm.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-02-21 14:55:02 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-02-21 14:55:02 +0000
commit4772762d86804d24c9707079c5ad7287e68b0809 (patch)
tree29cf2e2174a28fe5c0ee08d062df97e3f687cb4e /perl-install/lvm.pm
parent6dde5c8b426c01b73c1c63f2a1e74a0af95264e1 (diff)
downloaddrakx-backup-do-not-use-4772762d86804d24c9707079c5ad7287e68b0809.tar
drakx-backup-do-not-use-4772762d86804d24c9707079c5ad7287e68b0809.tar.gz
drakx-backup-do-not-use-4772762d86804d24c9707079c5ad7287e68b0809.tar.bz2
drakx-backup-do-not-use-4772762d86804d24c9707079c5ad7287e68b0809.tar.xz
drakx-backup-do-not-use-4772762d86804d24c9707079c5ad7287e68b0809.zip
ensure lvm tools don't need to be all installed at the same time
Diffstat (limited to 'perl-install/lvm.pm')
-rw-r--r--perl-install/lvm.pm7
1 files changed, 6 insertions, 1 deletions
diff --git a/perl-install/lvm.pm b/perl-install/lvm.pm
index b82cb589c..327e07fe2 100644
--- a/perl-install/lvm.pm
+++ b/perl-install/lvm.pm
@@ -43,17 +43,22 @@ sub check {
sub get_vg {
my ($part) = @_;
my $dev = expand_symlinks(devices::make($part->{device}));
+ install_any::check_prog ("pvdisplay") if $::isInstall;
(split(':', `pvdisplay -c $dev`))[1];
}
sub update_size {
my ($lvm) = @_;
+ install_any::check_prog ("vgdisplay") if $::isInstall;
my @l = split(':', `vgdisplay -c -D $lvm->{LVMname}`);
$lvm->{totalsectors} = ($lvm->{PE_size} = $l[12]) * $l[13];
}
sub get_lvs {
my ($lvm) = @_;
+ install_any::check_prog ("vgdisplay") if $::isInstall;
+ my @l = `vgdisplay -v -D $lvm->{LVMname}`;
+ install_any::check_prog ("lvdisplay") if $::isInstall;
$lvm->{primary}{normal} =
[
map {
@@ -61,7 +66,7 @@ sub get_lvs {
{ device => $_,
type => $type || 0x83,
size => (split(':', `lvdisplay -D -c /dev/$_`))[6] }
- } map { m|^LV Name\s+/dev/(\S+)| ? $1 : () } `vgdisplay -v -D $lvm->{LVMname}`
+ } map { m|^LV Name\s+/dev/(\S+)| ? $1 : () } @l
];
}