[readonly/geninitrd/devel: 226/334] Fix handling of module options.
draenog
draenog at pld-linux.org
Sat Nov 2 19:30:32 CET 2013
commit 58cd54806302d1438a9a76e8807f61a9b6598b59
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Sat Jul 17 19:39:54 2004 +0000
Fix handling of module options.
svn-id: @4358
geninitrd | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/geninitrd b/geninitrd
index 2c56b1a..7b4018a 100755
--- a/geninitrd
+++ b/geninitrd
@@ -973,13 +973,13 @@ for MODULE in $MODULES; do
MODULE2="`my_dirname "$MODULE"`"
NAME2=`basename "$MODULE" .gz`
MODULE2=$MODULE2/$NAME2
- module="`echo $MODULE | awk -F/ '{ $0=$NF } /'$modext'$/ { $0=substr($0,1,length($0)-length("'$modext'")); } { print $0; }'`"
+ module="`echo $MODULE | 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"`"
if [ -n "$verbose" ]; then
- /bin/echo -n "Loading module $module "
+ /bin/echo -n "Loading module [$module] "
if [ -n "$options" ] ; then
- echo "with options $options."
+ echo "with options [$options]."
else
echo "without options."
fi
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/readonly/geninitrd.git/commitdiff/398807324938659207036e520c0950a61ef50c11
More information about the pld-cvs-commit
mailing list