From 4b95ff3e606fe31ebb206981b3fa87d6b3acd656 Mon Sep 17 00:00:00 2001 From: Paladox none Date: Thu, 1 Jun 2017 14:29:29 +0000 Subject: [PATCH] Use lsb functions if /lib/lsb/init-functions file exists I get this warnning in debian lintian 13:48:17 W: gerrit: init.d-script-does-not-source-init-functions etc/init.d/gerrit 13:48:17 N: 13:48:17 N: The /etc/init.d script does not source /lib/lsb/init-functions. The 13:48:17 N: systemd package provides /lib/lsb/init-functions.d/40-systemd to 13:48:17 N: redirect /etc/init.d/$script calls to systemctl. 13:48:17 N: 13:48:17 N: Please add a line like this to your /etc/init.d script: 13:48:17 N: 13:48:17 N: . /lib/lsb/init-functions 13:48:17 N: 13:48:17 N: Severity: normal, Certainty: certain 13:48:17 N: 13:48:17 N: Check: systemd, Type: binary See https://gerrit.wikimedia.org/r/#/c/343297/ Bug: Issue 6379 Change-Id: I7d4223ab96f70a2fd6eed53a70b06957a3edc7f3 --- .../src/main/resources/com/google/gerrit/pgm/init/gerrit.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gerrit-pgm/src/main/resources/com/google/gerrit/pgm/init/gerrit.sh b/gerrit-pgm/src/main/resources/com/google/gerrit/pgm/init/gerrit.sh index 59528801bd..d331347db6 100755 --- a/gerrit-pgm/src/main/resources/com/google/gerrit/pgm/init/gerrit.sh +++ b/gerrit-pgm/src/main/resources/com/google/gerrit/pgm/init/gerrit.sh @@ -45,6 +45,10 @@ # If set to "0" disables using start-stop-daemon. This may need to # be set on SuSE systems. +if test -f /lib/lsb/init-functions ; then + . /lib/lsb/init-functions +fi + usage() { me=`basename "$0"` echo >&2 "Usage: $me {start|stop|restart|check|status|run|supervise|threads} [-d site]"