blob: 08d1f6dbe3d7141b4f320b2be467789aefa02dfc (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: vboxguest
# REQUIRE: FILESYSTEMS
# BEFORE: netif
# KEYWORD: nojail
#
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
# to enable this service:
#
# vboxguest_enable (bool): Set to NO by default.
# Set it to YES to enable vboxguest on startup
. %%RC_SUBR%%
name="vboxguest"
rcvar=${name}_enable
start_cmd="vboxguest_start"
stop_cmd="vboxguest_stop"
vboxguest_start()
{
if ! kldstat -q -m vboxguest;
then
if ! kldload vboxguest > /dev/null 2>&1;
then
warn "Can't load vboxguest module."
return 1
fi
fi
}
vboxguest_stop()
{
if kldstat -q -m vboxguest;
then
if ! kldunload vboxguest > /dev/null 2>&1;
then
warn "Can't unload vboxguest module."
return 1
fi
fi
}
load_rc_config $name
: ${vboxguest_enable="NO"}
run_rc_command "$1"
|