]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
init-ceph: make ./init-ceph behave from src dir on systemd 2811/head
authorSage Weil <sage@redhat.com>
Mon, 27 Oct 2014 21:53:26 +0000 (14:53 -0700)
committerSage Weil <sage@redhat.com>
Mon, 27 Oct 2014 22:02:18 +0000 (15:02 -0700)
Signed-off-by: Sage Weil <sage@redhat.com>
src/init-ceph.in

index 0ed77abab66a861d272a79132617bc6397993850..cfe25d8799e6fdd0cba9992477ea032bb8c6cfb3 100644 (file)
 
 . /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