postinst is in dahdi-dkms 1:2.10.2~dfsg-1ubuntu1.
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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | #!/bin/sh
NAME=dahdi
PACKAGE_NAME=$NAME-dkms
CVERSION=`dpkg-query -W -f='${Version}' $PACKAGE_NAME | cut -d\: -f2`
ARCH=`dpkg --print-architecture`
case $ARCH in
amd64)
ARCH="x86_64"
;;
lpia)
ARCH="i686"
;;
i386)
ARCH="i686"
;;
armel)
;;
*)
echo "WARNING: potentially unsupported arch: $ARCH"
ARCH="$ARCH"
;;
esac
case "$1" in
configure)
for POSTINST in /usr/lib/dkms/common.postinst /usr/share/$PACKAGE_NAME/postinst; do
if [ -f $POSTINST ]; then
$POSTINST $NAME $CVERSION /usr/share/$PACKAGE_NAME $ARCH $2
exit $?
fi
echo "WARNING: $POSTINST does not exist."
done
echo "ERROR: DKMS version is too old and $PACKAGE_NAME was not"
echo "built with legacy DKMS support."
echo "You must either rebuild $PACKAGE_NAME with legacy postinst"
echo "support or upgrade DKMS to a more current version."
exit 1
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
|