aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xkmod.prov10
1 files changed, 10 insertions, 0 deletions
diff --git a/kmod.prov b/kmod.prov
index f378ec3..2ea435b 100755
--- a/kmod.prov
+++ b/kmod.prov
@@ -11,3 +11,13 @@ if (/^srcversion:/) {
undef $name, $ver;
}
'
+dkmslist=$(echo "$provideslist" | egrep '/usr/src/[^/]*/dkms.conf$')
+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
+ # default on PACKAGE_NAME if no BUILT_MODULE_NAME is specified
+ sed -rne 's/^PACKAGE_NAME="?([^"]+)"?$/kmod(\1)/;T;p' $d
+ fi
+done