aboutsummaryrefslogtreecommitdiff
path: root/hwdetect
diff options
context:
space:
mode:
Diffstat (limited to 'hwdetect')
-rwxr-xr-xhwdetect6
1 files changed, 6 insertions, 0 deletions
diff --git a/hwdetect b/hwdetect
index c4052c3..6d708e5 100755
--- a/hwdetect
+++ b/hwdetect
@@ -50,6 +50,12 @@ fi
# find pci aliases
find /sys/devices/ -name "modalias" > /tmp/modules
+# check for empty /tmp/modules
+if ! [ -s /tmp/modules ]; then
+ echo "hwdetect aborted -- you need a kernel >= 2.6.12" >&2
+ exit 1
+fi
+
# get the modaliases
for i in `cat /tmp/modules`; do
cat $i >> /tmp/modprobe