From c4ac92af3f213d7084758ea2191ffc3744e2dbe7 Mon Sep 17 00:00:00 2001 From: Edison Su Date: Tue, 8 Mar 2011 18:28:25 -0500 Subject: [PATCH] fix destroy snapshot --- scripts/storage/qcow2/managesnapshot.sh | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/scripts/storage/qcow2/managesnapshot.sh b/scripts/storage/qcow2/managesnapshot.sh index f32232d635e..5c24fde4c60 100755 --- a/scripts/storage/qcow2/managesnapshot.sh +++ b/scripts/storage/qcow2/managesnapshot.sh @@ -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