summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorDarren Hart <dvhart@linux.intel.com>2011-09-15 15:41:37 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-09-16 13:30:26 +0100
commite4fe5542a5242a62d7fc83bd24f65aeadb4d9390 (patch)
treea57b7cef66ff224596cdc92513bac5c664b3f687 /meta
parent6f797c9398be2206dc6f721109a25038a2ce4a87 (diff)
downloadpoky-e4fe5542a5242a62d7fc83bd24f65aeadb4d9390.tar.gz
Set an explicit path for the initrd scripts
If we don't set PATH, then the shell will specify one for us. Busybox adds the sbin dirs, but bash does not. I hit an issue where bash (among other things) ended up in my initrd and the boot scripts failed due to a bad default PATH. While that is a separate issue, we should not be at the mercy of the shell's default PATH. Update the initrdscripts to all specify: PATH=/sbin:/bin:/usr/sbin:/usr/bin (From OE-Core rev: 4617ae0f433876037c2c9a0dfdb5e373e7a5c77b) Signed-off-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-core/initrdscripts/files/init-boot.sh2
-rw-r--r--meta/recipes-core/initrdscripts/files/init-install.sh2
-rw-r--r--meta/recipes-core/initrdscripts/files/init-live.sh4
-rw-r--r--meta/recipes-core/initrdscripts/initramfs-boot_1.0.bb2
-rw-r--r--meta/recipes-core/initrdscripts/initramfs-live-boot_1.0.bb2
-rw-r--r--meta/recipes-core/initrdscripts/initramfs-live-install_1.0.bb2
6 files changed, 10 insertions, 4 deletions
diff --git a/meta/recipes-core/initrdscripts/files/init-boot.sh b/meta/recipes-core/initrdscripts/files/init-boot.sh
index 9d804fc3a7..e82eba025d 100644
--- a/meta/recipes-core/initrdscripts/files/init-boot.sh
+++ b/meta/recipes-core/initrdscripts/files/init-boot.sh
@@ -1,5 +1,7 @@
1#!/bin/sh 1#!/bin/sh
2 2
3PATH=/sbin:/bin:/usr/sbin:/usr/bin
4
3mkdir /proc 5mkdir /proc
4mkdir /sys 6mkdir /sys
5mount -t proc proc /proc 7mount -t proc proc /proc
diff --git a/meta/recipes-core/initrdscripts/files/init-install.sh b/meta/recipes-core/initrdscripts/files/init-install.sh
index fb6cea8d31..d31d994341 100644
--- a/meta/recipes-core/initrdscripts/files/init-install.sh
+++ b/meta/recipes-core/initrdscripts/files/init-install.sh
@@ -5,6 +5,8 @@
5# install.sh [device_name] [rootfs_name] [video_mode] [vga_mode] 5# install.sh [device_name] [rootfs_name] [video_mode] [vga_mode]
6# 6#
7 7
8PATH=/sbin:/bin:/usr/sbin:/usr/bin
9
8# We need 20 Mb for the boot partition 10# We need 20 Mb for the boot partition
9boot_size=20 11boot_size=20
10 12
diff --git a/meta/recipes-core/initrdscripts/files/init-live.sh b/meta/recipes-core/initrdscripts/files/init-live.sh
index 6a1deba0e2..c054863a2a 100644
--- a/meta/recipes-core/initrdscripts/files/init-live.sh
+++ b/meta/recipes-core/initrdscripts/files/init-live.sh
@@ -1,5 +1,7 @@
1#!/bin/sh 1#!/bin/sh
2 2
3PATH=/sbin:/bin:/usr/sbin:/usr/bin
4
3ROOT_MOUNT="/rootfs/" 5ROOT_MOUNT="/rootfs/"
4ROOT_IMAGE="rootfs.img" 6ROOT_IMAGE="rootfs.img"
5MOUNT="/bin/mount" 7MOUNT="/bin/mount"
@@ -12,7 +14,7 @@ early_setup() {
12 mount -t proc proc /proc 14 mount -t proc proc /proc
13 mount -t sysfs sysfs /sys 15 mount -t sysfs sysfs /sys
14 udevd --daemon 16 udevd --daemon
15 /sbin/udevadm trigger --action=add 17 udevadm trigger --action=add
16} 18}
17 19
18read_args() { 20read_args() {
diff --git a/meta/recipes-core/initrdscripts/initramfs-boot_1.0.bb b/meta/recipes-core/initrdscripts/initramfs-boot_1.0.bb
index 704c2718a0..6f9b4c21f1 100644
--- a/meta/recipes-core/initrdscripts/initramfs-boot_1.0.bb
+++ b/meta/recipes-core/initrdscripts/initramfs-boot_1.0.bb
@@ -3,7 +3,7 @@ LICENSE = "MIT"
3LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" 3LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
4SRC_URI = "file://init-boot.sh" 4SRC_URI = "file://init-boot.sh"
5 5
6PR = "r1" 6PR = "r2"
7 7
8do_install() { 8do_install() {
9 install -m 0755 ${WORKDIR}/init-boot.sh ${D}/init 9 install -m 0755 ${WORKDIR}/init-boot.sh ${D}/init
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 6d354b77ca..b404f8c600 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"
3LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" 3LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
4SRC_URI = "file://init-live.sh" 4SRC_URI = "file://init-live.sh"
5 5
6PR = "r5" 6PR = "r6"
7 7
8do_install() { 8do_install() {
9 install -m 0755 ${WORKDIR}/init-live.sh ${D}/init 9 install -m 0755 ${WORKDIR}/init-live.sh ${D}/init
diff --git a/meta/recipes-core/initrdscripts/initramfs-live-install_1.0.bb b/meta/recipes-core/initrdscripts/initramfs-live-install_1.0.bb
index fc35e5c9c8..793a4b799b 100644
--- a/meta/recipes-core/initrdscripts/initramfs-live-install_1.0.bb
+++ b/meta/recipes-core/initrdscripts/initramfs-live-install_1.0.bb
@@ -3,7 +3,7 @@ LICENSE = "MIT"
3LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" 3LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
4SRC_URI = "file://init-install.sh" 4SRC_URI = "file://init-install.sh"
5 5
6PR = "r5" 6PR = "r6"
7 7
8RDEPENDS_${PN} = "grub parted e2fsprogs-mke2fs" 8RDEPENDS_${PN} = "grub parted e2fsprogs-mke2fs"
9 9