summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Terjan <pterjan@mageia.org>2018-01-04 04:16:43 +0000
committerPascal Terjan <pterjan@mageia.org>2018-01-04 04:16:43 +0000
commite9dd64112cbb6582a931546d9f451a5f91c84601 (patch)
treebddf22fa740c1378c2e742e2352b00099a8053a7
parentd24876d991bbcfb83fd523896dba85e2df1fce46 (diff)
downloaddrakx-e9dd64112cbb6582a931546d9f451a5f91c84601.tar
drakx-e9dd64112cbb6582a931546d9f451a5f91c84601.tar.gz
drakx-e9dd64112cbb6582a931546d9f451a5f91c84601.tar.bz2
drakx-e9dd64112cbb6582a931546d9f451a5f91c84601.tar.xz
drakx-e9dd64112cbb6582a931546d9f451a5f91c84601.zip
Really exit on error
Incorrect code noticed in a comment on mga#22266
-rw-r--r--perl-install/install/NEWS1
-rwxr-xr-xtools/mdkinst_stage2_tool5
2 files changed, 5 insertions, 1 deletions
diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS
index bb59e6c4e..a40e7e6fe 100644
--- a/perl-install/install/NEWS
+++ b/perl-install/install/NEWS
@@ -1,4 +1,5 @@
- fix perl escaping causing commands to not get linked
+- fix some error handling in mdkinst_stage2_tool
Version 17.91 - 4 October 2017
diff --git a/tools/mdkinst_stage2_tool b/tools/mdkinst_stage2_tool
index c1ef5d151..0019ffc86 100755
--- a/tools/mdkinst_stage2_tool
+++ b/tools/mdkinst_stage2_tool
@@ -36,7 +36,10 @@ if [ $ACTION = "--compress" ]; then
[ -d "$LIVE_DIR" ] || error
echo "Creating $COMPRESSED_IMAGE from $LIVE_DIR"
rm -f $STAGE2_DIR/.room
- mksquashfs $LIVE_DIR $COMPRESSED_IMAGE -all-root -noappend >/dev/null || { echo "mksquashfs failed"; exit 1; }
+ if ! mksquashfs $LIVE_DIR $COMPRESSED_IMAGE -all-root -noappend >/dev/null; then
+ echo "mksquashfs failed"
+ exit 1
+ fi
chmod 755 $COMPRESSED_IMAGE
echo foo > $STAGE2_DIR/.room
if [ -s $STAGE2_DIR/.room ]; then