Blame 0020-dmsquash-live-do-not-abort-if-user-pressed-ESC-on-ch.patch

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