From ea0aba4ae3b2eab5fc53ecc93b6ef3d12e900591 Mon Sep 17 00:00:00 2001
From: Koichiro IWAO
Date: Mon, 13 Apr 2015 11:50:39 +0900
Subject: instfiles: init.d/xrdp shouldn't be installed on systemd system
On systemd system, at least CentOS 7, `service foo start` command
works as wrapper of `systemctl start foo`. However, xrdp installs
init script into /etc/init.d/xrdp. This script is not necessary
for systemd system, and, what is worse, if init.d/xrdp exists,
`service xrdp start` works as wrapper to run init.d/xrdp. Maybe
this is inconvinient for many users.
---
instfiles/Makefile.am | 10 +++++++---
instfiles/init.d/Makefile.am | 2 +-
2 files changed, 8 insertions(+), 4 deletions(-)
(limited to 'instfiles')
diff --git a/instfiles/Makefile.am b/instfiles/Makefile.am
index 85b5ffaa..dd11c7a0 100644
--- a/instfiles/Makefile.am
+++ b/instfiles/Makefile.am
@@ -4,7 +4,6 @@ xrdp.service
SUBDIRS = \
pam.d \
- init.d \
default \
pulse
@@ -12,6 +11,9 @@ if HAVE_SYSTEMD
systemdsystemunit_DATA = \
xrdp-sesman.service \
xrdp.service
+else
+SUBDIRS+=
+ init.d
endif
startscriptdir=$(sysconfdir)/xrdp
@@ -34,5 +36,7 @@ startscript_DATA = \
# must be tab below
install-data-hook:
chmod 755 $(DESTDIR)$(sysconfdir)/xrdp/xrdp.sh
- chmod 755 $(DESTDIR)$(sysconfdir)/init.d/xrdp
- sed -i 's|__BASE__|$(prefix)|' $(DESTDIR)$(sysconfdir)/init.d/xrdp;
+ if [ -f $(DESTDIR)$(sysconfdir)/init.d/xrdp ]; then \
+ chmod 755 $(DESTDIR)$(sysconfdir)/init.d/xrdp; \
+ sed -i 's|__BASE__|$(prefix)|' $(DESTDIR)$(sysconfdir)/init.d/xrdp; \
+ fi
diff --git a/instfiles/init.d/Makefile.am b/instfiles/init.d/Makefile.am
index ae411c20..d9e43ecb 100644
--- a/instfiles/init.d/Makefile.am
+++ b/instfiles/init.d/Makefile.am
@@ -1,4 +1,4 @@
EXTRA_DIST = xrdp
startscriptdir=$(sysconfdir)/init.d
startscript_DATA = xrdp
-
+
--
cgit v1.2.1
From 2ce05038fd2130de5d3c6703058940480872f139 Mon Sep 17 00:00:00 2001
From: Koichiro IWAO
Date: Mon, 27 Apr 2015 09:28:27 +0900
Subject: instfiles: default/xrdp is not needed as well on systemd
---
instfiles/Makefile.am | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'instfiles')
diff --git a/instfiles/Makefile.am b/instfiles/Makefile.am
index dd11c7a0..e818625d 100644
--- a/instfiles/Makefile.am
+++ b/instfiles/Makefile.am
@@ -4,7 +4,6 @@ xrdp.service
SUBDIRS = \
pam.d \
- default \
pulse
if HAVE_SYSTEMD
@@ -13,6 +12,7 @@ systemdsystemunit_DATA = \
xrdp.service
else
SUBDIRS+=
+ default \
init.d
endif
--
cgit v1.2.1