diff options
-rw-r--r-- | meta/recipes-core/initrdscripts/files/init-live.sh | 17 | ||||
-rw-r--r-- | meta/recipes-core/initrdscripts/initramfs-live-boot_1.0.bb | 2 |
2 files changed, 12 insertions, 7 deletions
diff --git a/meta/recipes-core/initrdscripts/files/init-live.sh b/meta/recipes-core/initrdscripts/files/init-live.sh index 1cd87e8d94..6a1deba0e2 100644 --- a/meta/recipes-core/initrdscripts/files/init-live.sh +++ b/meta/recipes-core/initrdscripts/files/init-live.sh | |||
@@ -1,9 +1,10 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | 2 | ||
3 | ROOT_MOUNT="/rootfs/" | 3 | ROOT_MOUNT="/rootfs/" |
4 | ROOT_IMAGE="isolinux/rootfs.img" | 4 | ROOT_IMAGE="rootfs.img" |
5 | MOUNT="/bin/mount" | 5 | MOUNT="/bin/mount" |
6 | UMOUNT="/bin/umount" | 6 | UMOUNT="/bin/umount" |
7 | ISOLINUX="" | ||
7 | 8 | ||
8 | early_setup() { | 9 | early_setup() { |
9 | mkdir /proc | 10 | mkdir /proc |
@@ -58,8 +59,12 @@ while true | |||
58 | do | 59 | do |
59 | for i in `ls /media 2>/dev/null`; do | 60 | for i in `ls /media 2>/dev/null`; do |
60 | if [ -f /media/$i/$ROOT_IMAGE ] ; then | 61 | if [ -f /media/$i/$ROOT_IMAGE ] ; then |
61 | found="yes" | 62 | found="yes" |
62 | break | 63 | break |
64 | elif [ -f /media/$i/isolinux/$ROOT_IMAGE ]; then | ||
65 | found="yes" | ||
66 | ISOLINUX="isolinux" | ||
67 | break | ||
63 | fi | 68 | fi |
64 | done | 69 | done |
65 | if [ "$found" = "yes" ]; then | 70 | if [ "$found" = "yes" ]; then |
@@ -73,15 +78,15 @@ case $label in | |||
73 | mkdir $ROOT_MOUNT | 78 | mkdir $ROOT_MOUNT |
74 | mknod /dev/loop0 b 7 0 | 79 | mknod /dev/loop0 b 7 0 |
75 | 80 | ||
76 | if ! $MOUNT -o rw,loop,noatime,nodiratime /media/$i/$ROOT_IMAGE $ROOT_MOUNT ; then | 81 | if ! $MOUNT -o rw,loop,noatime,nodiratime /media/$i/$ISOLINUX/$ROOT_IMAGE $ROOT_MOUNT ; then |
77 | fatal "Couldnt mount rootfs image" | 82 | fatal "Couldnt mount rootfs image" |
78 | else | 83 | else |
79 | boot_live_root | 84 | boot_live_root |
80 | fi | 85 | fi |
81 | ;; | 86 | ;; |
82 | install) | 87 | install) |
83 | if [ -f /media/$i/$ROOT_IMAGE ] ; then | 88 | if [ -f /media/$i/$ISOLINUX/$ROOT_IMAGE ] ; then |
84 | ./install.sh $i $ROOT_IMAGE $video_mode $vga_mode | 89 | ./install.sh $i/$ISOLINUX $ROOT_IMAGE $video_mode $vga_mode |
85 | else | 90 | else |
86 | fatal "Couldnt find install script" | 91 | fatal "Couldnt find install script" |
87 | fi | 92 | fi |
diff --git a/meta/recipes-core/initrdscripts/initramfs-live-boot_1.0.bb b/meta/recipes-core/initrdscripts/initramfs-live-boot_1.0.bb index 140fb1d1e8..6d354b77ca 100644 --- a/meta/recipes-core/initrdscripts/initramfs-live-boot_1.0.bb +++ b/meta/recipes-core/initrdscripts/initramfs-live-boot_1.0.bb | |||
@@ -3,7 +3,7 @@ LICENSE = "MIT" | |||
3 | LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" | 3 | LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" |
4 | SRC_URI = "file://init-live.sh" | 4 | SRC_URI = "file://init-live.sh" |
5 | 5 | ||
6 | PR = "r4" | 6 | PR = "r5" |
7 | 7 | ||
8 | do_install() { | 8 | do_install() { |
9 | install -m 0755 ${WORKDIR}/init-live.sh ${D}/init | 9 | install -m 0755 ${WORKDIR}/init-live.sh ${D}/init |