aboutsummaryrefslogtreecommitdiffstats
path: root/kmod.prov
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2007-09-27 09:47:06 +0000
committerOlivier Blin <oblin@mandriva.com>2007-09-27 09:47:06 +0000
commit9e74295ccfc2f9898b919888829e027c045bc67d (patch)
tree0c442f6d7c816eba08b1200b26b08ab0b0e1e3ef /kmod.prov
parentc52c7060fe1c72d55b6d8d846318ac73d069c8ce (diff)
downloadrpm-setup-9e74295ccfc2f9898b919888829e027c045bc67d.tar
rpm-setup-9e74295ccfc2f9898b919888829e027c045bc67d.tar.gz
rpm-setup-9e74295ccfc2f9898b919888829e027c045bc67d.tar.bz2
rpm-setup-9e74295ccfc2f9898b919888829e027c045bc67d.tar.xz
rpm-setup-9e74295ccfc2f9898b919888829e027c045bc67d.zip
print kmod provides even if no version is found
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 fc23948..f66af2b 100755
--- a/kmod.prov
+++ b/kmod.prov
@@ -7,7 +7,7 @@ echo $modulelist | xargs -r /sbin/modinfo | \
$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;
+ print "kmod\($name\)" . ($ver ? " = $ver" : "") if $name;
undef $name; undef $ver;
}
'