postflight revision 343053a42dedb94c8ef5534fff89c72384adf94d
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsync#!/bin/sh
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsync
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsync#
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsync# Copyright (C) 2007-2010 Oracle Corporation
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsync#
343053a42dedb94c8ef5534fff89c72384adf94dvboxsync# This file is part of VirtualBox Open Source Edition (OSE), as
343053a42dedb94c8ef5534fff89c72384adf94dvboxsync# available from http://www.virtualbox.org. This file is free software;
343053a42dedb94c8ef5534fff89c72384adf94dvboxsync# you can redistribute it and/or modify it under the terms of the GNU
343053a42dedb94c8ef5534fff89c72384adf94dvboxsync# General Public License (GPL) as published by the Free Software
343053a42dedb94c8ef5534fff89c72384adf94dvboxsync# Foundation, in version 2 as it comes in the "COPYING" file of the
343053a42dedb94c8ef5534fff89c72384adf94dvboxsync# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
343053a42dedb94c8ef5534fff89c72384adf94dvboxsync# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsync#
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsync
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsync#
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsync# Unload any old extension that might be loaded already (ignore failures).
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsync#
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsyncsync
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsyncif kextstat -lb org.virtualbox.kext.VBoxNetAdp 2>&1 | grep -q org.virtualbox.kext.VBoxNetAdp; then
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsync kextunload -m org.virtualbox.kext.VBoxNetAdp
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsyncfi
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsyncif kextstat -lb org.virtualbox.kext.VBoxNetFlt 2>&1 | grep -q org.virtualbox.kext.VBoxNetFlt; then
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsync kextunload -m org.virtualbox.kext.VBoxNetFlt
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsyncfi
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsyncif kextstat -lb org.virtualbox.kext.VBoxUSB 2>&1 | grep -q org.virtualbox.kext.VBoxUSB; then
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsync kextunload -m org.virtualbox.kext.VBoxUSB
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsyncfi
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsyncif kextstat -lb org.virtualbox.kext.VBoxDrv 2>&1 | grep -q org.virtualbox.kext.VBoxDrv; then
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsync kextunload -m org.virtualbox.kext.VBoxDrv
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsyncfi
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsync
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsync#
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsync# Load the extension, exit on first error.
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsync#
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsyncsync
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsynckextload /Library/Extensions/VBoxDrv.kext
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsynckextload -d /Library/Extensions/VBoxDrv.kext /Library/Extensions/VBoxUSB.kext
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsynckextload -d /Library/Extensions/VBoxDrv.kext /Library/Extensions/VBoxNetFlt.kext
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsynckextload -d /Library/Extensions/VBoxDrv.kext /Library/Extensions/VBoxNetAdp.kext
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsync