summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Marc Lenoir2021-08-01 14:36:29 +0200
committerJean-Marc Lenoir2021-08-01 14:36:29 +0200
commitaa10fb6029b2de2a8adfd5372de87717779634de (patch)
tree8a902fa2bfbb7541b9c934eb925a7496033db979
parent3384179db07e17440830ec53f82b25626c691305 (diff)
downloadaur-aa10fb6029b2de2a8adfd5372de87717779634de.tar.gz
Implement .path units to start services only when a VM is started
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD8
-rw-r--r--vmware-networks.path8
-rw-r--r--vmware-usbarbitrator.path8
-rw-r--r--vmware-workstation.install19
5 files changed, 42 insertions, 5 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 01c3a03dd95..35e0758bdc8 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -58,6 +58,8 @@ pkgbase = vmware-workstation14
source = vmware-networks-configuration.service
source = vmware-networks.service
source = vmware-usbarbitrator.service
+ source = vmware-networks.path
+ source = vmware-usbarbitrator.path
source = dkms.conf.in
source = Makefile
source = vmmon.patch
@@ -80,6 +82,8 @@ pkgbase = vmware-workstation14
sha256sums = 9b4fbe0ba83f761a2eb9ecd05d48428f8b0a5b3abd8404ccbd928408e682f02b
sha256sums = c0a5aea785db06921fb350d36d5e0fd9a14f5eee0c835686ec6fea1af8c92245
sha256sums = d7a9fbf39a0345ae2f14f7f389f30b1110f605d187e0c241e99bbb18993c250d
+ sha256sums = 16a73931894a65d43da489ff25d07647c0ecddf60d443b103bceca63504910fe
+ sha256sums = fe1b1be8297f4170406f97dd1f8b385d911faf45afe19cbc0c26b8092b3ddf8d
sha256sums = 10562d11d50edab9abc2b29c8948714edcb9b084f99b3766d07ddd21259e372e
sha256sums = 273d4357599a3e54259c78cc49054fef8ecfd2c2eda35cbcde3a53a62777a5ac
sha256sums = 078dc018bab0cb115e610a19ddd85778664cda6a0878bac8f65a4615d35db279
diff --git a/PKGBUILD b/PKGBUILD
index 28ee32b9825..973381d7cc6 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -88,6 +88,8 @@ source=(
'vmware-networks-configuration.service'
'vmware-networks.service'
'vmware-usbarbitrator.service'
+ 'vmware-networks.path'
+ 'vmware-usbarbitrator.path'
'dkms.conf.in'
'Makefile'
@@ -116,6 +118,8 @@ sha256sums=(
'9b4fbe0ba83f761a2eb9ecd05d48428f8b0a5b3abd8404ccbd928408e682f02b'
'c0a5aea785db06921fb350d36d5e0fd9a14f5eee0c835686ec6fea1af8c92245'
'd7a9fbf39a0345ae2f14f7f389f30b1110f605d187e0c241e99bbb18993c250d'
+ '16a73931894a65d43da489ff25d07647c0ecddf60d443b103bceca63504910fe'
+ 'fe1b1be8297f4170406f97dd1f8b385d911faf45afe19cbc0c26b8092b3ddf8d'
'10562d11d50edab9abc2b29c8948714edcb9b084f99b3766d07ddd21259e372e'
'273d4357599a3e54259c78cc49054fef8ecfd2c2eda35cbcde3a53a62777a5ac'
@@ -333,7 +337,9 @@ fi
vmware-authd.service \
vmware-networks-configuration.service \
vmware-networks.service \
- vmware-usbarbitrator.service
+ vmware-usbarbitrator.service \
+ vmware-networks.path \
+ vmware-usbarbitrator.path
do
install -Dm 644 \
"$srcdir/$service_file" \
diff --git a/vmware-networks.path b/vmware-networks.path
new file mode 100644
index 00000000000..fb53ff4ba64
--- /dev/null
+++ b/vmware-networks.path
@@ -0,0 +1,8 @@
+[Unit]
+Description=Monitor to Load-On-Demand the VMware Networks service
+
+[Path]
+PathExistsGlob=/var/run/vmware/*/*
+
+[Install]
+WantedBy=paths.target
diff --git a/vmware-usbarbitrator.path b/vmware-usbarbitrator.path
new file mode 100644
index 00000000000..e56473635d8
--- /dev/null
+++ b/vmware-usbarbitrator.path
@@ -0,0 +1,8 @@
+[Unit]
+Description=Monitor to Load-On-Demand the VMware USB Arbitrator
+
+[Path]
+PathExistsGlob=/var/run/vmware/*/*
+
+[Install]
+WantedBy=paths.target
diff --git a/vmware-workstation.install b/vmware-workstation.install
index 36f5a3505e4..84025a35fb4 100644
--- a/vmware-workstation.install
+++ b/vmware-workstation.install
@@ -2,14 +2,25 @@ post_install() {
cat << EOF
==> Before using VMware, you need to reboot or load vmw_vmci and vmmon kernel modules (in a terminal on root: modprobe -a vmw_vmci vmmon)
-==> You may also need to enable some of these services:
-- vmware-networks.service: to have network access inside VMs
-- vmware-usbarbitrator.service: to connect USB devices inside VMs
-- vmware-hostd.service: to share VMs on the network
+==> You may also need to enable some of the following services:
+- vmware-networks: to have network access inside VMs
+- vmware-usbarbitrator: to connect USB devices inside VMs
+- vmware-hostd: to share VMs on the network
+These services can be activated during boot by enabling .service units or only when a VM is started by enabling .path units (except for vmware-hostd).
EOF
}
+post_upgrade() {
+ if (( $(vercmp "$2" "14.1.7-11") < 0 )); then
+ cat << EOF
+
+Now vmware-networks and vmware-usbarbitrator services can be activated only when a VM is started by enabling .path units instead of .service units.
+
+EOF
+ fi
+}
+
post_remove() {
cat << EOF