Skip to content

Commit

Permalink
common.postinst: do not build modules having AUTOINSTALL disabled
Browse files Browse the repository at this point in the history
AUTOINSTALL is disabled by default (value is unset/empty)

Closes: dell#368
  • Loading branch information
anbe42 committed Feb 8, 2024
1 parent bb0d3f3 commit 14ff65b
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 @@ elif [ -d "/usr/src/$NAME-$VERSION" ]; then
dkms add -m $NAME -v $VERSION > /dev/null
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 14ff65b

Please sign in to comment.