resource-agents/RHEL-13089-2-crypt-fix-crypt_type-check-and-usage.patch
Oyvind Albrigtsen b209cbe076 - crypt: new resource agent
Resolves: RHEL-13089
2025-04-24 14:52:56 +02:00

33 lines
946 B
Diff

From fa45156e8b22d477ea8cbbfe48151e4e0b173320 Mon Sep 17 00:00:00 2001
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
Date: Thu, 24 Apr 2025 14:45:52 +0200
Subject: [PATCH] crypt: fix crypt_type check, and usage when action has not
been specified
---
heartbeat/crypt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/heartbeat/crypt b/heartbeat/crypt
index 4d4d6142b..1dbf8c33f 100755
--- a/heartbeat/crypt
+++ b/heartbeat/crypt
@@ -207,7 +207,7 @@ crypt_validate_all() {
ocf_exit_reason "Hash key file $key_file not accessible"
return $OCF_ERR_CONFIGURED
fi
- if ! ocf_is_true "$use_clevis" && [ ! -r "$crypt_type" ]; then
+ if ! ocf_is_true "$use_clevis" && [ -z "$crypt_type" ]; then
ocf_exit_reason "crypt_type not set"
return $OCF_ERR_CONFIGURED
fi
@@ -348,7 +348,7 @@ crypt_monitor() {
# Check for strange argument count.
if [ $# -ne 1 ]; then
- usage
+ crypt_usage
exit $OCF_ERR_GENERIC
fi