#!/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 on boot time? [ 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
rel='vcs-git' href='https://www.csie.ntu.edu.tw/~b01902062/git/freebsd-ports-gnome' title='freebsd-ports-gnome Git repository'/>