File 0001-Fix-ha-cluster-init-dmidecode-command-not-found-bsc-.patch of Package ha-cluster-bootstrap.11348

From 2c71a397f7616af2c927bd4053650d586509873d Mon Sep 17 00:00:00 2001
From: liangxin1300 <XLiang@suse.com>
Date: Mon, 29 Apr 2019 14:09:22 +0800
Subject: [PATCH] Fix: ha-cluster-init: dmidecode command not found
 (bsc#1104118)

---
 scripts/ha-cluster-init | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/ha-cluster-init b/scripts/ha-cluster-init
index b5ceb02..376da87 100755
--- a/scripts/ha-cluster-init
+++ b/scripts/ha-cluster-init
@@ -400,7 +400,7 @@ init_corosync()
 {
 	init_corosync_auth
 
-	if dmidecode -s system-version | grep '\<.*\.amazon\>'; then
+	if [ -x "$(command -v dmidecode)" ] && dmidecode -s system-version | grep '\<.*\.amazon\>'; then
 		init_corosync_unicast
 	elif $COROSYNC_UNICAST; then
 		init_corosync_unicast
-- 
1.8.3.1

openSUSE Build Service is sponsored by