From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 31C0A139696 for ; Tue, 23 May 2017 23:26:59 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 68BECE0DA4; Tue, 23 May 2017 23:26:58 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 3671AE0D92 for ; Tue, 23 May 2017 23:26:57 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id B176D341762 for ; Tue, 23 May 2017 23:26:56 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 57D48743E for ; Tue, 23 May 2017 23:26:55 +0000 (UTC) From: "Fabio Rossi" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Fabio Rossi" Message-ID: <1495315093.c825cf260f3730b510e135657a6d355800801f0e.fabio@gentoo> Subject: [gentoo-commits] proj/vmware:master commit in: app-emulation/vmware-workstation/files/, app-emulation/vmware-player/files/ X-VCS-Repository: proj/vmware X-VCS-Files: app-emulation/vmware-player/files/vmware-11.2.rc app-emulation/vmware-player/files/vmware-12.1.rc app-emulation/vmware-player/files/vmware-12.5.rc app-emulation/vmware-workstation/files/vmware-11.0.rc app-emulation/vmware-workstation/files/vmware-11.1.rc app-emulation/vmware-workstation/files/vmware-11.2.rc app-emulation/vmware-workstation/files/vmware-12.1.rc app-emulation/vmware-workstation/files/vmware-12.5.rc app-emulation/vmware-workstation/files/vmware-9.0.rc X-VCS-Directories: app-emulation/vmware-player/files/ app-emulation/vmware-workstation/files/ X-VCS-Committer: fabio X-VCS-Committer-Name: Fabio Rossi X-VCS-Revision: c825cf260f3730b510e135657a6d355800801f0e X-VCS-Branch: master Date: Tue, 23 May 2017 23:26:55 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: d480cb42-37d7-4eb4-8720-73409434fdd2 X-Archives-Hash: e6a31f83921e95bfe541f3893c90e659 commit: c825cf260f3730b510e135657a6d355800801f0e Author: Fabio Rossi inwind it> AuthorDate: Sat May 20 21:18:13 2017 +0000 Commit: Fabio Rossi inwind net> CommitDate: Sat May 20 21:18:13 2017 +0000 URL: https://gitweb.gentoo.org/proj/vmware.git/commit/?id=c825cf26 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. app-emulation/vmware-player/files/vmware-11.2.rc | 66 ++++++++++++++++++--- app-emulation/vmware-player/files/vmware-12.1.rc | 68 ++++++++++++++++++---- app-emulation/vmware-player/files/vmware-12.5.rc | 68 ++++++++++++++++++---- .../vmware-workstation/files/vmware-11.0.rc | 66 ++++++++++++++++++--- .../vmware-workstation/files/vmware-11.1.rc | 66 ++++++++++++++++++--- .../vmware-workstation/files/vmware-11.2.rc | 66 ++++++++++++++++++--- .../vmware-workstation/files/vmware-12.1.rc | 66 ++++++++++++++++++--- .../vmware-workstation/files/vmware-12.5.rc | 66 ++++++++++++++++++--- .../vmware-workstation/files/vmware-9.0.rc | 67 +++++++++++++++++++-- 9 files changed, 519 insertions(+), 80 deletions(-) diff --git a/app-emulation/vmware-player/files/vmware-11.2.rc b/app-emulation/vmware-player/files/vmware-11.2.rc index 3437207..38524b2 100644 --- a/app-emulation/vmware-player/files/vmware-11.2.rc +++ b/app-emulation/vmware-player/files/vmware-11.2.rc @@ -15,13 +15,37 @@ start() { eend $? ebegin Starting VMware services - # quiet for vmci because it may not be there - modprobe -vq vmci || modprobe -v vmw_vmci - eend $? + # 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 - # vmci or vmw_vmci was loaded by the previous modprobe + # 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 vsock vmblock vmnet + modprobe -av vmmon vmblock vmnet eend $? @@BINDIR@@/vmware-networks --start eend $? @@ -35,10 +59,34 @@ stop() { @@BINDIR@@/vmware-networks --stop eend $? ebegin Stopping VMware services - modprobe -rv vsock vmmon vmblock vmnet + modprobe -rv vmmon vmblock vmnet eend $? - # quiet for vmci because it may not be there - modprobe -rvq vmci || modprobe -rv vmw_vmci - 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 } diff --git a/app-emulation/vmware-player/files/vmware-12.1.rc b/app-emulation/vmware-player/files/vmware-12.1.rc index 14ff124..38524b2 100644 --- a/app-emulation/vmware-player/files/vmware-12.1.rc +++ b/app-emulation/vmware-player/files/vmware-12.1.rc @@ -1,7 +1,7 @@ #!/sbin/openrc-run # Copyright 1999-2014 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: $ +# $Id$ depend() { need localmount @@ -15,13 +15,37 @@ start() { eend $? ebegin Starting VMware services - # quiet for vmci because it may not be there - modprobe -vq vmci || modprobe -v vmw_vmci - eend $? + # 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 - # vmci or vmw_vmci was loaded by the previous modprobe + # 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 vsock vmblock vmnet + modprobe -av vmmon vmblock vmnet eend $? @@BINDIR@@/vmware-networks --start eend $? @@ -35,10 +59,34 @@ stop() { @@BINDIR@@/vmware-networks --stop eend $? ebegin Stopping VMware services - modprobe -rv vsock vmmon vmblock vmnet + modprobe -rv vmmon vmblock vmnet eend $? - # quiet for vmci because it may not be there - modprobe -rvq vmci || modprobe -rv vmw_vmci - 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 } diff --git a/app-emulation/vmware-player/files/vmware-12.5.rc b/app-emulation/vmware-player/files/vmware-12.5.rc index 14ff124..38524b2 100644 --- a/app-emulation/vmware-player/files/vmware-12.5.rc +++ b/app-emulation/vmware-player/files/vmware-12.5.rc @@ -1,7 +1,7 @@ #!/sbin/openrc-run # Copyright 1999-2014 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: $ +# $Id$ depend() { need localmount @@ -15,13 +15,37 @@ start() { eend $? ebegin Starting VMware services - # quiet for vmci because it may not be there - modprobe -vq vmci || modprobe -v vmw_vmci - eend $? + # 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 - # vmci or vmw_vmci was loaded by the previous modprobe + # 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 vsock vmblock vmnet + modprobe -av vmmon vmblock vmnet eend $? @@BINDIR@@/vmware-networks --start eend $? @@ -35,10 +59,34 @@ stop() { @@BINDIR@@/vmware-networks --stop eend $? ebegin Stopping VMware services - modprobe -rv vsock vmmon vmblock vmnet + modprobe -rv vmmon vmblock vmnet eend $? - # quiet for vmci because it may not be there - modprobe -rvq vmci || modprobe -rv vmw_vmci - 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 } diff --git a/app-emulation/vmware-workstation/files/vmware-11.0.rc b/app-emulation/vmware-workstation/files/vmware-11.0.rc index 3437207..38524b2 100644 --- a/app-emulation/vmware-workstation/files/vmware-11.0.rc +++ b/app-emulation/vmware-workstation/files/vmware-11.0.rc @@ -15,13 +15,37 @@ start() { eend $? ebegin Starting VMware services - # quiet for vmci because it may not be there - modprobe -vq vmci || modprobe -v vmw_vmci - eend $? + # 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 - # vmci or vmw_vmci was loaded by the previous modprobe + # 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 vsock vmblock vmnet + modprobe -av vmmon vmblock vmnet eend $? @@BINDIR@@/vmware-networks --start eend $? @@ -35,10 +59,34 @@ stop() { @@BINDIR@@/vmware-networks --stop eend $? ebegin Stopping VMware services - modprobe -rv vsock vmmon vmblock vmnet + modprobe -rv vmmon vmblock vmnet eend $? - # quiet for vmci because it may not be there - modprobe -rvq vmci || modprobe -rv vmw_vmci - 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 } diff --git a/app-emulation/vmware-workstation/files/vmware-11.1.rc b/app-emulation/vmware-workstation/files/vmware-11.1.rc index 3437207..38524b2 100644 --- a/app-emulation/vmware-workstation/files/vmware-11.1.rc +++ b/app-emulation/vmware-workstation/files/vmware-11.1.rc @@ -15,13 +15,37 @@ start() { eend $? ebegin Starting VMware services - # quiet for vmci because it may not be there - modprobe -vq vmci || modprobe -v vmw_vmci - eend $? + # 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 - # vmci or vmw_vmci was loaded by the previous modprobe + # 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 vsock vmblock vmnet + modprobe -av vmmon vmblock vmnet eend $? @@BINDIR@@/vmware-networks --start eend $? @@ -35,10 +59,34 @@ stop() { @@BINDIR@@/vmware-networks --stop eend $? ebegin Stopping VMware services - modprobe -rv vsock vmmon vmblock vmnet + modprobe -rv vmmon vmblock vmnet eend $? - # quiet for vmci because it may not be there - modprobe -rvq vmci || modprobe -rv vmw_vmci - 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 } diff --git a/app-emulation/vmware-workstation/files/vmware-11.2.rc b/app-emulation/vmware-workstation/files/vmware-11.2.rc index 3437207..38524b2 100644 --- a/app-emulation/vmware-workstation/files/vmware-11.2.rc +++ b/app-emulation/vmware-workstation/files/vmware-11.2.rc @@ -15,13 +15,37 @@ start() { eend $? ebegin Starting VMware services - # quiet for vmci because it may not be there - modprobe -vq vmci || modprobe -v vmw_vmci - eend $? + # 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 - # vmci or vmw_vmci was loaded by the previous modprobe + # 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 vsock vmblock vmnet + modprobe -av vmmon vmblock vmnet eend $? @@BINDIR@@/vmware-networks --start eend $? @@ -35,10 +59,34 @@ stop() { @@BINDIR@@/vmware-networks --stop eend $? ebegin Stopping VMware services - modprobe -rv vsock vmmon vmblock vmnet + modprobe -rv vmmon vmblock vmnet eend $? - # quiet for vmci because it may not be there - modprobe -rvq vmci || modprobe -rv vmw_vmci - 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 } diff --git a/app-emulation/vmware-workstation/files/vmware-12.1.rc b/app-emulation/vmware-workstation/files/vmware-12.1.rc index 3437207..38524b2 100644 --- a/app-emulation/vmware-workstation/files/vmware-12.1.rc +++ b/app-emulation/vmware-workstation/files/vmware-12.1.rc @@ -15,13 +15,37 @@ start() { eend $? ebegin Starting VMware services - # quiet for vmci because it may not be there - modprobe -vq vmci || modprobe -v vmw_vmci - eend $? + # 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 - # vmci or vmw_vmci was loaded by the previous modprobe + # 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 vsock vmblock vmnet + modprobe -av vmmon vmblock vmnet eend $? @@BINDIR@@/vmware-networks --start eend $? @@ -35,10 +59,34 @@ stop() { @@BINDIR@@/vmware-networks --stop eend $? ebegin Stopping VMware services - modprobe -rv vsock vmmon vmblock vmnet + modprobe -rv vmmon vmblock vmnet eend $? - # quiet for vmci because it may not be there - modprobe -rvq vmci || modprobe -rv vmw_vmci - 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 } diff --git a/app-emulation/vmware-workstation/files/vmware-12.5.rc b/app-emulation/vmware-workstation/files/vmware-12.5.rc index 3437207..38524b2 100644 --- a/app-emulation/vmware-workstation/files/vmware-12.5.rc +++ b/app-emulation/vmware-workstation/files/vmware-12.5.rc @@ -15,13 +15,37 @@ start() { eend $? ebegin Starting VMware services - # quiet for vmci because it may not be there - modprobe -vq vmci || modprobe -v vmw_vmci - eend $? + # 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 - # vmci or vmw_vmci was loaded by the previous modprobe + # 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 vsock vmblock vmnet + modprobe -av vmmon vmblock vmnet eend $? @@BINDIR@@/vmware-networks --start eend $? @@ -35,10 +59,34 @@ stop() { @@BINDIR@@/vmware-networks --stop eend $? ebegin Stopping VMware services - modprobe -rv vsock vmmon vmblock vmnet + modprobe -rv vmmon vmblock vmnet eend $? - # quiet for vmci because it may not be there - modprobe -rvq vmci || modprobe -rv vmw_vmci - 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 } 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 }