summaryrefslogtreecommitdiff
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:29:35 +0100
commit4617ae0f433876037c2c9a0dfdb5e373e7a5c77b (patch)
tree1c6c4a4240e648f8bedc0fc0420da922c0ed3db1 /meta
parent97249b6d12e9a87bac97a48ad35434084bbe70e3 (diff)
downloadopenembedded-core-4617ae0f433876037c2c9a0dfdb5e373e7a5c77b.tar.gz
openembedded-core-4617ae0f433876037c2c9a0dfdb5e373e7a5c77b.tar.bz2
openembedded-core-4617ae0f433876037c2c9a0dfdb5e373e7a5c77b.tar.xz
openembedded-core-4617ae0f433876037c2c9a0dfdb5e373e7a5c77b.zip
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 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 9d804fc3a..e82eba025 100644
--- a/meta/recipes-core/initrdscripts/files/init-boot.sh
+++ b/meta/recipes-core/initrdscripts/files/init-boot.sh
@@ -1,5 +1,7 @@
#!/bin/sh
+PATH=/sbin:/bin:/usr/sbin:/usr/bin
+
mkdir /proc
mkdir /sys
mount -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 fb6cea8d3..d31d99434 100644
--- a/meta/recipes-core/initrdscripts/files/init-install.sh
+++ b/meta/recipes-core/initrdscripts/files/init-install.sh
@@ -5,6 +5,8 @@
# install.sh [device_name] [rootfs_name] [video_mode] [vga_mode]
#
+PATH=/sbin:/bin:/usr/sbin:/usr/bin
+
# We need 20 Mb for the boot partition
boot_size=20
diff --git a/meta/recipes-core/initrdscripts/files/init-live.sh b/meta/recipes-core/initrdscripts/files/init-live.sh
index 6a1deba0e..c054863a2 100644
--- a/meta/recipes-core/initrdscripts/files/init-live.sh
+++ b/meta/recipes-core/initrdscripts/files/init-live.sh
@@ -1,5 +1,7 @@
#!/bin/sh
+PATH=/sbin:/bin:/usr/sbin:/usr/bin
+
ROOT_MOUNT="/rootfs/"
ROOT_IMAGE="rootfs.img"
MOUNT="/bin/mount"
@@ -12,7 +14,7 @@ early_setup() {
mount -t proc proc /proc
mount -t sysfs sysfs /sys
udevd --daemon
- /sbin/udevadm trigger --action=add
+ udevadm trigger --action=add
}
read_args() {
diff --git a/meta/recipes-core/initrdscripts/initramfs-boot_1.0.bb b/meta/recipes-core/initrdscripts/initramfs-boot_1.0.bb
index 704c2718a..6f9b4c21f 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"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
SRC_URI = "file://init-boot.sh"
-PR = "r1"
+PR = "r2"
do_install() {
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 6d354b77c..b404f8c60 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"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
SRC_URI = "file://init-live.sh"
-PR = "r5"
+PR = "r6"
do_install() {
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 fc35e5c9c..793a4b799 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"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
SRC_URI = "file://init-install.sh"
-PR = "r5"
+PR = "r6"
RDEPENDS_${PN} = "grub parted e2fsprogs-mke2fs"