Improve install/deinstall scripts and make use of SUB_FILES to avoid hardcoding paths. Add support for FreeBSD 5.3 and later. PR: ports/97331 Submitted by: Nick Barkas <snb@threerings.net> (maintainer) Obtained from: Dmitry Frolov <frolov@riss-telecom.ru>
20 lines
352 B
Bash
20 lines
352 B
Bash
#!/bin/sh
|
|
#
|
|
# Unload ipmi module if necessary
|
|
#
|
|
# $FreeBSD$
|
|
#
|
|
|
|
KMODDIR="%%KMODDIR%%"
|
|
|
|
case "$2" in
|
|
DEINSTALL)
|
|
echo "Unloading ipmi kernel module."
|
|
|
|
# Unload the module if it is currently loaded.
|
|
kldstat -n ipmi 2>/dev/null >/dev/null && kldunload ipmi || true
|
|
;;
|
|
POST-DEINSTALL)
|
|
type kldxref >/dev/null 2>&1 && kldxref ${KMODDIR} || true
|
|
;;
|
|
esac
|