fix destroy snapshot

This commit is contained in:
Edison Su 2011-03-08 18:28:25 -05:00
parent 3624fee85d
commit c4ac92af3f

View File

@ -42,19 +42,14 @@ create_snapshot() {
destroy_snapshot() {
local disk=$1
local deleteDir=$2
local snapshotname=$2
local failed=0
if [ -d $disk ]
then
if [ -f $disk/$snapshotname ]
then
rm -rf $disk/$snapshotname >& /dev/null
fi
if [ "$deleteDir" == "1" ]
then
rm -rf $disk >& /dev/null
rm -rf $disk/$snapshotname >& /dev/null
fi
return $failed