]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
init-ceph: make lockfile dir configuration (redhat)
authorSage Weil <sage@newdream.net>
Tue, 2 Nov 2010 05:09:56 +0000 (22:09 -0700)
committerSage Weil <sage@newdream.net>
Tue, 2 Nov 2010 05:09:56 +0000 (22:09 -0700)
Reported-by: Ed Burnette <ed.burnette@sas.com>
Signed-off-by: Sage Weil <sage@newdream.net>
src/init-ceph.in

index d42a80651bb71954931728729b39607abe65919e..bc5240673b015da78c84a54d195efdfd445af440 100644 (file)
@@ -29,13 +29,6 @@ else
     fi
 fi
 
-# do lockfile, if RH
-if [ -d /var/lock/subsys ]; then
-    lockfile=/var/lock/subsys/ceph
-else
-    lockfile=""
-fi
-
 usage_exit() {
     echo "usage: $0 [options] {start|stop|restart} [mon|osd|mds]..."
     printf "\t-c ceph.conf\n"
@@ -233,6 +226,13 @@ for name in $what; do
        first_dev=`echo $btrfs_devs | cut '-d ' -f 1`
     fi
 
+    # do lockfile, if RH
+    get_conf lockfile "/var/lock/subsys/ceph" "lock file"
+    lockdir=`dirname $lockfile`
+    if [ ! -d "$lockdir" ]; then
+       lockfile=""
+    fi
+
     case "$command" in
        start)
             # build final command