blob: 47ceb24b2c003460433647950f001af9f94665da (
plain)
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
|
#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: vmware-guestd
# REQUIRE: DAEMON
# BEFORE: LOGIN
# KEYWORD: FreeBSD
PREFIX=%%PREFIX%%
. %%RC_SUBR%%
# Global
checkvm_cmd="${PREFIX}/sbin/vmware-checkvm > /dev/null"
# Functions
vmware_guest_kmod_start()
{
echo 'Loading vmmemctl kernel module.'
kldload ${PREFIX}/lib/vmware-tools/modules/vmmemctl.ko >/dev/null 2>&1
}
# VMware kernel modules
name="vmware_guest_kmod"
rcvar=`set_rcvar`
start_precmd="${checkvm_cmd}"
start_cmd="vmware_guest_kmod_start"
stop_precmd="${checkvm_cmd}"
stop_cmd=":"
load_rc_config $name
[ -z "$vmware_guest_kmod_enable" ] && vmware_guest_kmod_enable="NO"
run_rc_command "$1"
# VMware guest daemon
name="vmware_guestd"
rcvar=`set_rcvar`
start_precmd="${checkvm_cmd}"
unset start_cmd
stop_precmd="${checkvm_cmd}"
unset stop_cmd
command="${PREFIX}/sbin/vmware-guestd"
command_args=">/dev/null 2>&1"
pidfile="/var/run/${name}.pid"
load_rc_config $name
[ -z "$vmware_guestd_enable" ] && vmware_guestd_enable="YES"
[ -z "$vmware_guestd_flags" ] && vmware_guestd_flags="--background ${pidfile}"
run_rc_command "$1"
|