diff options
author | imp <imp@FreeBSD.org> | 2010-10-21 22:33:50 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2010-10-21 22:33:50 +0000 |
commit | c29e8203e995e2d78a3d72c34fe46c29a26712d6 (patch) | |
tree | d551a4633b5866392d2cae694055baffb7d88225 | |
parent | d52ae23cf4cdac91533f4b87be625e28a1418856 (diff) | |
download | FreeBSD-src-c29e8203e995e2d78a3d72c34fe46c29a26712d6.zip FreeBSD-src-c29e8203e995e2d78a3d72c34fe46c29a26712d6.tar.gz |
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
-rwxr-xr-x | usr.sbin/pc-sysinstall/backend/functions.sh | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/usr.sbin/pc-sysinstall/backend/functions.sh b/usr.sbin/pc-sysinstall/backend/functions.sh index 46b5a02..2b78bbc 100755 --- a/usr.sbin/pc-sysinstall/backend/functions.sh +++ b/usr.sbin/pc-sysinstall/backend/functions.sh @@ -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 }; |