summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2011-10-07 23:13:24 +0000
committerThierry Vignaud <tv@mageia.org>2011-10-07 23:13:24 +0000
commit61641f2f42126f0a121cd9d0bdcea79f5c06852f (patch)
treec5546e3eb333ebe5366e0fe0c445ddf77ceb879c
parentc469a87ef9efd7a60490f9662adfa5203322ac8c (diff)
downloaddrakx-backup-do-not-use-61641f2f42126f0a121cd9d0bdcea79f5c06852f.tar
drakx-backup-do-not-use-61641f2f42126f0a121cd9d0bdcea79f5c06852f.tar.gz
drakx-backup-do-not-use-61641f2f42126f0a121cd9d0bdcea79f5c06852f.tar.bz2
drakx-backup-do-not-use-61641f2f42126f0a121cd9d0bdcea79f5c06852f.tar.xz
drakx-backup-do-not-use-61641f2f42126f0a121cd9d0bdcea79f5c06852f.zip
better error reporting
-rwxr-xr-ximages/make_boot_img4
1 files changed, 3 insertions, 1 deletions
diff --git a/images/make_boot_img b/images/make_boot_img
index c6bf57436..08adbb697 100755
--- a/images/make_boot_img
+++ b/images/make_boot_img
@@ -4,6 +4,7 @@ use Config;
use FileHandle;
use MDK::Common;
use POSIX;
+use Carp;
Config->import;
my ($arch) = $Config{archname} =~ /(.*?)-/;
@@ -25,7 +26,8 @@ if ($>) {
}
sub __ { print @_, "\n"; system(@_) }
-sub _ { __ @_; $? and die }
+sub _ { __ @_; $? and croak "'" . join(' ', @_) . "failed ($?)\n" }
+
sub mke2fs {
my ($f) = @_;
_ "/sbin/mke2fs -q -m 0 -F -s 1 $f";