All of lore.kernel.org
 help / color / mirror / Atom feed
From: Harald Hoyer <harald-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: "Sebastian Köln"
	<skoeln-4JCb7EXykGJ5qnkD1ooD3mPhZIeI7moD@public.gmane.org>,
	initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: Bug in dracut-functions.sh@225(print_vars)
Date: Tue, 20 May 2014 13:28:03 +0200	[thread overview]
Message-ID: <537B3C43.7040103@redhat.com> (raw)
In-Reply-To: <201404061338.54350.skoeln-4JCb7EXykGJ5qnkD1ooD3mPhZIeI7moD@public.gmane.org>

On 06.04.2014 13:38, Sebastian Köln wrote:
> Hello,
> 
> I stubled upon the following bug (dracut --verbose output):
> 
>> ...
>> //usr/lib/dracut/modules.d/10i18n/module-setup.sh@132(install_local_i18n): 
> EXT_KEYMAPS='backspace keypad euro2'
>> ...
>> /usr/lib/dracut/dracut-functions.sh@224(print_vars): eval printf -v _value 
> %s '$EXT_KEYMAPS'
>> //usr/lib/dracut/dracut-functions.sh@224(print_vars): printf -v _value %s 
> backspace keypad euro2
>> /usr/lib/dracut/dracut-functions.sh@225(print_vars): [[ -n 
> backspacekeypadeuro2 ]]
>> /usr/lib/dracut/dracut-functions.sh@225(print_vars): printf '%s=\"%s\"\n' 
> EXT_KEYMAPS backspacekeypadeuro2
> 
> the "eval" line of print_vars
> needs to re replaced by
>> eval printf -v _value "%s" \""\$$_var"\"
> 
> the modified function is then:
> 
>> # Function prints global variables in format name=value line by line.
>> # $@ = list of global variables' name
>> print_vars() {
>>     local _var _value
>>
>>     for _var in "$@"
>>     do
>>         eval printf -v _value "%s" \""\$$_var"\"
>>         [[ ${_value} ]] && printf '%s="%s"\n' "$_var" "$_value"
>>     done
>> }
> 
> this produces the correct result.


Thanks!

http://git.kernel.org/cgit/boot/dracut/dracut.git/commit/?id=7a94a4326f0641396125acb2b444b562224457a1

      parent reply	other threads:[~2014-05-20 11:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-06 11:38 Bug in dracut-functions.sh@225(print_vars) Sebastian Köln
     [not found] ` <201404061338.54350.skoeln-4JCb7EXykGJ5qnkD1ooD3mPhZIeI7moD@public.gmane.org>
2014-05-20 11:28   ` Harald Hoyer [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=537B3C43.7040103@redhat.com \
    --to=harald-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
    --cc=initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=skoeln-4JCb7EXykGJ5qnkD1ooD3mPhZIeI7moD@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.