common_install() { /sbin/depmod -a @_F_kernelmod_uname@ } post_install() { common_install } post_upgrade() { common_install ## if that exisit we bumped / upgraded the package only no new kernel ## on a new kernel we do nothing because one has to reboot anyway if [ -e /lib/modules/`uname -r`/kernel/misc/vboxguest.ko.xz ]; then ## see if is loaded , if yes kill it and modprobe again if not do nothing if grep -q vboxguest /proc/modules; then echo -n "reloading vboxguest kernel module.." /sbin/rmmod vboxvideo /sbin/rmmod vboxsf /sbin/rmmod vboxguest sleep 1 /sbin/modprobe vboxsf echo " done." fi fi } post_remove() { if grep -q vboxguest /proc/modules; then /sbin/rmmod vboxguest /sbin/rmmod vboxvideo /sbin/rmmod vboxsf fi common_install } op=$1 shift $op $*