Ticket #28469: patch-startup.diff
File patch-startup.diff, 3.9 KB (added by carsomyr@…, 13 years ago) |
---|
-
src/VBox/Installer/darwin/VBoxStartupItems/VirtualBox/VirtualBox
old new 22 22 VBOXUSB="VBoxUSB" 23 23 24 24 # 25 # Switch the binaries to the right architecture.26 #27 VBOX_ARCH=`uname -m`28 if test "$VBOX_ARCH" = "x86_64"; then29 VBOX_ARCH="amd64"30 else31 VBOX_ARCH="x86"32 fi33 for VBOX_TRG in `ls /Applications/VirtualBox.app/Contents/MacOS/*-${VBOX_ARCH}`;34 do35 VBOX_LINKNAME=`echo "$VBOX_TRG" | sed -e 's|-'"${VBOX_ARCH}"'$||' `36 if test "$VBOX_LINKNAME" != "$VBOX_TRG"; then37 rm -f "$VBOX_LINKNAME"38 if ! ln -vh "$VBOX_TRG" "$VBOX_LINKNAME"; then39 ConsoleMessage "Error: ln -vh $VBOX_TRG $VBOX_LINKNAME failed"40 VBOX_RC=141 fi42 else43 ConsoleMessage "Error: Script error VBOX_TRG=$VBOX_TRG"44 VBOX_RC=145 fi46 done47 48 #49 25 # Check that all the directories exist first. 50 26 # 51 if [ ! -d /Library/Extensions/${VBOXDRV}.kext ]; then52 ConsoleMessage "Error: /Library/Extensions/${VBOXDRV}.kext is missing"27 if [ ! -d @KEXT_DIR@/${VBOXDRV}.kext ]; then 28 ConsoleMessage "Error: @KEXT_DIR@/${VBOXDRV}.kext is missing" 53 29 VBOX_RC=1 54 30 fi 55 if [ ! -d /Library/Extensions/${VBOXUSB}.kext ]; then56 ConsoleMessage "Error: /Library/Extensions/${VBOXUSB}.kext is missing"31 if [ ! -d @KEXT_DIR@/${VBOXUSB}.kext ]; then 32 ConsoleMessage "Error: @KEXT_DIR@/${VBOXUSB}.kext is missing" 57 33 VBOX_RC=1 58 34 fi 59 if [ ! -d /Library/Extensions/VBoxNetFlt.kext ]; then60 ConsoleMessage "Error: /Library/Extensions/VBoxNetFlt.kext is missing"35 if [ ! -d @KEXT_DIR@/VBoxNetFlt.kext ]; then 36 ConsoleMessage "Error: @KEXT_DIR@/VBoxNetFlt.kext is missing" 61 37 VBOX_RC=1 62 38 fi 63 if [ ! -d /Library/Extensions/VBoxNetAdp.kext ]; then64 ConsoleMessage "Error: /Library/Extensions/VBoxNetAdp.kext is missing"39 if [ ! -d @KEXT_DIR@/VBoxNetAdp.kext ]; then 40 ConsoleMessage "Error: @KEXT_DIR@/VBoxNetAdp.kext is missing" 65 41 VBOX_RC=1 66 42 fi 67 43 … … 93 69 # 94 70 if [ $VBOX_RC -eq 0 ]; then 95 71 ConsoleMessage "Loading ${VBOXDRV}.kext" 96 if ! kextload /Library/Extensions/${VBOXDRV}.kext; then97 ConsoleMessage "Error: Failed to load /Library/Extensions/${VBOXDRV}.kext"72 if ! kextload @KEXT_DIR@/${VBOXDRV}.kext; then 73 ConsoleMessage "Error: Failed to load @KEXT_DIR@/${VBOXDRV}.kext" 98 74 VBOX_RC=1 99 75 fi 100 76 101 77 ConsoleMessage "Loading ${VBOXUSB}.kext" 102 if ! kextload -d /Library/Extensions/${VBOXDRV}.kext /Library/Extensions/${VBOXUSB}.kext; then103 ConsoleMessage "Error: Failed to load /Library/Extensions/${VBOXUSB}.kext"78 if ! kextload -d @KEXT_DIR@/${VBOXDRV}.kext @KEXT_DIR@/${VBOXUSB}.kext; then 79 ConsoleMessage "Error: Failed to load @KEXT_DIR@/${VBOXUSB}.kext" 104 80 VBOX_RC=1 105 81 fi 106 82 107 83 ConsoleMessage "Loading VBoxNetFlt.kext" 108 if ! kextload -d /Library/Extensions/${VBOXDRV}.kext /Library/Extensions/VBoxNetFlt.kext; then109 ConsoleMessage "Error: Failed to load /Library/Extensions/VBoxNetFlt.kext"84 if ! kextload -d @KEXT_DIR@/${VBOXDRV}.kext @KEXT_DIR@/VBoxNetFlt.kext; then 85 ConsoleMessage "Error: Failed to load @KEXT_DIR@/VBoxNetFlt.kext" 110 86 VBOX_RC=1 111 87 fi 112 88 113 89 ConsoleMessage "Loading VBoxNetAdp.kext" 114 if ! kextload -d /Library/Extensions/${VBOXDRV}.kext /Library/Extensions/VBoxNetAdp.kext; then115 ConsoleMessage "Error: Failed to load /Library/Extensions/VBoxNetAdp.kext"90 if ! kextload -d @KEXT_DIR@/${VBOXDRV}.kext @KEXT_DIR@/VBoxNetAdp.kext; then 91 ConsoleMessage "Error: Failed to load @KEXT_DIR@/VBoxNetAdp.kext" 116 92 VBOX_RC=1 117 93 fi 118 94