summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormaximilian attems <maks@debian.org>2009-02-13 17:09:35 +0100
committermaximilian attems <maks@debian.org>2009-02-13 17:09:35 +0100
commit93654c9230d3817fa57069012a0b06ccb1df09e4 (patch)
tree633ab6e357dc968982163153d3e22ceeb9c17cdf
parent63cc7b9216d69f413cd5414c96cf2c9a403e03ae (diff)
downloadinitramfs-tools-93654c9230d3817fa57069012a0b06ccb1df09e4.tar.gz
initramfs-tools-93654c9230d3817fa57069012a0b06ccb1df09e4.zip
mkinitramfs: Fix new pipe construct to really work inside "${DESTDIR}"
trivial fix on top of previous change. afais cpio doesn't really give sensible return errors, so this fall through the cracks.
-rwxr-xr-xmkinitramfs3
1 files changed, 2 insertions, 1 deletions
diff --git a/mkinitramfs b/mkinitramfs
index 0aa2ba7..2f5112c 100755
--- a/mkinitramfs
+++ b/mkinitramfs
@@ -273,8 +273,9 @@ exec 3>&1
eval `
# http://cfaj.freeshell.org/shell/cus-faq-2.html
exec 4>&1 >&3 3>&-
+ cd "${DESTDIR}"
{
- cd "${DESTDIR}" && find . 4>&-; echo "ec1=$?;" >&4
+ find . 4>&-; echo "ec1=$?;" >&4
} | {
cpio --quiet --dereference -o -H newc 4>&-; echo "ec2=$?;" >&4
} | gzip >"${outfile}"