freebsd-ports/sysutils/ipmi-kmod/pkg-deinstall
Kirill Ponomarev 88d6dcc393 Add ipmi-kmod 20060418, backport of ipmi driver from FreeBSD 7-CURRENT
for FreeBSD 6.x.

PR:		ports/96324
Submitted by:	Nick Barkas <snb@threerings.net>
2006-05-01 17:24:35 +00:00

20 lines
380 B
Bash

#!/bin/sh
#
# Unload ipmi module if necessary, then remove the file
#
# $FreeBSD$
#
if [ "x$2" != "xDEINSTALL" ]; then
exit 0
fi
echo "Unloading ipmi kernel module."
# Unload the module if it is currently loaded.
kldstat -n ipmi 2>/dev/null >/dev/null && kldunload ipmi
# Now remove the .ko file
KMODDIR="/boot/modules"
[ -f ${KMODDIR}/ipmi.ko ] && rm -f ${KMODDIR}/ipmi.ko