From: Sage Weil Date: Mon, 27 Oct 2014 21:53:26 +0000 (-0700) Subject: init-ceph: make ./init-ceph behave from src dir on systemd X-Git-Tag: v0.89~81^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F2811%2Fhead;p=ceph.git init-ceph: make ./init-ceph behave from src dir on systemd Signed-off-by: Sage Weil --- 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