Project

General

Profile

Feature #14348 » ceph-9.2.0-osd-prestart.diff

/usr/libexec/ceph/ceph-osd-prestart.sh fix - Artemy Kapitula, 01/12/2016 09:10 PM

View differences:

ceph-9.2.0/src/ceph-osd-prestart.sh 2016-01-12 15:36:46.000000000 -0500
#!/bin/sh
eval set -- "$(getopt -o i: --long id:,cluster: -- $@)"
eval set -- "$(getopt -o i: --long id:,cluster:,node: -- $@)"
while true ; do
case "$1" in
-i|--id) id=$2; shift 2 ;;
--cluster) cluster=$2; shift 2 ;;
--node) node=$2 ; shift 2 ;;
--) shift ; break ;;
esac
done
if [ "$id" = "" ] ; then
if echo "$node" | grep -q "\." ; then
cluster=`echo "$node" | cut -f 1 -d "."`
id=`echo "$node" | cut -f 2 -d "."`
else
id="$node"
cluster="ceph"
fi
fi
if [ -z "$id" ]; then
echo "Usage: $0 [OPTIONS]"
echo "--id/-i ID set ID portion of my name"
(1-1/2)