SVN: geninitrd/trunk/geninitrd

glen glen at pld-linux.org
Sat Feb 9 19:17:05 CET 2008


Author: glen
Date: Sat Feb  9 19:17:04 2008
New Revision: 9265

Modified:
   geninitrd/trunk/geninitrd
Log:
- fix output formatting

Modified: geninitrd/trunk/geninitrd
==============================================================================
--- geninitrd/trunk/geninitrd	(original)
+++ geninitrd/trunk/geninitrd	Sat Feb  9 19:17:04 2008
@@ -1036,8 +1036,8 @@
 	local mod
 
 	for mod in $modules; do
-		MODULE2="`dirname "$mod"`"
-		NAME2=`basename "$mod" .gz`
+		MODULE2=$(dirname "$mod")
+		NAME2=$(basename "$mod" .gz)
 		MODULE2=$MODULE2/$NAME2
 		module="`echo $mod | awk -F/ '{ $0=$NF } /'$modext'.*$/ { gsub(/'$modext'.*/, NIL, $0); } { print $0; }'`"
 		options=$(modprobe_conf | awk -vmodule="$module" '{ if ($1 == "options" && $2 == module) { for(i=3;i<=NF;i++) printf("%s ",$i); }}')
@@ -1047,7 +1047,14 @@
 		firmware_var="$(eval echo \$MODULE_${generic_module}_FIRMWARE)"
 
 		if [ -n "$verbose" ]; then
-			warn "Loading module [$module]${options:+ with options [$options]}${options:- without options}${sleep_var:+ and $sleep_var usleep}."
+			s=""
+			if [ "$options" ]; then
+				s="$s with options [$options]"
+			fi
+			if [ "$sleep_var" ]; then
+				s="$s and $sleep_var usleep"
+			fi
+			warn "Loading module [$module]$s"
 		fi
 
 		if [ -n "$firmware_var" ]; then


More information about the pld-cvs-commit mailing list