aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2007-09-04 17:43:12 +0000
committerOlivier Blin <oblin@mandriva.com>2007-09-04 17:43:12 +0000
commitf632eeaa41ab63f16f0a201a1a4455dbf49a4745 (patch)
tree6e6ba0802147b0b0125425936175ccf4872cd935
parenteb113e88fddd49d75d1a1121d05cc038d53c32ab (diff)
downloadrpm-setup-f632eeaa41ab63f16f0a201a1a4455dbf49a4745.tar
rpm-setup-f632eeaa41ab63f16f0a201a1a4455dbf49a4745.tar.gz
rpm-setup-f632eeaa41ab63f16f0a201a1a4455dbf49a4745.tar.bz2
rpm-setup-f632eeaa41ab63f16f0a201a1a4455dbf49a4745.tar.xz
rpm-setup-f632eeaa41ab63f16f0a201a1a4455dbf49a4745.zip
rewrite the dkms kmod() output loop
-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