~ubuntu-branches/ubuntu/quantal/ceph/quantal

« back to all changes in this revision

Viewing changes to src/ceph-rbdnamer

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2012-08-27 08:23:21 UTC
  • mto: This revision was merged to the branch mainline in revision 21.
  • Revision ID: package-import@ubuntu.com-20120827082321-2cfej6ddvk63vsqq
Tags: upstream-0.48.1
ImportĀ upstreamĀ versionĀ 0.48.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/bin/sh
2
2
 
3
 
POOL=`cat /sys/devices/rbd/$1/pool`
4
 
IMAGE=`cat /sys/devices/rbd/$1/name`
5
 
SNAP=`cat /sys/devices/rbd/$1/current_snap`
 
3
DEV=$1
 
4
NUM=`echo $DEV | sed 's#p.*##g' | tr -d 'a-z'`
 
5
POOL=`cat /sys/devices/rbd/$NUM/pool`
 
6
IMAGE=`cat /sys/devices/rbd/$NUM/name`
 
7
SNAP=`cat /sys/devices/rbd/$NUM/current_snap`
6
8
if [ "$SNAP" = "-" ]; then
7
9
        echo -n "$POOL $IMAGE"
8
10
else