summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--hooks/pci9
-rw-r--r--install/pci17
2 files changed, 26 insertions, 0 deletions
diff --git a/hooks/pci b/hooks/pci
new file mode 100644
index 0000000..d158d25
--- /dev/null
+++ b/hooks/pci
@@ -0,0 +1,9 @@
+# vim:set ft=sh:
+run_hook ()
+{
+ if [ -e "/sys/bus/pci" ]; then
+ msg -n "Loading pci bus modules..."
+ /bin/modprobe -a -q $(/bin/cat /sys/bus/pci/devices/*/modalias) >/dev/null 2>&1
+ msg "done."
+ fi
+}
diff --git a/install/pci b/install/pci
new file mode 100644
index 0000000..4329720
--- /dev/null
+++ b/install/pci
@@ -0,0 +1,17 @@
+# vim: set ft=sh:
+
+install ()
+{
+ MODULES=""
+ BINARIES=""
+ FILES=""
+ SCRIPT="pci"
+}
+
+help ()
+{
+cat<<HELPEOF
+ This hook loads the necessary modules for the pci bus.
+ No modules are installed by this hook, it is script-only.
+HELPEOF
+}