Last change
on this file since 78273 was 76553, checked in by vboxsync, 6 years ago |
scm --update-copyright-year
|
-
Property svn:eol-style
set to
LF
-
Property svn:executable
set to
*
-
Property svn:keywords
set to
Author Date Id Revision
|
File size:
1.3 KB
|
Line | |
---|
1 | #!/bin/sh
|
---|
2 | ## @file
|
---|
3 | # VBoxService wrapper script.
|
---|
4 | #
|
---|
5 | # Load required kernel extensions before start service (if necessary).
|
---|
6 | #
|
---|
7 |
|
---|
8 | #
|
---|
9 | # Copyright (C) 2007-2019 Oracle Corporation
|
---|
10 | #
|
---|
11 | # This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
12 | # available from http://www.virtualbox.org. This file is free software;
|
---|
13 | # you can redistribute it and/or modify it under the terms of the GNU
|
---|
14 | # General Public License (GPL) as published by the Free Software
|
---|
15 | # Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
16 | # VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
17 | # hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
18 | #
|
---|
19 |
|
---|
20 | export PATH="/bin:/usr/bin:/sbin:/usr/sbin:$PATH"
|
---|
21 |
|
---|
22 | echo "Check if kernel extensions loaded..."
|
---|
23 | items="VBoxGuest"
|
---|
24 | for item in $items; do
|
---|
25 | kext_item="org.virtualbox.kext.$item"
|
---|
26 | loaded=`kextstat | grep $kext_item`
|
---|
27 | if [ -z "$loaded" ] ; then
|
---|
28 | echo "Loading $item kernel extension..."
|
---|
29 | XNU_VERSION=`LC_ALL=C uname -r | LC_ALL=C cut -d . -f 1`
|
---|
30 | if [ "$XNU_VERSION" -ge "10" ]; then
|
---|
31 | kextutil /Library/Extensions/$item.kext
|
---|
32 | else
|
---|
33 | kextload /Library/Extensions/$item.kext
|
---|
34 | fi
|
---|
35 | fi
|
---|
36 | done
|
---|
37 |
|
---|
38 | exec "/Library/Application Support/VirtualBox Guest Additions/VBoxService" -f
|
---|
39 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.