summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/initrdscripts/initramfs-framework/init
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/initrdscripts/initramfs-framework/init')
-rwxr-xr-xmeta/recipes-core/initrdscripts/initramfs-framework/init13
1 files changed, 7 insertions, 6 deletions
diff --git a/meta/recipes-core/initrdscripts/initramfs-framework/init b/meta/recipes-core/initrdscripts/initramfs-framework/init
index 0be8f4dafd..20774aa5e9 100755
--- a/meta/recipes-core/initrdscripts/initramfs-framework/init
+++ b/meta/recipes-core/initrdscripts/initramfs-framework/init
@@ -78,12 +78,13 @@ mount -t sysfs sysfs /sys
78 78
79# populate bootparam environment 79# populate bootparam environment
80for p in `cat /proc/cmdline`; do 80for p in `cat /proc/cmdline`; do
81 opt="${p%%=*}" 81 opt=`echo $p | cut -d'=' -f1`
82 opt=${opt/-/_} 82 opt=`echo $opt | sed -e 's/-/_/'`
83 if [ "${p/=/}" = "$p" ]; then 83 if [ "`echo $p | cut -d'=' -f1`" = "$p" ]; then
84 eval "bootparam_${opt}=true" 84 eval "bootparam_${opt}=true"
85 else 85 else
86 eval "bootparam_${opt}=\"${p#*=}\"" 86 value="`echo $p | cut -d'=' -f2-`"
87 eval "bootparam_${opt}=\"${value}\""
87 fi 88 fi
88done 89done
89 90
@@ -102,7 +103,7 @@ mkdir $ROOTFS_DIR
102# Load and run modules 103# Load and run modules
103for m in $MODULES_DIR/*; do 104for m in $MODULES_DIR/*; do
104 # Skip backup files 105 # Skip backup files
105 if [ "${m/\~/}" != "$m" ]; then 106 if [ "`echo $m | sed -e 's/\~$//'`" = "$m" ]; then
106 continue 107 continue
107 fi 108 fi
108 109
@@ -117,7 +118,7 @@ for m in $MODULES_DIR/*; do
117 done 118 done
118 119
119 # process module 120 # process module
120 source $m 121 . $m
121 122
122 if ! eval "${module}_enabled"; then 123 if ! eval "${module}_enabled"; then
123 debug "Skipping module $module" 124 debug "Skipping module $module"