#!/bin/bash # # Testcase: Reload the vgem module # # ... we've broken this way too often :( # function unload() { /sbin/rmmod vgem # drm may be used by other devices (nouveau, radeon, udl, etc) /sbin/rmmod drm &> /dev/null if /sbin/lsmod | grep vgem &> /dev/null ; then echo WARNING: vgem.ko still loaded! return 1 fi } unload &> /dev/null /sbin/modprobe vgem $* || exit 1 unload || exit 1