summaryrefslogtreecommitdiffstats
path: root/core/rootfs/rootfs-stage31/data/sbin/hotplug
diff options
context:
space:
mode:
Diffstat (limited to 'core/rootfs/rootfs-stage31/data/sbin/hotplug')
-rwxr-xr-xcore/rootfs/rootfs-stage31/data/sbin/hotplug15
1 files changed, 15 insertions, 0 deletions
diff --git a/core/rootfs/rootfs-stage31/data/sbin/hotplug b/core/rootfs/rootfs-stage31/data/sbin/hotplug
new file mode 100755
index 00000000..f2bda19b
--- /dev/null
+++ b/core/rootfs/rootfs-stage31/data/sbin/hotplug
@@ -0,0 +1,15 @@
+#!/bin/ash
+
+[ "$ACTION" != "add" ] && exit 0
+
+[ -z "$MODALIAS" ] && exit 0
+
+[ "${MODALIAS:0:5}" != "pci:v" ] && exit 0 # Ignore everything but PCI devices
+
+ID="${MODALIAS:9:4}:${MODALIAS:18:4}"
+
+LINE="$( lspci -n | grep -oEi "[0-9]{4}: $ID" | cut -c1-2 )"
+[ "$LINE" = "03" ] && exit 0 # Skip GFX, handled by other module
+
+modprobe "$MODALIAS"
+