Revision 56fff918

View differences:

src/tm_mad/shared/postmigrate
1
#!/bin/bash
2

  
3
DRIVER_PATH=$(dirname $0)
4

  
5
DISK_COUNT=$(onevm show $4 -x|grep DISK_ID| wc -l)
6
TMS=$(onevm show $4 -x|sed -rn 's/[[:space:]]*<TM_MAD><\!\[CDATA\[([^]]*).*/\1/p')
7

  
8
XPATH="${DRIVER_PATH}/../../datastore/xpath.rb -b $7"
9

  
10
for i in `seq 1 $DISK_COUNT`; do
11
  TM=`echo $TMS|cut -d" " -f$i`
12
  DISK_ID=`echo $i-1 | bc`
13
  DEV=`ssh $1 "readlink $3/disk.$DISK_ID"`
14
  ${DRIVER_PATH}/../$TMS/postmigrate "$1" "$2" "$DEV"
15
done
16

  
17
exit 0
src/tm_mad/shared/postmigrate
1
../common/postmigrate
src/tm_mad/shared/premigrate
1
#!/bin/bash
2

  
3
DRIVER_PATH=$(dirname $0)
4

  
5
DISK_COUNT=$(onevm show $4 -x|grep DISK_ID| wc -l)
6
TMS=$(onevm show $4 -x|sed -rn 's/[[:space:]]*<TM_MAD><\!\[CDATA\[([^]]*).*/\1/p')
7

  
8
XPATH="${DRIVER_PATH}/../../datastore/xpath.rb -b $7"
9

  
10
for i in `seq 1 $DISK_COUNT`; do
11
  TM=`echo $TMS|cut -d" " -f$i`
12
  DISK_ID=$(($i-1))
13
  DEV=`ssh $1 "readlink $3/disk.$DISK_ID"`
14
  ${DRIVER_PATH}/../$TMS/premigrate "$1" "$2" "$DEV"
15
done
16

  
17
exit 0
src/tm_mad/shared/premigrate
1
../common/premigrate

Also available in: Unified diff