SVN: geninitrd/trunk/geninitrd

glen glen at pld-linux.org
Tue Dec 21 19:53:15 CET 2010


Author: glen
Date: Tue Dec 21 19:53:15 2010
New Revision: 12017

Modified:
   geninitrd/trunk/geninitrd
Log:
- catch error from image compress

Modified: geninitrd/trunk/geninitrd
==============================================================================
--- geninitrd/trunk/geninitrd	(original)
+++ geninitrd/trunk/geninitrd	Tue Dec 21 19:53:15 2010
@@ -1376,16 +1376,16 @@
 	case "$compressor" in
 	xz)
 		# don't use -9 here since kernel won't understand it
-		xz --format=xz --check=crc32 --lzma2=preset=6e,dict=1MiB < "$IMAGE" > "$tmp"
+		xz --format=xz --check=crc32 --lzma2=preset=6e,dict=1MiB < "$IMAGE" > "$tmp" || die "Compress failed, out of memory?" $?
 		;;
 	lzma)
-		xz --format=lzma -9 < "$IMAGE" > "$tmp"
+		xz --format=lzma -9 < "$IMAGE" > "$tmp" || die "Compress failed, out of memory?" $?
 		;;
 	bzip2)
-		bzip2 -9 < "$IMAGE" > "$tmp"
+		bzip2 -9 < "$IMAGE" > "$tmp" || die "Compress failed" $?
 		;;
 	gzip)
-		gzip -9 < "$IMAGE" > "$tmp"
+		gzip -9 < "$IMAGE" > "$tmp" || die "Compress failed" $?
 		;;
 	esac
 	mv -f "$tmp" "$target"


More information about the pld-cvs-commit mailing list