summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormaximilian attems <maks@debian.org>2010-07-05 17:57:15 +0200
committermaximilian attems <maks@debian.org>2010-07-05 18:05:52 +0200
commit90d99e475616b9819226afcf09b866fa2fcd9985 (patch)
tree10051b70f1eac25b1096b6fea0380950a83162e5
parentcf097346fd4e32a4918ca02c304fe1cf95ec5c23 (diff)
downloadinitramfs-tools-90d99e475616b9819226afcf09b866fa2fcd9985.tar.gz
initramfs-tools-90d99e475616b9819226afcf09b866fa2fcd9985.zip
mkinitramfs: Fix missing compress quotings
the fallback for unset ${compress} never got used, due to the missing quotes. Do also set the GZIP CONFIG option when setting fallback of gzip. Closes: 587608 Thanks: Valentin QUEQUET <valentin.quequet@orange.fr> Signed-off-by: maximilian attems <maks@debian.org>
-rwxr-xr-xmkinitramfs5
1 files changed, 3 insertions, 2 deletions
diff --git a/mkinitramfs b/mkinitramfs
index e49e01c..3a2feae 100755
--- a/mkinitramfs
+++ b/mkinitramfs
@@ -134,8 +134,9 @@ else
COMPRESS=${compress}
fi
-if ! command -v ${compress} >/dev/null 2>&1; then
+if ! command -v "${compress}" >/dev/null 2>&1; then
compress=gzip
+ COMPRESS=GZIP
[ "${verbose}" = y ] && \
echo "No ${COMPRESS} in ${PATH}, using gzip"
fi
@@ -321,7 +322,7 @@ eval `
find . 4>&-; echo "ec1=$?;" >&4
} | {
cpio --quiet --dereference -o -H newc 4>&-; echo "ec2=$?;" >&4
- } | ${compress} >"${outfile}"
+ } | "${compress}" >"${outfile}"
echo "ec3=$?;" >&4
`
if [ "$ec1" -ne 0 ]; then exit "$ec1"; fi