aboutsummaryrefslogtreecommitdiffstats
path: root/kmod.prov
diff options
context:
space:
mode:
Diffstat (limited to 'kmod.prov')
-rwxr-xr-xkmod.prov12
1 files changed, 7 insertions, 5 deletions
diff --git a/kmod.prov b/kmod.prov
index 154ffd1..0a81e42 100755
--- a/kmod.prov
+++ b/kmod.prov
@@ -13,11 +13,13 @@ if (/^srcversion:/) {
'
dkmslist=$(echo "$provideslist" | egrep '/usr/src/[^/]*/dkms.conf$')
[ -n "$dkmslist" ] && echo $dkmslist | while read d; do
- BUILT=`sed -rne 's/^BUILT_MODULE_NAME\[[0-9]+\]="?([^"]+)"?$/kmod(\1)/;T;p' $d`
- if [ -n "$BUILT" ]; then
- echo "$BUILT"
- else
+ [ -z "$VERSION" ] && continue
+ 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
- sed -rne 's/^PACKAGE_NAME="?([^"]+)"?$/kmod(\1)/;T;p' $d
+ MODULES=`sed -rne 's/^PACKAGE_NAME="?([^"]+)"?$/\1/;T;p' $d`
fi
+ echo "$MODULES" | while read m; do
+ echo "kmod($m)"
+ done
done