This breaks on osd0. I was doing something stupid with sed but I can't
figure out what right now, but osdN support is going away anyway.
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
echo "Building osdmap"
# find highest osd id - assumes the conf file complies with osd numbering requirements
- maxosd=`$CCONF -c $conf -l osd | egrep -v '^osd$' | sed 's/^\.//' | cut -c 4- | sort -n | tail -1`
+ maxosd=`$CCONF -c $conf -l osd | grep -v ^osd\$ | cut -c 5- | sort -n | tail -1`
echo " highest numbered osd in $conf is osd.$maxosd"
lastosd=$(($maxosd + 1))