6
PACKAGE_NAME="open-vm-tools-dkms"
7
CVERSION="$(dpkg-query -W -f='${Version}' ${PACKAGE_NAME} | awk -F "-" '{ print $1 }' | cut -d\: -f2)"
8
ARCH=$(dpkg --print-architecture)
12
for POSTINST in /usr/lib/dkms/common.postinst /usr/share/${PACKAGE_NAME}/postinst
16
${POSTINST} ${NAME} ${CVERSION} /usr/share/${PACKAGE_NAME} ${ARCH} ${2}
20
echo "WARNING: ${POSTINST} does not exist."
23
echo "ERROR: DKMS version is too old and ${PACKAGE_NAME} was not"
24
echo "built with legacy DKMS support."
25
echo "You must either rebuild ${PACKAGE_NAME} with legacy postinst"
26
echo "support or upgrade DKMS to a more current version."
30
abort-upgrade|abort-remove|abort-deconfigure)
35
echo "postinst called with unknown argument \`${1}'" >&2