From: Harald Hoyer Date: Fri, 22 Jun 2012 13:13:47 +0000 (+0200) Subject: dracut.sh: speedup "strip" X-Git-Tag: 020~45 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=69b35075f3a15ce29b211bc4fb6640e5ffddd871;p=thirdparty%2Fdracut.git dracut.sh: speedup "strip" --- diff --git a/dracut.sh b/dracut.sh index 5600ec0ef..cc3669a6b 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 && {