From 67ff7dac8290560715629241e09fe9fb0359c990 Mon Sep 17 00:00:00 2001 From: Rajesh Battala Date: Tue, 7 Oct 2014 12:38:43 +0530 Subject: [PATCH] CLOUDSTACK-7654 fixed issues with zip format templates. --- scripts/installer/createtmplt.sh | 2 +- scripts/storage/qcow2/createtmplt.sh | 2 +- scripts/storage/secondary/createtmplt.sh | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/installer/createtmplt.sh b/scripts/installer/createtmplt.sh index bd539dd2fb8..95ecd9cb6c9 100755 --- a/scripts/installer/createtmplt.sh +++ b/scripts/installer/createtmplt.sh @@ -74,7 +74,7 @@ uncompress() { ;; bzip2) bunzip2 -c $1 > $tmpfile ;; - ZIP) unzip -p $1 | cat > $tmpfile + [zZ][iI][pP]) unzip -p $1 | cat > $tmpfile ;; *) printf "$1" return 0 diff --git a/scripts/storage/qcow2/createtmplt.sh b/scripts/storage/qcow2/createtmplt.sh index 8d6dd0d4849..38bb561cd5c 100755 --- a/scripts/storage/qcow2/createtmplt.sh +++ b/scripts/storage/qcow2/createtmplt.sh @@ -74,7 +74,7 @@ uncompress() { ;; bzip2) bunzip2 -c $1 > $tmpfile ;; - ZIP) unzip -p $1 | cat > $tmpfile + [zZ][iI][pP]) unzip -p $1 | cat > $tmpfile ;; *) printf "$1" return 0 diff --git a/scripts/storage/secondary/createtmplt.sh b/scripts/storage/secondary/createtmplt.sh index 6b31232bc9e..358022b6dec 100755 --- a/scripts/storage/secondary/createtmplt.sh +++ b/scripts/storage/secondary/createtmplt.sh @@ -73,7 +73,7 @@ is_compressed() { ;; bzip2) ctype="bz2" ;; - ZIP) ctype="zip" + [zZ][iI][pP]) ctype="zip" ;; *) echo "File $1 does not appear to be compressed" >&2 return 1 @@ -92,7 +92,7 @@ uncompress() { ;; bzip2) bunzip2 -q -c $1 > $tmpfile ;; - ZIP) unzip -q -p $1 | cat > $tmpfile + [zZ][iI][pP]) unzip -q -p $1 | cat > $tmpfile ;; *) printf "$1" return 0