mirror of
https://github.com/ceph/ceph
synced 2024-12-30 15:33:31 +00:00
ceph-daemon: remove guesswork to find script file
Allow passing CEPH_DAEMON via the environment or default to using the script from the standard location. Signed-off-by: Michael Fritch <mfritch@suse.com>
This commit is contained in:
parent
9e03530441
commit
995e5c3209
@ -22,16 +22,12 @@ OSD_LV_NAME=${SCRIPT_NAME%.*}
|
||||
[ -z "$SUDO" ] && SUDO=sudo
|
||||
|
||||
if [ -z "$CEPH_DAEMON" ]; then
|
||||
[ -x src/ceph-daemon/ceph-daemon ] && CEPH_DAEMON=src/ceph-daemon/ceph-daemon
|
||||
[ -x ../src/ceph-daemon/ceph-daemon ] && CEPH_DAEMON=../src/ceph-daemon/ceph-daemon
|
||||
[ -x ./ceph-daemon/ceph-daemon ] && CEPH_DAEMON=./ceph-daemon/ceph-daemon
|
||||
[ -x ./ceph-daemon ] && CEPH_DAEMON=.ceph-daemon
|
||||
which ceph-daemon && CEPH_DAEMON=$(which ceph-daemon)
|
||||
CEPH_DAEMON=${SCRIPT_DIR}/../../src/ceph-daemon/ceph-daemon
|
||||
fi
|
||||
|
||||
# at this point, we need $CEPH_DAEMON set
|
||||
if [ -z "$CEPH_DAEMON" ]; then
|
||||
echo "ceph-daemon not found.Please set \$CEPH_DAEMON"
|
||||
if ! [ -x "$CEPH_DAEMON" ]; then
|
||||
echo "ceph-daemon not found. Please set \$CEPH_DAEMON"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user