vboxguest.sh revision 613c0d015cbaef93be47fc03f0708744c5c24f79
# Sun xVM VirtualBox
# VirtualBox Guest Additions kernel module control script for Solaris.
#
# Copyright (C) 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="vboxguest"
abort()
{
echo 1>&2 "$1"
exit 1
}
info()
{
echo 1>&2 "$1"
}
{
fi
return 0
fi
}
{
else
fi
return 1
fi
return 0
}
{
abort "This program must be run with administrator privileges. Aborting"
fi
}
{
if module_loaded; then
info "VirtualBox guest kernel module already loaded."
else
if test ! module_loaded; then
abort "## Failed to load VirtualBox guest kernel module."
info "VirtualBox guest kernel module loaded."
else
stop
abort "Aborting due to attach failure."
fi
fi
}
{
if module_loaded; then
info "VirtualBox guest kernel module unloaded."
info "VirtualBox guest kernel module not loaded."
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