diff options
| -rw-r--r-- | meta/recipes-core/initrdscripts/files/init-install-efi.sh | 49 | ||||
| -rw-r--r-- | meta/recipes-core/initrdscripts/files/init-install.sh | 54 |
2 files changed, 51 insertions, 52 deletions
diff --git a/meta/recipes-core/initrdscripts/files/init-install-efi.sh b/meta/recipes-core/initrdscripts/files/init-install-efi.sh index a6a86790c8..dca1432e40 100644 --- a/meta/recipes-core/initrdscripts/files/init-install-efi.sh +++ b/meta/recipes-core/initrdscripts/files/init-install-efi.sh | |||
| @@ -24,22 +24,22 @@ echo "Searching for hard drives ..." | |||
| 24 | 24 | ||
| 25 | for device in `ls /sys/block/`; do | 25 | for device in `ls /sys/block/`; do |
| 26 | case $device in | 26 | case $device in |
| 27 | loop*) | 27 | loop*) |
| 28 | # skip loop device | 28 | # skip loop device |
| 29 | ;; | 29 | ;; |
| 30 | sr*) | 30 | sr*) |
| 31 | # skip CDROM device | 31 | # skip CDROM device |
| 32 | ;; | 32 | ;; |
| 33 | ram*) | 33 | ram*) |
| 34 | # skip ram device | 34 | # skip ram device |
| 35 | ;; | 35 | ;; |
| 36 | *) | 36 | *) |
| 37 | # skip the device LiveOS is on | 37 | # skip the device LiveOS is on |
| 38 | # Add valid hard drive name to the list | 38 | # Add valid hard drive name to the list |
| 39 | if [ $device != $live_dev_name -a -e /dev/$device ]; then | 39 | if [ $device != $live_dev_name -a -e /dev/$device ]; then |
| 40 | hdnamelist="$hdnamelist $device" | 40 | hdnamelist="$hdnamelist $device" |
| 41 | fi | 41 | fi |
| 42 | ;; | 42 | ;; |
| 43 | esac | 43 | esac |
| 44 | done | 44 | done |
| 45 | 45 | ||
| @@ -49,8 +49,8 @@ for hdname in $hdnamelist; do | |||
| 49 | echo "-------------------------------" | 49 | echo "-------------------------------" |
| 50 | echo /dev/$hdname | 50 | echo /dev/$hdname |
| 51 | if [ -r /sys/block/$hdname/device/vendor ]; then | 51 | if [ -r /sys/block/$hdname/device/vendor ]; then |
| 52 | echo -n "VENDOR=" | 52 | echo -n "VENDOR=" |
| 53 | cat /sys/block/$hdname/device/vendor | 53 | cat /sys/block/$hdname/device/vendor |
| 54 | fi | 54 | fi |
| 55 | if [ -r /sys/block/$hdname/device/model ]; then | 55 | if [ -r /sys/block/$hdname/device/model ]; then |
| 56 | echo -n "MODEL=" | 56 | echo -n "MODEL=" |
| @@ -63,18 +63,17 @@ for hdname in $hdnamelist; do | |||
| 63 | echo | 63 | echo |
| 64 | # Get user choice | 64 | # Get user choice |
| 65 | while true; do | 65 | while true; do |
| 66 | echo -n "Do you want to install this image there? [y/n] " | 66 | echo -n "Do you want to install this image there? [y/n] " |
| 67 | read answer | 67 | read answer |
| 68 | if [ "$answer" = "y" -o "$answer" = "n" ]; then | 68 | if [ "$answer" = "y" -o "$answer" = "n" ]; then |
| 69 | break | 69 | break |
| 70 | fi | 70 | fi |
| 71 | echo "Please answer y or n" | 71 | echo "Please answer y or n" |
| 72 | done | 72 | done |
| 73 | if [ "$answer" = "y" ]; then | 73 | if [ "$answer" = "y" ]; then |
| 74 | TARGET_DEVICE_NAME=$hdname | 74 | TARGET_DEVICE_NAME=$hdname |
| 75 | break | 75 | break |
| 76 | fi | 76 | fi |
| 77 | |||
| 78 | done | 77 | done |
| 79 | 78 | ||
| 80 | if [ -n "$TARGET_DEVICE_NAME" ]; then | 79 | if [ -n "$TARGET_DEVICE_NAME" ]; then |
| @@ -170,7 +169,7 @@ if [ -d /tgt_root/etc/ ] ; then | |||
| 170 | echo "UUID=$boot_uuid /boot vfat defaults 1 2" >> /tgt_root/etc/fstab | 169 | echo "UUID=$boot_uuid /boot vfat defaults 1 2" >> /tgt_root/etc/fstab |
| 171 | # We dont want udev to mount our root device while we're booting... | 170 | # We dont want udev to mount our root device while we're booting... |
| 172 | if [ -d /tgt_root/etc/udev/ ] ; then | 171 | if [ -d /tgt_root/etc/udev/ ] ; then |
| 173 | echo "/dev/${device}" >> /tgt_root/etc/udev/mount.blacklist | 172 | echo "/dev/${device}" >> /tgt_root/etc/udev/mount.blacklist |
| 174 | fi | 173 | fi |
| 175 | fi | 174 | fi |
| 176 | 175 | ||
diff --git a/meta/recipes-core/initrdscripts/files/init-install.sh b/meta/recipes-core/initrdscripts/files/init-install.sh index c57a0f3700..e1e7cb1bd3 100644 --- a/meta/recipes-core/initrdscripts/files/init-install.sh +++ b/meta/recipes-core/initrdscripts/files/init-install.sh | |||
| @@ -23,22 +23,22 @@ echo "Searching for hard drives ..." | |||
| 23 | 23 | ||
| 24 | for device in `ls /sys/block/`; do | 24 | for device in `ls /sys/block/`; do |
| 25 | case $device in | 25 | case $device in |
| 26 | loop*) | 26 | loop*) |
| 27 | # skip loop device | 27 | # skip loop device |
| 28 | ;; | 28 | ;; |
| 29 | sr*) | 29 | sr*) |
| 30 | # skip CDROM device | 30 | # skip CDROM device |
| 31 | ;; | 31 | ;; |
| 32 | ram*) | 32 | ram*) |
| 33 | # skip ram device | 33 | # skip ram device |
| 34 | ;; | 34 | ;; |
| 35 | *) | 35 | *) |
| 36 | # skip the device LiveOS is on | 36 | # skip the device LiveOS is on |
| 37 | # Add valid hard drive name to the list | 37 | # Add valid hard drive name to the list |
| 38 | if [ $device != $live_dev_name -a -e /dev/$device ]; then | 38 | if [ $device != $live_dev_name -a -e /dev/$device ]; then |
| 39 | hdnamelist="$hdnamelist $device" | 39 | hdnamelist="$hdnamelist $device" |
| 40 | fi | 40 | fi |
| 41 | ;; | 41 | ;; |
| 42 | esac | 42 | esac |
| 43 | done | 43 | done |
| 44 | 44 | ||
| @@ -48,8 +48,8 @@ for hdname in $hdnamelist; do | |||
| 48 | echo "-------------------------------" | 48 | echo "-------------------------------" |
| 49 | echo /dev/$hdname | 49 | echo /dev/$hdname |
| 50 | if [ -r /sys/block/$hdname/device/vendor ]; then | 50 | if [ -r /sys/block/$hdname/device/vendor ]; then |
| 51 | echo -n "VENDOR=" | 51 | echo -n "VENDOR=" |
| 52 | cat /sys/block/$hdname/device/vendor | 52 | cat /sys/block/$hdname/device/vendor |
| 53 | fi | 53 | fi |
| 54 | if [ -r /sys/block/$hdname/device/model ]; then | 54 | if [ -r /sys/block/$hdname/device/model ]; then |
| 55 | echo -n "MODEL=" | 55 | echo -n "MODEL=" |
| @@ -62,16 +62,16 @@ for hdname in $hdnamelist; do | |||
| 62 | echo | 62 | echo |
| 63 | # Get user choice | 63 | # Get user choice |
| 64 | while true; do | 64 | while true; do |
| 65 | echo -n "Do you want to install this image there? [y/n] " | 65 | echo -n "Do you want to install this image there? [y/n] " |
| 66 | read answer | 66 | read answer |
| 67 | if [ "$answer" = "y" -o "$answer" = "n" ]; then | 67 | if [ "$answer" = "y" -o "$answer" = "n" ]; then |
| 68 | break | 68 | break |
| 69 | fi | 69 | fi |
| 70 | echo "Please answer y or n" | 70 | echo "Please answer y or n" |
| 71 | done | 71 | done |
| 72 | if [ "$answer" = "y" ]; then | 72 | if [ "$answer" = "y" ]; then |
| 73 | TARGET_DEVICE_NAME=$hdname | 73 | TARGET_DEVICE_NAME=$hdname |
| 74 | break | 74 | break |
| 75 | fi | 75 | fi |
| 76 | done | 76 | done |
| 77 | 77 | ||
| @@ -101,7 +101,7 @@ fi | |||
| 101 | 101 | ||
| 102 | mkdir -p /tmp | 102 | mkdir -p /tmp |
| 103 | if [ ! -L /etc/mtab ]; then | 103 | if [ ! -L /etc/mtab ]; then |
| 104 | cat /proc/mounts > /etc/mtab | 104 | cat /proc/mounts > /etc/mtab |
| 105 | fi | 105 | fi |
| 106 | 106 | ||
| 107 | disk_size=$(parted /dev/${device} unit mb print | grep Disk | cut -d" " -f 3 | sed -e "s/MB//") | 107 | disk_size=$(parted /dev/${device} unit mb print | grep Disk | cut -d" " -f 3 | sed -e "s/MB//") |
| @@ -130,8 +130,8 @@ swap_start=$((rootfs_end)) | |||
| 130 | rootwait="" | 130 | rootwait="" |
| 131 | part_prefix="" | 131 | part_prefix="" |
| 132 | if [ ! "${device#mmcblk}" = "${device}" ]; then | 132 | if [ ! "${device#mmcblk}" = "${device}" ]; then |
| 133 | part_prefix="p" | 133 | part_prefix="p" |
| 134 | rootwait="rootwait" | 134 | rootwait="rootwait" |
| 135 | fi | 135 | fi |
| 136 | 136 | ||
| 137 | if [ $grub_version -eq 0 ] ; then | 137 | if [ $grub_version -eq 0 ] ; then |
| @@ -211,7 +211,7 @@ if [ -d /tgt_root/etc/ ] ; then | |||
| 211 | echo "$bootdev /boot ext3 defaults 1 2" >> /tgt_root/etc/fstab | 211 | echo "$bootdev /boot ext3 defaults 1 2" >> /tgt_root/etc/fstab |
| 212 | # We dont want udev to mount our root device while we're booting... | 212 | # We dont want udev to mount our root device while we're booting... |
| 213 | if [ -d /tgt_root/etc/udev/ ] ; then | 213 | if [ -d /tgt_root/etc/udev/ ] ; then |
| 214 | echo "/dev/${device}" >> /tgt_root/etc/udev/mount.blacklist | 214 | echo "/dev/${device}" >> /tgt_root/etc/udev/mount.blacklist |
| 215 | fi | 215 | fi |
| 216 | fi | 216 | fi |
| 217 | umount /tgt_root | 217 | umount /tgt_root |
