SVN: geninitrd/trunk/geninitrd

zbyniu zbyniu at pld-linux.org
Sun May 3 10:30:47 CEST 2009


Author: zbyniu
Date: Sun May  3 10:30:46 2009
New Revision: 10350

Modified:
   geninitrd/trunk/geninitrd
Log:
- /lib/firmware/`uname -r`/ files support


Modified: geninitrd/trunk/geninitrd
==============================================================================
--- geninitrd/trunk/geninitrd	(original)
+++ geninitrd/trunk/geninitrd	Sun May  3 10:30:46 2009
@@ -572,12 +572,16 @@
 	fi
 
 	for firmware in $firmware_files; do
-		if [ ! -f "/lib/firmware/$firmware" ]; then
-				die "firmware file /lib/firmware/$firmware doesn't exist."
-		else
+		if [ -f "/lib/firmware/$firmware" ]; then
 			FIRMWAREDIR=${firmware%/*}
 			[ "$FIRMWAREDIR" != "$firmware" ] && inst_d /lib/firmware/$FIRMWAREDIR
 			inst /lib/firmware/$firmware /lib/firmware/$firmware
+		elif [ -f "/lib/firmware/$kernel/$firmware" ]; then
+			FIRMWAREDIR=${firmware%/*}
+			[ "$FIRMWAREDIR" != "$firmware" ] && inst_d /lib/firmware/$FIRMWAREDIR
+			inst /lib/firmware/$kernel/$firmware /lib/firmware/$firmware
+		else
+			die "firmware file /lib/firmware/$firmware nor /lib/firmware/$kernel/$firmware doesn't exist."
 		fi
 	done
 


More information about the pld-cvs-commit mailing list