summarylogtreecommitdiffstats
path: root/bcwc-pcie-dkms.install
blob: 9b9fdb1bbe5a62b8e9b759ab3cbe0d239e1a7a6e (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
post_install() {
  dkms_install $1
}

pre_upgrade() {
  dkms_remove $2
}

post_upgrade() {
  dkms_install $1
}

pre_remove () {
  dkms_remove $1
}

dkms_remove() {
  local line=`dkms status -m bcwc-pcie`
  if echo "$line" | grep -E 'added|built|installed'; then
    dkms remove -m bcwc-pcie -v ${1%%-*} --all
  fi
}

dkms_install() {
  dkms install -m bcwc-pcie -v ${1%%-*}
  modprobe facetimehd

  /usr/bin/depmod -a
}