#!/bin/sh

package="mstflint"

# This test is run after both the dkms package was installed, and
# at least one kernel package was installed. This means that a
# the DKMS module should have been built.
#
# Let's see if this is the case
if dkms status | grep "^$package/.*: installed$"; then
	exit 0
fi

# Just in case we really got here after a failed build,
# show make.log files to simplify debug
for log in ls "/var/lib/dkms/$package"/*/*/*/log/make.log; do
	if [ -r "$log" ]; then
		echo "====== $log ======"
		cat "$log"
	fi
done
exit 3

