diff options
Diffstat (limited to 'kmod.prov')
-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 |