summarylogtreecommitdiffstats
path: root/r8168-dkms.install
blob: 70eaa49a9bf279cefb80fe62567f5147b15ecd55 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
post_install() {
  dkms add r8168/${1%-*}
  cat << EOF
==> 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
}