Blame SOURCES/lvm2-2_02_188-blkdeactivate-add-missing-VDO_AVAILABLE-check-in-dea.patch

e1e9d4
 scripts/blkdeactivate.sh.in | 6 ++++++
e1e9d4
 1 file changed, 6 insertions(+)
e1e9d4
e1e9d4
diff --git a/scripts/blkdeactivate.sh.in b/scripts/blkdeactivate.sh.in
e1e9d4
index 57b3e58..7c517b8 100644
e1e9d4
--- a/scripts/blkdeactivate.sh.in
e1e9d4
+++ b/scripts/blkdeactivate.sh.in
e1e9d4
@@ -330,6 +330,12 @@ deactivate_vdo() {
e1e9d4
         test -b "$DEV_DIR/mapper/$xname" || return 0
e1e9d4
         test -z "${SKIP_DEVICE_LIST["$kname"]}" || return 1
e1e9d4
 
e1e9d4
+	# Skip VDO device deactivation if VDO tools missing.
e1e9d4
+	test "$VDO_AVAILABLE" -eq 0 && {
e1e9d4
+		add_device_to_skip_list
e1e9d4
+		return 1
e1e9d4
+	}
e1e9d4
+
e1e9d4
         deactivate_holders "$DEV_DIR/mapper/$xname" || return 1
e1e9d4
 
e1e9d4
         echo -n "  [VDO]: deactivating VDO volume $xname... "