From fb8a47586d0c5c5833a6bee2adc162a22b646d5a Mon Sep 17 00:00:00 2001 From: Tobias Powalowski Date: Sun, 27 Nov 2005 18:55:30 +0000 Subject: 'upgpkg: fixed lock on kernels <= 2.6.12' --- hwdetect | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'hwdetect') 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 -- cgit v1.2.3