postinst is in dkms 2.2.0.3-1ubuntu3.
This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | #!/bin/sh
set -e
if dpkg --compare-versions "$2" lt-nl "2.0.21.1-1~" ; then
if [ -e "/etc/modprobe.d/dkms" ]; then
md5sum=$(md5sum /etc/modprobe.d/dkms | sed -e 's/ .*//')
old_md5sum=$(dpkg-query -W -f='${Conffiles}' dkms | \
sed -n -e "\' /etc/modprobe.d/dkms ' { s/ obsolete$//; s/.* //; p }")
if [ "$md5sum" = "$old_md5sum" ]; then
rm -f /etc/modprobe.d/dkms
else
echo "Moving /etc/modprobe.d/dkms to /etc/modprobe.d/dkms.conf ..."
mv /etc/modprobe.d/dkms /etc/modprobe.d/dkms.conf
rm -f /etc/modprobe.d/dkms
fi
fi
fi
# Automatically added by dh_installmodules
if [ "$1" = configure ]; then
if [ -e "/etc/modprobe.d/dkms" ]; then
echo "Preserving user changes to /etc/modprobe.d/dkms.conf ..."
if [ -e "/etc/modprobe.d/dkms.conf" ]; then
mv -f "/etc/modprobe.d/dkms.conf" "/etc/modprobe.d/dkms.conf.dpkg-new"
fi
mv -f "/etc/modprobe.d/dkms" "/etc/modprobe.d/dkms.conf"
fi
fi
# End automatically added section
|