Blame SOURCES/0274-dmsquash-live-do-not-abort-if-user-pressed-ESC-on-ch.patch

18971c
From 2af6708641bb896f0c117ae49906783cfd46f0a8 Mon Sep 17 00:00:00 2001
18971c
From: Harald Hoyer <harald@redhat.com>
18971c
Date: Tue, 25 Nov 2014 13:44:54 +0100
18971c
Subject: [PATCH] dmsquash-live: do not abort, if user pressed ESC on
18971c
 checkisomd5
18971c
18971c
If the user pressed ESC while checkisomd5 runs the media check, it will
18971c
exit with "2". Previously that would mean, that the media check was not
18971c
successful.
18971c
18971c
(cherry picked from commit 370035d561baa6852bcb02161ef736a78b62b336)
18971c
---
18971c
 modules.d/90dmsquash-live/checkisomd5@.service  | 1 +
18971c
 modules.d/90dmsquash-live/dmsquash-live-root.sh | 2 +-
18971c
 2 files changed, 2 insertions(+), 1 deletion(-)
18971c
18971c
diff --git a/modules.d/90dmsquash-live/checkisomd5@.service b/modules.d/90dmsquash-live/checkisomd5@.service
18971c
index 20e40bd7..c4ca10f3 100644
18971c
--- a/modules.d/90dmsquash-live/checkisomd5@.service
18971c
+++ b/modules.d/90dmsquash-live/checkisomd5@.service
18971c
@@ -11,3 +11,4 @@ StandardInput=tty-force
18971c
 StandardOutput=inherit
18971c
 StandardError=inherit
18971c
 TimeoutSec=0
18971c
+SuccessExitStatus=2
18971c
diff --git a/modules.d/90dmsquash-live/dmsquash-live-root.sh b/modules.d/90dmsquash-live/dmsquash-live-root.sh
18971c
index 64abc0be..8d5476cd 100755
18971c
--- a/modules.d/90dmsquash-live/dmsquash-live-root.sh
18971c
+++ b/modules.d/90dmsquash-live/dmsquash-live-root.sh
18971c
@@ -46,7 +46,7 @@ if [ -n "$check" ]; then
18971c
     else
18971c
         checkisomd5 --verbose $livedev
18971c
     fi
18971c
-    if [ $? -ne 0 ]; then
18971c
+    if [ $? -eq 1 ]; then
18971c
         die "CD check failed!"
18971c
         exit 1
18971c
     fi