summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
authordminer <none@none>2008-02-13 15:48:38 -0800
committerdminer <none@none>2008-02-13 15:48:38 -0800
commita916d99c7b27a531bf37c57f83b0b74120fd05bb (patch)
tree3ef8f6c719213835d2d1d38c97341f34dcb2f58b /usr/src
parent073af7d9c45b5d0da4960c39a80af39504480d26 (diff)
downloadillumos-joyent-a916d99c7b27a531bf37c57f83b0b74120fd05bb.tar.gz
6626043 create_ramdisk could be faster
Contributed by Juergen Keil <jk@tools.de>
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/cmd/boot/scripts/create_ramdisk.ksh17
1 files changed, 9 insertions, 8 deletions
diff --git a/usr/src/cmd/boot/scripts/create_ramdisk.ksh b/usr/src/cmd/boot/scripts/create_ramdisk.ksh
index c51418f389..619f57cac3 100644
--- a/usr/src/cmd/boot/scripts/create_ramdisk.ksh
+++ b/usr/src/cmd/boot/scripts/create_ramdisk.ksh
@@ -20,7 +20,7 @@
# CDDL HEADER END
#
-# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
# ident "%Z%%M% %I% %E% SMI"
@@ -186,7 +186,7 @@ function copy_files
do
if [ $compress = yes ]; then
dir="${path%/*}"
- mkdir -p "$rdmnt/$dir"
+ [ -d "$rdmnt/$dir" ] || mkdir -p "$rdmnt/$dir"
$GZIP_CMD -c "$path" > "$rdmnt/$path"
else
print "$path"
@@ -448,17 +448,18 @@ do
(( dirsize64 += size ))
fi
else
- filetype=`LC_MESSAGES=C file "$path" 2>/dev/null |\
- awk '/ELF/ { print $3 }'`
- if [ "$filetype" = "64-bit" ]; then
+ case `LC_MESSAGES=C /usr/bin/file -m /dev/null "$path" 2>/dev/null` in
+ *ELF\ 64-bit*)
print "$path" >> "$list64"
- elif [ "$filetype" = "32-bit" ]; then
+ ;;
+ *ELF\ 32-bit*)
print "$path"
- else
+ ;;
+ *)
# put in both lists
print "$path"
print "$path" >> "$list64"
- fi
+ esac
fi
done >"$list32"