mkinitrd unification across distributions
 help / color / mirror / Atom feed
From: Dave Young <dyoung-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Harald Hoyer <harald-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: Wim Muskee <wimmuskee-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] Do not override user specified initramfs image name
Date: Wed, 13 Mar 2013 15:26:54 +0800	[thread overview]
Message-ID: <51402A3E.5060207@redhat.com> (raw)
In-Reply-To: <514027FE.9090600-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>

On 03/13/2013 03:17 PM, Harald Hoyer wrote:
> Am 13.03.2013 02:48, schrieb Dave Young:
>>
>>
>> The code section for setting default initramfs image name is only for
>> the case that user has not specified image name argument.
>>
>> Moving the code to else section of below:
>>
>> if [[ "$1" ]]; then
>> ...
>> else
>> ...
>> fi
>>
>> Also remove the typo of trailing '}'
>>
>> Reported-by: Wim Muskee <wimmuskee-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>> Signed-off-by: Dave Young <dyoung-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
>> ---
>> diff --git a/lsinitrd.sh b/lsinitrd.sh
>> index 7a09423..fe723f7 100755
>> --- a/lsinitrd.sh
>> +++ b/lsinitrd.sh
>> @@ -54,23 +54,23 @@ if [[ "$1" ]]; then
>>          usage
>>          exit 1
>>      fi
>> -fi
>> -
>> -[[ -f /etc/machine-id ]] && read MACHINE_ID < /etc/machine-id
>> -
>> -if [[ $MACHINE_ID ]] && ( [[ -d /boot/${MACHINE_ID} ]] || [[ -L /boot/${MACHINE_ID} ]] ); then
>> -    image="/boot/${MACHINE_ID}/${KERNEL_VERSION}/initrd"
>>  else
>> -    image="/boot/initramfs-${KERNEL_VERSION}.img}"
>> -fi
>> +    [[ -f /etc/machine-id ]] && read MACHINE_ID < /etc/machine-id
>>  
>> -if ! [[ -f "$image" ]]; then
>> -    {
>> +    if [[ $MACHINE_ID ]] && ( [[ -d /boot/${MACHINE_ID} ]] || [[ -L /boot/${MACHINE_ID} ]] ); then
>> +        image="/boot/${MACHINE_ID}/${KERNEL_VERSION}/initrd"
>> +    else
>> +        image="/boot/initramfs-${KERNEL_VERSION}.img"
>> +    fi
>> +
>> +    if ! [[ -f "$image" ]]; then
>> +        {
>>          echo "No <initramfs file> specified and the default image '$image' cannot be accessed!"
>>          echo
>> -    } >&2
>> -    usage
>> -    exit 1
>> +        } >&2
>> +        usage
>> +        exit 1
>> +    fi
>>  fi
>>  
>>  CAT=zcat
>>
> 
> see
> http://git.kernel.org/cgit/boot/dracut/dracut.git/commit/?id=727e68d0b5cb93eb6c6e00f0541b8519657a2597
> and
> http://git.kernel.org/cgit/boot/dracut/dracut.git/commit/?id=d928724c3cf464a495c11162042951887b80f5e6
> 
> already committed on 2013-03-11
> 
> 

Good to know, thanks for tell.

-- 
Thanks
Dave


      parent reply	other threads:[~2013-03-13  7:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-11 18:53 dracut-026: lsinitrd doesn't work with provided image Wim Muskee
     [not found] ` <CAKzfqkfwg_tW70VJbmgKg-Vs3O2DWLX36o0bMZhYvTL9U9QCRQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-03-12  7:54   ` Dave Young
     [not found]     ` <513EDF30.7090408-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-03-12 14:35       ` Wim Muskee
     [not found]         ` <CAKzfqkeUkknOwONqZkuZ8c56+5iNLxigLv+K70sSDXuvPaabZg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-03-12 14:59           ` Harald Hoyer
     [not found]             ` <513F42EC.5030800-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-03-13  1:48               ` [PATCH] Do not override user specified initramfs image name Dave Young
     [not found]                 ` <513FDAF4.9030908-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-03-13  7:17                   ` Harald Hoyer
     [not found]                     ` <514027FE.9090600-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-03-13  7:26                       ` Dave Young [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=51402A3E.5060207@redhat.com \
    --to=dyoung-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
    --cc=harald-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=wimmuskee-Re5JQEeQqe8AvxtiuMwx3w@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