aboutsummaryrefslogtreecommitdiffstats
path: root/kmod.prov
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2007-09-25 11:54:53 +0000
committerOlivier Blin <oblin@mandriva.com>2007-09-25 11:54:53 +0000
commit6d0caa9e7c4b28f5a0219f6da31874c98c850f29 (patch)
treed79e9817704c3833a9e8c50c7d405799ce84fd40 /kmod.prov
parent5f7fdc0393ebbb32bcebc2b5ff8746f833f60d7f (diff)
downloadrpm-setup-6d0caa9e7c4b28f5a0219f6da31874c98c850f29.tar
rpm-setup-6d0caa9e7c4b28f5a0219f6da31874c98c850f29.tar.gz
rpm-setup-6d0caa9e7c4b28f5a0219f6da31874c98c850f29.tar.bz2
rpm-setup-6d0caa9e7c4b28f5a0219f6da31874c98c850f29.tar.xz
rpm-setup-6d0caa9e7c4b28f5a0219f6da31874c98c850f29.zip
move PACKAGE_NAME in a variable for next commits
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