[readonly/geninitrd/BUSYBOX: 23/113] find remove

draenog draenog at pld-linux.org
Sat Nov 2 19:11:58 CET 2013


commit aa69da6e687bb0565166e25c5e00b0b958f6282e
Author: inglod <inglod at pld-linux.org>
Date:   Tue Jan 16 14:08:13 2001 +0000

    find remove
    
    
    svn-id: @1175

 geninitrd | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)
---
diff --git a/geninitrd b/geninitrd
index 1fcdb79..14c427f 100755
--- a/geninitrd
+++ b/geninitrd
@@ -61,6 +61,18 @@ usage () {
     exit 1
 }
 
+
+my_find() {
+	for name in `ls`
+	do
+	   if [ -d $name ]; then
+		(cd $name;my_find $1/$name $2)
+	   else
+	   	[ -f $name -a "$name" = "$2" ] && echo $1/$name
+	   fi
+	done
+}
+
 findmodule() {
     skiperrors=""
     modName=$1
@@ -78,7 +90,7 @@ findmodule() {
 	findmodule socal
     fi
 
-    fmPath="`(cd /lib/modules/$kernel; find -type f -name "$modName.o")`"
+    fmPath="`(cd /lib/modules/$kernel; my_find . "$modName.o")`"
 
     if [ ! -f "/lib/modules/$kernel/$fmPath" ]; then
 	if [ -n "$skiperrors" ]; then
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/readonly/geninitrd.git/commitdiff/0999a53e93eedcf489380684b998ce04aaddf11c



More information about the pld-cvs-commit mailing list