aboutsummaryrefslogtreecommitdiff
path: root/hwdetect
diff options
context:
space:
mode:
authorTobias Powalowski <tpowa@archlinux.org>2005-11-27 18:55:30 +0000
committerTobias Powalowski <tpowa@archlinux.org>2005-11-27 18:55:30 +0000
commitfb8a47586d0c5c5833a6bee2adc162a22b646d5a (patch)
tree18161f9876cd1ed2f96f8e22d68f253ccd5108c0 /hwdetect
parent66779d909c3a08f2c3fa0811de12f0e3b5c54bc0 (diff)
downloadinitscripts-fb8a47586d0c5c5833a6bee2adc162a22b646d5a.tar.xz
'upgpkg: fixed lock on kernels <= 2.6.12'
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