diff options
author | Chen Qi <Qi.Chen@windriver.com> | 2013-08-02 15:48:47 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-08-06 12:39:53 +0100 |
commit | ca365c603b72e29fa028d6e83a8ca42b1d115f1e (patch) | |
tree | ea286f90bee83a89f513b7f0fa336708b63626fe | |
parent | ae26fa41ae51c2f420e18633c242a4f3c29b4587 (diff) | |
download | poky-ca365c603b72e29fa028d6e83a8ca42b1d115f1e.tar.gz |
initramfs-framework: fix bashism
(From OE-Core rev: e6039e6e3b98d6ab91252a5012d76279b1fac6e8)
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rwxr-xr-x | meta/recipes-core/initrdscripts/initramfs-framework/finish | 5 | ||||
-rwxr-xr-x | meta/recipes-core/initrdscripts/initramfs-framework/init | 13 |
2 files changed, 10 insertions, 8 deletions
diff --git a/meta/recipes-core/initrdscripts/initramfs-framework/finish b/meta/recipes-core/initrdscripts/initramfs-framework/finish index bedd803f10..325f47be40 100755 --- a/meta/recipes-core/initrdscripts/initramfs-framework/finish +++ b/meta/recipes-core/initrdscripts/initramfs-framework/finish | |||
@@ -16,8 +16,9 @@ finish_run() { | |||
16 | if [ -n "$bootparam_root" ]; then | 16 | if [ -n "$bootparam_root" ]; then |
17 | debug "No e2fs compatible filesystem has been mounted, mounting $bootparam_root..." | 17 | debug "No e2fs compatible filesystem has been mounted, mounting $bootparam_root..." |
18 | 18 | ||
19 | if [ "${bootparam_root:0:5}" = "UUID=" ]; then | 19 | if [ "`echo ${bootparam_root} | cut -c1-5`" = "UUID=" ]; then |
20 | bootparam_root="/dev/disk/by-uuid/${bootparam_root/UUID=/}" | 20 | root_uuid=`echo $bootparam_root | cut -c6-` |
21 | bootparam_root="/dev/disk/by-uuid/$root_uuid" | ||
21 | fi | 22 | fi |
22 | 23 | ||
23 | if [ -e "$bootparam_root" ]; then | 24 | if [ -e "$bootparam_root" ]; then |
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 |
80 | for p in `cat /proc/cmdline`; do | 80 | for 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 |
88 | done | 89 | done |
89 | 90 | ||
@@ -102,7 +103,7 @@ mkdir $ROOTFS_DIR | |||
102 | # Load and run modules | 103 | # Load and run modules |
103 | for m in $MODULES_DIR/*; do | 104 | for 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" |