summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarald Hoyer <harald@redhat.com>2012-06-22 15:13:47 +0200
committerHarald Hoyer <harald@redhat.com>2012-06-29 12:41:25 +0200
commit69b35075f3a15ce29b211bc4fb6640e5ffddd871 (patch)
tree9000ceb3bb0b7b8337feb3c49ad2cde7df4c5f99
parent744054779febc72178dbc22127ebfcca93e7b861 (diff)
downloaddracut-69b35075f3a15ce29b211bc4fb6640e5ffddd871.tar.gz
dracut-69b35075f3a15ce29b211bc4fb6640e5ffddd871.tar.bz2
dracut-69b35075f3a15ce29b211bc4fb6640e5ffddd871.zip
dracut.sh: speedup "strip"
-rwxr-xr-xdracut.sh12
1 files changed, 5 insertions, 7 deletions
diff --git a/dracut.sh b/dracut.sh
index 5600ec0e..cc3669a6 100755
--- a/dracut.sh
+++ b/dracut.sh
@@ -844,7 +844,7 @@ fi
# strip binaries
if [[ $do_strip = yes ]] ; then
- for p in strip grep find; do
+ for p in strip xargs find; do
if ! type -P $p >/dev/null; then
derror "Could not find '$p'. You should run $0 with '--nostrip'."
do_strip=no
@@ -853,12 +853,10 @@ if [[ $do_strip = yes ]] ; then
fi
if [[ $do_strip = yes ]] ; then
- for f in $(find "$initdir" -type f \
- \( -perm -0100 -or -perm -0010 -or -perm -0001 \
- -or -path '*/lib/modules/*.ko' \) ); do
- dinfo "Stripping $f"
- strip -g "$f" 2>/dev/null|| :
- done
+ find "$initdir" -type f \
+ \( -perm -0100 -or -perm -0010 -or -perm -0001 \
+ -or -path '*/lib/modules/*.ko' \) -print0 \
+ | xargs -0 strip -g 2>/dev/null
fi
type hardlink &>/dev/null && {