summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-01-20 19:12:53 +0000
committerThierry Vignaud <tv@mageia.org>2012-01-20 19:12:53 +0000
commitd1d0ca7b6b65f08154784e34048c6b1d03486133 (patch)
tree74086c01fbf34b22de4757726e7b94120b2e92c8 /perl-install
parentfcb34609455e2cc75e19de5d4104b2a1ad0ae85a (diff)
downloaddrakx-d1d0ca7b6b65f08154784e34048c6b1d03486133.tar
drakx-d1d0ca7b6b65f08154784e34048c6b1d03486133.tar.gz
drakx-d1d0ca7b6b65f08154784e34048c6b1d03486133.tar.bz2
drakx-d1d0ca7b6b65f08154784e34048c6b1d03486133.tar.xz
drakx-d1d0ca7b6b65f08154784e34048c6b1d03486133.zip
(lvm_cmd_or_die) report back error from lvm2
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/NEWS1
-rw-r--r--perl-install/install/NEWS1
-rw-r--r--perl-install/lvm.pm7
3 files changed, 8 insertions, 1 deletions
diff --git a/perl-install/NEWS b/perl-install/NEWS
index df56351e1..f14af452f 100644
--- a/perl-install/NEWS
+++ b/perl-install/NEWS
@@ -1,6 +1,7 @@
- add support for XZ modules
- diskdrake:
o enable to set LV names when not in expert mode
+ o report back error from lvm2
o suggest better LV names based on the mount point rather than numbers
Version 13.74 - 24 December 2011
diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS
index f4004c38e..7d22cdb0a 100644
--- a/perl-install/install/NEWS
+++ b/perl-install/install/NEWS
@@ -3,6 +3,7 @@
- include gtk20 translations (caps lock & the like)
- diskdrake:
o enable to set LV names when not in expert mode
+ o report back error from lvm2
o suggest better LV names based on the mount point rather than numbers
Version 13.75.1 - 19 January 2012
diff --git a/perl-install/lvm.pm b/perl-install/lvm.pm
index 83d3e7896..6a6c250f9 100644
--- a/perl-install/lvm.pm
+++ b/perl-install/lvm.pm
@@ -56,7 +56,12 @@ sub lvm_cmd {
}
sub lvm_cmd_or_die {
my ($prog, @para) = @_;
- lvm_cmd($prog, @para) or die "$prog failed\n";
+ my @err;
+ lvm_cmd("2>", \@err, $prog, @para) or do {
+ my $err = $err[-1]; # prevent "Modification of non-creatable array value attempted"
+ chomp($err);
+ die "$prog failed: $err\n";
+ };
}
sub check {