do_dkms revision 7eaaa8a4480370b82ef3735994f986f338fb4df2
7eaaa8a4480370b82ef3735994f986f338fb4df2vboxsync# Script to register/build/unregister a kernel module with DKMS.
7eaaa8a4480370b82ef3735994f986f338fb4df2vboxsync# Copyright (C) 2010 Oracle Corporation
7eaaa8a4480370b82ef3735994f986f338fb4df2vboxsync# This file is part of VirtualBox Open Source Edition (OSE), as
7eaaa8a4480370b82ef3735994f986f338fb4df2vboxsync# available from http://www.virtualbox.org. This file is free software;
7eaaa8a4480370b82ef3735994f986f338fb4df2vboxsync# you can redistribute it and/or modify it under the terms of the GNU
7eaaa8a4480370b82ef3735994f986f338fb4df2vboxsync# General Public License (GPL) as published by the Free Software
7eaaa8a4480370b82ef3735994f986f338fb4df2vboxsync# Foundation, in version 2 as it comes in the "COPYING" file of the
7eaaa8a4480370b82ef3735994f986f338fb4df2vboxsync# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
7eaaa8a4480370b82ef3735994f986f338fb4df2vboxsync# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
7eaaa8a4480370b82ef3735994f986f338fb4df2vboxsync echo "Uninstalling modules from DKMS"
7eaaa8a4480370b82ef3735994f986f338fb4df2vboxsync # first, remove _any_ old module
7eaaa8a4480370b82ef3735994f986f338fb4df2vboxsync # either 'vboxvideo, <version>: added'
7eaaa8a4480370b82ef3735994f986f338fb4df2vboxsync # or 'vboxvideo, <version>, ...: installed'
7eaaa8a4480370b82ef3735994f986f338fb4df2vboxsync version=`echo "$line" | sed "s/$m,\([^,]*\)[,:].*/\1/;t;d"`
7eaaa8a4480370b82ef3735994f986f338fb4df2vboxsync echo " removing old DKMS module $m version $version"
7eaaa8a4480370b82ef3735994f986f338fb4df2vboxsync # there should not be any more matches
7eaaa8a4480370b82ef3735994f986f338fb4df2vboxsync echo "Attempting to install using DKMS"
7eaaa8a4480370b82ef3735994f986f338fb4df2vboxsync echo "Failed to install using DKMS, attempting to install without"