[readonly/geninitrd/devel: 256/334] Sleeping after module load support.

draenog draenog at pld-linux.org
Sat Nov 2 19:33:04 CET 2013


commit 8e598759f3e1833108244cb267e233c2a57d1612
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Thu Nov 17 12:56:36 2005 +0000

    Sleeping after module load support.
    
    svn-id: @6538

 geninitrd | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)
---
diff --git a/geninitrd b/geninitrd
index c9464f5..e8c4d33 100755
--- a/geninitrd
+++ b/geninitrd
@@ -668,16 +668,25 @@ modules_add_linuxrc() {
 	        MODULE2=$MODULE2/$NAME2
 	        module="`echo $mod | awk -F/ '{ $0=$NF } /'$modext'.*$/ { gsub(/'$modext'.*/, NIL, $0); } { print $0; }'`"
 	        options="`awk '{ if($1 == "options" && $2 == "'${module}'") { for(i=3;i<=NF;i++) printf("%s ",$i); }}' "$modulefile"`"
+		eval sleep_var="MODULE_${module}_SLEEP"
 
 	        if [ -n "$verbose" ]; then
-	                /bin/echo -n "Loading module [$module] "
+	                echo -n "Loading module [$module] "
 	                if [ -n "$options" ] ; then
-	                        echo "with options [$options]."
+	                        echo -n "with options [$options]"
 	                else
-	                        echo "without options."
+	                        echo -n "without options"
 	                fi
+			if [ -n "$sleep_var" ]; then
+				echo " and $sleep_var sleep."
+			else
+				echo "."
+			fi
 	        fi
 	        echo "$insmod /lib/modules/$kernel/$MODULE2 $options" >> "$linuxrc"
+		if [ -n "${sleep_var}" ]; then
+			echo "usleep $sleep_var" >> "$linuxrc"
+		fi
 	done
 }
 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/readonly/geninitrd.git/commitdiff/398807324938659207036e520c0950a61ef50c11



More information about the pld-cvs-commit mailing list