[Fai-commit] r5775 - people/wbx people/wbx/fai-squashfs/lib trunk/lib

Waldemar Brodkorb wbx-guest at alioth.debian.org
Fri Apr 23 20:46:41 UTC 2010


Author: wbx-guest
Date: 2010-04-23 20:46:41 +0000 (Fri, 23 Apr 2010)
New Revision: 5775

Added:
   people/wbx/fai-squashfs/
Modified:
   people/wbx/fai-squashfs/lib/subroutines
   trunk/lib/subroutines
Log:
add a branch for squashfs config space

Modified: people/wbx/fai-squashfs/lib/subroutines
===================================================================
--- trunk/lib/subroutines	2010-04-20 11:38:04 UTC (rev 5773)
+++ people/wbx/fai-squashfs/lib/subroutines	2010-04-23 20:46:41 UTC (rev 5775)
@@ -633,18 +633,22 @@
     echo -n "Kernel currently running: "
     uname -rsmo
     echo -n "Kernel parameters: "; cat /proc/cmdline
-    for word in $(cat /proc/cmdline) ; do
-	case $word in
-	    FAI_CLASSES=*)
-                eval "$word"
-		for class in ${FAI_CLASSES//,/ }; do
-		    echo $class >>/tmp/l
-		done
+    eval "cmdline=($(</proc/cmdline))"
+    echo "Kernel parameters: ${cmdline[*]}"
+    for word in "${cmdline[@]}"; do
+        case $word in
+            FAI_CLASSES=*)
+		word=${word#*=}
+		eval "classes=(${word//,/ })"
+		printf '%s\n' "${classes[@]}" >>/tmp/l
 		unset FAI_CLASSES
 		;;
 
 	    [a-zA-Z]*=*)
-		eval "export $word"
+		varname=${word%%=*}
+		word=${word#*=}
+		eval $varname=\$word
+		eval export $varname
 		;;
 	esac
     done

Modified: trunk/lib/subroutines
===================================================================
--- trunk/lib/subroutines	2010-04-23 20:40:45 UTC (rev 5774)
+++ trunk/lib/subroutines	2010-04-23 20:46:41 UTC (rev 5775)
@@ -633,18 +633,22 @@
     echo -n "Kernel currently running: "
     uname -rsmo
     echo -n "Kernel parameters: "; cat /proc/cmdline
-    for word in $(cat /proc/cmdline) ; do
-	case $word in
-	    FAI_CLASSES=*)
-                eval "$word"
-		for class in ${FAI_CLASSES//,/ }; do
-		    echo $class >>/tmp/l
-		done
+    eval "cmdline=($(</proc/cmdline))"
+    echo "Kernel parameters: ${cmdline[*]}"
+    for word in "${cmdline[@]}"; do
+        case $word in
+            FAI_CLASSES=*)
+		word=${word#*=}
+		eval "classes=(${word//,/ })"
+		printf '%s\n' "${classes[@]}" >>/tmp/l
 		unset FAI_CLASSES
 		;;
 
 	    [a-zA-Z]*=*)
-		eval "export $word"
+		varname=${word%%=*}
+		word=${word#*=}
+		eval $varname=\$word
+		eval export $varname
 		;;
 	esac
     done




More information about the Fai-commit mailing list