summaryrefslogtreecommitdiff
blob: 2ba649336fdfac2e1df77d0150ffe35e6d8e9f4f (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
#!/sbin/openrc-run
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

depend() {
	need localmount
	use net
}

start() {
	ebegin Starting VMware USB Arbitrator
	#start-stop-daemon --start --exec @@BINDIR@@/vmware-usbarbitrator
	@@BINDIR@@/vmware-usbarbitrator 
	eend $?
	ebegin Starting VMware services
	
	# quiet for vmci because it may not be there
	modprobe -vq vmci || modprobe -v vmw_vmci
	eend $?
	
	# vmci or vmw_vmci was loaded by the previous modprobe 
	# no need to do it here
	modprobe -av vmmon vsock vmblock vmnet 
	eend $?
	@@BINDIR@@/vmware-networks --start
	eend $?
}

stop() {
	ebegin Stopping VMware USB Arbitrator
	#start-stop-daemon --stop --exec @@BINDIR@@/vmware-usbarbitrator
	killall --wait @@BINDIR@@/vmware-usbarbitrator 
	eend $?
	@@BINDIR@@/vmware-networks --stop 
	eend $?
	ebegin Stopping VMware services
	modprobe -rv vsock vmmon vmblock vmnet
	eend $?
	
	# quiet for vmci because it may not be there
	modprobe -rvq vmci || modprobe -rv vmw_vmci
	eend $?
}