summarylogtreecommitdiffstats
path: root/notes.install
blob: 11c45bea26faad1550c4f8bcc19f2a1ba406c5c0 (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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
BOLD='\033[1m'
GREEN='\033[32m'
RESET='\033[0m'

msg_replug() {
	echo -e "${BOLD}${GREEN}Replug${RESET} your tablet if it is connected. This will re-trigger the udev rules accordingly."
	echo
}

msg_starting() {
	echo "The daemon can be started with:"
	echo -e "  $ ${GREEN}otd${RESET}"
	echo "You can fork it to the background and use output redirection to a log file if desired."
	echo "A systemd user service is also provided and can be used instead:"
	echo -e "  $ ${GREEN}systemctl --user enable --now opentabletdriver.service${RESET}"
	echo
}

msg_modules() {
	echo "You will have to manually disable built-in kernel modules in order for this driver to work properly."
	echo -e "This can be done by blacklisting the kernel module by creating a file in ${GREEN}/etc/modprobe.d/blacklist.conf${RESET} with a single line:"
	echo -e "    ${GREEN}blacklist <module>${RESET}"
	echo "Where <module> is 'wacom' if you own a wacom tablet, and 'hid_uclogic' otherwise."
	echo "To unload the module immediately, run:"
	echo -e "  # ${GREEN}rmmod <module>${RESET}"
	echo
}

msg_faq() {
	echo -e "In the case that you still have issues after following these instructions, the FAQ at ${GREEN}https://github.com/InfinityGhost/OpenTabletDriver/wiki/Linux-FAQ${RESET} may help."
	echo
}


msg_upgrade_starting() {
	if [ $(vercmp $1 'v0.4.2.r282.g4372321-2') -gt -1 ]
	then
		return 0
	fi

	echo "The method of starting the daemon has changed since your previous version of OpenTabletDriver."
	msg_starting
}

msg_upgrade_systemd() {
	if [ $(vercmp $1 'v0.5.0.r59.g6780778-2') -gt -1 ]
	then
		return 0
	fi

	echo "OpenTabletDriver's systemd user service has been updated since your previous version"
	echo "To make systemd aware of this and apply changes immediately, please run the following commands:"
	echo -e "${GREEN}systemctl --user daemon-reload"
	echo    "systemctl --user reenable opentabletdriver.service"
	echo -e "systemctl --user restart opentabletdriver.service${RESET}"
	echo
}


post_install() {
	echo
	echo -e "${BOLD}Welcome to OpenTabletDriver!${RESET}"
	echo "In order to start using this driver, there are certain things that have to be configured manually."
	echo
	msg_replug
	msg_starting
	msg_modules
	msg_faq
}

post_upgrade() {
	msg_upgrade_starting $2
	msg_upgrade_systemd $2
}