public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
To: openembedded-core@lists.openembedded.org
Cc: Saul Wold <sgw-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
Subject: Re: [PATCH] rootfs_rpm: Escape the backtick to ensure the ls runs on the target
Date: Wed, 30 Jan 2013 11:13:14 +0100	[thread overview]
Message-ID: <lytxpzkmh1.fsf@ensc-virt.intern.sigma-chemnitz.de> (raw)
In-Reply-To: <1359500666-2874-1-git-send-email-sgw@linux.intel.com> (Saul Wold's message of "Tue, 29 Jan 2013 15:04:26 -0800")

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.

E.g. compare

i=abc

cat << "EOF"
echo $i
EOF

cat << EOF
echo $i
EOF


Enrico



  reply	other threads:[~2013-01-30 10:28 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 [this message]
2013-01-30 18:35   ` Saul Wold

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=lytxpzkmh1.fsf@ensc-virt.intern.sigma-chemnitz.de \
    --to=enrico.scholz@sigma-chemnitz.de \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=sgw-VuQAYsv1563Yd54FQh9/CA@public.gmane.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