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

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