Bug#870448: hw-detect - stop using modprobe -l
Package: hw-detect
Version: 1.124
Severity: normal
Tags: patch
I keep seeing this in installer logs, back to jessie.
Aug 2 01:52:11 main-menu[193]: (process:224): modprobe: invalid option -- 'l'
I rated this normal rather than minor because the way it is working
now the is_available() function always returns 1 (failure)
My suggestion is to use modinfo instead.
This will return multiline output inside the quotes but
a couple of tests suggests that is ok.
It does fail with some modules (nvidia), not sure if we care.
diff --git a/hw-detect.sh b/hw-detect.sh
index 7977814..d8196c1 100755
--- a/hw-detect.sh
+++ b/hw-detect.sh
@@ -43,7 +43,7 @@ is_not_loaded() {
}
is_available () {
- [ "$(modprobe -l $1)" ] || return 1
+ [ "$(modinfo $1)" ] || return 1
}
# Module as first parameter, description of device the second.
Kind regards
Vince
Reply to: