#!/bin/sh

if [ $# -lt 3 ] ; then
  echo "Usage: tc-tune-osimg <osimg> <cache_file> <blk_size(MB)>"
  exit 1
fi

exec >>/var/log/tc-tune-osimg.log
exec 2>&1

CREATECACHE=/home/tc/bin/tc-create-cache

osimg=$1
cache_file=$2

blk_size=`expr $3 \* 1024 \* 1024`
img_size=`stat -c %s "$osimg"`

$CREATECACHE $osimg $img_size $cache_file $blk_size

