#!/bin/ksh93 # postinstall, postremove BASE="${PKG_INSTALL_ROOT}" [[ ${BASE} = '/' ]] && BASE= if [[ -n ${PKG_PROC_script} && -z ${BASE} ]] || [[ -z ${PKG_PROC_script} && \ ( $1 == 'configure' || $1 == 'remove' || -z ${DPKG_MAINTSCRIPT_NAME} ) ]] then if [[ -e ${BASE}/lib/udev/rules.d/71-nvidia.rules ]]; then # fix the "start service via udev rule" bullshit from debian/ubuntu # package nvidia-kernel-common-XXX sed -i -e '/nvidia-persistenced/ d' \ ${BASE}/lib/udev/rules.d/71-nvidia.rules fi REL=${ uname -r ; } if [[ '4.15.0-154-generic' == ${REL} ]]; then /sbin/depmod -a [[ -x /usr/sbin/update-initramfs ]] && /usr/sbin/update-initramfs -u print 'You should reboot the machine now.' fi fi return 0