blob: d9b7a1306d185035614d1c0ebcc02ca87a3100e4 (
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
|
# arg 1: the new package version
post_install() {
dkms add nvidia/${1%-*}
dkms install -m nvidia/${1%-*}
echo "==> To build your modules automatically at startup, run:"
echo " # systemctl enable dkms"
echo ":: NOTE: You may want to stick to .27: https://devtalk.nvidia.com/default/topic/950647/linux/black-screen-with-367-35/"
}
# arg 1: the new package version
# arg 2: the old package versio
pre_upgrade() {
pre_remove "$2"
}
# arg 1: the new package version
# arg 2: the old package version
post_upgrade() {
post_install "$1"
}
# arg 1: the old package version
pre_remove() {
# Remove modules using dkms
[ -n "${1%-*}" ] && dkms remove -m nvidia/${1%-*} --all || true
}
# vim: ts=2 sw=2 et:
|