Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 21 Oct 2010 22:33:50 +0000 (UTC)
From:      Warner Losh <imp@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r214187 - head/usr.sbin/pc-sysinstall/backend
Message-ID:  <201010212233.o9LMXol1006038@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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
 };



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201010212233.o9LMXol1006038>