Check for ceph.conf instead of package

Rather than looking for a package to be installed,
this change lets us look for the ceph.conf that is
setup by the charm to determine if the charm has moved
past its install hook

Change-Id: I2b6cfbe0bb4207733ed991f6d3a9850584e30408
This commit is contained in:
Chris MacNaughton 2018-06-13 15:25:01 +02:00
parent 1f68a5874e
commit a7223f0968
1 changed files with 5 additions and 1 deletions

View File

@ -9,7 +9,11 @@
# Note: this doesn't wait to ensure that ceph is bootstrapped because
# that logic is already existing in the charm's hook.
if ! dpkg -s ceph > /dev/null 2>&1; then
IFS='/' read -r -a array <<< "$JUJU_UNIT_NAME"
LOCAL_UNIT="${array[0]}"
charm_ceph_conf="/var/lib/charm/$LOCAL_UNIT/ceph.conf"
if ! test -e $charm_ceph_conf; then
juju-log "Ceph not yet installed."
exit 0
fi