summarylogtreecommitdiffstats
path: root/moxa-mxu11x0-install.sh
blob: 93677690b8be2514c96b2d85a4dea83bf1e69ce4 (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
_pkgname='moxa-mxu11x0'
_modulename='mxu11x0'
_builtinmod='ti_usb_3410_5052'

post_upgrade() {
  set -u
  if [ ! -d "/usr/src/${_pkgname}"-*/ ]; then
    # depmod -a # now done by pacman hook
    modprobe -r "${_builtinmod}"
    modprobe "${_modulename}"
  fi
  set +u
}

post_install() {
  post_upgrade
}

pre_remove() {
  set -u
  if [ ! -d "/usr/src/${_pkgname}"-*/ ]; then
    modprobe -r "${_modulename}"
    modprobe "${_builtinmod}"
  fi
  set +u
}