summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron Griffin <aaron@archlinux.org>2006-04-27 02:27:09 +0200
committerAaron Griffin <aaron@archlinux.org>2006-04-27 02:27:09 +0200
commitb3002a0c9ec4f3a299b5756695fb28957a83e005 (patch)
tree9659968bc0823914ecc1fb3009904436ab5a9fff
parentcf89f5cd1ce31c1073fb4ffff915f01bb10d5c6c (diff)
downloadmkinitcpio-b3002a0c9ec4f3a299b5756695fb28957a83e005.tar.gz
mkinitcpio-b3002a0c9ec4f3a299b5756695fb28957a83e005.tar.xz
split base into base and pci hooks
git-svn-id: http://projects.archlinux.org/svn/initramfs/mkinitcpio@23 880c04e9-e011-0410-abf7-b926e227c9cd
-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
+}