Am 12.03.2013 15:35, schrieb Wim Muskee:
> On Tue, Mar 12, 2013 at 8:54 AM, Dave Young <[email protected]> wrote:
>> On 03/12/2013 02:53 AM, Wim Muskee wrote:
>>> hi,
>>>
>>> In dracut-026:
>>> # dracut /boot/initramfs-dracut-x86_64-3.3.8-gentoo 3.3.8-gentoo
>>> # lsinitrd /boot/initramfs-dracut-x86_64-3.3.8-gentoo
>>>
>>> No <initramfs file> specified and the default image
>>> '/boot/initramfs-3.2.1-gentoo-r2.img}' cannot be accessed!
>>>
>>> Usage: lsinitrd [-s] [<initramfs file> [<filename>]]
>>>
>>> Looking at the lsinitrd, the provided image seems to be always
>>> overwritten after it has been set from $1.
>>>
>>
>> The machine-id section should only be run in case without $1 as image name.
>> Is below fix works for you?
>>
>> 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}"

typo.. trailing "}"
--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to