do_dkms revision 73b48d036adc9de8ba80796a9f9daf1ad5c8b6b7
#
# Script to register/build/unregister a kernel module with DKMS.
#
# Copyright (C) 2010 Oracle Corporation
#
# This file is part of VirtualBox Open Source Edition (OSE), as
# available from http://www.virtualbox.org. This file is free software;
# General Public License (GPL) as published by the Free Software
# Foundation, in version 2 as it comes in the "COPYING" file of the
# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
#
if [ "$1" = "install" ]; then
ACTION="install"
MODULE="$2"
VERSION="$3"
elif [ "$1" = "uninstall" ]; then
shift
ACTION="uninstall"
OLDMODULES="$*"
break
fi
if [ -n "$DKMS" ]
then
if [ "$ACTION" = "uninstall" ]; then
echo "Uninstalling modules from DKMS"
for m in $OLDMODULES
do
# first, remove _any_ old module
do
# either 'vboxvideo, <version>: added'
# or 'vboxvideo, <version>, ...: installed'
echo " removing old DKMS module $m version $version"
fi
done
done
exit 0
elif [ "$ACTION" = "install" ]; then
echo "Attempting to install using DKMS"
then
exit 0
fi
echo "Failed to install using DKMS, attempting to install without"
fi
fi
exit 1