]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mkcephfs: fix check for highest osd
authorSage Weil <sage.weil@dreamhost.com>
Fri, 15 Apr 2011 22:11:25 +0000 (15:11 -0700)
committerSage Weil <sage.weil@dreamhost.com>
Fri, 15 Apr 2011 22:11:25 +0000 (15:11 -0700)
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>
src/mkcephfs.in

index 834d776fc4a5abe8fb173569fec1c478e072d3d6..40a1cf90596d550b126c2d1a72a0272dc44dac86 100644 (file)
@@ -291,7 +291,7 @@ if [ $preparemon -eq 1 ]; then
     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))