blob: efa2236ae7fc88ac9d3349b256f82291a9c34591 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#!/bin/sh
#
# Unload cdce kernel module if necessary
#
# $FreeBSD$
#
if [ "x$2" != "xDEINSTALL" ]; then
exit 0
fi
echo "Disabling if_cdce."
# Unload if_cdce kernel module
kldstat -n if_cdce 2>/dev/null >/dev/null && kldunload if_cdce
# Remove kernel module
if [ `sysctl -n kern.osreldate` -ge 500000 ]; then
KMODDIR="/boot/modules"
else
KMODDIR="/modules"
fi
[ -f ${KMODDIR}/if_cdce.ko ] && rm -f ${KMODDIR}/if_cdce.ko
|