summarylogtreecommitdiffstats
path: root/r8168-dkms.install
blob: 41b01ecaf78cea6ce9cbf3db16dd0e855307f4d2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
post_install() {
  dkms add r8168/${1%-*}
  cat << EOF
==> To build and install your modules run: dkms install r8168/${1%-*}
==> To do this automatically at startup run: systemctl enable dkms.service
==> The module r8168 conflicts with r8169. You can blacklist it with:
==> echo "blacklist r8169" > /etc/modprobe.d/r8169_blacklist.conf
EOF
}

pre_upgrade() {
  pre_remove "$2"
}

post_upgrade() {
  post_install "$1"
}

pre_remove() {
  [ -n "${1%-*}" ] && dkms remove r8168/${1%-*} --all &>/dev/null || true
}