On Fri, Sep 16, 2011 at 3:42 PM, Dan McGee <dpmcgee@gmail.com> wrote:
On Fri, Sep 16, 2011 at 9:31 AM, Seblu <seblu@seblu.net> wrote:
On Fri, Sep 16, 2011 at 2:50 PM, Dave Reisner <d@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@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. Define "doesn't work"? Because your solution doesn't work: I tested carrefuly before posting.
$ echo checked_modules 'virtio_\(blk\|pci\)' checked_modules virtio_\(blk\|pci\) $ echo checked_modules virtio_{blk,pci} checked_modules virtio_blk virtio_pci
If we use bash exp, 2 args will be passed to check modules, which will pass 2 args to all_modules, which will pass 2 args to grep and fail. ==> Building image from preset: 'default' -> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux.img ==> Starting build: 3.0-ARCH -> Parsing hook: [base] -> Parsing hook: [udev] -> Parsing hook: [autodetect] -> Parsing hook: [pata] -> Parsing hook: [scsi] -> Parsing hook: [sata] -> Parsing hook: [virtio] grep: virtio_pci: No such file or directory -> Parsing hook: [filesystems] -> Parsing hook: [usbinput] ==> Generating module dependencies Lukas, do you have concrete suggestions to improve it? -- Sébastien Luttringer www.seblu.net