Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions dkms_common.postinst.in
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,19 @@ 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
# Same check as in dkms.conf: only "yes" enables autoinstallation
case "$autoinstall" in
[Yy][Ee][Ss])
;;
""|[Nn][Oo])
echo "Not building the $NAME module which does not have AUTOINSTALL enabled."
exit 0
;;
*)
echo "dkms.conf: Error! Unsupported AUTOINSTALL value '$autoinstall'" >&2
exit 1
;;
esac

dkms_conf="/var/lib/dkms/$NAME/$VERSION/source/dkms.conf"
autoinstall=$(bash -c 'AUTOINSTALL=; . "'"$dkms_conf"'" >/dev/null 2>&1; echo $AUTOINSTALL')
Expand Down