]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
vstart.sh: do not try to remove default asok_dir 16523/head
authorKefu Chai <kchai@redhat.com>
Mon, 24 Jul 2017 08:38:13 +0000 (16:38 +0800)
committerKefu Chai <kchai@redhat.com>
Mon, 24 Jul 2017 08:40:10 +0000 (16:40 +0800)
Signed-off-by: Kefu Chai <kchai@redhat.com>
src/vstart.sh

index 1b63b62689fb3f4013f5f441e3ab8a3525647ac6..8fb64f9910e643e7f8337a5583afa144ea1e8773 100755 (executable)
@@ -343,7 +343,9 @@ else
     if [ "$new" -ne 0 ]; then
         # only delete if -n
         asok_dir=`dirname $($CEPH_BIN/ceph-conf --show-config-value admin_socket)`
-        [ -d $asok_dir ] && rm -f $asok_dir/* && rmdir $asok_dir
+        if [ $asok_dir != /var/run/ceph ]; then
+            [ -d $asok_dir ] && rm -f $asok_dir/* && rmdir $asok_dir
+        fi
         if [ -z "$CEPH_ASOK_DIR" ]; then
             CEPH_ASOK_DIR=`mktemp -u -d "${TMPDIR:-/tmp}/ceph-asok.XXXXXX"`
         fi