blob: f9303eed3fd6f81242becea47fa1b2d1160a5f75 (
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
|
_pkgname='sunix-snx'
_modulename='snx'
post_upgrade() {
set -u
if [ ! -d "/usr/src/${_pkgname}"-*/ ]; then
depmod -a
if ! lsmod | cut -d' ' -f1 | grep -q "^${_modulename}"'$'; then
#echo 'Reboot or load now with:'
#echo " sudo modprobe '${_modulename}'"
modprobe "${_modulename}"
fi
fi
set +u
}
post_install() {
post_upgrade
}
pre_remove() {
set -u
if [ ! -d "/usr/src/${_pkgname}"-*/ ]; then
rmmod "${_modulename}"
fi
set +u
}
|