vboxdrv.sh revision f9fc8c7343143818644af6caf51a2b2520b8b7a9
# innotek VirtualBox
# VirtualBox kernel module control script for Solaris.
#
# Copyright (C) 2007-2008 innotek GmbH
#
# 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.
#
VBOXDRVFILE=""
SILENTUNLOAD=""
abort()
{
echo 1>&2 "$1"
exit 1
}
info()
{
echo 1>&2 "$1"
}
{
fi
else
VBOXDRVFILE=""
fi
}
{
return 0
fi
abort "VirtualBox kernel module (vboxdrv) not installed."
}
{
else
fi
return 1
fi
return 0
}
{
abort "This program must be run with administrator privileges. Aborting"
fi
}
start()
{
if module_loaded; then
info "vboxdrv already loaded..."
else
if ! module_loaded; then
abort "Failed to load vboxdrv."
info "Loaded vboxdrv."
else
stop
abort "Aborting due to attach failure."
fi
fi
}
stop()
{
if module_loaded; then
info "Unloaded vboxdrv."
info "vboxdrv not loaded."
fi
}
restart()
{
stop
return 0
}
status()
{
if module_loaded; then
info "vboxdrv running."
else
info "vboxdrv stopped."
fi
}
if test "$2" = "silentunload"; then
SILENTUNLOAD="$2"
fi
case "$1" in
;;
stop)
stop
;;
;;
;;
*)
echo "Usage: $0 {start|stop|restart|status}"
exit 1
esac
exit