[oe-commits] Saul Wold : rootfs_rpm: Escape the backtick to ensure the ls runs on the target

git at git.openembedded.org git at git.openembedded.org
Wed Jan 30 00:07:40 UTC 2013


Module: openembedded-core.git
Branch: master
Commit: e893cf0b3843701e80f5c9f47be04d1a88e5ed68
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=e893cf0b3843701e80f5c9f47be04d1a88e5ed68

Author: Saul Wold <sgw at linux.intel.com>
Date:   Tue Jan 29 15:04:26 2013 -0800

rootfs_rpm: Escape the backtick to ensure the ls runs on the target

This change ensures that the ls /etc/rpm-postinsts runs in the target
at first boot time, rather than at the creation time of the script on
the host.

This was causing the following error in the rootfs log:

+ install -d /srv/ssd/sgw/machines/fri2/tmp/work/fri2-poky-linux/core-image-minimal/1.0-r0/rootfs//etc/rcS.d
+ i=
+ ls /etc/rpm-postinsts/
ls: cannot access /etc/rpm-postinsts/: No such file or directory

Signed-off-by: Saul Wold <sgw at linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>

---

 meta/classes/rootfs_rpm.bbclass |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/meta/classes/rootfs_rpm.bbclass b/meta/classes/rootfs_rpm.bbclass
index accd7d9..119bf92 100644
--- a/meta/classes/rootfs_rpm.bbclass
+++ b/meta/classes/rootfs_rpm.bbclass
@@ -108,7 +108,7 @@ fakeroot rootfs_rpm_do_rootfs () {
 	i=\$i
 	cat > ${IMAGE_ROOTFS}${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}run-postinsts << EOF
 #!/bin/sh
-for i in `ls /etc/rpm-postinsts/`; do
+for i in \`ls /etc/rpm-postinsts/\`; do
 	i=/etc/rpm-postinsts/$i
 	echo "Running postinst $i..."
 	if [ -f $i ] && $i; then





More information about the Openembedded-commits mailing list