Sophie

Sophie

distrib > Fedora > 13 > i386 > media > updates-src > by-pkgid > 2565d442133d17866d7a0458852920c6 > files > 53

dracut-005-5.fc13.src.rpm

From a254ca12cc23ca215aa4fa3927ba41944582d2d9 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Fri, 7 May 2010 11:03:55 +0200
Subject: [PATCH 053/133] dracut: get rid of the "file" command

---
 dracut |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/dracut b/dracut
index 6d9bf7c..35be7eb 100755
--- a/dracut
+++ b/dracut
@@ -278,7 +278,7 @@ ldconfig -r "$initdir" || [[ $(id -u) != "0" ]] && dinfo "ldconfig might need ui
 
 # strip binaries 
 if [[ $do_strip = yes ]] ; then
-    for p in strip objdump sed grep find; do 
+    for p in strip grep find; do 
 	if ! which $p >/dev/null 2>&1; then
 	    derror "Could not find '$p'. You should run $0 with '--nostrip'."
 	    do_strip=no
@@ -287,11 +287,9 @@ 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' \) -exec file {} \; | 
-	grep -v ' shared object,' | 
-	sed -n -e 's/^\(.*\):[ 	]*ELF.*, not stripped/\1/p'); do
+    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" || :
+	strip -g "$f" 2>/dev/null|| :
         #
         # FIXME: only strip -g for now
         #
-- 
1.7.3