diff options
author | Jean-Marc Lenoir | 2021-08-01 14:20:02 +0200 |
---|---|---|
committer | Jean-Marc Lenoir | 2021-08-01 14:20:02 +0200 |
commit | 4984b963b055f73e9dea16976cdbd147ae51c15a (patch) | |
tree | fabe5f15e842251da1016d83833bf1c0e3f47ef1 | |
parent | 6434678fc59a9f41eeec76fe2e0b16b84c3c0c26 (diff) | |
download | aur-4984b963b055f73e9dea16976cdbd147ae51c15a.tar.gz |
Implement .path units to start services only when a VM is started
-rw-r--r-- | .SRCINFO | 4 | ||||
-rw-r--r-- | PKGBUILD | 8 | ||||
-rw-r--r-- | vmware-networks.path | 8 | ||||
-rw-r--r-- | vmware-usbarbitrator.path | 8 | ||||
-rw-r--r-- | vmware-workstation.install | 19 |
5 files changed, 42 insertions, 5 deletions
@@ -56,6 +56,8 @@ pkgbase = vmware-workstation15 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 @@ -78,6 +80,8 @@ pkgbase = vmware-workstation15 sha256sums = 9b4fbe0ba83f761a2eb9ecd05d48428f8b0a5b3abd8404ccbd928408e682f02b sha256sums = c0a5aea785db06921fb350d36d5e0fd9a14f5eee0c835686ec6fea1af8c92245 sha256sums = d7a9fbf39a0345ae2f14f7f389f30b1110f605d187e0c241e99bbb18993c250d + sha256sums = 16a73931894a65d43da489ff25d07647c0ecddf60d443b103bceca63504910fe + sha256sums = fe1b1be8297f4170406f97dd1f8b385d911faf45afe19cbc0c26b8092b3ddf8d sha256sums = 10562d11d50edab9abc2b29c8948714edcb9b084f99b3766d07ddd21259e372e sha256sums = 273d4357599a3e54259c78cc49054fef8ecfd2c2eda35cbcde3a53a62777a5ac sha256sums = c6192797745e19e6361e005adb98383f8877f0118e1db5c018c67cc88c7cb6e1 @@ -86,6 +86,8 @@ source=( 'vmware-networks-configuration.service' 'vmware-networks.service' 'vmware-usbarbitrator.service' + 'vmware-networks.path' + 'vmware-usbarbitrator.path' 'dkms.conf.in' 'Makefile' @@ -114,6 +116,8 @@ sha256sums=( '9b4fbe0ba83f761a2eb9ecd05d48428f8b0a5b3abd8404ccbd928408e682f02b' 'c0a5aea785db06921fb350d36d5e0fd9a14f5eee0c835686ec6fea1af8c92245' 'd7a9fbf39a0345ae2f14f7f389f30b1110f605d187e0c241e99bbb18993c250d' + '16a73931894a65d43da489ff25d07647c0ecddf60d443b103bceca63504910fe' + 'fe1b1be8297f4170406f97dd1f8b385d911faf45afe19cbc0c26b8092b3ddf8d' '10562d11d50edab9abc2b29c8948714edcb9b084f99b3766d07ddd21259e372e' '273d4357599a3e54259c78cc49054fef8ecfd2c2eda35cbcde3a53a62777a5ac' @@ -331,7 +335,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 000000000000..fb53ff4ba642 --- /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 000000000000..e56473635d8b --- /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 36f5a3505e48..1f95eead53ac 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" "15.5.7-4") < 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 |