-
Notifications
You must be signed in to change notification settings - Fork 2
/
vmware-patch.install
52 lines (42 loc) · 1.34 KB
/
vmware-patch.install
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
49
50
51
52
# Colored makepkg-like functions
msg_blue() {
printf "${blue}==>${bold} $1${all_off}\n"
}
note_blue() {
printf "${blue}==>${yellow} Note $1)${bold} $2${all_off}\n"
}
note_green() {
printf "${green}==>${yellow} Note:${bold} $1${all_off}\n"
}
all_off="$(tput sgr0)"
bold="${all_off}$(tput bold)"
blue="${bold}$(tput setaf 4)"
green="${bold}$(tput setaf 2)"
yellow="${bold}$(tput setaf 3)"
_common() {
vmware-patch
echo
note_blue 1 "Enabling the main service is *required* to automatically load modules on boot:
# systemctl enable vmware"
note_blue 2 "To patch VMware sources in the future, re-run the script 'vmware-patch' as root.
Changes can be reverted with 'vmware-unpatch' (only required to apply other
patching methods)."
note_blue 3 "For further reading see the relevant sections in the Wiki:
https://wiki.archlinux.org/index.php/Vmware#Tips_and_tricks
https://wiki.archlinux.org/index.php/Vmware#Troubleshooting"
echo
}
post_install() {
msg_blue "Running 'vmware-patch' for the first time.."
_common
}
post_upgrade() {
msg_blue "Re-running 'vmware-patch'.."
_common
}
post_remove() {
if [[ -d /usr/lib/vmware/modules/source-* ]]; then
echo
note_green "Left '$(ls -d /usr/lib/vmware/modules/source-*/)' as backup.\n"
fi
}