mrc0mmand / rpms / lvm2

Forked from rpms/lvm2 2 years ago
Clone

Blame SOURCES/lvm2-2_03_14-vdo-prompt-with-no-return-failure.patch

0c180e
From f3f99d45b89d415528e21a66f94ab4576f95ba56 Mon Sep 17 00:00:00 2001
0c180e
From: Zdenek Kabelac <zkabelac@redhat.com>
0c180e
Date: Fri, 10 Sep 2021 22:39:23 +0200
0c180e
Subject: [PATCH 5/5] vdo: prompt with no return failure
0c180e
0c180e
Exit 1  (failure) when prompt for conversion is answered as 'No'.
0c180e
0c180e
(cherry picked from commit 3b24c0fe4e197383101eae53b14f19586cf2eda1)
0c180e
---
0c180e
 scripts/lvm_import_vdo.sh | 2 +-
0c180e
 1 file changed, 1 insertion(+), 1 deletion(-)
0c180e
0c180e
diff --git a/scripts/lvm_import_vdo.sh b/scripts/lvm_import_vdo.sh
0c180e
index e5b30d8..06a043c 100755
0c180e
--- a/scripts/lvm_import_vdo.sh
0c180e
+++ b/scripts/lvm_import_vdo.sh
0c180e
@@ -356,7 +356,7 @@ EOF
0c180e
 		read -n 1 -s ANSWER
0c180e
 		case "${ANSWER:0:1}" in
0c180e
 			y|Y )  echo "Yes" ;;
0c180e
-			* )    echo "No" ; PROMPTING=""; exit ;;
0c180e
+			* )    echo "No" ; PROMPTING=""; exit 1 ;;
0c180e
 		esac
0c180e
 		PROMPTING=""
0c180e
 		YES="-y" # From now, now prompting
0c180e
-- 
0c180e
1.8.3.1
0c180e