]> git.pld-linux.org Git - packages/VirtualBox.git/blame_incremental - VirtualBox-vboxsf.init
fix math
[packages/VirtualBox.git] / VirtualBox-vboxsf.init
... / ...
CommitLineData
1#!/bin/sh
2#
3# virtualbox VirtualBox virtualizer for x86 hardware
4# chkconfig: 345 84 16
5# description: Oracle VirtualBox is a general-purpose full virtualizer for x86 \
6# hardware. Targeted at server, desktop and embedded use.
7
8# Source function library
9. /etc/rc.d/init.d/functions
10
11VBOX_MODULE="vboxsf"
12
13# Get service config - may override defaults
14[ -f /etc/sysconfig/virtualbox ] && . /etc/sysconfig/virtualbox
15
16start() {
17 if [ -f /var/lock/subsys/vboxsf ]; then
18 return
19 fi
20
21 modprobe -s $VBOX_MODULE
22 touch /var/lock/subsys/vboxsf
23}
24
25stop() {
26 # NOTE: rmmod will wait if device is in use, so automatic rmmod probably is not the best idea
27 /sbin/rmmod $VBOX_MODULE
28 rm -f /var/lock/subsys/vboxsf
29}
30
31RETVAL=0
32# See how we were called.
33case "$1" in
34 start)
35 start
36 ;;
37 stop)
38 stop
39 ;;
40 restart)
41 stop
42 start
43 ;;
44 status)
45 if ! is_module $VBOX_MODULE; then
46 echo "$VBOX_MODULE module is loaded"
47 else
48 echo "$VBOX_MODULE module is not loaded"
49 RETVAL=3
50 fi
51 ;;
52 *)
53 msg_usage "$0 {start|stop|restart|status}"
54 exit 3
55esac
56
57exit $RETVAL
This page took 0.029077 seconds and 4 git commands to generate.