From 387d5d8275ab595b09704ab7801ece89813e70c5 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Mon, 27 Oct 2014 14:53:26 -0700 Subject: [PATCH] init-ceph: make ./init-ceph behave from src dir on systemd Signed-off-by: Sage Weil --- src/init-ceph.in | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/init-ceph.in b/src/init-ceph.in index 0ed77abab66a..cfe25d8799e6 100644 --- a/src/init-ceph.in +++ b/src/init-ceph.in @@ -14,6 +14,10 @@ . /lib/lsb/init-functions +# detect systemd +SYSTEMD=0 +grep -qs systemd /proc/1/comm && SYSTEMD=1 + # if we start up as ./init-ceph, assume everything else is in the # current directory too. if [ `dirname $0` = "." ] && [ $PWD != "/etc/init.d" ]; then @@ -21,6 +25,7 @@ if [ `dirname $0` = "." ] && [ $PWD != "/etc/init.d" ]; then SBINDIR=. LIBDIR=. ETCDIR=. + SYSTEMD=0 else BINDIR=@bindir@ SBINDIR=@prefix@/sbin @@ -45,10 +50,6 @@ test -f $LIBDIR/ceph_common.sh || exit 0 EXIT_STATUS=0 -# detect systemd -SYSTEMD=0 -grep -qs systemd /proc/1/comm && SYSTEMD=1 - signal_daemon() { name=$1 daemon=$2 -- 2.47.3