vboxdrv.sh revision 1c2c968fd241148110002d75b2c0fdeddc211e14
# Sun xVM VirtualBox
# VirtualBox kernel module control script for Solaris.
#
# Copyright (C) 2007-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.
#
SILENTUNLOAD=""
MODNAME="vboxdrv"
abort()
{
echo 1>&2 "$1"
exit 1
}
info()
{
echo 1>&2 "$1"
}
{
fi
return 0
fi
abort "VirtualBox kernel module NOT installed."
}
{
else
fi
return 1
fi
return 0
}
{
abort "This program must be run with administrator privileges. Aborting"
fi
}
{
if module_loaded; then
info "VirtualBox kernel module already loaded."
else
if test -n "_HARDENED_"; then
else
fi
if test ! module_loaded; then
abort "## Failed to load VirtualBox kernel module."
info "VirtualBox kernel module loaded."
else
abort "Aborting due to attach failure."
fi
fi
}
{
if module_loaded; then
info "VirtualBox kernel module unloaded."
info "VirtualBox kernel module not loaded."
fi
# check for vbi and force unload it
/usr/sbin/modunload -i $vbi_mod_id
fi
}
{
return 0
}
{
if module_loaded; then
info "Running."
else
info "Stopped."
fi
}
if test "$2" = "silentunload"; then
SILENTUNLOAD="$2"
fi
case "$1" in
;;
stop)
;;
;;
;;
*)
echo "Usage: $0 {start|stop|restart|status}"
exit 1
esac
exit