aboutsummaryrefslogtreecommitdiffstats
path: root/kmod.prov
diff options
context:
space:
mode:
Diffstat (limited to 'kmod.prov')
-rwxr-xr-xkmod.prov7
1 files changed, 3 insertions, 4 deletions
diff --git a/kmod.prov b/kmod.prov
index dcd9aa1..809215f 100755
--- a/kmod.prov
+++ b/kmod.prov
@@ -15,11 +15,10 @@ dkmslist=$(echo "$provideslist" | egrep '/usr/src/[^/]*/dkms.conf$')
[ -n "$dkmslist" ] && echo $dkmslist | while read d; do
VERSION=`sed -rne 's/^PACKAGE_VERSION="?([^"]+)"?$/\1/;T;p' $d`
[ -z "$VERSION" ] && continue
+ PACKAGE_NAME=`sed -rne 's/^PACKAGE_NAME="?([^"]+)"?$/\1/;T;p' $d`
MODULES=`sed -rne 's/^BUILT_MODULE_NAME\[[0-9]+\]="?([^"]+)"?$/\1/;T;p' $d`
- if [ -z "$MODULES" ]; then
- # default on PACKAGE_NAME if no BUILT_MODULE_NAME is specified
- MODULES=`sed -rne 's/^PACKAGE_NAME="?([^"]+)"?$/\1/;T;p' $d`
- fi
+ # default on PACKAGE_NAME if no BUILT_MODULE_NAME is specified
+ [ -z "$MODULES" ] && MODULES=$PACKAGE_NAME
echo "$MODULES" | while read m; do
echo "kmod($m) = $VERSION"
done