File vmware-workstation-2xHx-lite.install of Package vmware-workstation-2xHx-lite

post_install() {
  # Enable and start VMware services
  echo "==> Enabling and starting VMware services..."
  systemctl enable --now vmware-networks.service
  systemctl enable --now vmware-usbarbitrator.service

  cat << EOF

==> VMware services have been automatically enabled and started.
==> For the changes to take full effect, a reboot is recommended.

EOF
}

post_upgrade() {
  if (( $(vercmp "$2" "16.1.2-2") < 0 )); then
  cat << EOF

Now VMware services can be activated only when a VM is started by enabling .path units instead of .service units.

EOF
  fi
}

post_remove() {
  echo "==> Cleaning up VMware installation..."

  if [ -d "/etc/vmware" ]; then
    echo "Removing /etc/vmware directory..."
    rm -rf "/etc/vmware"
  fi

  if [ -d "/etc/vmware-installer" ]; then
    echo "Removing /etc/vmware-installer directory..."
    rm -rf "/etc/vmware-installer"
  fi

  if [ -d "/usr/lib/vmware-installer" ]; then
    echo "Removing /usr/lib/vmware-installer directory..."
    rm -rf "/usr/lib/vmware-installer"
  fi

  cat << EOF

==> VMware directories have been automatically removed.

EOF
}
openSUSE Build Service is sponsored by