diff options
author | Olivier Blin <oblin@mandriva.com> | 2007-09-04 17:43:12 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.com> | 2007-09-04 17:43:12 +0000 |
commit | f632eeaa41ab63f16f0a201a1a4455dbf49a4745 (patch) | |
tree | 6e6ba0802147b0b0125425936175ccf4872cd935 | |
parent | eb113e88fddd49d75d1a1121d05cc038d53c32ab (diff) | |
download | rpm-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-x | kmod.prov | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -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 |