]> code.ossystems Code Review - openembedded-core.git/commitdiff
rootfs_rpm: Escape the backtick to ensure the ls runs on the target
authorSaul Wold <sgw@linux.intel.com>
Tue, 29 Jan 2013 23:04:26 +0000 (15:04 -0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 29 Jan 2013 23:51:49 +0000 (23:51 +0000)
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@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/rootfs_rpm.bbclass

index accd7d9c3c76e2c23b380ec1febc35fcf76c0bc1..119bf92cd7bba945dc30555b8c796ae847ca0338 100644 (file)
@@ -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