public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: Saul Wold <sgw@linux.intel.com>
To: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [PATCH] rootfs_rpm: Escape the backtick to ensure the ls runs on the target
Date: Wed, 30 Jan 2013 10:35:23 -0800	[thread overview]
Message-ID: <510967EB.5060700@linux.intel.com> (raw)
In-Reply-To: <lytxpzkmh1.fsf@ensc-virt.intern.sigma-chemnitz.de>

On 01/30/2013 02:13 AM, Enrico Scholz wrote:
> Saul Wold <sgw-VuQAYsv1563Yd54FQh9/CA@public.gmane.org> writes:
>
>> 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.
>> ...
>> -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..."
>
> are you really sure, this is enough? $i gets probably expanded too.  A
> better way than to escape all and everything is to quote the EOF marker.
>
Yes, I verified the out put in the S98run-postinsts script that is on 
disk and it's correct.

There a line above that sets i=\$i so the expansion occurs back to $i!

Sau!

> E.g. compare
>
> i=abc
>
> cat << "EOF"
> echo $i
> EOF
>
> cat << EOF
> echo $i
> EOF
>
>
> Enrico
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>
>



      reply	other threads:[~2013-01-30 18:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-29 23:04 [PATCH] rootfs_rpm: Escape the backtick to ensure the ls runs on the target Saul Wold
2013-01-30 10:13 ` Enrico Scholz
2013-01-30 18:35   ` Saul Wold [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=510967EB.5060700@linux.intel.com \
    --to=sgw@linux.intel.com \
    --cc=enrico.scholz@sigma-chemnitz.de \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox