Changeset 15131 in vbox for trunk/src/VBox/HostDrivers/VBoxNetFlt
- Timestamp:
- Dec 8, 2008 8:34:10 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/VBoxNetFlt/darwin/loadnetflt.sh
r15130 r15131 11 11 # 12 12 13 SCRIPT_NAME="loadusb" 13 14 XNU_VERSION=`LC_ALL=C uname -r | LC_ALL=C cut -d . -f 1` 14 15 … … 17 18 18 19 if [ "$XNU_VERSION" -ge "9" ]; then 19 DEP_DRVNAME="VBoxDrv.kext"20 DEP_DRVNAME="VBoxDrv.kext" 20 21 else 21 DEP_DRVNAME="VBoxDrvTiger.kext"22 DEP_DRVNAME="VBoxDrvTiger.kext" 22 23 fi 23 24 DEP_BUNDLE="org.virtualbox.kext.VBoxDrv" … … 47 48 LOADED=`kextstat -b $BUNDLE -l` 48 49 if test -n "$LOADED"; then 49 echo " loadnetflt.sh: Unloading $BUNDLE..."50 echo "${SCRIPT_NAME}.sh: Unloading $BUNDLE..." 50 51 sudo kextunload -v 6 -b $BUNDLE 51 52 LOADED=`kextstat -b $BUNDLE -l` 52 53 if test -n "$LOADED"; then 53 echo " loadnetflt: failed to unload $BUNDLE, see above..."54 echo "${SCRIPT_NAME}.sh: failed to unload $BUNDLE, see above..." 54 55 exit 1; 55 56 fi 56 echo " loadnetflt: Successfully unloaded $BUNDLE"57 echo "${SCRIPT_NAME}.sh: Successfully unloaded $BUNDLE" 57 58 fi 58 59 … … 61 62 # Copy the .kext to the symbols directory and tweak the kextload options. 62 63 if test -n "$VBOX_DARWIN_SYMS"; then 63 echo " loadnetflt.sh: copying the extension the symbol area..."64 echo "${SCRIPT_NAME}.sh: copying the extension the symbol area..." 64 65 rm -Rf "$VBOX_DARWIN_SYMS/$DRVNAME" 65 66 mkdir -p "$VBOX_DARWIN_SYMS" … … 74 75 OWNER=`/usr/bin/stat -f "%u" "$DIR"` 75 76 if test "$OWNER" -ne 0; then 76 TMP_DIR=/tmp/ loadusb.tmp77 echo " loadnetflt.sh: chown didn't work on $DIR, using temp location $TMP_DIR/$DRVNAME"77 TMP_DIR=/tmp/${SCRIPT_NAME}.tmp 78 echo "${SCRIPT_NAME}.sh: chown didn't work on $DIR, using temp location $TMP_DIR/$DRVNAME" 78 79 79 80 # clean up first (no sudo rm) … … 97 98 sudo chmod -R o-rwx "$DIR" 98 99 sync 99 echo " loadnetflt: loading $DIR... (kextload $OPTS \"$DIR\")"100 echo "${SCRIPT_NAME}.sh: loading $DIR... (kextload $OPTS \"$DIR\")" 100 101 sudo kextload $OPTS -d "$DEP_DIR" "$DIR" 101 102 sync
Note:
See TracChangeset
for help on using the changeset viewer.