aboutsummaryrefslogtreecommitdiff
path: root/hwdetect
diff options
context:
space:
mode:
Diffstat (limited to 'hwdetect')
-rwxr-xr-xhwdetect5
1 files changed, 5 insertions, 0 deletions
diff --git a/hwdetect b/hwdetect
index 533cc0d..dc7587e 100755
--- a/hwdetect
+++ b/hwdetect
@@ -34,6 +34,11 @@ usage () {
[ "$1" == "" ] && usage
+if ! [ -d /sys/devices ]; then
+ echo "/sys/devices is not present -- mount /sys first" >&2
+ exit 1
+fi
+
: >/tmp/modules-plain
: >/tmp/modules-stripped
: >/tmp/modules-sorted