Skip to content
Browse files

change add_driver_classes -> add_checked_modules, add add_all_modules

  • Loading branch information...
1 parent e759436 commit e735fbc647ba1153d114a0c84072b5ad78d1e705 @falconindy committed May 15, 2011
Showing with 31 additions and 18 deletions.
  1. +8 −3 README.pod
  2. +1 −1 builders/ata
  3. +1 −1 builders/filesystems
  4. +1 −1 builders/firewire
  5. +1 −1 builders/fw
  6. +1 −1 builders/ide
  7. +1 −1 builders/mdadm
  8. +1 −1 builders/net
  9. +1 −1 builders/pcmcia
  10. +1 −1 builders/scsi
  11. +2 −2 builders/usb
  12. +1 −1 builders/usbinput
  13. +1 −1 builders/virtio
  14. +10 −2 geninit.api
View
11 README.pod
@@ -189,18 +189,23 @@ library dependencies which will also be added to the image.
Add a directory, specified by its absolute path on the image. Unless specified,
the permissions of the directory will be 755.
-=item B<add_driver_classes> I<class>...
+=item B<add_checked_modules> I<class>...
Add one or more classifications of modules to the image, specified as a
directory relative to C</lib/modules/KERNELVERSION/kernel>, e.g. 'drivers/scsi'
or 'crypto'. Modules can be filtered by name by adding glob (including extended
glob) patterns to the I<MODFILTER> array prior to calling
-B<add_driver_classes>. This filter is cleared after the parsing of each hook,
+B<add_checked_modules>. This filter is cleared after the parsing of each hook,
although you are free to call B<unset> from within the builder, if desired.
Additionally, if the autodetect builder is used as part of image generation,
only the intersection of the autodetect module list and the results of the
-add_driver_classes call will be added to the resulting image.
+add_checked_modules call will be added to the resulting image.
+
+=item B<all_all_modules> I<class>...
+
+Identical to B<add_checked_modules> with the exception that no comparison
+against the autodetected module list is performed.
=item B<add_file> I<source> [I<path>]
View
2 builders/ata
@@ -1,7 +1,7 @@
#!/bin/bash
build() {
- add_driver_classes drivers/ata drivers/block && add_module sd_mod
+ add_checked_modules drivers/ata drivers/block && add_module sd_mod
}
helpmsg() {
View
2 builders/filesystems
@@ -2,7 +2,7 @@
build() {
MODFILTER=('nls_*')
- add_driver_classes fs
+ add_checked_modules fs
}
helpmsg() {
View
2 builders/firewire
@@ -1,7 +1,7 @@
#!/bin/bash
build() {
- add_driver_classes drivers/firewire
+ add_checked_modules drivers/firewire
add_module firewire-sbp2
add_module sd_mod
View
2 builders/fw
@@ -1,7 +1,7 @@
#!/bin/bash
build() {
- add_driver_classes drivers/firewire
+ add_checked_modules drivers/firewire
add_module firewire-sbp2
add_module sd_mod
View
2 builders/ide
@@ -1,7 +1,7 @@
#!/bin/bash
build() {
- add_driver_classes drivers/ide && add_module ide-gd_mod
+ add_checked_modules drivers/ide && add_module ide-gd_mod
}
helpmsg() {
View
2 builders/mdadm
@@ -2,7 +2,7 @@
build() {
MODFILTER=('dm-*')
- add_driver_classes drivers/md
+ add_checked_modules drivers/md
add_binary "/sbin/mdadm"
add_file "/lib/udev/rules.d/64-md-raid.rules"
View
2 builders/net
@@ -4,7 +4,7 @@ build() {
use_hookscript
add_module nfs
- add_driver_classes drivers/net
+ add_checked_modules drivers/net
add_binary "/lib/initcpio/ipconfig" "/bin/ipconfig"
add_binary "/lib/initcpio/nfsmount" "/bin/nfsmount"
View
2 builders/pcmcia
@@ -1,7 +1,7 @@
#!/bin/bash
build() {
- add_driver_classes drivers/pcmcia drivers/ide/legacy && add_module sd_mod
+ add_checked_modules drivers/pcmcia drivers/ide/legacy && add_module sd_mod
add_binary "/lib/udev/pcmcia-socket-startup"
add_binary "/lib/udev/pcmcia-check-broken-cis"
View
2 builders/scsi
@@ -2,7 +2,7 @@
build() {
MODFILTER=('*_cs')
- add_driver_classes drivers/scsi drivers/block drivers/message/fusion &&
+ add_checked_modules drivers/scsi drivers/block drivers/message/fusion &&
add_module sd_mod
}
View
4 builders/usb
@@ -1,11 +1,11 @@
#!/bin/bash
build() {
- if add_driver_classes drivers/usb/host; then
+ if add_checked_modules drivers/usb/host; then
add_module usb_storage
add_module sd_mod
add_module sr_mod
- add_driver_classes drivers/usb/storage
+ add_checked_modules drivers/usb/storage
fi
}
View
2 builders/usbinput
@@ -1,7 +1,7 @@
#!/bin/bash
build() {
- add_driver_classes drivers/usb/host drivers/hid/usbhid
+ add_checked_modules drivers/usb/host drivers/hid/usbhid
}
helpmsg() {
View
2 builders/virtio
@@ -1,7 +1,7 @@
#!/bin/bash
build() {
- add_driver_classes drivers/virtio && add_module virtio_blk
+ add_checked_modules drivers/virtio && add_module virtio_blk
}
helpmsg() {
View
12 geninit.api
@@ -187,8 +187,8 @@ use_hookscript() { # {{{
__add_file "/hooks/$script" "$basedir$_sharedir/hooks/$script" 755
} # }}}
-add_driver_classes() { # {{{
- # add a class of drivers, as a dir relative to /lib/modules/$kernver/kernel.
+add_checked_modules() { # {{{
+ # add a class of modules, as a dir relative to /lib/modules/$kernver/kernel.
# if you need to block addition of modules, you can add glob patterns to the
# 'MODFILTER' array within your builder. They must be quoted and the
# filter is cleared after parsing of each builder.
@@ -223,4 +223,12 @@ add_driver_classes() { # {{{
return $(( ! ret ))
} # }}}
+add_all_modules() { # {{{
+ # add a class of modules, as a dir relative to /lib/modules/$kernver/kernel.
+ # this function honors 'MODFILTER', but does not check against the autodetected
+ # cache of modules.
+
+ NOAUTO=1 add_checked_modules "$@"
+} # }}}
+
# vim: set et sw=2 ft=sh:

0 comments on commit e735fbc

Please sign in to comment.
Something went wrong with that request. Please try again.