summarylogtreecommitdiffstats
path: root/nvidia-beta-dkms.install
blob: e53943333317a2e88380bc363c6e5a953f691a85 (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
# 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"
}

# 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: