diff options
author | 2017-05-20 23:18:13 +0200 | |
---|---|---|
committer | 2017-05-20 23:18:13 +0200 | |
commit | c825cf260f3730b510e135657a6d355800801f0e (patch) | |
tree | 40dea078a3f5c60b508296d66ed96b1351bf507f /app-emulation/vmware-workstation/files/vmware-9.0.rc | |
parent | adding support for 4.9 kernels to vmware-modules 304 (workstation 11) (diff) | |
download | vmware-c825cf260f3730b510e135657a6d355800801f0e.tar.gz vmware-c825cf260f3730b510e135657a6d355800801f0e.tar.bz2 vmware-c825cf260f3730b510e135657a6d355800801f0e.zip |
app-emulation/vmware-{player,workstation}: fix init.d when vsock/vmci are built into kernel
The old init scripts fail when the vsock/vmci are built into kernel
not as modules. This should close the bug #510156. The systemd services
fail but don't block the initialization so I haven't touched them.
Diffstat (limited to 'app-emulation/vmware-workstation/files/vmware-9.0.rc')
-rw-r--r-- | app-emulation/vmware-workstation/files/vmware-9.0.rc | 67 |
1 files changed, 61 insertions, 6 deletions
diff --git a/app-emulation/vmware-workstation/files/vmware-9.0.rc b/app-emulation/vmware-workstation/files/vmware-9.0.rc index b568831..38524b2 100644 --- a/app-emulation/vmware-workstation/files/vmware-9.0.rc +++ b/app-emulation/vmware-workstation/files/vmware-9.0.rc @@ -14,9 +14,38 @@ start() { @@BINDIR@@/vmware-usbarbitrator eend $? ebegin Starting VMware services - modprobe -v vmci || modprobe -v vmw_vmci - eend $? - modprobe -av vmmon vmci vsock vmblock vmnet + + # vmci might be: + # 1) built as external kernel module + # 2) built as internal kernel module (with name vmw_vmci) + # 3) embedded in the kernel + for mod in /lib/modules/$(uname -r)/misc/vmci.ko \ + /lib/modules/$(uname -r)/kernel/drivers/misc/vmw_vmci/vmw_vmci.ko ; + do + if [[ -f "${mod}" ]] ; then + modprobe -v $(basename "${mod}" .ko) + eend $? + break + fi + done + + # vsock might be: + # 1) built as external kernel module + # 2) built as internal kernel module (with name vmw_vsock_vmci_transport) + # 3) embedded in the kernel + for mod in /lib/modules/$(uname -r)/misc/vsock.ko \ + /lib/modules/$(uname -r)/kernel/net/vmw_vsock/vmw_vsock_vmci_transport.ko ; + do + if [[ -f "${mod}" ]] ; then + modprobe -v $(basename "${mod}" .ko) + eend $? + break + fi + done + + # vmci or vsock were already loaded by the previous modprobe, + # no need to do it here + modprobe -av vmmon vmblock vmnet eend $? @@BINDIR@@/vmware-networks --start eend $? @@ -30,8 +59,34 @@ stop() { @@BINDIR@@/vmware-networks --stop eend $? ebegin Stopping VMware services - modprobe -rv vsock vmmon vmblock vmnet - eend $? - modprobe -rv vmci || modprobe -rv vmw_vmci + modprobe -rv vmmon vmblock vmnet eend $? + + # vsock might be: + # 1) built as external kernel module + # 2) built as internal kernel module (with name vmw_vsock_vmci_transport) + # 3) embedded in the kernel + for mod in /lib/modules/$(uname -r)/misc/vsock.ko \ + /lib/modules/$(uname -r)/kernel/net/vmw_vsock/vmw_vsock_vmci_transport.ko ; + do + if [[ -f "${mod}" ]] ; then + modprobe -rv $(basename "${mod}" .ko) + eend $? + break + fi + done + + # vmci might be: + # 1) built as external kernel module + # 2) built as internal kernel module (with name vmw_vmci) + # 3) embedded in the kernel + for mod in /lib/modules/$(uname -r)/misc/vmci.ko \ + /lib/modules/$(uname -r)/kernel/drivers/misc/vmw_vmci/vmw_vmci.ko ; + do + if [[ -f "${mod}" ]] ; then + modprobe -rv $(basename "${mod}" .ko) + eend $? + break + fi + done } |