loadnetflt.sh revision 130a462bf46409a9352467033f92e02e4b249879
## @file
# For development.
#
#
# Copyright (C) 2006-2008 Sun Microsystems, Inc.
#
# Sun Microsystems, Inc. confidential
# All rights reserved
#
XNU_VERSION=`LC_ALL=C uname -r | LC_ALL=C cut -d . -f 1`
else
fi
if [ ! -d "$DIR" ]; then
echo "Cannot find $DIR or it's not a directory..."
exit 1;
fi
if [ ! -d "$DEP_DIR" ]; then
echo "Cannot find $DEP_DIR or it's not a directory... (dependency)"
exit 1;
fi
if [ -n "$*" ]; then
OPTS="$*"
else
OPTS="-t"
fi
# Try unload any existing instance first.
if test -n "$LOADED"; then
echo "loadnetflt.sh: Unloading $BUNDLE..."
if test -n "$LOADED"; then
echo "loadnetflt: failed to unload $BUNDLE, see above..."
exit 1;
fi
echo "loadnetflt: Successfully unloaded $BUNDLE"
fi
set -e
# Copy the .kext to the symbols directory and tweak the kextload options.
if test -n "$VBOX_DARWIN_SYMS"; then
echo "loadnetflt.sh: copying the extension the symbol area..."
mkdir -p "$VBOX_DARWIN_SYMS"
cp -R "$DIR" "$VBOX_DARWIN_SYMS/"
OPTS="$OPTS -s $VBOX_DARWIN_SYMS/ "
fi
# On smbfs, this might succeed just fine but make no actual changes,
# so we might have to temporarily copy the driver to a local directory.
echo "loadnetflt.sh: chown didn't work on $DIR, using temp location $TMP_DIR/$DRVNAME"
# clean up first (no sudo rm)
if test -e "$TMP_DIR"; then
fi
# make a copy and switch over DIR
# load.sh puts it here.
# retry
fi