[Debian-ha-commits] [pcs] 09/09: Update rules to handle registering the pcsd init script appropriately
Richard Winters
devrik-guest at moszumanska.debian.org
Mon May 4 19:55:47 UTC 2015
This is an automated email from the git hooks/post-receive script.
devrik-guest pushed a commit to branch master
in repository pcs.
commit 016eeb1cb71aba3115c584ce1e4f686dc3e2e26f
Author: Richard B Winters <rik at mmogp.com>
Date: Mon May 4 00:09:33 2015 -0400
Update rules to handle registering the pcsd init script appropriately
Change-Id: I4bfab898db20092f6adeab86ec4a78b9e7df0dc0
Signed-off-by: Richard B Winters <rik at mmogp.com>
---
debian/rules | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/debian/rules b/debian/rules
index 132fb47..0ffa6b8 100755
--- a/debian/rules
+++ b/debian/rules
@@ -11,7 +11,7 @@ export DEB_LDFLAGS_MAINT_APPEND=-Wl,-z,defs
# main packaging script based on dh7 syntax
%:
- dh $@ --with python2 --fail-missing
+ dh $@ --with python2,systemd --fail-missing
override_dh_clean:
dh_clean --keep --exclude="corosync.conf.orig"
@@ -40,10 +40,15 @@ override_dh_auto_install:
override_dh_python2:
dh_python2 -p pcs --skip-private
dh_python2 -p pcs /usr/share/pcsd
-
+
+INSTALLINIT_COMMAND = $(shell \
+ if ps -p 1 -o comm= | grep -q -i "systemd" ; \
+ then echo "dh_installinit -n --name=pcsd --"; \
+ else echo "dh_installinit --onlyscripts --name=pcsd --"; fi)
+
override_dh_installinit:
- dh_installinit -n --name=pcsd --
-
+ $(INSTALLINIT_COMMAND)
+
override_dh_compress:
# make non-scripts non-executable
chmod -x $(CURDIR)/debian/pcs/usr/share/pcsd/public/css/*
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-ha/pcs.git
More information about the Debian-HA-Commits
mailing list