freebsd-ports/security/dazuko/pkg-install
Jose Alonso Cardenas Marquez 892a3a954e - Update to 2.3.9
- Remove BROKEN on > 8.x
2011-06-24 21:10:22 +00:00

33 lines
761 B
Bash

#!/bin/sh
if [ "$2" = "POST-INSTALL" ]; then
MODULENAME=dazuko
echo -n "Do you want load ${MODULENAME}.ko? [ y/n ]: "
read LOADMOD
echo
if [ x"${LOADMOD}" = x"y" ]; then
kldstat -n ${MODULENAME} > /dev/null 2>&1; RESULT=$?
if [ ${RESULT} -eq 0 ]; then
kldunload -f -n ${MODULENAME}
fi
kldload ${MODULENAME}
fi
echo -n "Do you want load ${MODULENAME}.ko in /etc/rc.local file? [ y/n ]: "
read BOOTMOD
echo
if [ x"${BOOTMOD}" = x"y" ]; then
cat /etc/rc.local | grep ${MODULENAME} > /dev/null 2>&1; RESULT=$?
if [ ${RESULT} -eq 0 ]; then
sed -i '' -e '/kldload ${MODULENAME}.*/d' /etc/rc.local
echo `which kldload` ${MODULENAME} >> /etc/rc.local
else
echo `which kldload` ${MODULENAME} >> /etc/rc.local
fi
fi
fi
exit 0