Minor tweaks in compression support:
o We need an eval here to get the right expansion of the command o bs=128k doesn't work in some cases, so eliminate it and cope with the minor performance hit. Submitted by: john hixson
This commit is contained in:
parent
73e5f76349
commit
c9489e0d75
@ -138,7 +138,7 @@ rc_halt()
|
||||
fi
|
||||
|
||||
echo "Running: ${CMD}" >>${LOGOUT}
|
||||
${CMD} >>${LOGOUT} 2>>${LOGOUT}
|
||||
eval ${CMD} >>${LOGOUT} 2>>${LOGOUT}
|
||||
STATUS="$?"
|
||||
if [ "${STATUS}" != "0" ]
|
||||
then
|
||||
@ -364,37 +364,37 @@ write_image()
|
||||
|
||||
case "${COMPRESSION}" in
|
||||
lzw)
|
||||
rc_halt "uncompress ${IMAGE_FILE} -c | dd of=${DEVICE_FILE} bs=128k"
|
||||
rc_halt "uncompress ${IMAGE_FILE} -c | dd of=${DEVICE_FILE}"
|
||||
IMAGE_FILE="${IMAGE_FILE%.Z}"
|
||||
;;
|
||||
|
||||
lzo)
|
||||
rc_halt "lzop -d $IMAGE_{FILE} -c | dd of=${DEVICE_FILE} bs=128k"
|
||||
rc_halt "lzop -d $IMAGE_{FILE} -c | dd of=${DEVICE_FILE}"
|
||||
IMAGE_FILE="${IMAGE_FILE%.lzo}"
|
||||
;;
|
||||
|
||||
lzma)
|
||||
rc_halt "lzma -d ${IMAGE_FILE} -c | dd of=${DEVICE_FILE} bs=128k"
|
||||
rc_halt "lzma -d ${IMAGE_FILE} -c | dd of=${DEVICE_FILE}"
|
||||
IMAGE_FILE="${IMAGE_FILE%.lzma}"
|
||||
;;
|
||||
|
||||
gzip)
|
||||
rc_halt "gunzip ${IMAGE_FILE} -c | dd of=${DEVICE_FILE} bs=128k"
|
||||
rc_halt "gunzip ${IMAGE_FILE} -c | dd of=${DEVICE_FILE}"
|
||||
IMAGE_FILE="${IMAGE_FILE%.gz}"
|
||||
;;
|
||||
|
||||
bzip2)
|
||||
rc_halt "bunzip2 ${IMAGE_FILE} -c | dd of=${DEVICE_FILE} bs=128k"
|
||||
rc_halt "bunzip2 ${IMAGE_FILE} -c | dd of=${DEVICE_FILE}"
|
||||
IMAGE_FILE="${IMAGE_FILE%.bz2}"
|
||||
;;
|
||||
|
||||
xz)
|
||||
rc_halt "xz -d ${IMAGE_FILE} -c | dd of=${DEVICE_FILE} bs=128k"
|
||||
rc_halt "xz -d ${IMAGE_FILE} -c | dd of=${DEVICE_FILE}"
|
||||
IMAGE_FILE="${IMAGE_FILE%.xz}"
|
||||
;;
|
||||
|
||||
zip)
|
||||
rc_halt "unzip ${IMAGE_FILE} -c | dd of=${DEVICE_FILE} bs=128k"
|
||||
rc_halt "unzip ${IMAGE_FILE} -c | dd of=${DEVICE_FILE}"
|
||||
IMAGE_FILE="${IMAGE_FILE%.zip}"
|
||||
;;
|
||||
|
||||
@ -404,7 +404,7 @@ write_image()
|
||||
esac
|
||||
|
||||
else
|
||||
rc_halt "dd if=${IMAGE_FILE} of=${DEVICE_FILE} bs=128k"
|
||||
rc_halt "dd if=${IMAGE_FILE} of=${DEVICE_FILE}"
|
||||
|
||||
fi
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user