From owner-svn-src-all@FreeBSD.ORG Thu Oct 21 22:33:50 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 93448106566C; Thu, 21 Oct 2010 22:33:50 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 67CB48FC08; Thu, 21 Oct 2010 22:33:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9LMXoKH006040; Thu, 21 Oct 2010 22:33:50 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9LMXol1006038; Thu, 21 Oct 2010 22:33:50 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201010212233.o9LMXol1006038@svn.freebsd.org> From: Warner Losh Date: Thu, 21 Oct 2010 22:33:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r214187 - head/usr.sbin/pc-sysinstall/backend X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Oct 2010 22:33:50 -0000 Author: imp Date: Thu Oct 21 22:33:50 2010 New Revision: 214187 URL: http://svn.freebsd.org/changeset/base/214187 Log: 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 Modified: head/usr.sbin/pc-sysinstall/backend/functions.sh Modified: head/usr.sbin/pc-sysinstall/backend/functions.sh ============================================================================== --- head/usr.sbin/pc-sysinstall/backend/functions.sh Thu Oct 21 22:18:12 2010 (r214186) +++ head/usr.sbin/pc-sysinstall/backend/functions.sh Thu Oct 21 22:33:50 2010 (r214187) @@ -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 };