Skip to content

Commit

Permalink
common.postinst: only build AUTOINSTALL="yes" modules on installation
Browse files Browse the repository at this point in the history
  • Loading branch information
anbe42 authored and scaronni committed Feb 4, 2025
1 parent e351be6 commit a3ae33b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions dkms_common.postinst.in
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,13 @@ if [ -z "$autoinstall" ]; then
exit 0
fi

dkms_conf="/var/lib/dkms/$NAME/$VERSION/source/dkms.conf"
autoinstall=$(bash -c 'AUTOINSTALL=; . "'"$dkms_conf"'" >/dev/null 2>&1; echo $AUTOINSTALL')
if [ -z "$autoinstall" ]; then
echo "Not building the $NAME module which does not have AUTOINSTALL enabled."
exit 0
fi

# On 1st installation, let us look for a directory
# in @MODDIR@ which matches $(uname -r). If none
# is found it is possible that buildd is being used
Expand Down

0 comments on commit a3ae33b

Please sign in to comment.