summaryrefslogtreecommitdiffstats
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
commitafcd7efd7598f639f5c65111560108fd063c0bfb (patch)
tree74086c01fbf34b22de4757726e7b94120b2e92c8
parentcf9b2ec70e1de7f7fe5a12d9ab9c05e5151757e4 (diff)
downloaddrakx-backup-do-not-use-afcd7efd7598f639f5c65111560108fd063c0bfb.tar
drakx-backup-do-not-use-afcd7efd7598f639f5c65111560108fd063c0bfb.tar.gz
drakx-backup-do-not-use-afcd7efd7598f639f5c65111560108fd063c0bfb.tar.bz2
drakx-backup-do-not-use-afcd7efd7598f639f5c65111560108fd063c0bfb.tar.xz
drakx-backup-do-not-use-afcd7efd7598f639f5c65111560108fd063c0bfb.zip
(lvm_cmd_or_die) report back error from lvm2
-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 {