postflight revision 66ab05d147fcb24a5fec1cd3c37a1799db26c804
# $Id$
## @file
# Reloads the new kernel extension at the end of installation.
#
#
# Copyright (C) 2007-2013 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.
#
#
# Make sure the old startup items are gone.
#
test -d "/Library/StartupItems/VirtualBox/Resources/English.lproj/" && rmdir "/Library/StartupItems/VirtualBox/Resources/English.lproj/"
test -d "/Library/StartupItems/VirtualBox/Resources/" && rmdir "/Library/StartupItems/VirtualBox/Resources/"
fi
#
# Install the launchd script.
#
set -e
ln -s "../Application Support/VirtualBox/LaunchDaemons/org.virtualbox.startup.plist" \
set +e
#
# Unload any old extension that might be loaded already (ignore failures).
#
fi
fi
fi
fi
#
# Load the extension, exit on first error.
#
set -e
kextload -d '/Library/Application Support/VirtualBox/VBoxDrv.kext' '/Library/Application Support/VirtualBox/VBoxUSB.kext'
kextload -d '/Library/Application Support/VirtualBox/VBoxDrv.kext' '/Library/Application Support/VirtualBox/VBoxNetFlt.kext'
kextload -d '/Library/Application Support/VirtualBox/VBoxDrv.kext' '/Library/Application Support/VirtualBox/VBoxNetAdp.kext'