[arch-projects] [MKINITCPIO][PATCH 2/2] Add a virtio hook

Seblu seblu at seblu.net
Fri Sep 16 09:31:25 EDT 2011


On Fri, Sep 16, 2011 at 2:50 PM, Dave Reisner <d at falconindy.com> wrote:
> On Fri, Sep 16, 2011 at 02:39:44PM +0200, Sebastien Luttringer wrote:
>> This allow initcpio to boot vm which use virtio as network/disk backend.
>>
>> Signed-off-by: Sebastien Luttringer <seblu at seblu.net>
>> ---
>>  install/virtio |   15 +++++++++++++++
>>  1 files changed, 15 insertions(+), 0 deletions(-)
>>  create mode 100644 install/virtio
>>
>> diff --git a/install/virtio b/install/virtio
>> new file mode 100644
>> index 0000000..12503e9
>> --- /dev/null
>> +++ b/install/virtio
>> @@ -0,0 +1,15 @@
>> +build() {
>> +    MODULES="$(checked_modules 'virtio_blk')"
>> +    MODULES+=" $(checked_modules 'virtio_pci')"
>
> checked_modules can take multiple parameters:
>
>  MODULES=$(checked_modules virtio_{blk,pci})

This doesn't work but something like "virtio_\(blk\|pci\)" do the job.

>
>> +}
>> +
>> +help ()
>> +{
>> +cat<<HELPEOF
>> +  This hook loads the necessary modules for a virtio root device.
>> +  Detection will take place at runtime. To minimize the modules
>> +  in the image, add the autodetect hook too.
>> +HELPEOF
>> +}
>> +
>> +# vim: set ft=sh ts=4 sw=4 et:
>
> I'd appreciate it if you could follow the newer style shown in the
> autodetect or base hook. I've been making an effort to clean these all
> up to match the remainder of the codebase:
>
> https://github.com/falconindy/mkinitcpio/commit/d0e2a180
>
> d
>

sure

-- 
Sébastien Luttringer
www.seblu.net


More information about the arch-projects mailing list