代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/openhpi 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From d82555d0f32fc341d8f3e58a08f63894a3eb7ce0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dan=20Hor=C3=A1k?= <dan@danny.cz>
Date: Tue, 6 Mar 2012 11:23:01 +0100
Subject: [PATCH] add support for systemd
New configure parameter is introduced (--with-systemdsystemunitdir) and when set
it means that systemd service file will be installed instead of the classis initscript.
---
configure.ac | 12 ++++++++++++
openhpid/Makefile.am | 7 +++++++
openhpid/openhpid.service.in | 11 +++++++++++
3 files changed, 30 insertions(+)
create mode 100644 openhpid/openhpid.service.in
diff --git a/configure.ac b/configure.ac
index e538fb4..80157af 100644
--- a/configure.ac
+++ b/configure.ac
@@ -709,6 +709,17 @@ AC_ARG_ENABLE([man],
AC_SUBST(MAN,"")
fi])
+dnl systemd system unit files location
+AC_ARG_WITH([systemdsystemunitdir],
+ AS_HELP_STRING([--with-systemdsystemunitdir@<:@=DIR@:>@],[systemd system unit files location]),
+ [enable_systemd=yes],
+ [enable_systemd=no])
+
+dnl enable systemd and set unit dir
+AM_CONDITIONAL([ENABLE_SYSTEMD], [test "x$enable_systemd" = "xyes"])
+unitdir=$with_systemdsystemunitdir
+AC_SUBST(unitdir)
+
AC_CONFIG_FILES([openhpi.spec
openhpi.pc
rt-env.sh
@@ -751,6 +762,7 @@ AC_CONFIG_FILES([openhpi.spec
docs/man/Makefile
openhpid/Makefile
openhpid/openhpid.sh
+ openhpid/openhpid.service
openhpid/t/Makefile
openhpid/t/ohpi/Makefile
hpi_shell/Makefile
diff --git a/openhpid/Makefile.am b/openhpid/Makefile.am
index bccbce5..bfc6e73 100644
--- a/openhpid/Makefile.am
+++ b/openhpid/Makefile.am
@@ -28,6 +28,7 @@ DIST_SUBDIRS = t
EXTRA_DIST = \
openhpid.sh.in \
+ openhpid.service.in \
Makefile.mingw32 \
openhpid-win32.cpp \
version.rc
@@ -83,11 +84,17 @@ endif
install-data-local:
+if ENABLE_SYSTEMD
+ $(mkinstalldirs) $(DESTDIR)$(unitdir)
+ $(INSTALL) -m 0644 openhpid.service $(DESTDIR)$(unitdir)
+else
$(mkinstalldirs) $(DESTDIR)$(sysconfdir)/init.d
$(INSTALL) -m 0755 openhpid.sh $(DESTDIR)$(sysconfdir)/init.d/openhpid
+endif
uninstall-local:
rm -f $(DESTDIR)$(sysconfdir)/init.d/openhpid
+ rm -f $(DESTDIR)$(unitdir)/openhpid.service
clean-local:
rm -f *~ core core.*
diff --git a/openhpid/openhpid.service.in b/openhpid/openhpid.service.in
new file mode 100644
index 0000000..69b1348
--- /dev/null
+++ b/openhpid/openhpid.service.in
@@ -0,0 +1,11 @@
+[Unit]
+Description=Daemon providing access to the SAF Hardware Platform Interface
+After=syslog.target
+
+[Service]
+Type=forking
+PIDFile=/var/run/openhpid.pid
+ExecStart=@sbindir@/openhpid -c @sysconfdir@/openhpi/openhpi.conf
+
+[Install]
+WantedBy=multi-user.target
--
1.9.3
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。