diff options
Diffstat (limited to 'meta/recipes-core/initrdscripts/files/init-install.sh')
-rw-r--r-- | meta/recipes-core/initrdscripts/files/init-install.sh | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/meta/recipes-core/initrdscripts/files/init-install.sh b/meta/recipes-core/initrdscripts/files/init-install.sh index 7fccddea03..f9e9768e43 100644 --- a/meta/recipes-core/initrdscripts/files/init-install.sh +++ b/meta/recipes-core/initrdscripts/files/init-install.sh | |||
@@ -17,7 +17,14 @@ swap_ratio=5 | |||
17 | hdnamelist="" | 17 | hdnamelist="" |
18 | live_dev_name=`cat /proc/mounts | grep ${1%/} | awk '{print $1}'` | 18 | live_dev_name=`cat /proc/mounts | grep ${1%/} | awk '{print $1}'` |
19 | live_dev_name=${live_dev_name#\/dev/} | 19 | live_dev_name=${live_dev_name#\/dev/} |
20 | live_dev_name=${live_dev_name%%[0-9]*} | 20 | # Only strip the digit identifier if the device is not an mmc |
21 | case $live_dev_name in | ||
22 | mmcblk*) | ||
23 | ;; | ||
24 | *) | ||
25 | live_dev_name=${live_dev_name%%[0-9]*} | ||
26 | ;; | ||
27 | esac | ||
21 | 28 | ||
22 | echo "Searching for hard drives ..." | 29 | echo "Searching for hard drives ..." |
23 | 30 | ||
@@ -35,9 +42,14 @@ for device in `ls /sys/block/`; do | |||
35 | *) | 42 | *) |
36 | # skip the device LiveOS is on | 43 | # skip the device LiveOS is on |
37 | # Add valid hard drive name to the list | 44 | # Add valid hard drive name to the list |
38 | if [ $device != $live_dev_name -a -e /dev/$device ]; then | 45 | case $device in |
39 | hdnamelist="$hdnamelist $device" | 46 | $live_dev_name*) |
40 | fi | 47 | # skip the device we are running from |
48 | ;; | ||
49 | *) | ||
50 | hdnamelist="$hdnamelist $device" | ||
51 | ;; | ||
52 | esac | ||
41 | ;; | 53 | ;; |
42 | esac | 54 | esac |
43 | done | 55 | done |