]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
stop.sh: compile cephadm
authorMichael Fritch <mfritch@suse.com>
Thu, 18 Nov 2021 23:15:32 +0000 (16:15 -0700)
committerJohn Mulligan <jmulligan@redhat.com>
Tue, 13 Sep 2022 16:17:20 +0000 (12:17 -0400)
use the path to the compiled cephadm binary file

Signed-off-by: Michael Fritch <mfritch@suse.com>
src/stop.sh

index 55abb759330736ebe880bacefb5d02bd23c6e2a7..dce34b6513f1bdfae3e73985873dcd958dd12575 100755 (executable)
@@ -30,7 +30,10 @@ else
   CEPH_CONF_PATH="$PWD"
 fi
 conf_fn="$CEPH_CONF_PATH/ceph.conf"
-CEPHADM_DIR_PATH="$CEPH_CONF_PATH/../src/cephadm"
+
+if [ -z "$CEPHADM" ]; then
+  CEPHADM="${CEPH_BIN}/cephadm"
+fi
 
 MYUID=$(id -u)
 MYNAME=$(id -nu)
@@ -75,7 +78,7 @@ maybe_kill() {
 
 do_killcephadm() {
     FSID=$($CEPH_BIN/ceph -c $conf_fn fsid)
-    sudo $CEPHADM_DIR_PATH/cephadm rm-cluster --fsid $FSID --force
+    sudo $CEPHADM rm-cluster --fsid $FSID --force
 }
 
 do_umountall() {
@@ -189,7 +192,7 @@ if [ $stop_all -eq 1 ]; then
         fi
     fi
 
-    daemons="$(sudo $CEPHADM_DIR_PATH/cephadm ls 2> /dev/null)"
+    daemons="$(sudo $CEPHADM ls 2> /dev/null)"
     if [ $? -eq 0 -a "$daemons" != "[]" ]; then
         do_killcephadm
     fi