#!/bin/sh # # VBoxService wrapper script. # # Load required kernel extensions before start service (if necessary). # # 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; # you can redistribute it and/or modify it under the terms of the GNU # 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. # export PATH="/bin:/usr/bin:/sbin:/usr/sbin:$PATH" echo "Check if kernel extensions loaded..." items="VBoxGuest" for item in $items; do kext_item="org.virtualbox.kext.$item" loaded=`kextstat | grep $kext_item` if [ -z "$loaded" ] ; then echo "Loading $item kernel extension..." kextload /Library/Extensions/$item.kext fi done "/Library/Application Support/VirtualBox Guest Additions/VBoxService" -f exit $?