diff options
author | Koichiro IWAO <meta@vmeta.jp> | 2015-04-13 11:50:39 +0900 |
---|---|---|
committer | Koichiro IWAO <meta@vmeta.jp> | 2015-04-17 10:07:42 +0900 |
commit | ea0aba4ae3b2eab5fc53ecc93b6ef3d12e900591 (patch) | |
tree | c5d92b406978fad6e61d1f4707da118f4e7089c9 | |
parent | b55231f18a08e116e521e64199739f0e3be20316 (diff) | |
download | xrdp-proprietary-ea0aba4ae3b2eab5fc53ecc93b6ef3d12e900591.tar.gz xrdp-proprietary-ea0aba4ae3b2eab5fc53ecc93b6ef3d12e900591.zip |
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.
-rw-r--r-- | instfiles/Makefile.am | 10 | ||||
-rw-r--r-- | instfiles/init.d/Makefile.am | 2 |
2 files changed, 8 insertions, 4 deletions
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 - + |