Skip to content

Commit

Permalink
init-ceph: fix status version check across machines
Browse files Browse the repository at this point in the history
The local state isn't propagated into the backtick shell, resulting in
'unknown' for all remote daemons.  Avoid backticks altogether.

Signed-off-by: Sage Weil <[email protected]>
  • Loading branch information
Sage Weil committed Dec 28, 2012
1 parent 6356739 commit 6c7b667
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/init-ceph.in
Original file line number Diff line number Diff line change
Expand Up @@ -340,8 +340,8 @@ for name in $what; do
status)
if daemon_is_running $name ceph-$type $id $pid_file; then
get_conf asok "/var/run/ceph/ceph-$type.$id.asok" "admin socket"
version=`do_cmd "$BINDIR/ceph --admin-daemon $asok version 2>/dev/null" || echo unknown`
echo "$name: running $version"
echo -n "$name: running "
do_cmd "$BINDIR/ceph --admin-daemon $asok version 2>/dev/null" || echo unknown
elif [ -e "$pid_file" ]; then
# daemon is dead, but pid file still exists
echo "$name: dead."
Expand Down

0 comments on commit 6c7b667

Please sign in to comment.