summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perl-install/install_any.pm2
-rw-r--r--perl-install/lvm.pm7
2 files changed, 7 insertions, 2 deletions
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm
index f83e2a184..68cf34ab1 100644
--- a/perl-install/install_any.pm
+++ b/perl-install/install_any.pm
@@ -1029,7 +1029,6 @@ sub write_fstab {
}
my @bigseldom_used_groups = (
- [ qw(pvcreate pvdisplay vgchange vgcreate vgdisplay vgextend vgremove vgscan lvcreate lvdisplay lvremove /lib/liblvm.so) ],
);
sub check_prog {
@@ -1076,6 +1075,7 @@ sub remove_bigseldom_used {
unlink glob_("/usr/share/gtk/themes/$_*") foreach qw(marble3d);
unlink(m|^/| ? $_ : "/usr/bin/$_") foreach
((map { @$_ } @bigseldom_used_groups),
+ qw(pvcreate pvdisplay vgchange vgcreate vgdisplay vgextend vgremove vgscan lvcreate lvdisplay lvremove /lib/liblvm.so),
qw(mkreiserfs resize_reiserfs mkfs.xfs),
);
}
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
];
}