Debian Codegraph @

debian/scripts/postinst-dkms

raw
1 DKMS_NAME=#MODULE_NAME#
2 DKMS_PACKAGE_NAME=$DKMS_NAME-dkms
3 DKMS_VERSION=#MODULE_VERSION#
4
5 postinst_found=0
6
7 case "$1" in
8 configure)
9 for DKMS_POSTINST in /usr/lib/dkms/common.postinst /usr/share/$DKMS_PACKAGE_NAME/postinst; do
10 if [ -f $DKMS_POSTINST ]; then
11 $DKMS_POSTINST $DKMS_NAME $DKMS_VERSION /usr/share/$DKMS_PACKAGE_NAME "" $2
12 postinst_found=1
13 break
14 fi
15 done
16 if [ "$postinst_found" -eq 0 ]; then
17 echo "ERROR: DKMS version is too old and $DKMS_PACKAGE_NAME was not"
18 echo "built with legacy DKMS support."
19 echo "You must either rebuild $DKMS_PACKAGE_NAME with legacy postinst"
20 echo "support or upgrade DKMS to a more current version."
21 exit 1
22 fi
23 ;;
24 esac