Print this page
XXX Remove nawk(1)

@@ -204,11 +204,11 @@
         fi
 
         # Estimate image size and add %10 overhead for ufs stuff.
         # Note, we can't use du here in case $UNPACKED_ROOT is on a filesystem,
         # e.g. zfs, in which the disk usage is less than the sum of the file
-        # sizes.  The nawk code
+        # sizes.  The awk code
         #
         #       {t += ($7 % 1024) ? (int($7 / 1024) + 1) * 1024 : $7}
         #
         # below rounds up the size of a file/directory, in bytes, to the
         # next multiple of 1024.  This mimics the behavior of ufs especially

@@ -216,15 +216,15 @@
         # bigger than if du was called on a ufs directory.
         #
         # if the operation in turn is compressing the files the amount
         # of typical shrinkage is used to come up with a useful archive
         # size
-        size=$(find "$UNPACKED_ROOT" -ls | nawk '
+        size=$(find "$UNPACKED_ROOT" -ls | /usr/xpg4/bin/awk '
             {t += ($7 % 1024) ? (int($7 / 1024) + 1) * 1024 : $7}
             END {print int(t * 1.10 / 1024)}')
         if [ "$COMPRESS" = true ] ; then
-                size=`echo $size | nawk '{s = $1} END {print int(s * 0.6)}'`
+                size=`echo $size | /usr/xpg4/bin/awk '{s = $1} END {print int(s * 0.6)}'`
         fi
 
         /usr/sbin/mkfile ${size}k "$TMR"
 
         LOFIDEV=`/usr/sbin/lofiadm -a "$TMR"`