postflight revision 29e18dff973632afcdb1ebf98dbc9d38f80a7792
341N/A#!/bin/sh
341N/A# $Id$
1402N/A## @file
341N/A# Reloads the new kernel extension at the end of installation.
341N/A#
919N/A
919N/A#
919N/A# Copyright (C) 2007-2013 Oracle Corporation
919N/A#
919N/A# This file is part of VirtualBox Open Source Edition (OSE), as
919N/A# available from http://www.virtualbox.org. This file is free software;
919N/A# you can redistribute it and/or modify it under the terms of the GNU
919N/A# General Public License (GPL) as published by the Free Software
919N/A# Foundation, in version 2 as it comes in the "COPYING" file of the
919N/A# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
919N/A# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
919N/A#
919N/A
919N/A#
919N/A# Unload any old extension that might be loaded already (ignore failures).
919N/A#
919N/Async
341N/Aif kextstat -lb org.virtualbox.kext.VBoxNetAdp 2>&1 | grep -q org.virtualbox.kext.VBoxNetAdp; then
341N/A kextunload -m org.virtualbox.kext.VBoxNetAdp
341N/Afi
341N/Aif kextstat -lb org.virtualbox.kext.VBoxNetFlt 2>&1 | grep -q org.virtualbox.kext.VBoxNetFlt; then
493N/A kextunload -m org.virtualbox.kext.VBoxNetFlt
341N/Afi
341N/Aif kextstat -lb org.virtualbox.kext.VBoxUSB 2>&1 | grep -q org.virtualbox.kext.VBoxUSB; then
1370N/A kextunload -m org.virtualbox.kext.VBoxUSB
341N/Afi
911N/Aif kextstat -lb org.virtualbox.kext.VBoxDrv 2>&1 | grep -q org.virtualbox.kext.VBoxDrv; then
1370N/A kextunload -m org.virtualbox.kext.VBoxDrv
1370N/Afi
1370N/A
911N/A#
341N/A# Load the extension, exit on first error.
341N/A#
1402N/Async
1265N/Aset -e
1370N/Akextload '/Library/Application Support/VirtualBox/VBoxDrv.kext'
1370N/Akextload -d '/Library/Application Support/VirtualBox/VBoxDrv.kext' '/Library/Application Support/VirtualBox/VBoxUSB.kext'
1370N/Akextload -d '/Library/Application Support/VirtualBox/VBoxDrv.kext' '/Library/Application Support/VirtualBox/VBoxNetFlt.kext'
1179N/Akextload -d '/Library/Application Support/VirtualBox/VBoxDrv.kext' '/Library/Application Support/VirtualBox/VBoxNetAdp.kext'
1233N/A
1265N/A