From b26bd40e94272e5d0d6cb985d42e0f8794ea5d5f Mon Sep 17 00:00:00 2001
From: rpm-build <rpm-build>
Date: Wed, 8 Feb 2023 10:43:57 +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 a677a53..eaaedae 100644
--- a/configure.ac
+++ b/configure.ac
@@ -217,6 +217,15 @@ for i in $DISTRO $DISTROS; do
 			DISTROEXT=fedora
 			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 a16917f..add8880 100644
--- a/pcsd/Makefile.am
+++ b/pcsd/Makefile.am
@@ -1,6 +1,7 @@
 EXTRA_DIST		= \
 			  pam/pcsd.debian \
 			  pam/pcsd.fedora \
+			  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.33.0

