loadnetflt.sh revision 5dddec1355c8adc42db429187f2eb18b2bae94be
## @file
# For development.
#
#
# Copyright (C) 2006-2008 Sun Microsystems, Inc.
#
# This file is part of VirtualBox Open Source Edition (OSE), as
# available from http://www.virtualbox.org. This file is free software;
# 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.
#
# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
# Clara, CA 95054 USA or visit http://www.sun.com if you need
# additional information or have any questions.
#
SCRIPT_NAME="loadnetflt"
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 "${SCRIPT_NAME}.sh: Unloading $BUNDLE..."
if test -n "$LOADED"; then
echo "${SCRIPT_NAME}.sh: failed to unload $BUNDLE, see above..."
exit 1;
fi
echo "${SCRIPT_NAME}.sh: 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 "${SCRIPT_NAME}.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.
else
OWNER=1000
fi
# 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
else
fi