3 # vboxservice VirtualBox guest services
5 # description: VirtualBox guest services
6 # processname: VBoxService
8 # Source function library
9 . /etc/rc.d/init.d/functions
12 . /etc/sysconfig/network
14 # Check that networking is up.
15 if is_yes "${NETWORKING}"; then
16 if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
17 msg_network_down "VBox Service"
24 # Get service config - may override defaults
25 [ -f /etc/sysconfig/vboxservice ] && . /etc/sysconfig/vboxservice
28 # Check if the service is already running?
29 if [ -f /var/lock/subsys/vboxservice ]; then
30 msg_already_running "VBox Service"
34 msg_starting "VBox Service"
35 daemon /usr/bin/VBoxService
37 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/vboxservice
41 if [ ! -f /var/lock/subsys/vboxservice ]; then
42 msg_not_running "VBox Service"
47 msg_stopping "VBox Service"
49 rm -f /var/lock/subsys/vboxservice
53 if [ ! -f /var/lock/subsys/vboxservice ]; then
54 msg_not_running "VBox Service"
64 # See how we were called.
83 status vboxservice VBoxService
87 msg_usage "$0 {start|stop|restart|try-restart|force-reload|status}"