From 3a9534a997237c52783f9b668a18f585e618cd52 Mon Sep 17 00:00:00 2001
From: rpm-build <rpm-build>
Date: Wed, 6 Dec 2023 06:26:32 +0800
Subject: [PATCH] Support for openEuler

---
 configure.ac            | 9 +++++++++
 pcsd/Makefile.am        | 1 +
 pcsd/pam/pcsd.openEuler | 5 +++++
 3 files changed, 15 insertions(+)
 create mode 100644 pcsd/pam/pcsd.openEuler

diff --git a/configure.ac b/configure.ac
index 20db079..68de52c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -258,6 +258,15 @@ for i in $DISTRO $DISTROS; do
 			DISTROEXT=opencloudos
 			break
 		;;
+                openEuler)
+                        FOUND_DISTRO=1
+                        CONFIGDIR="$sysconfdir/sysconfig"
+                        PCSLIBDIR="$LIBDIR"
+                        PCMKDAEMONDIR="$prefix/libexec/pacemaker"
+                        COROSYNCLOGDIR="$localstatedir/log/cluster"
+                        DISTROEXT=openEuler
+                        break
+                ;;
 	esac
 done
 
diff --git a/pcsd/Makefile.am b/pcsd/Makefile.am
index fb8b116..ac65bef 100644
--- a/pcsd/Makefile.am
+++ b/pcsd/Makefile.am
@@ -2,6 +2,7 @@ EXTRA_DIST		= \
 			  pam/pcsd.debian \
 			  pam/pcsd.fedora \
 			  pam/pcsd.opencloudos \
+                          pam/pcsd.openEuler \
 			  test/cib1.xml \
 			  test/corosync.conf \
 			  test/crm1.xml \
diff --git a/pcsd/pam/pcsd.openEuler b/pcsd/pam/pcsd.openEuler
new file mode 100644
index 0000000..fcb7a46
--- /dev/null
+++ b/pcsd/pam/pcsd.openEuler
@@ -0,0 +1,5 @@
+#%PAM-1.0
+auth       include      system-auth
+account    include      system-auth
+password   include      system-auth
+session    include      system-auth
-- 
2.41.0

