aboutsummaryrefslogtreecommitdiffstats
path: root/kmod.prov
diff options
context:
space:
mode:
Diffstat (limited to 'kmod.prov')
-rwxr-xr-xkmod.prov2
1 files changed, 1 insertions, 1 deletions
diff --git a/kmod.prov b/kmod.prov
index fd90d9a..41f57eb 100755
--- a/kmod.prov
+++ b/kmod.prov
@@ -4,7 +4,7 @@ provideslist=`sed "s/['\"]/\\\&/g"`
modulelist=$(echo "$provideslist" | egrep '^.*(/lib/modules/|/var/lib/dkms/).*\.ko(\.gz)?$')
echo $modulelist | xargs -r /sbin/modinfo | \
perl -lne '
-$name = $1 if m!^filename:.*\b([^/]+)\.k?o!;
+$name = $1 if m!^filename:\s*(?:.*/)?([^/]+)\.k?o!;
$ver = $1 if /^version:\s*[a-zA-Z]{0,6}\-?(\d+[\.\:\-\[\]]?\d*[\.\:\-\[\]]?\d*[\.\:\-\[\]]?\d*[\.\:\-\[\]]?\d*-?[a-zA-Z]{0,6}\d?).*/;
if (/^vermagic:/) {
print "kmod\($name\) = $ver" if $name && $ver;