summarylogtreecommitdiffstats
path: root/vmware-horizon-client.install
blob: dcb15df5f0fdf16da6140d4d0d5312535232a039 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/bin/sh

eol_message() {
  cat <<-EOM
	 >   _      __              _
	 >  | | /| / /__ ________  (_)__  ___ __
	 >  | |/ |/ / _ `/ __/ _ \/ / _ \/ _ `(_)
	 >  |__/|__/\_,_/_/ /_//_/_/_//_/\_, (_)
	 >                              /___/
	 > VMware was aquired by Broadcom, and renamed to Omnissa. Now this package
	 > is EOL (end of life). Please replace it with new 'omnissa-horizon-client'!
	EOM
}

EULA() {
  cat <<-EOM

	 > By installing this package you acknowledge that you agree to the End-User
	 > License Agreement (EULA) found in /usr/share/doc/omnissa-horizon-client/.
	 > If you do not agree to Omnissa EULA remove this package immediately:
	 >  $ pacman -Rc omnissa-horizon-client
	EOM
}

hosts_add() {
  if ! grep -q 'view-localhost' /etc/hosts; then
    echo '127.0.0.2 view-localhost # added by vmware-horizon-client' >> /etc/hosts
  fi
}

hosts_remove() {
  sed -i '/view-localhost/d' /etc/hosts
}

post_install() {
  eol_message
  EULA
  hosts_add
}

post_upgrade() {
  eol_message
  hosts_add
}

post_remove() {
  hosts_remove
}